gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-docs] 01/02: updated api


From: gnunet
Subject: [taler-docs] 01/02: updated api
Date: Mon, 23 Oct 2023 14:48:35 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository docs.

commit f497ca890f7bcdef67d0ef68ebcc34520dec23d9
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Oct 23 09:48:05 2023 -0300

    updated api
---
 wallet/wallet-core.md | 368 ++++++++++++++++++++++++++++++++------------------
 1 file changed, 237 insertions(+), 131 deletions(-)

diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md
index 35d533c2..4f83f743 100644
--- a/wallet/wallet-core.md
+++ b/wallet/wallet-core.md
@@ -42,7 +42,9 @@ This file is auto-generated from 
[wallet-core](https://git.taler.net/wallet-core
 * [AcceptTipOp](#accepttipop)
 ###  Exchange Management
 * [ListExchangesOp](#listexchangesop)
+* [ListExchangesForScopedCurrencyOp](#listexchangesforscopedcurrencyop)
 * [AddExchangeOp](#addexchangeop)
+* [UpdateExchangeEntryOp](#updateexchangeentryop)
 * [ListKnownBankAccountsOp](#listknownbankaccountsop)
 * [AddKnownBankAccountsOp](#addknownbankaccountsop)
 * [ForgetKnownBankAccountsOp](#forgetknownbankaccountsop)
@@ -50,7 +52,7 @@ This file is auto-generated from 
[wallet-core](https://git.taler.net/wallet-core
 * [GetExchangeTosOp](#getexchangetosop)
 * [GetExchangeDetailedInfoOp](#getexchangedetailedinfoop)
 * [ListCurrenciesOp](#listcurrenciesop)
-* [GetScopedCurrencyInfoOp](#getscopedcurrencyinfoop)
+* [GetCurrencySpecificationOp](#getcurrencyspecificationop)
 ###  Deposits
 * [GenerateDepositGroupTxIdOp](#generatedepositgrouptxidop)
 * [CreateDepositGroupOp](#createdepositgroupop)
@@ -92,10 +94,13 @@ This file is auto-generated from 
[wallet-core](https://git.taler.net/wallet-core
 * [WithdrawTestBalanceOp](#withdrawtestbalanceop)
 * [WithdrawTestkudosOp](#withdrawtestkudosop)
 * [TestPayOp](#testpayop)
-* [WithdrawFakebankOp](#withdrawfakebankop)
 * [GetPendingTasksOp](#getpendingtasksop)
 * [DumpCoinsOp](#dumpcoinsop)
 * [TestingSetTimetravelOp](#testingsettimetravelop)
+* [TestingWaitTransactionsFinalOp](#testingwaittransactionsfinalop)
+* [TestingWaitRefreshesFinalOp](#testingwaitrefreshesfinalop)
+* [TestingWaitTasksProcessedOp](#testingwaittasksprocessedop)
+* [TestingWaitTransactionStateOp](#testingwaittransactionstateop)
 * [SetCoinSuspendedOp](#setcoinsuspendedop)
 * [ForceRefreshOp](#forcerefreshop)
 ## Operation Reference
@@ -153,12 +158,12 @@ export type GetBalancesOp = {
 ```
 ```typescript
 export interface BalancesResponse {
-  balances: Balance[];
+  balances: WalletBalance[];
 }
 
 ```
 ```typescript
-export interface Balance {
+export interface WalletBalance {
   scopeInfo: ScopeInfo;
   available: AmountString;
   pendingIncoming: AmountString;
@@ -357,6 +362,12 @@ export interface TransactionsRequest {
    * if present, results will be limited to transactions related to the given 
search string
    */
   search?: string;
+  /**
+   * Sort order of the transaction items.
+   * By default, items are sorted ascending by their
+   * main timestamp.
+   */
+  sort?: "ascending" | "descending";
   /**
    * If true, include all refreshes in the transactions list.
    */
@@ -530,7 +541,7 @@ export type GetWithdrawalDetailsForAmountOp = {
 ```typescript
 export interface GetWithdrawalDetailsForAmountRequest {
   exchangeBaseUrl: string;
-  amount: string;
+  amount: AmountString;
   restrictAge?: number;
 }
 
@@ -645,7 +656,7 @@ export type AcceptManualWithdrawalOp = {
 ```typescript
 export interface AcceptManualWithdrawalRequest {
   exchangeBaseUrl: string;
-  amount: string;
+  amount: AmountString;
   restrictAge?: number;
 }
 
@@ -752,12 +763,6 @@ export interface GetContractTermsDetailsRequest {
  * processing in the wallet.
  */
 export interface WalletContractData {
-  products?: Product[];
-  summaryI18n:
-    | {
-        [lang_tag: string]: string;
-      }
-    | undefined;
   /**
    * Fulfillment URL, or the empty string if the order has no fulfillment URL.
    *
@@ -774,6 +779,11 @@ export interface WalletContractData {
   orderId: string;
   merchantBaseUrl: string;
   summary: string;
+  summaryI18n:
+    | {
+        [lang_tag: string]: string;
+      }
+    | undefined;
   autoRefund: TalerProtocolDuration | undefined;
   maxWireFee: AmountString;
   wireFeeAmortization: number;
@@ -785,8 +795,6 @@ export interface WalletContractData {
   wireInfoHash: string;
   maxDepositFee: AmountString;
   minimumAge?: number;
-  deliveryDate: TalerProtocolTimestamp | undefined;
-  deliveryLocation: Location | undefined;
 }
 
 ```
@@ -1001,6 +1009,39 @@ export interface ExchangesListResponse {
 
 ```
 
+### ListExchangesForScopedCurrencyOp
+```typescript
+/**
+ * List exchanges that are available for withdrawing a particular
+ * scoped currency.
+ */
+export type ListExchangesForScopedCurrencyOp = {
+  op: WalletApiOperation.ListExchangesForScopedCurrency;
+  request: ListExchangesForScopedCurrencyRequest;
+  response: ExchangesShortListResponse;
+};
+// ListExchangesForScopedCurrency = "listExchangesForScopedCurrency"
+
+```
+```typescript
+export interface ListExchangesForScopedCurrencyRequest {
+  scope: ScopeInfo;
+}
+
+```
+```typescript
+export interface ExchangesShortListResponse {
+  exchanges: ShortExchangeListItem[];
+}
+
+```
+```typescript
+export interface ShortExchangeListItem {
+  exchangeBaseUrl: string;
+}
+
+```
+
 ### AddExchangeOp
 ```typescript
 /**
@@ -1015,6 +1056,26 @@ export type AddExchangeOp = {
 
 ```
 
+### UpdateExchangeEntryOp
+```typescript
+/**
+ * Update an exchange entry.
+ */
+export type UpdateExchangeEntryOp = {
+  op: WalletApiOperation.UpdateExchangeEntry;
+  request: UpdateExchangeEntryRequest;
+  response: EmptyObject;
+};
+// UpdateExchangeEntry = "updateExchangeEntry"
+
+```
+```typescript
+export interface UpdateExchangeEntryRequest {
+  exchangeBaseUrl: string;
+}
+
+```
+
 ### ListKnownBankAccountsOp
 ```typescript
 export type ListKnownBankAccountsOp = {
@@ -1226,7 +1287,6 @@ export interface ExchangeFullDetails {
   exchangeBaseUrl: string;
   currency: string;
   paytoUris: string[];
-  tos: ExchangeTosStatusDetails;
   auditors: ExchangeAuditor[];
   wireInfo: WireInfo;
   denomFees: DenomOperationMap<FeeDescription[]>;
@@ -1234,15 +1294,6 @@ export interface ExchangeFullDetails {
   globalFees: FeeDescription[];
 }
 
-```
-```typescript
-export interface ExchangeTosStatusDetails {
-  acceptedVersion?: string;
-  currentVersion?: string;
-  contentType?: string;
-  content?: string;
-}
-
 ```
 ```typescript
 export interface WireInfo {
@@ -1300,31 +1351,39 @@ export interface WalletCurrencyInfo {
 
 ```
 
-### GetScopedCurrencyInfoOp
+### GetCurrencySpecificationOp
 ```typescript
-export type GetScopedCurrencyInfoOp = {
-  op: WalletApiOperation.GetScopedCurrencyInfo;
-  request: GetCurrencyInfoRequest;
-  response: GetCurrencyInfoResponse;
+export type GetCurrencySpecificationOp = {
+  op: WalletApiOperation.GetCurrencySpecification;
+  request: GetCurrencySpecificationRequest;
+  response: GetCurrencySpecificationResponse;
 };
-// GetScopedCurrencyInfo = "getScopedCurrencyInfo"
+// GetCurrencySpecification = "getCurrencySpecification"
 
 ```
 ```typescript
-export interface GetCurrencyInfoRequest {
+export interface GetCurrencySpecificationRequest {
   scope: ScopeInfo;
 }
 
 ```
 ```typescript
-export interface GetCurrencyInfoResponse {
-  decimalSeparator: string;
-  numFractionalDigits: number;
-  numTinyDigits: number;
-  /**
-   * Is the currency name leading or trailing?
-   */
-  isCurrencyNameLeading: boolean;
+export interface GetCurrencySpecificationResponse {
+  currencySpecification: CurrencySpecification;
+}
+
+```
+```typescript
+export interface CurrencySpecification {
+  name: string;
+  decimal_separator: string;
+  num_fractional_input_digits: Integer;
+  num_fractional_normal_digits: Integer;
+  num_fractional_trailing_zero_digits: Integer;
+  is_currency_name_leading: boolean;
+  alt_unit_names: {
+    [log10: string]: string;
+  };
 }
 
 ```
@@ -1887,7 +1946,7 @@ export interface PreparePeerPushCreditResponse {
   amount: AmountString;
   amountRaw: AmountString;
   amountEffective: AmountString;
-  peerPushPaymentIncomingId: string;
+  peerPushCreditId: string;
   transactionId: string;
 }
 
@@ -1913,7 +1972,7 @@ export interface ConfirmPeerPushCreditRequest {
    *
    * @deprecated specify transactionId instead!
    */
-  peerPushPaymentIncomingId?: string;
+  peerPushCreditId?: string;
   transactionId?: string;
 }
 
@@ -2015,7 +2074,7 @@ export interface PreparePeerPullDebitResponse {
   amount: AmountString;
   amountRaw: AmountString;
   amountEffective: AmountString;
-  peerPullPaymentIncomingId: string;
+  peerPullDebitId: string;
   transactionId: string;
 }
 
@@ -2041,7 +2100,7 @@ export interface ConfirmPeerPullDebitRequest {
    *
    * @deprecated use transactionId instead
    */
-  peerPullPaymentIncomingId?: string;
+  peerPullDebitId?: string;
   transactionId?: string;
 }
 
@@ -2206,11 +2265,11 @@ export type WithdrawTestBalanceOp = {
 ```
 ```typescript
 export interface WithdrawTestBalanceRequest {
-  amount: string;
+  amount: AmountString;
   /**
-   * Bank access API base URL.
+   * Corebank API base URL.
    */
-  bankAccessApiBaseUrl: string;
+  corebankApiBaseUrl: string;
   exchangeBaseUrl: string;
   forcedDenomSel?: ForcedDenomSel;
 }
@@ -2249,7 +2308,7 @@ export type TestPayOp = {
 export interface TestPayArgs {
   merchantBaseUrl: string;
   merchantAuthToken?: string;
-  amount: string;
+  amount: AmountString;
   summary: string;
   forcedCoinSel?: ForcedCoinSel;
 }
@@ -2291,30 +2350,6 @@ export interface PayCoinSelection {
 
 ```
 
-### WithdrawFakebankOp
-```typescript
-/**
- * Make a withdrawal from a fakebank, i.e.
- * a bank where test users can be registered freely
- * and testing APIs are available.
- */
-export type WithdrawFakebankOp = {
-  op: WalletApiOperation.WithdrawFakebank;
-  request: WithdrawFakebankRequest;
-  response: EmptyObject;
-};
-// WithdrawFakebank = "withdrawFakebank"
-
-```
-```typescript
-export interface WithdrawFakebankRequest {
-  amount: AmountString;
-  exchange: string;
-  bank: string;
-}
-
-```
-
 ### GetPendingTasksOp
 ```typescript
 /**
@@ -2396,7 +2431,7 @@ export interface PendingTaskInfoCommon {
    * Retry info.  Currently used to stop the wallet after any operation
    * exceeds a number of retries.
    */
-  retryInfo?: RetryInfo;
+  retryInfo?: DbRetryInfo;
 }
 
 ```
@@ -2425,12 +2460,21 @@ export type TaskId = string & {
 
 ```
 ```typescript
-export interface RetryInfo {
-  firstTry: AbsoluteTime;
-  nextRetry: AbsoluteTime;
+export interface DbRetryInfo {
+  firstTry: DbPreciseTimestamp;
+  nextRetry: DbPreciseTimestamp;
   retryCounter: number;
 }
 
+```
+```typescript
+/**
+ * Timestamp, stored as microseconds.
+ */
+export type DbPreciseTimestamp = number & {
+  [symDbPreciseTimestamp]: true;
+};
+
 ```
 ```typescript
 export interface RetryPolicy {
@@ -2550,7 +2594,7 @@ export interface PendingExchangeCheckRefreshTask {
 export interface PendingPurchaseTask {
   type: PendingTaskType.Purchase;
   proposalId: string;
-  retryInfo?: RetryInfo;
+  retryInfo?: DbRetryInfo;
   /**
    * Status of the payment as string, used only for debugging.
    */
@@ -2568,7 +2612,7 @@ export interface PendingRefreshTask {
   lastError?: TalerErrorDetail;
   refreshGroupId: string;
   finishedPerCoin: boolean[];
-  retryInfo?: RetryInfo;
+  retryInfo?: DbRetryInfo;
 }
 
 ```
@@ -2591,7 +2635,7 @@ export interface PendingTipPickupTask {
 export interface PendingWithdrawTask {
   type: PendingTaskType.Withdraw;
   lastError: TalerErrorDetail | undefined;
-  retryInfo?: RetryInfo;
+  retryInfo?: DbRetryInfo;
   withdrawalGroupId: string;
 }
 
@@ -2600,7 +2644,7 @@ export interface PendingWithdrawTask {
 export interface PendingRecoupTask {
   type: PendingTaskType.Recoup;
   recoupGroupId: string;
-  retryInfo?: RetryInfo;
+  retryInfo?: DbRetryInfo;
   lastError: TalerErrorDetail | undefined;
 }
 
@@ -2612,7 +2656,7 @@ export interface PendingRecoupTask {
 export interface PendingDepositTask {
   type: PendingTaskType.Deposit;
   lastError: TalerErrorDetail | undefined;
-  retryInfo: RetryInfo | undefined;
+  retryInfo: DbRetryInfo | undefined;
   depositGroupId: string;
 }
 
@@ -2651,7 +2695,7 @@ export interface PendingPeerPullInitiationTask {
  */
 export interface PendingPeerPullDebitTask {
   type: PendingTaskType.PeerPullDebit;
-  peerPullPaymentIncomingId: string;
+  peerPullDebitId: string;
 }
 
 ```
@@ -2660,7 +2704,7 @@ export interface PendingPeerPullDebitTask {
  */
 export interface PendingPeerPushCreditTask {
   type: PendingTaskType.PeerPushCredit;
-  peerPushPaymentIncomingId: string;
+  peerPushCreditId: string;
 }
 
 ```
@@ -2719,7 +2763,7 @@ export interface CoinDumpJson {
     spend_allocation:
       | {
           id: string;
-          amount: string;
+          amount: AmountString;
         }
       | undefined;
     /**
@@ -2838,6 +2882,69 @@ export interface TestingSetTimetravelRequest {
 
 ```
 
+### TestingWaitTransactionsFinalOp
+```typescript
+/**
+ * Wait until all transactions are in a final state.
+ */
+export type TestingWaitTransactionsFinalOp = {
+  op: WalletApiOperation.TestingWaitTransactionsFinal;
+  request: EmptyObject;
+  response: EmptyObject;
+};
+// TestingWaitTransactionsFinal = "testingWaitTransactionsFinal"
+
+```
+
+### TestingWaitRefreshesFinalOp
+```typescript
+/**
+ * Wait until all refresh transactions are in a final state.
+ */
+export type TestingWaitRefreshesFinalOp = {
+  op: WalletApiOperation.TestingWaitRefreshesFinal;
+  request: EmptyObject;
+  response: EmptyObject;
+};
+// TestingWaitRefreshesFinal = "testingWaitRefreshesFinal"
+
+```
+
+### TestingWaitTasksProcessedOp
+```typescript
+/**
+ * Wait until all tasks have been processed and the wallet is idle.
+ */
+export type TestingWaitTasksProcessedOp = {
+  op: WalletApiOperation.TestingWaitTasksProcessed;
+  request: EmptyObject;
+  response: EmptyObject;
+};
+// TestingWaitTasksProcessed = "testingWaitTasksProcessed"
+
+```
+
+### TestingWaitTransactionStateOp
+```typescript
+/**
+ * Wait until a transaction is in a particular state.
+ */
+export type TestingWaitTransactionStateOp = {
+  op: WalletApiOperation.TestingWaitTransactionState;
+  request: TestingWaitTransactionRequest;
+  response: EmptyObject;
+};
+// TestingWaitTransactionState = "testingWaitTransactionState"
+
+```
+```typescript
+export interface TestingWaitTransactionRequest {
+  transactionId: string;
+  txState: TransactionState;
+}
+
+```
+
 ### SetCoinSuspendedOp
 ```typescript
 /**
@@ -2902,6 +3009,11 @@ export interface WalletCoreVersion {
 export type ScopeInfo = ScopeInfoGlobal | ScopeInfoExchange | ScopeInfoAuditor;
 ```
 ```typescript
+export type AmountString = string & {
+  [__amount_str]: true;
+};
+```
+```typescript
 /**
  * How the amount should be interpreted in a transaction
  * Effective = how the balance is change
@@ -3021,6 +3133,10 @@ export declare enum TransactionType {
 }
 ```
 ```typescript
+/**
+ * Precise timestamp, typically used in the wallet-core
+ * API but not in other Taler APIs so far.
+ */
 export interface TalerPreciseTimestamp {
   /**
    * Seconds (as integer) since epoch.
@@ -3250,19 +3366,6 @@ export interface OrderShortInfo {
    * Map from IETF BCP 47 language tags to localized summaries
    */
   summary_i18n?: InternationalizedString;
-  /**
-   * List of products that are part of the order
-   */
-  products: Product[] | undefined;
-  /**
-   * Time indicating when the order should be delivered.
-   * May be overwritten by individual products.
-   */
-  delivery_date?: TalerProtocolTimestamp;
-  /**
-   * Delivery location for (all!) products.
-   */
-  delivery_location?: Location;
   /**
    * URL of the fulfillment, given by the merchant
    */
@@ -3308,27 +3411,6 @@ export interface InternationalizedString {
 }
 ```
 ```typescript
-export interface Product {
-  product_id?: string;
-  description: string;
-  description_i18n?: {
-    [lang_tag: string]: string;
-  };
-  quantity?: number;
-  unit?: string;
-  price?: AmountString;
-  image?: string;
-  taxes?: Tax[];
-  delivery_date?: TalerProtocolTimestamp;
-}
-```
-```typescript
-export interface Tax {
-  name: string;
-  tax: AmountString;
-}
-```
-```typescript
 export interface RefundInfoShort {
   transactionId: string;
   timestamp: TalerProtocolTimestamp;
@@ -3444,12 +3526,15 @@ export interface TransactionDeposit extends 
TransactionCommon {
    * Did all the deposit requests succeed?
    */
   deposited: boolean;
-  trackingState: Array<{
-    wireTransferId: string;
-    timestampExecuted: TalerProtocolTimestamp;
-    amountRaw: AmountString;
-    wireFee: AmountString;
-  }>;
+  trackingState: Array<DepositTransactionTrackingState>;
+}
+```
+```typescript
+export interface DepositTransactionTrackingState {
+  wireTransferId: string;
+  timestampExecuted: TalerProtocolTimestamp;
+  amountRaw: AmountString;
+  wireFee: AmountString;
 }
 ```
 ```typescript
@@ -3652,7 +3737,7 @@ export interface PreparePayResultInsufficientBalance {
    */
   proposalId: string;
   contractTerms: MerchantContractTerms;
-  amountRaw: string;
+  amountRaw: AmountString;
   talerUri: string;
   balanceDetails: PayMerchantInsufficientBalanceDetails;
 }
@@ -3791,6 +3876,27 @@ export interface ExchangeHandle {
 }
 ```
 ```typescript
+export interface Product {
+  product_id?: string;
+  description: string;
+  description_i18n?: {
+    [lang_tag: string]: string;
+  };
+  quantity?: number;
+  unit?: string;
+  price?: AmountString;
+  image?: string;
+  taxes?: Tax[];
+  delivery_date?: TalerProtocolTimestamp;
+}
+```
+```typescript
+export interface Tax {
+  name: string;
+  tax: AmountString;
+}
+```
+```typescript
 /**
  * Detailed reason for why the wallet's balance is insufficient.
  */
@@ -3837,8 +3943,8 @@ export interface PreparePayResultAlreadyConfirmed {
   transactionId: TransactionIdStr;
   contractTerms: MerchantContractTerms;
   paid: boolean;
-  amountRaw: string;
-  amountEffective: string | undefined;
+  amountRaw: AmountString;
+  amountEffective: AmountString | undefined;
   contractTermsHash: string;
   /**
    * @deprecated use transactionId
@@ -3860,8 +3966,8 @@ export interface PreparePayResultPaymentPossible {
   proposalId: string;
   contractTerms: MerchantContractTerms;
   contractTermsHash: string;
-  amountRaw: string;
-  amountEffective: string;
+  amountRaw: AmountString;
+  amountEffective: AmountString;
   talerUri: string;
 }
 ```
@@ -3905,10 +4011,10 @@ export interface PeerContractTerms {
 ```typescript
 export interface IntegrationTestArgs {
   exchangeBaseUrl: string;
-  bankAccessApiBaseUrl: string;
+  corebankApiBaseUrl: string;
   merchantBaseUrl: string;
   merchantAuthToken?: string;
-  amountToWithdraw: string;
-  amountToSpend: string;
+  amountToWithdraw: AmountString;
+  amountToSpend: AmountString;
 }
 ```

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]