Skip to content

Latest commit

 

History

History
582 lines (380 loc) · 20.9 KB

File metadata and controls

582 lines (380 loc) · 20.9 KB

InternalWalletsApi

All URIs are relative to https://developers.fireblocks.com/reference/

Method HTTP request Description
createInternalWallet POST /internal_wallets Create an internal wallet
createInternalWalletAsset POST /internal_wallets/{walletId}/{assetId} Add an asset to an internal wallet
deleteInternalWallet DELETE /internal_wallets/{walletId} Delete an internal wallet
deleteInternalWalletAsset DELETE /internal_wallets/{walletId}/{assetId} Delete a whitelisted address
getInternalWallet GET /internal_wallets/{walletId} Get assets for internal wallet
getInternalWalletAsset GET /internal_wallets/{walletId}/{assetId} Get an asset from an internal wallet
getInternalWalletAssetsPaginated GET /internal_wallets/{walletId}/assets List assets in an internal wallet (Paginated)
getInternalWallets GET /internal_wallets List internal wallets
setCustomerRefIdForInternalWallet POST /internal_wallets/{walletId}/set_customer_ref_id Set an AML/KYT customer reference ID for internal wallet

createInternalWallet

UnmanagedWallet createInternalWallet()

Creates a new internal wallet with the requested name. Learn more about Whitelisted Internal Addresses here

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiCreateInternalWalletRequest, UnmanagedWallet } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiCreateInternalWalletRequest = {
  // CreateWalletRequest (optional)
  createWalletRequest: param_value,
  // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
  idempotencyKey: idempotencyKey_example,
};

fireblocks.internalWallets.createInternalWallet(body).then((res: FireblocksResponse<UnmanagedWallet>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createWalletRequest CreateWalletRequest
idempotencyKey [string] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) defaults to undefined

Return type

UnmanagedWallet

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A new wallet object * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createInternalWalletAsset

WalletAsset createInternalWalletAsset()

Adds an asset to an existing internal wallet.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiCreateInternalWalletAssetRequest, WalletAsset } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiCreateInternalWalletAssetRequest = {
  // string | The ID of the wallet
  walletId: walletId_example,
  // string | The ID of the asset to add
  assetId: assetId_example,
  // CreateInternalWalletAssetRequest (optional)
  createInternalWalletAssetRequest: param_value,
  // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
  idempotencyKey: idempotencyKey_example,
};

fireblocks.internalWallets.createInternalWalletAsset(body).then((res: FireblocksResponse<WalletAsset>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
createInternalWalletAssetRequest CreateInternalWalletAssetRequest
walletId [string] The ID of the wallet defaults to undefined
assetId [string] The ID of the asset to add defaults to undefined
idempotencyKey [string] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) defaults to undefined

Return type

WalletAsset

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A Wallet Asset object * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteInternalWallet

deleteInternalWallet()

Deletes an internal wallet by ID.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiDeleteInternalWalletRequest } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiDeleteInternalWalletRequest = {
  // string | The ID of the wallet to delete
  walletId: walletId_example,
};

fireblocks.internalWallets.deleteInternalWallet(body).then((res: FireblocksResponse<any>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
walletId [string] The ID of the wallet to delete defaults to undefined

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 OK * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteInternalWalletAsset

deleteInternalWalletAsset()

Deletes a whitelisted address (for an asset) from an internal wallet.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiDeleteInternalWalletAssetRequest } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiDeleteInternalWalletAssetRequest = {
  // string | The ID of the wallet
  walletId: walletId_example,
  // string | The ID of the asset to delete
  assetId: assetId_example,
};

fireblocks.internalWallets.deleteInternalWalletAsset(body).then((res: FireblocksResponse<any>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
walletId [string] The ID of the wallet defaults to undefined
assetId [string] The ID of the asset to delete defaults to undefined

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 OK * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getInternalWallet

UnmanagedWallet getInternalWallet()

Returns information for an internal wallet.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiGetInternalWalletRequest, UnmanagedWallet } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiGetInternalWalletRequest = {
  // string | The ID of the wallet to return
  walletId: walletId_example,
};

fireblocks.internalWallets.getInternalWallet(body).then((res: FireblocksResponse<UnmanagedWallet>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
walletId [string] The ID of the wallet to return defaults to undefined

Return type

UnmanagedWallet

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A Wallet object * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getInternalWalletAsset

WalletAsset getInternalWalletAsset()

Returns information for an asset in an internal wallet.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiGetInternalWalletAssetRequest, WalletAsset } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiGetInternalWalletAssetRequest = {
  // string | The ID of the wallet
  walletId: walletId_example,
  // string | The ID of the asset to return
  assetId: assetId_example,
};

fireblocks.internalWallets.getInternalWalletAsset(body).then((res: FireblocksResponse<WalletAsset>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
walletId [string] The ID of the wallet defaults to undefined
assetId [string] The ID of the asset to return defaults to undefined

Return type

WalletAsset

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A Wallet Asset object * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getInternalWalletAssetsPaginated

PaginatedAssetsResponse getInternalWalletAssetsPaginated()

Returns a paginated response of assets in an internal wallet.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiGetInternalWalletAssetsPaginatedRequest, PaginatedAssetsResponse } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiGetInternalWalletAssetsPaginatedRequest = {
  // string | The ID of the internal wallet to return assets for
  walletId: walletId_example,
  // number (optional)
  pageSize: 10,
  // string (optional)
  pageCursor: pageCursor_example,
};

fireblocks.internalWallets.getInternalWalletAssetsPaginated(body).then((res: FireblocksResponse<PaginatedAssetsResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
walletId [string] The ID of the internal wallet to return assets for defaults to undefined
pageSize [number] (optional) defaults to 50
pageCursor [string] (optional) defaults to undefined

Return type

PaginatedAssetsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A paginated response of assets for the internal wallet * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getInternalWallets

GetInternalWalletsResponse getInternalWallets()

Gets a list of internal wallets.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, GetInternalWalletsResponse } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body:any = {};

fireblocks.internalWallets.getInternalWallets(body).then((res: FireblocksResponse<GetInternalWalletsResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

GetInternalWalletsResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 A list of internal wallets * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

setCustomerRefIdForInternalWallet

setCustomerRefIdForInternalWallet(setCustomerRefIdRequest, )

Sets an AML/KYT customer reference ID for the specific internal wallet.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, InternalWalletsApiSetCustomerRefIdForInternalWalletRequest } from '@fireblocks/ts-sdk';

// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");

const fireblocks = new Fireblocks();

let body: InternalWalletsApiSetCustomerRefIdForInternalWalletRequest = {
  // SetCustomerRefIdRequest
  setCustomerRefIdRequest: param_value,
  // string | The wallet ID
  walletId: walletId_example,
  // string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
  idempotencyKey: idempotencyKey_example,
};

fireblocks.internalWallets.setCustomerRefIdForInternalWallet(body).then((res: FireblocksResponse<any>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
setCustomerRefIdRequest SetCustomerRefIdRequest
walletId [string] The wallet ID defaults to undefined
idempotencyKey [string] A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional) defaults to undefined

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 OK * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]