aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-04-23 12:49:42 +0200
committerFlorian Dold <florian@dold.me>2024-04-23 12:49:42 +0200
commit666b767766ef299bd58655c55ece6d4a82c3e947 (patch)
treead55f617626d96fb656ff7ab4ccb71b7931ee7b9 /packages/taler-util
parent0308290a128d29792225d7b2f4d2e22cb5d42f72 (diff)
downloadwallet-core-666b767766ef299bd58655c55ece6d4a82c3e947.tar.xz
wallet-core: support for withdrawals with forced reserve key
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/taler-types.ts1
-rw-r--r--packages/taler-util/src/wallet-types.ts11
2 files changed, 12 insertions, 0 deletions
diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts
index 2b8e55e38..392e7149c 100644
--- a/packages/taler-util/src/taler-types.ts
+++ b/packages/taler-util/src/taler-types.ts
@@ -1335,6 +1335,7 @@ export type AmountString = string & { [__amount_str]: true };
export type Base32String = string;
export type EddsaSignatureString = string;
export type EddsaPublicKeyString = string;
+export type EddsaPrivateKeyString = string;
export type CoinPublicKeyString = string;
export const codecForDenomination = (): Codec<ExchangeDenomination> =>
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 0564c45f7..9575e6d7d 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -62,6 +62,7 @@ import {
CoinEnvelope,
DenomKeyType,
DenominationPubKey,
+ EddsaPrivateKeyString,
ExchangeAuditor,
ExchangeWireAccount,
InternationalizedString,
@@ -1843,6 +1844,15 @@ export interface AcceptManualWithdrawalRequest {
exchangeBaseUrl: string;
amount: AmountString;
restrictAge?: number;
+
+ /**
+ * Instead of generating a fresh, random reserve key pair,
+ * use the provided reserve private key.
+ *
+ * Use with caution. Usage of this field may be restricted
+ * to developer mode.
+ */
+ forceReservePriv?: EddsaPrivateKeyString;
}
export const codecForAcceptManualWithdrawalRequest =
@@ -1851,6 +1861,7 @@ export const codecForAcceptManualWithdrawalRequest =
.property("exchangeBaseUrl", codecForString())
.property("amount", codecForAmountString())
.property("restrictAge", codecOptional(codecForNumber()))
+ .property("forceReservePriv", codecOptional(codecForString()))
.build("AcceptManualWithdrawalRequest");
export interface GetWithdrawalDetailsForAmountRequest {