From c46607a0a42cc0d8812fad97dc45b0175eedcafe Mon Sep 17 00:00:00 2001 From: Federico Bond Date: Thu, 21 Mar 2019 12:42:55 -0300 Subject: [PATCH] trezor-connect: Update type definition for AccountInfo interface --- types/trezor-connect/index.d.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/types/trezor-connect/index.d.ts b/types/trezor-connect/index.d.ts index 24fc6b9e6b..540fad6459 100644 --- a/types/trezor-connect/index.d.ts +++ b/types/trezor-connect/index.d.ts @@ -54,6 +54,18 @@ export interface PublicKey { depth: number; // BIP32 serialization format } +export interface Utxo { + index: number; // index of output IN THE TRANSACTION + transactionHash: string; // hash of the transaction + value: number; // how much money sent + addressPath: [number, number]; // path + height: number | null; // null == unconfirmed + coinbase: boolean; + tsize: number; // total size - in case of segwit, total, with segwit data + vsize: number; // virtual size - segwit concept - same as size in non-segwit + own: boolean; +} + export interface GetAccountInfoParams extends CommonParams { path?: number[]; // NOTE: xpub?: string; // if both these fields are missing, the user will select an account @@ -70,6 +82,11 @@ export interface AccountInfo { balance: number; confirmed: number; + transactions: number; + utxo: Utxo[]; + usedAddresses: Array<{ address: string, received: number }>; + unusedAddresses: string[]; + // These fields are returned, presumably, to save further calls when the use case requires // a usable address: address: string;