diff --git a/src/fireblocks-sdk.ts b/src/fireblocks-sdk.ts index 1b22bbc5..cd532a0d 100644 --- a/src/fireblocks-sdk.ts +++ b/src/fireblocks-sdk.ts @@ -510,39 +510,24 @@ export class FireblocksSDK { } /** - * Transfer from a main exchange account to a subaccount + * Internal Transfer from a main exchange account to a subaccount * @param exchangeAccountId The exchange ID in Fireblocks * @param subaccountId The ID of the subaccount in the exchange * @param assetId The asset to transfer * @param amount The amount to transfer + * @param note A description of the transfer * @param requestOptions */ - public async transferToSubaccount(exchangeAccountId: string, subaccountId: string, assetId: string, amount: number, requestOptions?: RequestOptions): Promise { - const body = { - subaccountId, - amount - }; - - return await this.apiClient.issuePostRequest(`/v1/exchange_accounts/${exchangeAccountId}/${assetId}/transfer_to_subaccount`, body, requestOptions); - } - - /** - * Transfer from a subaccount to a main exchange account - * @param exchangeAccountId The exchange ID in Fireblocks - * @param subaccountId The ID of the subaccount in the exchange - * @param assetId The asset to transfer - * @param amount The amount to transfer - * @param requestOptions - */ - public async transferFromSubaccount(exchangeAccountId: string, subaccountId: string, assetId: string, amount: number, requestOptions?: RequestOptions): Promise { - const body = { - subaccountId, - amount - }; - - return await this.apiClient.issuePostRequest(`/v1/exchange_accounts/${exchangeAccountId}/${assetId}/transfer_from_subaccount`, body, requestOptions); - } + public async internalTransfer(exchangeAccountId: string, subaccountId: string, assetId: string, amount: number, note: string, requestOptions?: RequestOptions): Promise { + const body = { + subaccountId, + assetId, + amount, + note + }; + return await this.apiClient.issuePostRequest(`/v1/exchange_accounts/${exchangeAccountId}/internal_transfer`, body, requestOptions); + } /** * Gets all fiat accounts for your tenant */