From 20c47ad25092e2d05d66ebb128a0299e668ac42d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 5 May 2023 13:23:51 -0300 Subject: updated documentation --- wallet/wallet-core.md | 263 ++++++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 128 deletions(-) (limited to 'wallet') diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md index 4fba3c8b..3de35f05 100644 --- a/wallet/wallet-core.md +++ b/wallet/wallet-core.md @@ -14,6 +14,7 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core * [DeleteTransactionOp](#deletetransactionop) * [RetryTransactionOp](#retrytransactionop) * [AbortTransactionOp](#aborttransactionop) +* [CancelAbortingTransactionOp](#cancelabortingtransactionop) * [SuspendTransactionOp](#suspendtransactionop) * [ResumeTransactionOp](#resumetransactionop) ### Withdrawals @@ -43,9 +44,8 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core * [GetExchangeDetailedInfoOp](#getexchangedetailedinfoop) * [ListCurrenciesOp](#listcurrenciesop) ### Deposits +* [GenerateDepositGroupTxIdOp](#generatedepositgrouptxidop) * [CreateDepositGroupOp](#createdepositgroupop) -* [TrackDepositGroupOp](#trackdepositgroupop) -* [GetFeeForDepositOp](#getfeefordepositop) * [PrepareDepositOp](#preparedepositop) ### Backups * [ExportBackupRecoveryOp](#exportbackuprecoveryop) @@ -75,7 +75,6 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core * [RecycleOp](#recycleop) ### Testing and Debugging * [ApplyDevExperimentOp](#applydevexperimentop) -* [SetDevModeOp](#setdevmodeop) * [RunIntegrationTestOp](#runintegrationtestop) * [RunIntegrationTestV2Op](#runintegrationtestv2op) * [TestCryptoOp](#testcryptoop) @@ -360,6 +359,28 @@ export type AbortTransactionOp = { ``` +### CancelAbortingTransactionOp +```typescript +/** + * Cancel aborting a transaction + * + * For payment transactions, it puts the payment into an "aborting" state. + */ +export type CancelAbortingTransactionOp = { + op: WalletApiOperation.CancelAbortingTransaction; + request: CancelAbortingTransactionRequest; + response: EmptyObject; +}; +// CancelAbortingTransaction = "cancelAbortingTransaction" + +``` +```typescript +export interface CancelAbortingTransactionRequest { + transactionId: string; +} + +``` + ### SuspendTransactionOp ```typescript /** @@ -623,7 +644,6 @@ export interface WalletContractData { wireFeeAmortization: number; payDeadline: TalerProtocolTimestamp; refundDeadline: TalerProtocolTimestamp; - allowedAuditors: AllowedAuditorInfo[]; allowedExchanges: AllowedExchangeInfo[]; timestamp: TalerProtocolTimestamp; wireMethod: string; @@ -634,13 +654,6 @@ export interface WalletContractData { deliveryLocation: Location | undefined; } -``` -```typescript -export interface AllowedAuditorInfo { - auditorBaseUrl: string; - auditorPub: string; -} - ``` ```typescript export interface AllowedExchangeInfo { @@ -1161,6 +1174,30 @@ export interface WalletCurrencyInfo { ``` +### GenerateDepositGroupTxIdOp +```typescript +/** + * Generate a fresh transaction ID for a deposit group. + * + * The resulting transaction ID can be specified when creating + * a deposit group, so that the client can already start waiting for notifications + * on that specific deposit group before the GreateDepositGroup request returns. + */ +export type GenerateDepositGroupTxIdOp = { + op: WalletApiOperation.GenerateDepositGroupTxId; + request: EmptyObject; + response: TxIdResponse; +}; +// GenerateDepositGroupTxId = "generateDepositGroupTxId" + +``` +```typescript +export interface TxIdResponse { + transactionId: string; +} + +``` + ### CreateDepositGroupOp ```typescript /** @@ -1179,6 +1216,13 @@ export type CreateDepositGroupOp = { ``` ```typescript export interface CreateDepositGroupRequest { + /** + * Pre-allocated transaction ID. + * Allows clients to easily handle notifications + * that occur while the operation has been created but + * before the creation request has returned. + */ + transactionId?: string; depositPaytoUri: string; amount: AmountString; } @@ -1192,86 +1236,6 @@ export interface CreateDepositGroupResponse { ``` -### TrackDepositGroupOp -```typescript -/** - * Track the status of a deposit group by querying the exchange. - */ -export type TrackDepositGroupOp = { - op: WalletApiOperation.TrackDepositGroup; - request: TrackDepositGroupRequest; - response: TrackDepositGroupResponse; -}; -// TrackDepositGroup = "trackDepositGroup" - -``` -```typescript -export interface TrackDepositGroupRequest { - depositGroupId: string; -} - -``` -```typescript -export interface TrackDepositGroupResponse { - responses: TrackTransaction[]; -} - -``` -```typescript -export type TrackTransaction = - | ({ - type: "accepted"; - } & TrackTransactionAccepted) - | ({ - type: "wired"; - } & TrackTransactionWired); - -``` -```typescript -interface TrackTransactionAccepted { - requirement_row?: number; - kyc_ok: boolean; - execution_time: TalerProtocolTimestamp; -} - -``` -```typescript -export interface TrackTransactionWired { - wtid: Base32String; - execution_time: TalerProtocolTimestamp; - coin_contribution: AmountString; - exchange_sig: EddsaSignatureString; - exchange_pub: EddsaPublicKeyString; -} - -``` - -### GetFeeForDepositOp -```typescript -export type GetFeeForDepositOp = { - op: WalletApiOperation.GetFeeForDeposit; - request: GetFeeForDepositRequest; - response: DepositGroupFees; -}; -// GetFeeForDeposit = "getFeeForDeposit" - -``` -```typescript -export interface GetFeeForDepositRequest { - depositPaytoUri: string; - amount: AmountString; -} - -``` -```typescript -export interface DepositGroupFees { - coin: AmountString; - wire: AmountString; - refresh: AmountString; -} - -``` - ### PrepareDepositOp ```typescript export type PrepareDepositOp = { @@ -1293,6 +1257,15 @@ export interface PrepareDepositRequest { export interface PrepareDepositResponse { totalDepositCost: AmountString; effectiveDepositAmount: AmountString; + fees: DepositGroupFees; +} + +``` +```typescript +export interface DepositGroupFees { + coin: AmountString; + wire: AmountString; + refresh: AmountString; } ``` @@ -1941,23 +1914,6 @@ export interface ApplyDevExperimentRequest { ``` -### SetDevModeOp -```typescript -export type SetDevModeOp = { - op: WalletApiOperation.SetDevMode; - request: SetDevModeRequest; - response: EmptyObject; -}; -// SetDevMode = "setDevMode" - -``` -```typescript -export interface SetDevModeRequest { - devModeEnabled: boolean; -} - -``` - ### RunIntegrationTestOp ```typescript /** @@ -2019,11 +1975,10 @@ export type WithdrawTestBalanceOp = { ```typescript export interface WithdrawTestBalanceRequest { amount: string; - bankBaseUrl: string; /** - * Bank access API base URL. Defaults to the bankBaseUrl. + * Bank access API base URL. */ - bankAccessApiBaseUrl?: string; + bankAccessApiBaseUrl: string; exchangeBaseUrl: string; forcedDenomSel?: ForcedDenomSel; } @@ -2224,9 +2179,8 @@ export enum PendingTaskType { Withdraw = "withdraw", Deposit = "deposit", Backup = "backup", - // FIXME: Rename to peer-push-debit and peer-pull-debit - PeerPushInitiation = "peer-push-initiation", - PeerPullInitiation = "peer-pull-initiation", + PeerPushDebit = "peer-push-debit", + PeerPullCredit = "peer-pull-credit", PeerPushCredit = "peer-push-credit", PeerPullDebit = "peer-pull-debit", } @@ -2438,7 +2392,7 @@ export interface PendingBackupTask { * The wallet wants to send a peer push payment. */ export interface PendingPeerPushInitiationTask { - type: PendingTaskType.PeerPushInitiation; + type: PendingTaskType.PeerPushDebit; pursePub: string; } @@ -2448,7 +2402,7 @@ export interface PendingPeerPushInitiationTask { * The wallet wants to send a peer pull payment. */ export interface PendingPeerPullInitiationTask { - type: PendingTaskType.PeerPullInitiation; + type: PendingTaskType.PeerPullCredit; pursePub: string; } @@ -2677,6 +2631,9 @@ export interface WalletCoreVersion { exchange: string; merchant: string; bank: string; + /** + * @deprecated will be removed + */ devMode: boolean; } ``` @@ -2716,6 +2673,13 @@ export interface TransactionCommon { transactionId: TransactionIdStr; type: TransactionType; timestamp: TalerProtocolTimestamp; + /** + * Transaction state, as per DD37. + */ + txState: TransactionState; + /** + * @deprecated in favor of statusMajor and statusMinor + */ extendedStatus: ExtendedStatus; /** * true if the transaction is still pending, false otherwise @@ -2763,6 +2727,53 @@ export interface TalerProtocolTimestamp { } ``` ```typescript +export interface TransactionState { + major: TransactionMajorState; + minor?: TransactionMinorState; +} +``` +```typescript +export declare enum TransactionMajorState { + None = "none", + Pending = "pending", + Done = "done", + Aborting = "aborting", + Aborted = "aborted", + Suspended = "suspended", + SuspendedDeletable = "suspended-deletable", + Dialog = "dialog", + SuspendedAborting = "suspended-aborting", + Failed = "failed", + Deleted = "deleted", + Unknown = "unknown", +} +``` +```typescript +export declare enum TransactionMinorState { + Unknown = "unknown", + Deposit = "deposit", + KycRequired = "kyc", + AmlRequired = "aml", + Track = "track", + Pay = "pay", + RebindSession = "rebind-session", + Refresh = "refresh", + Pickup = "pickup", + AutoRefund = "auto-refund", + User = "user", + Bank = "bank", + ClaimProposal = "claim-proposal", + CheckRefunds = "check-refunds", + Repurchase = "repurchase", + BankRegisterReserve = "bank-register-reserve", + BankConfirmTransfer = "bank-confirm-transfer", + WithdrawCoins = "withdraw-coins", + ExchangeWaitReserve = "exchange-wait-reserve", + AbortingBank = "aborting-bank", + Refused = "refused", +} +``` +```typescript export declare enum ExtendedStatus { Pending = "pending", Done = "done", @@ -2888,6 +2899,10 @@ export interface TransactionPayment extends TransactionCommon { * Is the wallet currently checking for a refund? */ refundQueryActive: boolean; + /** + * Does this purchase has an pos validation + */ + posConfirmation: string | undefined; } ``` ```typescript @@ -3085,6 +3100,7 @@ export declare enum RefreshReason { PayPeerPull = "pay-peer-pull", Refund = "refund", AbortPay = "abort-pay", + AbortDeposit = "abort-deposit", Recoup = "recoup", BackupRestored = "backup-restored", Scheduled = "scheduled", @@ -3120,7 +3136,7 @@ export interface TransactionDeposit extends TransactionCommon { wireTransferId: string; timestampExecuted: TalerProtocolTimestamp; amountRaw: AmountString; - amountEffective: AmountString; + wireFee: AmountString; }>; } ``` @@ -3219,14 +3235,6 @@ export interface TransactionPeerPushDebit extends TransactionCommon { ```typescript export interface AbortTransactionRequest { transactionId: string; - /** - * Move the payment immediately into an aborted state. - * The UI should warn the user that this might lead - * to money being lost. - * - * Defaults to false. - */ - forceImmediateAbort?: boolean; } ``` ```typescript @@ -3482,7 +3490,7 @@ export interface PayMerchantInsufficientBalanceDetails { balanceMerchantDepositable: AmountString; /** * If the payment would succeed without fees - * (i.e. balanceMechantWireable >= amountRequested), + * (i.e. balanceMerchantDepositable >= amountRequested), * this field contains an estimate of the amount that would additionally * be required to cover the fees. * @@ -3570,8 +3578,7 @@ export interface PeerContractTerms { ```typescript export interface IntegrationTestArgs { exchangeBaseUrl: string; - bankBaseUrl: string; - bankAccessApiBaseUrl?: string; + bankAccessApiBaseUrl: string; merchantBaseUrl: string; merchantAuthToken?: string; amountToWithdraw: string; -- cgit v1.2.3