commit b4ac2c99bad9b3371bdd72ca1133a7ed717c99ad
parent 4bd0457812adff9a7627ed59e08ace92c194a0ae
Author: Sebastian <sebasjm@gmail.com>
Date: Fri, 2 Aug 2024 11:18:24 -0300
wallet core doc updated
Diffstat:
| M | wallet/wallet-core.md | | | 247 | +++++++++++++++++++++++++++++++++++++++++++++++++------------------------------ |
1 file changed, 152 insertions(+), 95 deletions(-)
diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md
@@ -1,7 +1,7 @@
# Wallet-Core API Documentation
This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core.git/tree/packages/taler-wallet-core/src/wallet-api-types.ts).
## Overview
-### Unknown Group
+### Initialization
* [InitWalletOp](#initwalletop)
* [ShutdownOp](#shutdownop)
* [SetWalletRunConfigOp](#setwalletrunconfigop)
@@ -21,7 +21,6 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core
* [ListAssociatedRefreshesOp](#listassociatedrefreshesop)
* [TestingGetSampleTransactionsOp](#testinggetsampletransactionsop)
* [GetTransactionByIdOp](#gettransactionbyidop)
-* [GetWithdrawalTransactionByUriOp](#getwithdrawaltransactionbyuriop)
* [RetryPendingNowOp](#retrypendingnowop)
* [DeleteTransactionOp](#deletetransactionop)
* [RetryTransactionOp](#retrytransactionop)
@@ -113,11 +112,9 @@ This file is auto-generated from [wallet-core](https://git.taler.net/wallet-core
* [WithdrawTestBalanceOp](#withdrawtestbalanceop)
* [WithdrawTestkudosOp](#withdrawtestkudosop)
* [TestPayOp](#testpayop)
-* [GetPendingTasksOp](#getpendingtasksop)
* [GetActiveTasksOp](#getactivetasksop)
* [DumpCoinsOp](#dumpcoinsop)
* [TestingSetTimetravelOp](#testingsettimetravelop)
-* [TestingListTasksForTransactionOp](#testinglisttasksfortransactionop)
* [TestingWaitTransactionsFinalOp](#testingwaittransactionsfinalop)
* [TestingWaitTasksDoneOp](#testingwaittasksdoneop)
* [TestingWaitRefreshesFinalOp](#testingwaitrefreshesfinalop)
@@ -532,23 +529,6 @@ export interface TransactionByIdRequest {
```
-### GetWithdrawalTransactionByUriOp
-```typescript
-export type GetWithdrawalTransactionByUriOp = {
- op: WalletApiOperation.GetWithdrawalTransactionByUri;
- request: WithdrawalTransactionByURIRequest;
- response: TransactionWithdrawal | undefined;
-};
-// GetWithdrawalTransactionByUri = "getWithdrawalTransactionByUri"
-
-```
-```typescript
-export interface WithdrawalTransactionByURIRequest {
- talerWithdrawUri: string;
-}
-
-```
-
### RetryPendingNowOp
```typescript
export type RetryPendingNowOp = {
@@ -804,7 +784,7 @@ export interface PrepareBankIntegratedWithdrawalResponse {
export type ConfirmWithdrawalOp = {
op: WalletApiOperation.ConfirmWithdrawal;
request: ConfirmWithdrawalRequest;
- response: EmptyObject;
+ response: AcceptWithdrawalResponse;
};
// ConfirmWithdrawal = "confirmWithdrawal"
@@ -851,14 +831,6 @@ export interface AcceptBankIntegratedWithdrawalRequest {
}
```
-```typescript
-export interface AcceptWithdrawalResponse {
- reservePub: string;
- confirmTransferUrl?: string;
- transactionId: TransactionIdStr;
-}
-
-```
### AcceptManualWithdrawalOp
```typescript
@@ -1714,6 +1686,42 @@ export interface ExchangeFullDetails {
```
```typescript
+/**
+ * Auditor information as given by the exchange in /keys.
+ */
+export interface ExchangeAuditor {
+ /**
+ * Auditor's public key.
+ */
+ auditor_pub: string;
+ /**
+ * Base URL of the auditor.
+ */
+ auditor_url: string;
+ /**
+ * List of signatures for denominations by the auditor.
+ */
+ denomination_keys: AuditorDenomSig[];
+}
+
+```
+```typescript
+/**
+ * Signature by the auditor that a particular denomination key is audited.
+ */
+export interface AuditorDenomSig {
+ /**
+ * Denomination public key's hash.
+ */
+ denom_pub_h: string;
+ /**
+ * The signature.
+ */
+ auditor_sig: string;
+}
+
+```
+```typescript
export interface WireInfo {
feesForType: WireFeeMap;
accounts: ExchangeWireAccount[];
@@ -1940,6 +1948,7 @@ export interface CreateDepositGroupResponse {
### PrepareDepositOp
```typescript
+// FIXME: Rename to checkDeposit, as it does not create a transaction, just computes fees!
export type PrepareDepositOp = {
op: WalletApiOperation.PrepareDeposit;
request: PrepareDepositRequest;
@@ -1950,8 +1959,29 @@ export type PrepareDepositOp = {
```
```typescript
export interface PrepareDepositRequest {
+ /**
+ * Payto URI to identify the (bank) account that the exchange will wire
+ * the money to.
+ */
depositPaytoUri: string;
+ /**
+ * Amount that should be deposited.
+ *
+ * Raw amount, fees will be added on top.
+ */
amount: AmountString;
+ /**
+ * ID provided by the client to cancel the request.
+ *
+ * If the same request is made again with the same clientCancellationId,
+ * all previous requests are cancelled.
+ *
+ * The cancelled request will receive an error response with
+ * an error code that indicates the cancellation.
+ *
+ * The cancellation is best-effort, responses might still arrive.
+ */
+ clientCancellationId?: string;
}
```
@@ -2363,6 +2393,18 @@ export interface CheckPeerPushDebitRequest {
* FIXME: Allow specifying the instructed amount type.
*/
amount: AmountString;
+ /**
+ * ID provided by the client to cancel the request.
+ *
+ * If the same request is made again with the same clientCancellationId,
+ * all previous requests are cancelled.
+ *
+ * The cancelled request will receive an error response with
+ * an error code that indicates the cancellation.
+ *
+ * The cancellation is best-effort, responses might still arrive.
+ */
+ clientCancellationId?: string;
}
```
@@ -2462,7 +2504,7 @@ export interface PreparePeerPushCreditResponse {
export type ConfirmPeerPushCreditOp = {
op: WalletApiOperation.ConfirmPeerPushCredit;
request: ConfirmPeerPushCreditRequest;
- response: EmptyObject;
+ response: AcceptPeerPushPaymentResponse;
};
// ConfirmPeerPushCredit = "confirmPeerPushCredit"
@@ -2473,6 +2515,12 @@ export interface ConfirmPeerPushCreditRequest {
}
```
+```typescript
+export interface AcceptPeerPushPaymentResponse {
+ transactionId: TransactionIdStr;
+}
+
+```
### CheckPeerPullCreditOp
```typescript
@@ -2491,6 +2539,18 @@ export type CheckPeerPullCreditOp = {
export interface CheckPeerPullCreditRequest {
exchangeBaseUrl?: string;
amount: AmountString;
+ /**
+ * ID provided by the client to cancel the request.
+ *
+ * If the same request is made again with the same clientCancellationId,
+ * all previous requests are cancelled.
+ *
+ * The cancelled request will receive an error response with
+ * an error code that indicates the cancellation.
+ *
+ * The cancellation is best-effort, responses might still arrive.
+ */
+ clientCancellationId?: string;
}
```
@@ -2584,7 +2644,7 @@ export interface PreparePeerPullDebitResponse {
export type ConfirmPeerPullDebitOp = {
op: WalletApiOperation.ConfirmPeerPullDebit;
request: ConfirmPeerPullDebitRequest;
- response: EmptyObject;
+ response: AcceptPeerPullPaymentResponse;
};
// ConfirmPeerPullDebit = "confirmPeerPullDebit"
@@ -2595,6 +2655,12 @@ export interface ConfirmPeerPullDebitRequest {
}
```
+```typescript
+export interface AcceptPeerPullPaymentResponse {
+ transactionId: TransactionIdStr;
+}
+
+```
### ValidateIbanOp
```typescript
@@ -2780,6 +2846,17 @@ export type RunIntegrationTestOp = {
// RunIntegrationTest = "runIntegrationTest"
```
+```typescript
+export interface IntegrationTestArgs {
+ exchangeBaseUrl: string;
+ corebankApiBaseUrl: string;
+ merchantBaseUrl: string;
+ merchantAuthToken?: string;
+ amountToWithdraw: AmountString;
+ amountToSpend: AmountString;
+}
+
+```
### RunIntegrationTestV2Op
```typescript
@@ -2789,12 +2866,21 @@ export type RunIntegrationTestOp = {
*/
export type RunIntegrationTestV2Op = {
op: WalletApiOperation.RunIntegrationTestV2;
- request: IntegrationTestArgs;
+ request: IntegrationTestV2Args;
response: EmptyObject;
};
// RunIntegrationTestV2 = "runIntegrationTestV2"
```
+```typescript
+export interface IntegrationTestV2Args {
+ exchangeBaseUrl: string;
+ corebankApiBaseUrl: string;
+ merchantBaseUrl: string;
+ merchantAuthToken?: string;
+}
+
+```
### TestCryptoOp
```typescript
@@ -2885,22 +2971,6 @@ export interface TestPayResult {
```
-### GetPendingTasksOp
-```typescript
-/**
- * Get wallet-internal pending tasks.
- *
- * @deprecated
- */
-export type GetPendingTasksOp = {
- op: WalletApiOperation.GetPendingOperations;
- request: EmptyObject;
- response: any;
-};
-// GetPendingOperations = "getPendingOperations"
-
-```
-
### GetActiveTasksOp
```typescript
export type GetActiveTasksOp = {
@@ -3132,32 +3202,6 @@ export interface TestingSetTimetravelRequest {
```
-### TestingListTasksForTransactionOp
-```typescript
-/**
- * Add an offset to the wallet's internal time.
- */
-export type TestingListTasksForTransactionOp = {
- op: WalletApiOperation.TestingListTaskForTransaction;
- request: TestingListTasksForTransactionRequest;
- response: TestingListTasksForTransactionsResponse;
-};
-// TestingListTaskForTransaction = "testingListTasksForTransaction"
-
-```
-```typescript
-export interface TestingListTasksForTransactionRequest {
- transactionId: TransactionIdStr;
-}
-
-```
-```typescript
-export interface TestingListTasksForTransactionsResponse {
- taskIdList: string[];
-}
-
-```
-
### TestingWaitTransactionsFinalOp
```typescript
/**
@@ -3236,12 +3280,19 @@ export type TestingPingOp = {
```typescript
export type TestingGetReserveHistoryOp = {
op: WalletApiOperation.TestingGetReserveHistory;
- request: EmptyObject;
+ request: TestingGetReserveHistoryRequest;
response: any;
};
// TestingGetReserveHistory = "testingGetReserveHistory"
```
+```typescript
+export interface TestingGetReserveHistoryRequest {
+ reservePub: string;
+ exchangeBaseUrl: string;
+}
+
+```
### TestingResetAllRetriesOp
```typescript
@@ -3432,8 +3483,7 @@ export interface WalletCoreVersion {
}
```
```typescript
-// group: Initialization
-type EmptyObject = Record<string, never>;
+export type EmptyObject = Record<string, never>;
```
```typescript
export type ScopeInfo = ScopeInfoGlobal | ScopeInfoExchange | ScopeInfoAuditor;
@@ -3486,11 +3536,6 @@ export interface ConvertAmountRequest {
}
```
```typescript
-export type PaytoString = string & {
- [__payto_str]: true;
-};
-```
-```typescript
export interface AmountResponse {
effectiveAmount: AmountString;
rawAmount: AmountString;
@@ -3744,6 +3789,11 @@ interface WithdrawalDetailsForManualTransfer {
* Is the reserve ready for withdrawal?
*/
reserveIsReady: boolean;
+ /**
+ * How long does the exchange wait to transfer back funds from a
+ * reserve?
+ */
+ reserveClosingDelay: TalerProtocolDuration;
}
```
```typescript
@@ -3795,6 +3845,9 @@ export interface WithdrawalExchangeAccountDetails {
}
```
```typescript
+/**
+ * DD51 https://docs.taler.net/design-documents/051-fractional-digits.html
+ */
export interface CurrencySpecification {
name: string;
num_fractional_input_digits: Integer;
@@ -3847,6 +3900,10 @@ interface WithdrawalDetailsForTalerBankIntegrationApi {
* Is the reserve ready for withdrawal?
*/
reserveIsReady: boolean;
+ /**
+ * Is the bank transfer for the withdrawal externally confirmed?
+ */
+ externalConfirmation?: boolean;
exchangeCreditAccountDetails?: WithdrawalExchangeAccountDetails[];
}
```
@@ -4309,6 +4366,7 @@ export declare enum ExchangeUpdateStatus {
UnavailableUpdate = "unavailable-update",
Ready = "ready",
ReadyUpdate = "ready-update",
+ OutdatedUpdate = "outdated-update",
}
```
```typescript
@@ -4325,6 +4383,13 @@ export interface ForcedDenomSel {
}
```
```typescript
+export interface AcceptWithdrawalResponse {
+ reservePub: string;
+ confirmTransferUrl?: string;
+ transactionId: TransactionIdStr;
+}
+```
+```typescript
/**
* Result of a prepare pay operation.
*/
@@ -4395,13 +4460,15 @@ export interface ExchangeHandle {
export interface Product {
product_id?: string;
description: string;
- description_i18n?: InternationalizedString;
+ description_i18n?: {
+ [lang_tag: string]: string;
+ };
quantity?: Integer;
unit?: string;
price?: AmountString;
image?: ImageDataUrl;
taxes?: Tax[];
- delivery_date?: TalerProtocolTimestamp;
+ delivery_date?: Timestamp;
}
```
```typescript
@@ -4541,13 +4608,3 @@ export interface PeerContractTerms {
purse_expiration: TalerProtocolTimestamp;
}
```
-```typescript
-export interface IntegrationTestArgs {
- exchangeBaseUrl: string;
- corebankApiBaseUrl: string;
- merchantBaseUrl: string;
- merchantAuthToken?: string;
- amountToWithdraw: AmountString;
- amountToSpend: AmountString;
-}
-```