diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-11-19 16:16:12 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-11-19 16:16:12 +0100 |
commit | d9297f3dfddd5c7b072b46dee984251e3202ad75 (patch) | |
tree | 09e6f9e9e169e554d966b8a805f9fdf6a77ca2f3 /src/dbTypes.ts | |
parent | 87aa0f65c358773392d0c33c82fa040d466845a9 (diff) | |
download | wallet-core-d9297f3dfddd5c7b072b46dee984251e3202ad75.tar.xz |
work on CLI
Diffstat (limited to 'src/dbTypes.ts')
-rw-r--r-- | src/dbTypes.ts | 32 |
1 files changed, 32 insertions, 0 deletions
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<WithdrawalRecord> { + constructor() { + super("withdrawals", { keyPath: "id", autoIncrement: true }) + } + } + export const coins = new CoinsStore(); export const coinsReturns = new Store<CoinsReturnRecord>("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 */ |