diff options
Diffstat (limited to 'packages/taler-util/src/taler-types.ts')
-rw-r--r-- | packages/taler-util/src/taler-types.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/taler-util/src/taler-types.ts b/packages/taler-util/src/taler-types.ts index 2b8e55e38..66f98ea9a 100644 --- a/packages/taler-util/src/taler-types.ts +++ b/packages/taler-util/src/taler-types.ts @@ -978,7 +978,7 @@ export class WithdrawOperationStatusResponse { aborted: boolean; - amount: string; + amount: string | undefined; sender_wire?: string; @@ -1329,12 +1329,17 @@ export const codecForDenominationPubKey = () => .alternative(DenomKeyType.ClauseSchnorr, codecForCsDenominationPubKey()) .build("DenominationPubKey"); +export type LitAmountString = `${string}:${number}`; + declare const __amount_str: unique symbol; -export type AmountString = string & { [__amount_str]: true }; +export type AmountString = + | (string & { [__amount_str]: true }) + | LitAmountString; // export type AmountString = string; 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> => @@ -1552,7 +1557,7 @@ export const codecForWithdrawOperationStatusResponse = .property("selection_done", codecForBoolean()) .property("transfer_done", codecForBoolean()) .property("aborted", codecForBoolean()) - .property("amount", codecForString()) + .property("amount", codecOptional(codecForString())) .property("sender_wire", codecOptional(codecForString())) .property("suggested_exchange", codecOptional(codecForString())) .property("confirm_transfer_url", codecOptional(codecForString())) |