Skip to content

Commit

Permalink
Merge pull request #71 from fireblocks/COR-10778-refresh-balance-js-sdk
Browse files Browse the repository at this point in the history
add refresh balance to js sdk
  • Loading branch information
yarinvak authored Jan 4, 2022
2 parents 95497a3 + a212e4c commit 0fd8505
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ export class FireblocksSDK {
return await this.apiClient.issueGetRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}`);
}

/**
* Gets a single vault account asset balance after forcing refresh from the blockchain
* @param vaultAccountId The vault account ID
* @param assetId The ID of the asset to get
*/
public async refreshVaultAssetBalance(vaultAccountId: string, assetId: string, requestOptions?: RequestOptions): Promise<AssetResponse> {
return await this.apiClient.issuePostRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/balance`, "{}", requestOptions);
}

/**
* Gets deposit addresses for an asset in a vault account
* @param vaultAccountId The vault account ID
Expand Down

0 comments on commit 0fd8505

Please sign in to comment.