From aaf7e1338d6cdb1b4e01ad318938b3eaea2f922b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 30 Nov 2019 00:36:20 +0100 Subject: wallet robustness WIP --- src/walletTypes.ts | 49 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) (limited to 'src/walletTypes.ts') diff --git a/src/walletTypes.ts b/src/walletTypes.ts index b971e300d..45560694e 100644 --- a/src/walletTypes.ts +++ b/src/walletTypes.ts @@ -465,14 +465,14 @@ export type PreparePayResult = export interface PreparePayResultPaymentPossible { status: "payment-possible"; - proposalId: number; + proposalId: string; contractTerms: ContractTerms; totalFees: AmountJson; } export interface PreparePayResultInsufficientBalance { status: "insufficient-balance"; - proposalId: number; + proposalId: string; contractTerms: ContractTerms; } @@ -523,8 +523,10 @@ export interface WalletDiagnostics { export interface PendingWithdrawOperation { type: "withdraw"; - stage: string; reservePub: string; + withdrawSessionId: string; + numCoinsWithdrawn: number; + numCoinsTotal: number; } export interface PendingRefreshOperation { @@ -561,22 +563,47 @@ export interface PendingReserveOperation { stage: string; timestampCreated: Timestamp; reserveType: string; + reservePub: string; + bankWithdrawConfirmUrl?: string; } export interface PendingRefreshOperation { type: "refresh"; lastError?: OperationError; + refreshSessionId: string; oldCoinPub: string; refreshStatus: string; refreshOutputSize: number; } +export interface PendingPlanchetOperation { + type: "planchet"; + coinPub: string; + reservePub: string; + lastError?: OperationError; +} + +export interface PendingDirtyCoinOperation { + type: "dirty-coin"; + coinPub: string; +} + +export interface PendingProposalOperation { + type: "proposal"; + merchantBaseUrl: string; + proposalTimestamp: Timestamp; + proposalId: string; +} + export type PendingOperationInfo = | PendingWithdrawOperation | PendingReserveOperation | PendingBugOperation + | PendingPlanchetOperation + | PendingDirtyCoinOperation | PendingExchangeUpdateOperation - | PendingRefreshOperation; + | PendingRefreshOperation + | PendingProposalOperation; export interface PendingOperationsResponse { pendingOperations: PendingOperationInfo[]; @@ -614,3 +641,17 @@ export function getTimestampNow(): Timestamp { t_ms: new Date().getTime(), }; } + + +export interface PlanchetCreationResult { + coinPub: string; + coinPriv: string; + reservePub: string; + denomPubHash: string; + denomPub: string; + blindingKey: string; + withdrawSig: string; + coinEv: string; + exchangeBaseUrl: string; + coinValue: AmountJson; +} \ No newline at end of file -- cgit v1.2.3