aboutsummaryrefslogtreecommitdiff
path: root/wallet/wallet-core.md
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-04 19:07:36 +0200
committerFlorian Dold <florian@dold.me>2022-10-04 19:07:36 +0200
commitf4564b57acd04dd34751ced8ecb2bd10974452a6 (patch)
tree5e5befb01e5959aada4face4d162786bbb306653 /wallet/wallet-core.md
parenteffcc17d92268b057ec1f643b4328ab0b2f3fedb (diff)
downloaddocs-f4564b57acd04dd34751ced8ecb2bd10974452a6.tar.gz
docs-f4564b57acd04dd34751ced8ecb2bd10974452a6.tar.bz2
docs-f4564b57acd04dd34751ced8ecb2bd10974452a6.zip
tweak wallet-core doc generation
Diffstat (limited to 'wallet/wallet-core.md')
-rw-r--r--wallet/wallet-core.md462
1 files changed, 286 insertions, 176 deletions
diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md
index 331b9144..09619dc0 100644
--- a/wallet/wallet-core.md
+++ b/wallet/wallet-core.md
@@ -73,11 +73,7 @@ export type InitWalletOp = {
request: {};
response: {};
};
-
-```
-```typescript
-// Enum value:
-// WalletApiOperation.InitWallet = "initWallet"
+// InitWallet = "initWallet"
```
@@ -87,9 +83,11 @@ export type InitWalletOp = {
* Get current wallet balance.
*/
export type GetBalancesOp = {
+ op: WalletApiOperation.GetBalances;
request: {};
response: BalancesResponse;
};
+// GetBalances = "getBalances"
```
```typescript
@@ -115,9 +113,11 @@ export interface Balance {
* Get transactions.
*/
export type GetTransactionsOp = {
+ op: WalletApiOperation.GetTransactions;
request: TransactionsRequest;
response: TransactionsResponse;
};
+// GetTransactions = "getTransactions"
```
```typescript
@@ -173,8 +173,41 @@ export interface TransactionWithdrawal extends TransactionCommon {
```
```typescript
-// Enum value:
-// TransactionType.Withdrawal = "withdrawal"
+export interface TransactionCommon {
+ transactionId: string;
+ type: TransactionType;
+ timestamp: TalerProtocolTimestamp;
+ pending: boolean;
+ /**
+ * True if the transaction encountered a problem that might be
+ * permanent. A frozen transaction won't be automatically retried.
+ */
+ frozen: boolean;
+ /**
+ * Raw amount of the transaction (exclusive of fees or other extra costs).
+ */
+ amountRaw: AmountString;
+ /**
+ * Amount added or removed from the wallet's balance (including all fees and other costs).
+ */
+ amountEffective: AmountString;
+ error?: TalerErrorDetail;
+}
+
+```
+```typescript
+export declare enum TransactionType {
+ Withdrawal = "withdrawal",
+ Payment = "payment",
+ Refund = "refund",
+ Refresh = "refresh",
+ Tip = "tip",
+ Deposit = "deposit",
+ PeerPushDebit = "peer-push-debit",
+ PeerPushCredit = "peer-push-credit",
+ PeerPullDebit = "peer-pull-debit",
+ PeerPullCredit = "peer-pull-credit",
+}
```
```typescript
@@ -197,11 +230,6 @@ interface WithdrawalDetailsForManualTransfer {
```
```typescript
-// Enum value:
-// WithdrawalType.ManualTransfer = "manual-transfer"
-
-```
-```typescript
interface WithdrawalDetailsForTalerBankIntegrationApi {
type: WithdrawalType.TalerBankIntegrationApi;
/**
@@ -220,11 +248,6 @@ interface WithdrawalDetailsForTalerBankIntegrationApi {
```
```typescript
-// Enum value:
-// WithdrawalType.TalerBankIntegrationApi = "taler-bank-integration-api"
-
-```
-```typescript
export interface TransactionPayment extends TransactionCommon {
type: TransactionType.Payment;
/**
@@ -267,11 +290,6 @@ export interface TransactionPayment extends TransactionCommon {
```
```typescript
-// Enum value:
-// TransactionType.Payment = "payment"
-
-```
-```typescript
export declare enum PaymentStatus {
/**
* Explicitly aborted after timeout / failure
@@ -317,11 +335,6 @@ export interface TransactionRefund extends TransactionCommon {
```
```typescript
-// Enum value:
-// TransactionType.Refund = "refund"
-
-```
-```typescript
export interface TransactionTip extends TransactionCommon {
type: TransactionType.Tip;
amountRaw: AmountString;
@@ -334,11 +347,6 @@ export interface TransactionTip extends TransactionCommon {
```
```typescript
-// Enum value:
-// TransactionType.Tip = "tip"
-
-```
-```typescript
export interface TransactionRefresh extends TransactionCommon {
type: TransactionType.Refresh;
exchangeBaseUrl: string;
@@ -397,11 +405,6 @@ export interface TransactionPeerPullCredit extends TransactionCommon {
```
```typescript
-// Enum value:
-// TransactionType.PeerPullCredit = "peer-pull-credit"
-
-```
-```typescript
export interface PeerInfoShort {
expiration: TalerProtocolTimestamp | undefined;
summary: string | undefined;
@@ -425,11 +428,6 @@ export interface TransactionPeerPullDebit extends TransactionCommon {
```
```typescript
-// Enum value:
-// TransactionType.PeerPullDebit = "peer-pull-debit"
-
-```
-```typescript
/**
* We received money via a P2P payment.
*/
@@ -452,11 +450,6 @@ export interface TransactionPeerPushCredit extends TransactionCommon {
```
```typescript
-// Enum value:
-// TransactionType.PeerPushCredit = "peer-push-credit"
-
-```
-```typescript
/**
* We sent money via a P2P payment.
*/
@@ -482,11 +475,6 @@ export interface TransactionPeerPushDebit extends TransactionCommon {
}
```
-```typescript
-// Enum value:
-// TransactionType.PeerPushDebit = "peer-push-debit"
-
-```
### DeleteTransactionOp
```typescript
@@ -494,9 +482,11 @@ export interface TransactionPeerPushDebit extends TransactionCommon {
* Delete a transaction locally in the wallet.
*/
export type DeleteTransactionOp = {
+ op: WalletApiOperation.DeleteTransaction;
request: DeleteTransactionRequest;
response: {};
};
+// DeleteTransaction = "deleteTransaction"
```
```typescript
@@ -512,9 +502,11 @@ export interface DeleteTransactionRequest {
* Immediately retry a transaction.
*/
export type RetryTransactionOp = {
+ op: WalletApiOperation.RetryTransaction;
request: RetryTransactionRequest;
response: {};
};
+// RetryTransaction = "retryTransaction"
```
```typescript
@@ -530,9 +522,11 @@ export interface RetryTransactionRequest {
* Get details for withdrawing a particular amount (manual withdrawal).
*/
export type GetWithdrawalDetailsForAmountOp = {
+ op: WalletApiOperation.GetWithdrawalDetailsForAmount;
request: GetWithdrawalDetailsForAmountRequest;
response: ManualWithdrawalDetails;
};
+// GetWithdrawalDetailsForAmount = "getWithdrawalDetailsForAmount"
```
```typescript
@@ -572,9 +566,11 @@ export interface ManualWithdrawalDetails {
* Get details for withdrawing via a particular taler:// URI.
*/
export type GetWithdrawalDetailsForUriOp = {
+ op: WalletApiOperation.GetWithdrawalDetailsForUri;
request: GetWithdrawalDetailsForUriRequest;
response: WithdrawUriInfoResponse;
};
+// GetWithdrawalDetailsForUri = "getWithdrawalDetailsForUri"
```
```typescript
@@ -599,9 +595,11 @@ export interface WithdrawUriInfoResponse {
* Accept a bank-integrated withdrawal.
*/
export type AcceptBankIntegratedWithdrawalOp = {
+ op: WalletApiOperation.AcceptBankIntegratedWithdrawal;
request: AcceptBankIntegratedWithdrawalRequest;
response: AcceptWithdrawalResponse;
};
+// AcceptBankIntegratedWithdrawal = "acceptBankIntegratedWithdrawal"
```
```typescript
@@ -628,9 +626,11 @@ export interface AcceptWithdrawalResponse {
* Create a manual withdrawal.
*/
export type AcceptManualWithdrawalOp = {
+ op: WalletApiOperation.AcceptManualWithdrawal;
request: AcceptManualWithdrawalRequest;
response: AcceptManualWithdrawalResult;
};
+// AcceptManualWithdrawal = "acceptManualWithdrawal"
```
```typescript
@@ -666,11 +666,7 @@ export type PreparePayForUriOp = {
request: PreparePayRequest;
response: PreparePayResult;
};
-
-```
-```typescript
-// Enum value:
-// WalletApiOperation.PreparePayForUri = "preparePayForUri"
+// PreparePayForUri = "preparePayForUri"
```
```typescript
@@ -712,11 +708,6 @@ export interface PreparePayResultAlreadyConfirmed {
```
```typescript
-// Enum value:
-// PreparePayResultType.AlreadyConfirmed = "already-confirmed"
-
-```
-```typescript
/**
* Payment is possible.
*/
@@ -731,11 +722,6 @@ export interface PreparePayResultPaymentPossible {
}
```
-```typescript
-// Enum value:
-// PreparePayResultType.PaymentPossible = "payment-possible"
-
-```
### ConfirmPayOp
```typescript
@@ -748,11 +734,7 @@ export type ConfirmPayOp = {
request: ConfirmPayRequest;
response: ConfirmPayResult;
};
-
-```
-```typescript
-// Enum value:
-// WalletApiOperation.ConfirmPay = "confirmPay"
+// ConfirmPay = "confirmPay"
```
```typescript
@@ -781,11 +763,6 @@ export interface ConfirmPayResultDone {
```
```typescript
-// Enum value:
-// ConfirmPayResultType.Done = "done"
-
-```
-```typescript
export interface ConfirmPayResultPending {
type: ConfirmPayResultType.Pending;
transactionId: string;
@@ -800,9 +777,11 @@ export interface ConfirmPayResultPending {
* Abort a pending payment with a refund.
*/
export type AbortPayWithRefundOp = {
+ op: WalletApiOperation.AbortFailedPayWithRefund;
request: AbortPayWithRefundRequest;
response: {};
};
+// AbortFailedPayWithRefund = "abortFailedPayWithRefund"
```
```typescript
@@ -818,9 +797,11 @@ export interface AbortPayWithRefundRequest {
* Check for a refund based on a taler://refund URI.
*/
export type ApplyRefundOp = {
+ op: WalletApiOperation.ApplyRefund;
request: ApplyRefundRequest;
response: ApplyRefundResponse;
};
+// ApplyRefund = "applyRefund"
```
```typescript
@@ -849,9 +830,11 @@ export interface ApplyRefundResponse {
* Query and store information about a tip.
*/
export type PrepareTipOp = {
+ op: WalletApiOperation.PrepareTip;
request: PrepareTipRequest;
response: PrepareTipResult;
};
+// PrepareTip = "prepareTip"
```
```typescript
@@ -904,9 +887,11 @@ export interface PrepareTipResult {
* Accept a tip.
*/
export type AcceptTipOp = {
+ op: WalletApiOperation.AcceptTip;
request: AcceptTipRequest;
response: {};
};
+// AcceptTip = "acceptTip"
```
```typescript
@@ -922,9 +907,11 @@ export interface AcceptTipRequest {
* List exchanges known to the wallet.
*/
export type ListExchangesOp = {
+ op: WalletApiOperation.ListExchanges;
request: {};
response: ExchangesListResponse;
};
+// ListExchanges = "listExchanges"
```
```typescript
@@ -940,9 +927,11 @@ export interface ExchangesListResponse {
* Add / force-update an exchange.
*/
export type AddExchangeOp = {
+ op: WalletApiOperation.AddExchange;
request: AddExchangeRequest;
response: {};
};
+// AddExchange = "addExchange"
```
```typescript
@@ -959,9 +948,11 @@ export interface AddExchangeRequest {
* Accept a particular version of the exchange terms of service.
*/
export type SetExchangeTosAcceptedOp = {
+ op: WalletApiOperation.SetExchangeTosAccepted;
request: AcceptExchangeTosRequest;
response: {};
};
+// SetExchangeTosAccepted = "setExchangeTosAccepted"
```
```typescript
@@ -978,9 +969,11 @@ export interface AcceptExchangeTosRequest {
* Get the current terms of a service of an exchange.
*/
export type GetExchangeTosOp = {
+ op: WalletApiOperation.GetExchangeTos;
request: GetExchangeTosRequest;
response: GetExchangeTosResult;
};
+// GetExchangeTos = "getExchangeTos"
```
```typescript
@@ -1019,9 +1012,11 @@ export interface GetExchangeTosResult {
* List currencies known to the wallet.
*/
export type ListCurrenciesOp = {
+ op: WalletApiOperation.ListCurrencies;
request: {};
response: WalletCurrencyInfo;
};
+// ListCurrencies = "listCurrencies"
```
```typescript
@@ -1049,9 +1044,11 @@ export interface WalletCurrencyInfo {
* account, usually the wallet user's own bank account.
*/
export type CreateDepositGroupOp = {
+ op: WalletApiOperation.CreateDepositGroup;
request: CreateDepositGroupRequest;
response: CreateDepositGroupResponse;
};
+// CreateDepositGroup = "createDepositGroup"
```
```typescript
@@ -1075,9 +1072,11 @@ export interface CreateDepositGroupResponse {
* Track the status of a deposit group by querying the exchange.
*/
export type TrackDepositGroupOp = {
+ op: WalletApiOperation.TrackDepositGroup;
request: TrackDepositGroupRequest;
response: TrackDepositGroupResponse;
};
+// TrackDepositGroup = "trackDepositGroup"
```
```typescript
@@ -1102,9 +1101,11 @@ export interface TrackDepositGroupResponse {
* Export the recovery information for the wallet.
*/
export type ExportBackupRecoveryOp = {
+ op: WalletApiOperation.ExportBackupRecovery;
request: {};
response: BackupRecovery;
};
+// ExportBackupRecovery = "exportBackupRecovery"
```
@@ -1114,9 +1115,11 @@ export type ExportBackupRecoveryOp = {
* Import recovery information into the wallet.
*/
export type ImportBackupRecoveryOp = {
+ op: WalletApiOperation.ImportBackupRecovery;
request: RecoveryLoadRequest;
response: {};
};
+// ImportBackupRecovery = "importBackupRecovery"
```
```typescript
@@ -1152,9 +1155,11 @@ export declare enum RecoveryMergeStrategy {
* Manually make and upload a backup.
*/
export type RunBackupCycleOp = {
+ op: WalletApiOperation.RunBackupCycle;
request: {};
response: {};
};
+// RunBackupCycle = "runBackupCycle"
```
@@ -1164,9 +1169,11 @@ export type RunBackupCycleOp = {
* Add a new backup provider.
*/
export type AddBackupProviderOp = {
+ op: WalletApiOperation.AddBackupProvider;
request: AddBackupProviderRequest;
response: {};
};
+// AddBackupProvider = "addBackupProvider"
```
```typescript
@@ -1188,9 +1195,11 @@ export interface AddBackupProviderRequest {
* Get some useful stats about the backup state.
*/
export type GetBackupInfoOp = {
+ op: WalletApiOperation.GetBackupInfo;
request: {};
response: BackupInfo;
};
+// GetBackupInfo = "getBackupInfo"
```
```typescript
@@ -1273,11 +1282,6 @@ export interface ProviderPaymentTermsChanged {
```
```typescript
-// Enum value:
-// ProviderPaymentType.TermsChanged = "terms-changed"
-
-```
-```typescript
export interface ProviderPaymentPaid {
type: ProviderPaymentType.Paid;
paidUntil: AbsoluteTime;
@@ -1285,11 +1289,6 @@ export interface ProviderPaymentPaid {
```
```typescript
-// Enum value:
-// ProviderPaymentType.Paid = "paid"
-
-```
-```typescript
export interface ProviderPaymentInsufficientBalance {
type: ProviderPaymentType.InsufficientBalance;
}
@@ -1302,11 +1301,6 @@ export interface ProviderPaymentUnpaid {
```
```typescript
-// Enum value:
-// ProviderPaymentType.Unpaid = "unpaid"
-
-```
-```typescript
export interface ProviderPaymentPending {
type: ProviderPaymentType.Pending;
}
@@ -1321,9 +1315,11 @@ export interface ProviderPaymentPending {
* the backup of another wallet.
*/
export type SetWalletDeviceIdOp = {
+ op: WalletApiOperation.SetWalletDeviceId;
request: SetWalletDeviceIdRequest;
response: {};
};
+// SetWalletDeviceId = "setWalletDeviceId"
```
```typescript
@@ -1342,9 +1338,11 @@ export interface SetWalletDeviceIdRequest {
* Export a backup JSON, mostly useful for testing.
*/
export type ExportBackupPlainOp = {
+ op: WalletApiOperation.ExportBackupPlain;
request: {};
response: WalletBackupContentV1;
};
+// ExportBackupPlain = "exportBackupPlain"
```
@@ -1354,9 +1352,11 @@ export type ExportBackupPlainOp = {
* Initiate an outgoing peer push payment.
*/
export type InitiatePeerPushPaymentOp = {
+ op: WalletApiOperation.InitiatePeerPushPayment;
request: InitiatePeerPushPaymentRequest;
response: InitiatePeerPushPaymentResponse;
};
+// InitiatePeerPushPayment = "initiatePeerPushPayment"
```
```typescript
@@ -1384,9 +1384,11 @@ export interface InitiatePeerPushPaymentResponse {
* Check an incoming peer push payment.
*/
export type CheckPeerPushPaymentOp = {
+ op: WalletApiOperation.CheckPeerPushPayment;
request: CheckPeerPushPaymentRequest;
response: CheckPeerPushPaymentResponse;
};
+// CheckPeerPushPayment = "checkPeerPushPayment"
```
```typescript
@@ -1410,9 +1412,11 @@ export interface CheckPeerPushPaymentResponse {
* Accept an incoming peer push payment.
*/
export type AcceptPeerPushPaymentOp = {
+ op: WalletApiOperation.AcceptPeerPushPayment;
request: AcceptPeerPushPaymentRequest;
response: {};
};
+// AcceptPeerPushPayment = "acceptPeerPushPayment"
```
```typescript
@@ -1431,9 +1435,11 @@ export interface AcceptPeerPushPaymentRequest {
* Initiate an outgoing peer pull payment.
*/
export type InitiatePeerPullPaymentOp = {
+ op: WalletApiOperation.InitiatePeerPullPayment;
request: InitiatePeerPullPaymentRequest;
response: InitiatePeerPullPaymentResponse;
};
+// InitiatePeerPullPayment = "initiatePeerPullPayment"
```
```typescript
@@ -1465,9 +1471,11 @@ export interface InitiatePeerPullPaymentResponse {
* Prepare for an incoming peer pull payment.
*/
export type CheckPeerPullPaymentOp = {
+ op: WalletApiOperation.CheckPeerPullPayment;
request: CheckPeerPullPaymentRequest;
response: CheckPeerPullPaymentResponse;
};
+// CheckPeerPullPayment = "checkPeerPullPayment"
```
```typescript
@@ -1491,9 +1499,11 @@ export interface CheckPeerPullPaymentResponse {
* Accept an incoming peer pull payment.
*/
export type AcceptPeerPullPaymentOp = {
+ op: WalletApiOperation.AcceptPeerPullPayment;
request: AcceptPeerPullPaymentRequest;
response: {};
};
+// AcceptPeerPullPayment = "acceptPeerPullPayment"
```
```typescript
@@ -1512,9 +1522,11 @@ export interface AcceptPeerPullPaymentRequest {
* Exoport the wallet database's contents to JSON.
*/
export type ExportDbOp = {
+ op: WalletApiOperation.ExportDb;
request: {};
response: any;
};
+// ExportDb = "exportDb"
```
@@ -1524,9 +1536,11 @@ export type ExportDbOp = {
* Dangerously clear the whole wallet database.
*/
export type ClearDbOp = {
+ op: WalletApiOperation.ClearDb;
request: {};
response: {};
};
+// ClearDb = "clearDb"
```
@@ -1536,9 +1550,11 @@ export type ClearDbOp = {
* Export a backup, clear the database and re-import it.
*/
export type RecycleOp = {
+ op: WalletApiOperation.Recycle;
request: {};
response: {};
};
+// Recycle = "recycle"
```
@@ -1549,9 +1565,11 @@ export type RecycleOp = {
* of the exchange and merchant.
*/
export type RunIntegrationTestOp = {
+ op: WalletApiOperation.RunIntegrationTest;
request: IntegrationTestArgs;
response: {};
};
+// RunIntegrationTest = "runIntegrationTest"
```
```typescript
@@ -1574,9 +1592,11 @@ export interface IntegrationTestArgs {
* and merchant.
*/
export type WithdrawTestBalanceOp = {
+ op: WalletApiOperation.WithdrawTestBalance;
request: WithdrawTestBalanceRequest;
response: {};
};
+// WithdrawTestBalance = "withdrawTestBalance"
```
```typescript
@@ -1603,11 +1623,7 @@ export type WithdrawTestkudosOp = {
request: {};
response: {};
};
-
-```
-```typescript
-// Enum value:
-// WalletApiOperation.WithdrawTestkudos = "withdrawTestkudos"
+// WithdrawTestkudos = "withdrawTestkudos"
```
@@ -1618,9 +1634,11 @@ export type WithdrawTestkudosOp = {
* the exchange and merchant.
*/
export type TestPayOp = {
+ op: WalletApiOperation.TestPay;
request: TestPayArgs;
response: TestPayResult;
};
+// TestPay = "testPay"
```
```typescript
@@ -1702,11 +1720,7 @@ export type WithdrawFakebankOp = {
request: WithdrawFakebankRequest;
response: {};
};
-
-```
-```typescript
-// Enum value:
-// WalletApiOperation.WithdrawFakebank = "withdrawFakebank"
+// WithdrawFakebank = "withdrawFakebank"
```
```typescript
@@ -1724,9 +1738,11 @@ export interface WithdrawFakebankRequest {
* Get wallet-internal pending tasks.
*/
export type GetPendingTasksOp = {
+ op: WalletApiOperation.GetPendingOperations;
request: {};
response: PendingTasksResponse;
};
+// GetPendingOperations = "getPendingOperations"
```
```typescript
@@ -1824,6 +1840,87 @@ export interface RetryPolicy {
```
```typescript
+// Declare "static" methods in Error
+interface ErrorConstructor {
+ /** Create .stack property on a target object */
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
+ /**
+ * Optional override for formatting stack traces
+ *
+ * @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
+ */
+ prepareStackTrace?:
+ | ((err: Error, stackTraces: NodeJS.CallSite[]) => any)
+ | undefined;
+ stackTraceLimit: number;
+}
+
+```
+```typescript
+interface CallSite {
+ /**
+ * Value of "this"
+ */
+ getThis(): unknown;
+ /**
+ * Type of "this" as a string.
+ * This is the name of the function stored in the constructor field of
+ * "this", if available. Otherwise the object's [[Class]] internal
+ * property.
+ */
+ getTypeName(): string | null;
+ /**
+ * Current function
+ */
+ getFunction(): Function | undefined;
+ /**
+ * Name of the current function, typically its name property.
+ * If a name property is not available an attempt will be made to try
+ * to infer a name from the function's context.
+ */
+ getFunctionName(): string | null;
+ /**
+ * Name of the property [of "this" or one of its prototypes] that holds
+ * the current function
+ */
+ getMethodName(): string | null;
+ /**
+ * Name of the script [if this function was defined in a script]
+ */
+ getFileName(): string | null;
+ /**
+ * Current line number [if this function was defined in a script]
+ */
+ getLineNumber(): number | null;
+ /**
+ * Current column number [if this function was defined in a script]
+ */
+ getColumnNumber(): number | null;
+ /**
+ * A call site object representing the location where eval was called
+ * [if this function was created using a call to eval]
+ */
+ getEvalOrigin(): string | undefined;
+ /**
+ * Is this a toplevel invocation, that is, is "this" the global object?
+ */
+ isToplevel(): boolean;
+ /**
+ * Does this call take place in code defined by a call to eval?
+ */
+ isEval(): boolean;
+ /**
+ * Is this call in native V8 code?
+ */
+ isNative(): boolean;
+ /**
+ * Is this a constructor call?
+ */
+ isConstructor(): boolean;
+}
+
+```
+```typescript
/**
* The wallet is currently updating information about an exchange.
*/
@@ -1835,11 +1932,6 @@ export interface PendingExchangeUpdateTask {
```
```typescript
-// Enum value:
-// PendingTaskType.ExchangeUpdate = "exchange-update"
-
-```
-```typescript
/**
* The wallet should check whether coins from this exchange
* need to be auto-refreshed.
@@ -1851,11 +1943,6 @@ export interface PendingExchangeCheckRefreshTask {
```
```typescript
-// Enum value:
-// PendingTaskType.ExchangeCheckRefresh = "exchange-check-refresh"
-
-```
-```typescript
/**
* The wallet is signing coins and then sending them to
* the merchant.
@@ -1870,11 +1957,6 @@ export interface PendingPayTask {
```
```typescript
-// Enum value:
-// PendingTaskType.Pay = "pay"
-
-```
-```typescript
/**
* Status of downloading signed contract terms from a merchant.
*/
@@ -1890,11 +1972,6 @@ export interface PendingProposalDownloadTask {
```
```typescript
-// Enum value:
-// PendingTaskType.ProposalDownload = "proposal-download"
-
-```
-```typescript
/**
* Status of an ongoing withdrawal operation.
*/
@@ -1921,11 +1998,6 @@ export interface PendingRefundQueryTask {
```
```typescript
-// Enum value:
-// PendingTaskType.RefundQuery = "refund-query"
-
-```
-```typescript
/**
* The wallet is picking up a tip that the user has accepted.
*/
@@ -1938,11 +2010,6 @@ export interface PendingTipPickupTask {
```
```typescript
-// Enum value:
-// PendingTaskType.TipPickup = "tip-pickup"
-
-```
-```typescript
/**
* Status of an ongoing withdrawal operation.
*/
@@ -1955,11 +2022,6 @@ export interface PendingWithdrawTask {
```
```typescript
-// Enum value:
-// PendingTaskType.Withdraw = "withdraw"
-
-```
-```typescript
export interface PendingRecoupTask {
type: PendingTaskType.Recoup;
recoupGroupId: string;
@@ -1969,11 +2031,6 @@ export interface PendingRecoupTask {
```
```typescript
-// Enum value:
-// PendingTaskType.Recoup = "recoup"
-
-```
-```typescript
/**
* Status of an ongoing deposit operation.
*/
@@ -1993,11 +2050,6 @@ export interface PendingBackupTask {
}
```
-```typescript
-// Enum value:
-// PendingTaskType.Backup = "backup"
-
-```
### DumpCoinsOp
```typescript
@@ -2005,9 +2057,11 @@ export interface PendingBackupTask {
* Dump all coins of the wallet in a simple JSON format.
*/
export type DumpCoinsOp = {
+ op: WalletApiOperation.DumpCoins;
request: {};
response: CoinDumpJson;
};
+// DumpCoins = "dumpCoins"
```
```typescript
@@ -2066,7 +2120,75 @@ export interface CoinDumpJson {
```
```typescript
-interface Array<T> extends RelativeIndexable<T> {}
+export declare type DenominationPubKey =
+ | RsaDenominationPubKey
+ | CsDenominationPubKey;
+
+```
+```typescript
+export interface RsaDenominationPubKey {
+ readonly cipher: DenomKeyType.Rsa;
+ readonly rsa_public_key: string;
+ readonly age_mask: number;
+}
+
+```
+```typescript
+export interface CsDenominationPubKey {
+ readonly cipher: DenomKeyType.ClauseSchnorr;
+ readonly age_mask: number;
+ readonly cs_public_key: string;
+}
+
+```
+```typescript
+export interface AgeCommitmentProof {
+ commitment: AgeCommitment;
+ proof: AgeProof;
+}
+
+```
+```typescript
+export interface AgeCommitment {
+ mask: number;
+ /**
+ * Public keys, one for each age group specified in the age mask.
+ */
+ publicKeys: Edx25519PublicKeyEnc[];
+}
+
+```
+```typescript
+export declare type Edx25519PublicKeyEnc = FlavorP<
+ string,
+ "Edx25519PublicKeyEnc",
+ 32
+>;
+
+```
+```typescript
+export declare type FlavorP<T, FlavorT extends string, S extends number> = T & {
+ _flavor?: `taler.${FlavorT}`;
+ _size?: S;
+};
+
+```
+```typescript
+export interface AgeProof {
+ /**
+ * Private keys. Typically smaller than the number of public keys,
+ * because we drop private keys from age groups that are restricted.
+ */
+ privateKeys: Edx25519PrivateKeyEnc[];
+}
+
+```
+```typescript
+export declare type Edx25519PrivateKeyEnc = FlavorP<
+ string,
+ "Edx25519PrivateKeyEnc",
+ 64
+>;
```
@@ -2077,9 +2199,11 @@ interface Array<T> extends RelativeIndexable<T> {}
* Suspended coins won't be used for payments.
*/
export type SetCoinSuspendedOp = {
+ op: WalletApiOperation.SetCoinSuspended;
request: SetCoinSuspendedRequest;
response: {};
};
+// SetCoinSuspended = "setCoinSuspended"
```
```typescript
@@ -2097,9 +2221,11 @@ export interface SetCoinSuspendedRequest {
* be necessary.
*/
export type ForceRefreshOp = {
+ op: WalletApiOperation.ForceRefresh;
request: ForceRefreshRequest;
response: {};
};
+// ForceRefresh = "forceRefresh"
```
```typescript
@@ -2111,6 +2237,18 @@ export interface ForceRefreshRequest {
## Common Declarations
```typescript
+export interface TalerProtocolTimestamp {
+ readonly t_s: number | "never";
+}
+```
+```typescript
+export interface TalerErrorDetail {
+ code: TalerErrorCode;
+ hint?: string;
+ [x: string]: unknown;
+}
+```
+```typescript
export interface OrderShortInfo {
/**
* Order ID, uniquely identifies the order within a merchant instance
@@ -2211,19 +2349,6 @@ export interface Tax {
}
```
```typescript
-export interface TalerProtocolTimestamp {
- readonly t_s: number | "never";
-}
-```
-```typescript
-// Enum value:
-// PendingTaskType.Refresh = "refresh"
-```
-```typescript
-// Enum value:
-// PendingTaskType.Deposit = "deposit"
-```
-```typescript
export interface ExchangeListItem {
exchangeBaseUrl: string;
currency: string;
@@ -2248,10 +2373,6 @@ export interface ForcedDenomSel {
}
```
```typescript
-// Enum value:
-// ProviderPaymentType.InsufficientBalance = "insufficient-balance"
-```
-```typescript
/**
* Contract terms from a merchant.
*/
@@ -2420,17 +2541,6 @@ export interface ForcedCoinSel {
}
```
```typescript
-// Enum value:
-// ProviderPaymentType.Pending = "pending"
-```
-```typescript
-export interface TalerErrorDetail {
- code: TalerErrorCode;
- hint?: string;
- [x: string]: unknown;
-}
-```
-```typescript
export interface BackupRecovery {
walletRootPriv: string;
providers: {