gnunet-svn
[Top][All Lists]
Advanced

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

[taler-docs] branch master updated: wallet-core api


From: gnunet
Subject: [taler-docs] branch master updated: wallet-core api
Date: Tue, 05 Sep 2023 18:14:45 +0200

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

dold pushed a commit to branch master
in repository docs.

The following commit(s) were added to refs/heads/master by this push:
     new f9fd431f wallet-core api
f9fd431f is described below

commit f9fd431f42c9df99bd9b5bc83119fb981a3bd211
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Sep 5 18:14:37 2023 +0200

    wallet-core api
---
 extract-tsdefs/pnpm-lock.yaml |  34 +++--
 wallet/wallet-core.md         | 297 ++++++++++++++++++++++++++++++++----------
 2 files changed, 246 insertions(+), 85 deletions(-)

diff --git a/extract-tsdefs/pnpm-lock.yaml b/extract-tsdefs/pnpm-lock.yaml
index 9de1119e..0bc6ff8e 100644
--- a/extract-tsdefs/pnpm-lock.yaml
+++ b/extract-tsdefs/pnpm-lock.yaml
@@ -1,34 +1,40 @@
-lockfileVersion: 5.4
+lockfileVersion: '6.0'
 
-specifiers:
-  '@types/node': ^18.8.1
-  '@types/prettier': ^2.7.1
-  prettier: ^2.7.1
-  typescript: ^4.8.4
+settings:
+  autoInstallPeers: true
+  excludeLinksFromLockfile: false
 
 devDependencies:
-  '@types/node': 18.8.1
-  '@types/prettier': 2.7.1
-  prettier: 2.7.1
-  typescript: 4.8.4
+  '@types/node':
+    specifier: ^18.8.1
+    version: 18.8.1
+  '@types/prettier':
+    specifier: ^2.7.1
+    version: 2.7.1
+  prettier:
+    specifier: ^2.7.1
+    version: 2.7.1
+  typescript:
+    specifier: ^4.8.4
+    version: 4.8.4
 
 packages:
 
-  /@types/node/18.8.1:
+  /@types/node@18.8.1:
     resolution: {integrity: 
sha512-vuYaNuEIbOYLTLUAJh50ezEbvxrD43iby+lpUA2aa148Nh5kX/AVO/9m1Ahmbux2iU5uxJTNF9g2Y+31uml7RQ==}
     dev: true
 
-  /@types/prettier/2.7.1:
+  /@types/prettier@2.7.1:
     resolution: {integrity: 
sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==}
     dev: true
 
-  /prettier/2.7.1:
+  /prettier@2.7.1:
     resolution: {integrity: 
sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==}
     engines: {node: '>=10.13.0'}
     hasBin: true
     dev: true
 
-  /typescript/4.8.4:
+  /typescript@4.8.4:
     resolution: {integrity: 
sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==}
     engines: {node: '>=4.2.0'}
     hasBin: true
diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md
index 1b97c9df..35d533c2 100644
--- a/wallet/wallet-core.md
+++ b/wallet/wallet-core.md
@@ -31,12 +31,13 @@ This file is auto-generated from 
[wallet-core](https://git.taler.net/wallet-core
 * [AcceptManualWithdrawalOp](#acceptmanualwithdrawalop)
 ###  Merchant Payments
 * [PreparePayForUriOp](#preparepayforuriop)
+* [SharePaymentOp](#sharepaymentop)
 * [PreparePayForTemplateOp](#preparepayfortemplateop)
 * [GetContractTermsDetailsOp](#getcontracttermsdetailsop)
 * [ConfirmPayOp](#confirmpayop)
 * [StartRefundQueryForUriOp](#startrefundqueryforuriop)
 * [StartRefundQueryOp](#startrefundqueryop)
-###  Tipping
+###  Rewards
 * [PrepareTipOp](#preparetipop)
 * [AcceptTipOp](#accepttipop)
 ###  Exchange Management
@@ -49,6 +50,7 @@ This file is auto-generated from 
[wallet-core](https://git.taler.net/wallet-core
 * [GetExchangeTosOp](#getexchangetosop)
 * [GetExchangeDetailedInfoOp](#getexchangedetailedinfoop)
 * [ListCurrenciesOp](#listcurrenciesop)
+* [GetScopedCurrencyInfoOp](#getscopedcurrencyinfoop)
 ###  Deposits
 * [GenerateDepositGroupTxIdOp](#generatedepositgrouptxidop)
 * [CreateDepositGroupOp](#createdepositgroupop)
@@ -62,7 +64,10 @@ This file is auto-generated from 
[wallet-core](https://git.taler.net/wallet-core
 * [RemoveBackupProviderOp](#removebackupproviderop)
 * [GetBackupInfoOp](#getbackupinfoop)
 * [SetWalletDeviceIdOp](#setwalletdeviceidop)
-* [ExportBackupPlainOp](#exportbackupplainop)
+* [ListStoredBackupsOp](#liststoredbackupsop)
+* [CreateStoredBackupsOp](#createstoredbackupsop)
+* [RecoverStoredBackupsOp](#recoverstoredbackupsop)
+* [DeleteStoredBackupOp](#deletestoredbackupop)
 ###  Peer Payments
 * [CheckPeerPushDebitOp](#checkpeerpushdebitop)
 * [InitiatePeerPushDebitOp](#initiatepeerpushdebitop)
@@ -90,6 +95,7 @@ This file is auto-generated from 
[wallet-core](https://git.taler.net/wallet-core
 * [WithdrawFakebankOp](#withdrawfakebankop)
 * [GetPendingTasksOp](#getpendingtasksop)
 * [DumpCoinsOp](#dumpcoinsop)
+* [TestingSetTimetravelOp](#testingsettimetravelop)
 * [SetCoinSuspendedOp](#setcoinsuspendedop)
 * [ForceRefreshOp](#forcerefreshop)
 ## Operation Reference
@@ -161,24 +167,6 @@ export interface Balance {
   requiresUserInput: boolean;
 }
 
-```
-```typescript
-export type ScopeInfo =
-  | {
-      type: ScopeType.Global;
-      currency: string;
-    }
-  | {
-      type: ScopeType.Exchange;
-      currency: string;
-      url: string;
-    }
-  | {
-      type: ScopeType.Auditor;
-      currency: string;
-      url: string;
-    };
-
 ```
 
 ### GetBalancesDetailOp
@@ -373,6 +361,7 @@ export interface TransactionsRequest {
    * If true, include all refreshes in the transactions list.
    */
   includeRefreshes?: boolean;
+  filterByState?: TransactionStateFilter;
 }
 
 ```
@@ -696,6 +685,30 @@ export interface PreparePayRequest {
 
 ```
 
+### SharePaymentOp
+```typescript
+export type SharePaymentOp = {
+  op: WalletApiOperation.SharePayment;
+  request: SharePaymentRequest;
+  response: SharePaymentResult;
+};
+// SharePayment = "sharePayment"
+
+```
+```typescript
+export interface SharePaymentRequest {
+  merchantBaseUrl: string;
+  orderId: string;
+}
+
+```
+```typescript
+export interface SharePaymentResult {
+  privatePayUri: string;
+}
+
+```
+
 ### PreparePayForTemplateOp
 ```typescript
 /**
@@ -801,7 +814,11 @@ export type ConfirmPayOp = {
 ```
 ```typescript
 export interface ConfirmPayRequest {
-  proposalId: string;
+  /**
+   * @deprecated use transactionId instead
+   */
+  proposalId?: string;
+  transactionId?: string;
   sessionId?: string;
   forcedCoinSel?: ForcedCoinSel;
 }
@@ -877,19 +894,19 @@ export interface StartRefundQueryRequest {
 ### PrepareTipOp
 ```typescript
 /**
- * Query and store information about a tip.
+ * Query and store information about a reward.
  */
 export type PrepareTipOp = {
-  op: WalletApiOperation.PrepareTip;
-  request: PrepareTipRequest;
-  response: PrepareTipResult;
+  op: WalletApiOperation.PrepareReward;
+  request: PrepareRewardRequest;
+  response: PrepareRewardResult;
 };
-// PrepareTip = "prepareTip"
+// PrepareReward = "prepareReward"
 
 ```
 ```typescript
-export interface PrepareTipRequest {
-  talerTipUri: string;
+export interface PrepareRewardRequest {
+  talerRewardUri: string;
 }
 
 ```
@@ -901,7 +918,7 @@ export interface PrepareTipResult {
    *
    * @deprecated use transactionId instead
    */
-  walletTipId: string;
+  walletRewardId: string;
   /**
    * Tip transaction ID.
    */
@@ -913,12 +930,12 @@ export interface PrepareTipResult {
   /**
    * Amount that the merchant gave.
    */
-  tipAmountRaw: AmountString;
+  rewardAmountRaw: AmountString;
   /**
    * Amount that arrived at the wallet.
    * Might be lower than the raw amount due to fees.
    */
-  tipAmountEffective: AmountString;
+  rewardAmountEffective: AmountString;
   /**
    * Base URL of the merchant backend giving then tip.
    */
@@ -940,19 +957,19 @@ export interface PrepareTipResult {
 ### AcceptTipOp
 ```typescript
 /**
- * Accept a tip.
+ * Accept a reward.
  */
 export type AcceptTipOp = {
-  op: WalletApiOperation.AcceptTip;
-  request: AcceptTipRequest;
+  op: WalletApiOperation.AcceptReward;
+  request: AcceptRewardRequest;
   response: AcceptTipResponse;
 };
-// AcceptTip = "acceptTip"
+// AcceptReward = "acceptReward"
 
 ```
 ```typescript
-export interface AcceptTipRequest {
-  walletTipId: string;
+export interface AcceptRewardRequest {
+  walletRewardId: string;
 }
 
 ```
@@ -1045,13 +1062,17 @@ export interface PaytoUriUnknown extends 
PaytoUriGeneric {
 ```
 ```typescript
 export interface PaytoUriGeneric {
-  targetType: string;
+  targetType: PaytoType | string;
   targetPath: string;
   params: {
     [name: string]: string;
   };
 }
 
+```
+```typescript
+export type PaytoType = "iban" | "bitcoin" | "x-taler-bank";
+
 ```
 ```typescript
 export interface PaytoUriIBAN extends PaytoUriGeneric {
@@ -1279,6 +1300,35 @@ export interface WalletCurrencyInfo {
 
 ```
 
+### GetScopedCurrencyInfoOp
+```typescript
+export type GetScopedCurrencyInfoOp = {
+  op: WalletApiOperation.GetScopedCurrencyInfo;
+  request: GetCurrencyInfoRequest;
+  response: GetCurrencyInfoResponse;
+};
+// GetScopedCurrencyInfo = "getScopedCurrencyInfo"
+
+```
+```typescript
+export interface GetCurrencyInfoRequest {
+  scope: ScopeInfo;
+}
+
+```
+```typescript
+export interface GetCurrencyInfoResponse {
+  decimalSeparator: string;
+  numFractionalDigits: number;
+  numTinyDigits: number;
+  /**
+   * Is the currency name leading or trailing?
+   */
+  isCurrencyNameLeading: boolean;
+}
+
+```
+
 ### GenerateDepositGroupTxIdOp
 ```typescript
 /**
@@ -1670,17 +1720,73 @@ export interface SetWalletDeviceIdRequest {
 
 ```
 
-### ExportBackupPlainOp
+### ListStoredBackupsOp
 ```typescript
-/**
- * Export a backup JSON, mostly useful for testing.
- */
-export type ExportBackupPlainOp = {
-  op: WalletApiOperation.ExportBackupPlain;
+export type ListStoredBackupsOp = {
+  op: WalletApiOperation.ListStoredBackups;
+  request: EmptyObject;
+  response: StoredBackupList;
+};
+// ListStoredBackups = "listStoredBackups"
+
+```
+```typescript
+export interface StoredBackupList {
+  storedBackups: {
+    name: string;
+  }[];
+}
+
+```
+
+### CreateStoredBackupsOp
+```typescript
+export type CreateStoredBackupsOp = {
+  op: WalletApiOperation.CreateStoredBackup;
   request: EmptyObject;
-  response: WalletBackupContentV1;
+  response: CreateStoredBackupResponse;
 };
-// ExportBackupPlain = "exportBackupPlain"
+// CreateStoredBackup = "createStoredBackup"
+
+```
+```typescript
+export interface CreateStoredBackupResponse {
+  name: string;
+}
+
+```
+
+### RecoverStoredBackupsOp
+```typescript
+export type RecoverStoredBackupsOp = {
+  op: WalletApiOperation.RecoverStoredBackup;
+  request: RecoverStoredBackupRequest;
+  response: EmptyObject;
+};
+// RecoverStoredBackup = "recoverStoredBackup"
+
+```
+```typescript
+export interface RecoverStoredBackupRequest {
+  name: string;
+}
+
+```
+
+### DeleteStoredBackupOp
+```typescript
+export type DeleteStoredBackupOp = {
+  op: WalletApiOperation.DeleteStoredBackup;
+  request: DeleteStoredBackupRequest;
+  response: EmptyObject;
+};
+// DeleteStoredBackup = "deleteStoredBackup"
+
+```
+```typescript
+export interface DeleteStoredBackupRequest {
+  name: string;
+}
 
 ```
 
@@ -1804,8 +1910,11 @@ export type ConfirmPeerPushCreditOp = {
 export interface ConfirmPeerPushCreditRequest {
   /**
    * Transparent identifier of the incoming peer push payment.
+   *
+   * @deprecated specify transactionId instead!
    */
-  peerPushPaymentIncomingId: string;
+  peerPushPaymentIncomingId?: string;
+  transactionId?: string;
 }
 
 ```
@@ -1835,6 +1944,11 @@ export interface CheckPeerPullCreditResponse {
   exchangeBaseUrl: string;
   amountRaw: AmountString;
   amountEffective: AmountString;
+  /**
+   * Number of coins that will be used,
+   * can be used by the UI to warn if excessively large.
+   */
+  numCoins: number;
 }
 
 ```
@@ -1864,6 +1978,8 @@ export interface InitiatePeerPullCreditResponse {
   /**
    * Taler URI for the other party to make the payment
    * that was requested.
+   *
+   * @deprecated since it's not necessarily valid yet until the tx is in the 
right state
    */
   talerUri: string;
   transactionId: TransactionIdStr;
@@ -1922,8 +2038,11 @@ export type ConfirmPeerPullDebitOp = {
 export interface ConfirmPeerPullDebitRequest {
   /**
    * Transparent identifier of the incoming peer pull payment.
+   *
+   * @deprecated use transactionId instead
    */
-  peerPullPaymentIncomingId: string;
+  peerPullPaymentIncomingId?: string;
+  transactionId?: string;
 }
 
 ```
@@ -2288,7 +2407,7 @@ export enum PendingTaskType {
   Purchase = "purchase",
   Refresh = "refresh",
   Recoup = "recoup",
-  TipPickup = "tip-pickup",
+  RewardPickup = "reward-pickup",
   Withdraw = "withdraw",
   Deposit = "deposit",
   Backup = "backup",
@@ -2458,7 +2577,7 @@ export interface PendingRefreshTask {
  * The wallet is picking up a tip that the user has accepted.
  */
 export interface PendingTipPickupTask {
-  type: PendingTaskType.TipPickup;
+  type: PendingTaskType.RewardPickup;
   tipId: string;
   merchantBaseUrl: string;
   merchantTipId: string;
@@ -2699,6 +2818,26 @@ export type Edx25519PrivateKeyEnc = FlavorP<
 
 ```
 
+### TestingSetTimetravelOp
+```typescript
+/**
+ * Add an offset to the wallet's internal time.
+ */
+export type TestingSetTimetravelOp = {
+  op: WalletApiOperation.TestingSetTimetravel;
+  request: TestingSetTimetravelRequest;
+  response: EmptyObject;
+};
+// TestingSetTimetravel = "testingSetTimetravel"
+
+```
+```typescript
+export interface TestingSetTimetravelRequest {
+  offsetMs: number;
+}
+
+```
+
 ### SetCoinSuspendedOp
 ```typescript
 /**
@@ -2745,6 +2884,9 @@ export interface ForceRefreshRequest {
 ## Common Declarations
 ```typescript
 export interface WalletCoreVersion {
+  /**
+   * @deprecated
+   */
   hash: string | undefined;
   version: string;
   exchange: string;
@@ -2757,6 +2899,9 @@ export interface WalletCoreVersion {
 }
 ```
 ```typescript
+export type ScopeInfo = ScopeInfoGlobal | ScopeInfoExchange | ScopeInfoAuditor;
+```
+```typescript
 /**
  * How the amount should be interpreted in a transaction
  * Effective = how the balance is change
@@ -2796,7 +2941,7 @@ export type Transaction =
   | TransactionWithdrawal
   | TransactionPayment
   | TransactionRefund
-  | TransactionTip
+  | TransactionReward
   | TransactionRefresh
   | TransactionDeposit
   | TransactionPeerPullCredit
@@ -2867,7 +3012,7 @@ export declare enum TransactionType {
   Payment = "payment",
   Refund = "refund",
   Refresh = "refresh",
-  Tip = "tip",
+  Reward = "reward",
   Deposit = "deposit",
   PeerPushDebit = "peer-push-debit",
   PeerPushCredit = "peer-push-credit",
@@ -3214,8 +3359,8 @@ export interface RefundPaymentInfo {
 }
 ```
 ```typescript
-export interface TransactionTip extends TransactionCommon {
-  type: TransactionType.Tip;
+export interface TransactionReward extends TransactionCommon {
+  type: TransactionType.Reward;
   amountRaw: AmountString;
   /**
    * More information about the merchant
@@ -3441,13 +3586,9 @@ export interface ExchangeListItem {
   currency: string | undefined;
   paytoUris: string[];
   tosStatus: ExchangeTosStatus;
-  exchangeStatus: ExchangeEntryStatus;
+  exchangeEntryStatus: ExchangeEntryStatus;
+  exchangeUpdateStatus: ExchangeUpdateStatus;
   ageRestrictionOptions: number[];
-  /**
-   * Permanently added to the wallet, as opposed to just
-   * temporarily queried.
-   */
-  permanent: boolean;
   /**
    * Information about the last error that occurred when trying
    * to update the exchange info.
@@ -3457,18 +3598,27 @@ export interface ExchangeListItem {
 ```
 ```typescript
 export declare enum ExchangeTosStatus {
-  New = "new",
+  Pending = "pending",
+  Proposed = "proposed",
   Accepted = "accepted",
-  Changed = "changed",
-  NotFound = "not-found",
-  Unknown = "unknown",
 }
 ```
 ```typescript
 export declare enum ExchangeEntryStatus {
-  Unknown = "unknown",
-  Outdated = "outdated",
-  Ok = "ok",
+  Preset = "preset",
+  Ephemeral = "ephemeral",
+  Used = "used",
+}
+```
+```typescript
+export declare enum ExchangeUpdateStatus {
+  Initial = "initial",
+  InitialUpdate = "initial(update)",
+  Suspended = "suspended",
+  Failed = "failed",
+  OutdatedUpdate = "outdated(update)",
+  Ready = "ready",
+  ReadyUpdate = "ready(update)",
 }
 ```
 ```typescript
@@ -3497,10 +3647,12 @@ export type PreparePayResult =
 export interface PreparePayResultInsufficientBalance {
   status: PreparePayResultType.InsufficientBalance;
   transactionId: TransactionIdStr;
+  /**
+   * @deprecated use transactionId
+   */
   proposalId: string;
   contractTerms: MerchantContractTerms;
   amountRaw: string;
-  noncePriv: string;
   talerUri: string;
   balanceDetails: PayMerchantInsufficientBalanceDetails;
 }
@@ -3686,10 +3838,13 @@ export interface PreparePayResultAlreadyConfirmed {
   contractTerms: MerchantContractTerms;
   paid: boolean;
   amountRaw: string;
-  amountEffective: string;
+  amountEffective: string | undefined;
   contractTermsHash: string;
+  /**
+   * @deprecated use transactionId
+   */
   proposalId: string;
-  talerUri?: string;
+  talerUri: string;
 }
 ```
 ```typescript
@@ -3707,7 +3862,6 @@ export interface PreparePayResultPaymentPossible {
   contractTermsHash: string;
   amountRaw: string;
   amountEffective: string;
-  noncePriv: string;
   talerUri: string;
 }
 ```
@@ -3725,6 +3879,7 @@ export interface ForcedCoinSel {
 ```typescript
 export interface AddExchangeRequest {
   exchangeBaseUrl: string;
+  masterPub?: string;
   forceUpdate?: boolean;
 }
 ```

-- 
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]