From cb270cf28e04e67f18dc9a9b9106a1a9e41da0cb Mon Sep 17 00:00:00 2001 From: amirlevy Date: Wed, 28 Apr 2021 17:19:20 +0300 Subject: [PATCH 1/2] add listUnstpents - list of utxo for asset in vault account --- src/fireblocks-sdk.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/fireblocks-sdk.ts b/src/fireblocks-sdk.ts index bc01087e..9e09643b 100644 --- a/src/fireblocks-sdk.ts +++ b/src/fireblocks-sdk.ts @@ -110,6 +110,15 @@ export class FireblocksSDK { return await this.apiClient.issueGetRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/addresses`); } + /** + * Gets utxo list for an asset in a vault account + * @param vaultAccountId The vault account ID + * @param assetId The ID of the asset for which to get the utxo list + */ + public async getListUnspents(vaultAccountId: string, assetId: string): Promise { + return await this.apiClient.issueGetRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/listUnspents`); + } + /** * Generates a new address for an asset in a vault account * @param vaultAccountId The vault account ID From 97ccd8ef3cccc7f3c15cf92248ab5cae76b6807e Mon Sep 17 00:00:00 2001 From: amirlevy Date: Mon, 3 May 2021 10:40:49 +0300 Subject: [PATCH 2/2] rename to unspent_inputs --- src/fireblocks-sdk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fireblocks-sdk.ts b/src/fireblocks-sdk.ts index 9e09643b..caedc386 100644 --- a/src/fireblocks-sdk.ts +++ b/src/fireblocks-sdk.ts @@ -115,8 +115,8 @@ export class FireblocksSDK { * @param vaultAccountId The vault account ID * @param assetId The ID of the asset for which to get the utxo list */ - public async getListUnspents(vaultAccountId: string, assetId: string): Promise { - return await this.apiClient.issueGetRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/listUnspents`); + public async getUnspentInputs(vaultAccountId: string, assetId: string): Promise { + return await this.apiClient.issueGetRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/unspent_inputs`); } /**