diff options
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 65 |
1 files changed, 51 insertions, 14 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index a34a09f75..266197eb5 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -393,7 +393,6 @@ export interface ExchangeDetailsRecord { wireInfo: WireInfo; } - export interface ExchangeDetailsPointer { masterPublicKey: string; @@ -922,7 +921,6 @@ export interface RefreshSessionRecord { norevealIndex?: number; } - export enum RefundState { Failed = "failed", Applied = "applied", @@ -1186,9 +1184,9 @@ export const WALLET_BACKUP_STATE_KEY = "walletBackupState"; */ export type ConfigRecord = | { - key: typeof WALLET_BACKUP_STATE_KEY; - value: WalletBackupConfState; - } + key: typeof WALLET_BACKUP_STATE_KEY; + value: WalletBackupConfState; + } | { key: "currencyDefaultsApplied"; value: boolean }; export interface WalletBackupConfState { @@ -1405,17 +1403,17 @@ export enum BackupProviderStateTag { export type BackupProviderState = | { - tag: BackupProviderStateTag.Provisional; - } + tag: BackupProviderStateTag.Provisional; + } | { - tag: BackupProviderStateTag.Ready; - nextBackupTimestamp: TalerProtocolTimestamp; - } + tag: BackupProviderStateTag.Ready; + nextBackupTimestamp: TalerProtocolTimestamp; + } | { - tag: BackupProviderStateTag.Retrying; - retryInfo: RetryInfo; - lastError?: TalerErrorDetail; - }; + tag: BackupProviderStateTag.Retrying; + retryInfo: RetryInfo; + lastError?: TalerErrorDetail; + }; export interface BackupProviderTerms { supportedProtocolVersion: string; @@ -1625,6 +1623,36 @@ export interface PeerPushPaymentInitiationRecord { timestampCreated: TalerProtocolTimestamp; } +export interface PeerPullPaymentInitiationRecord { + /** + * What exchange are we using for the payment request? + */ + exchangeBaseUrl: string; + + /** + * Amount requested. + */ + amount: AmountString; + + /** + * Purse public key. Used as the primary key to look + * up this record. + */ + pursePub: string; + + /** + * Purse private key. + */ + pursePriv: string; + + /** + * Contract terms for the other party. + * + * FIXME: Nail down type! + */ + contractTerms: any; +} + /** * Record for a push P2P payment that this wallet was offered. * @@ -1825,6 +1853,15 @@ export const WalletStoresV1 = { ]), }, ), + peerPullPaymentInitiation: describeStore( + describeContents<PeerPullPaymentInitiationRecord>( + "peerPushPaymentInitiation", + { + keyPath: "pursePub", + }, + ), + {}, + ), }; export interface MetaConfigRecord { |