commit c22e79a816113f09e28adc10c80b3a6abe3409bb
parent 3c98ff7c5a8a50a145e4605cdfd27d3c29ceb031
Author: Florian Dold <florian@dold.me>
Date: Fri, 22 Nov 2024 21:06:42 +0100
update wallet-core API docs
Diffstat:
| M | wallet/wallet-core.md | | | 99 | ++++++++++++++++++++++--------------------------------------------------------- |
1 file changed, 27 insertions(+), 72 deletions(-)
diff --git a/wallet/wallet-core.md b/wallet/wallet-core.md
@@ -1525,7 +1525,7 @@ export interface UpdateExchangeEntryRequest {
export type ListKnownBankAccountsOp = {
op: WalletApiOperation.ListKnownBankAccounts;
request: ListKnownBankAccountsRequest;
- response: KnownBankAccounts;
+ response: ListKnownBankAccountsResponse;
};
// ListKnownBankAccounts = "listKnownBankAccounts"
@@ -1537,72 +1537,23 @@ export interface ListKnownBankAccountsRequest {
```
```typescript
-export interface KnownBankAccounts {
+export interface ListKnownBankAccountsResponse {
accounts: KnownBankAccountsInfo[];
}
```
```typescript
export interface KnownBankAccountsInfo {
- uri: PaytoUri;
- kyc_completed: boolean;
- currency: string;
- alias: string;
-}
-
-```
-```typescript
-export type PaytoUri =
- | PaytoUriUnknown
- | PaytoUriIBAN
- | PaytoUriTalerBank
- | PaytoUriBitcoin;
-
-```
-```typescript
-export interface PaytoUriUnknown extends PaytoUriGeneric {
- isKnown: false;
-}
-
-```
-```typescript
-export interface PaytoUriGeneric {
- targetType: PaytoType | string;
- targetPath: string;
- params: {
- [name: string]: string;
- };
-}
-
-```
-```typescript
-export type PaytoType = "iban" | "bitcoin" | "x-taler-bank";
-
-```
-```typescript
-export interface PaytoUriIBAN extends PaytoUriGeneric {
- isKnown: true;
- targetType: "iban";
- iban: string;
- bic?: string;
-}
-
-```
-```typescript
-export interface PaytoUriTalerBank extends PaytoUriGeneric {
- isKnown: true;
- targetType: "x-taler-bank";
- host: string;
- account: string;
-}
-
-```
-```typescript
-export interface PaytoUriBitcoin extends PaytoUriGeneric {
- isKnown: true;
- targetType: "bitcoin";
- address: string;
- segwitAddrs: Array<string>;
+ paytoUri: string;
+ /**
+ * Did we previously complete a KYC process for this bank account?
+ */
+ kycCompleted: boolean;
+ /**
+ * Currencies supported by the bank, if known.
+ */
+ currencies: string[] | undefined;
+ alias: string | undefined;
}
```
@@ -1610,18 +1561,18 @@ export interface PaytoUriBitcoin extends PaytoUriGeneric {
### AddKnownBankAccountsOp
```typescript
export type AddKnownBankAccountsOp = {
- op: WalletApiOperation.AddKnownBankAccounts;
- request: AddKnownBankAccountsRequest;
+ op: WalletApiOperation.AddKnownBankAccount;
+ request: AddKnownBankAccountRequest;
response: EmptyObject;
};
-// AddKnownBankAccounts = "addKnownBankAccounts"
+// AddKnownBankAccount = "addKnownBankAccount"
```
```typescript
-export interface AddKnownBankAccountsRequest {
- payto: string;
+export interface AddKnownBankAccountRequest {
+ paytoUri: string;
alias: string;
- currency: string;
+ currencies?: string[] | undefined;
}
```
@@ -1629,16 +1580,16 @@ export interface AddKnownBankAccountsRequest {
### ForgetKnownBankAccountsOp
```typescript
export type ForgetKnownBankAccountsOp = {
- op: WalletApiOperation.ForgetKnownBankAccounts;
- request: ForgetKnownBankAccountsRequest;
+ op: WalletApiOperation.ForgetKnownBankAccount;
+ request: ForgetKnownBankAccountRequest;
response: EmptyObject;
};
-// ForgetKnownBankAccounts = "forgetKnownBankAccounts"
+// ForgetKnownBankAccount = "forgetKnownBankAccount"
```
```typescript
-export interface ForgetKnownBankAccountsRequest {
- payto: string;
+export interface ForgetKnownBankAccountRequest {
+ paytoUri: string;
}
```
@@ -2065,6 +2016,10 @@ export interface CreateDepositGroupRequest {
transactionId?: TransactionIdStr;
depositPaytoUri: string;
amount: AmountString;
+ /**
+ * Use a fixed merchant private key.
+ */
+ testingFixedPriv?: string;
}
```