diff options
author | Florian Dold <florian@dold.me> | 2024-04-08 22:30:12 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-04-08 22:30:12 +0200 |
commit | 344d84f214bd3daf559ff888df36f8c5814accba (patch) | |
tree | 663a33dc5ca6bc687a7498358982335ef3f08826 /wallet | |
parent | 93d3bfb83da335d8e2ead90602a8d5861f7bf892 (diff) | |
download | docs-344d84f214bd3daf559ff888df36f8c5814accba.tar.gz docs-344d84f214bd3daf559ff888df36f8c5814accba.tar.bz2 docs-344d84f214bd3daf559ff888df36f8c5814accba.zip |
wallet-core docs
Diffstat (limited to 'wallet')
-rw-r--r-- | wallet/wallet-core.md | 157 |
1 files changed, 96 insertions, 61 deletions
diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md index 01c9d3da..8c600081 100644 --- a/wallet/wallet-core.md +++ b/wallet/wallet-core.md @@ -3,6 +3,7 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core ## Overview ### Unknown Group * [InitWalletOp](#initwalletop) +* [SetWalletRunConfigOp](#setwalletrunconfigop) * [GetVersionOp](#getversionop) ### Basic Wallet Information * [GetBalancesOp](#getbalancesop) @@ -112,6 +113,7 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core * [TestingWaitTransactionsFinalOp](#testingwaittransactionsfinalop) * [TestingWaitRefreshesFinalOp](#testingwaitrefreshesfinalop) * [TestingWaitTransactionStateOp](#testingwaittransactionstateop) +* [TestingPingOp](#testingpingop) * [TestingGetDenomStatsOp](#testinggetdenomstatsop) * [SetCoinSuspendedOp](#setcoinsuspendedop) * [ForceRefreshOp](#forcerefreshop) @@ -121,7 +123,7 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core /** * Initialize wallet-core. * - * Must be the request before any other operations. + * Must be the first request made to wallet-core. */ export type InitWalletOp = { op: WalletApiOperation.InitWallet; @@ -131,65 +133,20 @@ export type InitWalletOp = { // InitWallet = "initWallet" ``` -```typescript -export interface InitRequest { - config?: PartialWalletRunConfig; -} - -``` -```typescript -export interface PartialWalletRunConfig { - builtin?: Partial<WalletRunConfig["builtin"]>; - testing?: Partial<WalletRunConfig["testing"]>; - features?: Partial<WalletRunConfig["features"]>; -} - -``` -```typescript -export interface WalletRunConfig { - /** - * Initialization values useful for a complete startup. - * - * These are values may be overridden by different wallets - */ - builtin: { - exchanges: BuiltinExchange[]; - }; - /** - * Unsafe options which it should only be used to create - * testing environment. - */ - testing: { - /** - * Allow withdrawal of denominations even though they are about to expire. - */ - denomselAllowLate: boolean; - devModeActive: boolean; - insecureTrustExchange: boolean; - preventThrottling: boolean; - skipDefaults: boolean; - emitObservabilityEvents?: boolean; - }; - /** - * Configurations values that may be safe to show to the user - */ - features: { - allowHttp: boolean; - }; -} - -``` -```typescript -export interface BuiltinExchange { - exchangeBaseUrl: string; - currencyHint?: string; -} -``` +### SetWalletRunConfigOp ```typescript -export interface InitResponse { - versionInfo: WalletCoreVersion; -} +/** + * Change the configuration of wallet-core. + * + * Currently an alias for the initWallet request. + */ +export type SetWalletRunConfigOp = { + op: WalletApiOperation.SetWalletRunConfig; + request: InitRequest; + response: InitResponse; +}; +// SetWalletRunConfig = "setWalletRunConfig" ``` @@ -2740,6 +2697,10 @@ export declare enum CoinStatus { */ Fresh = "fresh", /** + * Coin was lost as the denomination is not usable anymore. + */ + DenomLoss = "denom-loss", + /** * Fresh, but currently marked as "suspended", thus won't be used * for spending. Used for testing. */ @@ -2893,6 +2854,17 @@ export interface TestingWaitTransactionRequest { ``` +### TestingPingOp +```typescript +export type TestingPingOp = { + op: WalletApiOperation.TestingPing; + request: EmptyObject; + response: EmptyObject; +}; +// TestingPing = "testingPing" + +``` + ### TestingGetDenomStatsOp ```typescript /** @@ -2959,13 +2931,76 @@ export type ForceRefreshOp = { ``` ```typescript export interface ForceRefreshRequest { - coinPubList: string[]; + refreshCoinSpecs: RefreshCoinSpec[]; +} + +``` +```typescript +export interface RefreshCoinSpec { + coinPub: string; + amount?: AmountString; } ``` ## Common Declarations ```typescript +export interface InitRequest { + config?: PartialWalletRunConfig; +} +``` +```typescript +export interface PartialWalletRunConfig { + builtin?: Partial<WalletRunConfig["builtin"]>; + testing?: Partial<WalletRunConfig["testing"]>; + features?: Partial<WalletRunConfig["features"]>; +} +``` +```typescript +export interface WalletRunConfig { + /** + * Initialization values useful for a complete startup. + * + * These are values may be overridden by different wallets + */ + builtin: { + exchanges: BuiltinExchange[]; + }; + /** + * Unsafe options which it should only be used to create + * testing environment. + */ + testing: { + /** + * Allow withdrawal of denominations even though they are about to expire. + */ + denomselAllowLate: boolean; + devModeActive: boolean; + insecureTrustExchange: boolean; + preventThrottling: boolean; + skipDefaults: boolean; + emitObservabilityEvents?: boolean; + }; + /** + * Configurations values that may be safe to show to the user + */ + features: { + allowHttp: boolean; + }; +} +``` +```typescript +export interface BuiltinExchange { + exchangeBaseUrl: string; + currencyHint: string; +} +``` +```typescript +export interface InitResponse { + versionInfo: WalletCoreVersion; +} +``` +```typescript export interface WalletCoreVersion { implementationSemver: string; implementationGitHash: string; @@ -3779,7 +3814,7 @@ export interface AbortTransactionRequest { export interface ExchangeListItem { exchangeBaseUrl: string; masterPub: string | undefined; - currency: string | undefined; + currency: string; paytoUris: string[]; tosStatus: ExchangeTosStatus; exchangeEntryStatus: ExchangeEntryStatus; @@ -3794,7 +3829,7 @@ export interface ExchangeListItem { * Set to true if this exchange doesn't charge any fees. */ noFees: boolean; - scopeInfo: ScopeInfo | undefined; + scopeInfo: ScopeInfo; lastUpdateTimestamp: TalerPreciseTimestamp | undefined; /** * Information about the last error that occurred when trying |