summaryrefslogtreecommitdiff
path: root/wallet
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-05 18:14:37 +0200
committerFlorian Dold <florian@dold.me>2023-09-05 18:14:43 +0200
commitf9fd431f42c9df99bd9b5bc83119fb981a3bd211 (patch)
tree4a814c70b62b1536e2226f0daf5f0a96f679a7a3 /wallet
parent47a86dfcb9af85ee38f4374eb49d2ab47d348e34 (diff)
downloaddocs-f9fd431f42c9df99bd9b5bc83119fb981a3bd211.tar.gz
docs-f9fd431f42c9df99bd9b5bc83119fb981a3bd211.tar.bz2
docs-f9fd431f42c9df99bd9b5bc83119fb981a3bd211.zip
wallet-core api
Diffstat (limited to 'wallet')
-rw-r--r--wallet/wallet-core.md297
1 files changed, 226 insertions, 71 deletions
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
@@ -162,24 +168,6 @@ export interface Balance {
}
```
-```typescript
-export type ScopeInfo =
- | {
- type: ScopeType.Global;
- currency: string;
- }
- | {
- type: ScopeType.Exchange;
- currency: string;
- url: string;
- }
- | {
- type: ScopeType.Auditor;
- currency: string;
- url: string;
- };
-
-```
### GetBalancesDetailOp
```typescript
@@ -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,7 +1062,7 @@ export interface PaytoUriUnknown extends PaytoUriGeneric {
```
```typescript
export interface PaytoUriGeneric {
- targetType: string;
+ targetType: PaytoType | string;
targetPath: string;
params: {
[name: string]: string;
@@ -1054,6 +1071,10 @@ export interface PaytoUriGeneric {
```
```typescript
+export type PaytoType = "iban" | "bitcoin" | "x-taler-bank";
+
+```
+```typescript
export interface PaytoUriIBAN extends PaytoUriGeneric {
isKnown: true;
targetType: "iban";
@@ -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,14 +3586,10 @@ 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;
}
```