diff --git a/src/fireblocks-sdk.ts b/src/fireblocks-sdk.ts index 1ffa26cc..605c1e16 100644 --- a/src/fireblocks-sdk.ts +++ b/src/fireblocks-sdk.ts @@ -289,15 +289,33 @@ export class FireblocksSDK { /** * Creates a new vault account * @param name A name for the new vault account + * @param hiddenOnUI If true, the created account and all related transactions will not be shown on Fireblocks console */ - public async createVaultAccount(name: string): Promise { + public async createVaultAccount(name: string, hiddenOnUI?: boolean): Promise { const body = { - name: name + name: name, + hiddenOnUI: hiddenOnUI || false }; return await this.apiClient.issuePostRequest("/v1/vault/accounts", body); } + /** + * Hides a vault account in Fireblocks console + * @param vaultAccountId The vault account ID + */ + public async hideVaultAccount(vaultAccountId: string): Promise { + return await this.apiClient.issuePostRequest(`/v1/vault/accounts/${vaultAccountId}/hide`, {}); + } + + /** + * Reveals a hidden vault account in Fireblocks console + * @param vaultAccountId The vault account ID + */ + public async unhideVaultAccount(vaultAccountId: string): Promise { + return await this.apiClient.issuePostRequest(`/v1/vault/accounts/${vaultAccountId}/unhide`, {}); + } + /** * Updates a vault account * @param name A new name for the vault account diff --git a/src/types.ts b/src/types.ts index 761a13a6..3e7df9d1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,7 @@ export interface VaultAccountResponse { id: string; name: string; + hiddenOnUI: boolean; assets: AssetResponse[]; }