From d9297f3dfddd5c7b072b46dee984251e3202ad75 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 19 Nov 2019 16:16:12 +0100 Subject: work on CLI --- src/dbTypes.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/dbTypes.ts') diff --git a/src/dbTypes.ts b/src/dbTypes.ts index ef79ae193..28893b8eb 100644 --- a/src/dbTypes.ts +++ b/src/dbTypes.ts @@ -896,6 +896,31 @@ export interface CoinsReturnRecord { wire: any; } + +export interface WithdrawalRecord { + /** + * Reserve that we're withdrawing from. + */ + reservePub: string; + + /** + * When was the withdrawal operation started started? + * Timestamp in milliseconds. + */ + startTimestamp: number; + + /** + * When was the withdrawal operation completed? + */ + finishTimestamp?: number; + + /** + * Amount that is being withdrawn with this operation. + * This does not include fees. + */ + withdrawalAmount: string; +} + /* tslint:disable:completed-docs */ /** @@ -1056,6 +1081,12 @@ export namespace Stores { } } + class WithdrawalsStore extends Store { + constructor() { + super("withdrawals", { keyPath: "id", autoIncrement: true }) + } + } + export const coins = new CoinsStore(); export const coinsReturns = new Store("coinsReturns", { keyPath: "contractTermsHash", @@ -1077,6 +1108,7 @@ export namespace Stores { export const purchases = new PurchasesStore(); export const tips = new TipsStore(); export const senderWires = new SenderWiresStore(); + export const withdrawals = new WithdrawalsStore(); } /* tslint:enable:completed-docs */ -- cgit v1.2.3