Skip to content

Latest commit

 

History

History
730 lines (505 loc) · 33 KB

NFTsApi.md

File metadata and controls

730 lines (505 loc) · 33 KB

NFTsApi

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

Method HTTP request Description
getNFT GET /nfts/tokens/{id} List token data by ID
getNFTs GET /nfts/tokens List tokens by IDs
getOwnershipTokens GET /nfts/ownership/tokens List all owned tokens (paginated)
listOwnedCollections GET /nfts/ownership/collections List owned collections (paginated)
listOwnedTokens GET /nfts/ownership/assets List all distinct owned tokens (paginated)
refreshNFTMetadata PUT /nfts/tokens/{id} Refresh token metadata
updateOwnershipTokens PUT /nfts/ownership/tokens Refresh vault account tokens
updateTokenOwnershipStatus PUT /nfts/ownership/tokens/{id}/status Update token ownership status
updateTokensOwnershipSpam PUT /nfts/ownership/tokens/spam Update tokens ownership spam property
updateTokensOwnershipStatus PUT /nfts/ownership/tokens/status Update tokens ownership status

getNFT

TokenResponse getNFT()

Returns the requested token data.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiGetNFTRequest, TokenResponse } 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: NFTsApiGetNFTRequest = {
  // string | NFT ID
  id: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd,
};

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

Parameters

Name Type Description Notes
id [string] NFT ID defaults to undefined

Return type

TokenResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 * X-Request-ID -

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

getNFTs

GetNFTsResponse getNFTs()

Returns the requested tokens data.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiGetNFTsRequest, GetNFTsResponse } 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: NFTsApiGetNFTsRequest = {
  // string | A comma separated list of NFT IDs. Up to 100 are allowed in a single request.
  ids: ids_example,
  // string | Page cursor to fetch (optional)
  pageCursor: pageCursor_example,
  // number | Items per page (max 100) (optional)
  pageSize: 8.14,
  // Array<'collection.name' | 'name' | 'blockchainDescriptor'> | Sort by param, it can be one param or a list of params separated by comma (optional)
  sort: param_value,
  // 'DESC' | 'ASC' | Order direction, it can be `ASC` for ascending or `DESC` for descending (optional)
  order: order_example,
};

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

Parameters

Name Type Description Notes
ids [string] A comma separated list of NFT IDs. Up to 100 are allowed in a single request. defaults to undefined
pageCursor [string] Page cursor to fetch (optional) defaults to undefined
pageSize [number] Items per page (max 100) (optional) defaults to undefined
sort Array<'collection.name' | 'name' | 'blockchainDescriptor'> Sort by param, it can be one param or a list of params separated by comma (optional) defaults to undefined
order [**'DESC' 'ASC'**]Array<'DESC' | 'ASC'> Order direction, it can be `ASC` for ascending or `DESC` for descending

Return type

GetNFTsResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 * X-Request-ID -

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

getOwnershipTokens

GetOwnershipTokensResponse getOwnershipTokens()

Returns all tokens and their data in your workspace.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiGetOwnershipTokensRequest, GetOwnershipTokensResponse } 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: NFTsApiGetOwnershipTokensRequest = {
  // 'ETH' | 'ETH_TEST3' | 'ETH_TEST5' | 'ETH_TEST6' | 'POLYGON' | 'POLYGON_TEST_MUMBAI' | 'AMOY_POLYGON_TEST' | 'XTZ' | 'XTZ_TEST' | 'BASECHAIN_ETH' | Blockchain descriptor filter (optional)
  blockchainDescriptor: blockchainDescriptor_example,
  // string | A comma separated list of Vault Account IDs. Up to 100 are allowed in a single request.  This field will be ignored when walletType=END_USER_WALLET or ncwId is provided. (optional)
  vaultAccountIds: vaultAccountIds_example,
  // string | Tenant\'s Non-Custodial Wallet ID (optional)
  ncwId: ncwId_example,
  // string | A comma separated list of Non-Custodial account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=VAULT_ACCOUNT or ncwId is not provided. (optional)
  ncwAccountIds: ncwAccountIds_example,
  // 'VAULT_ACCOUNT' | 'END_USER_WALLET' | Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET` (optional)
  walletType: walletType_example,
  // string | A comma separated list of NFT IDs. Up to 100 are allowed in a single request. (optional)
  ids: ids_example,
  // string | A comma separated list of collection IDs. Up to 100 are allowed in a single request. (optional)
  collectionIds: collectionIds_example,
  // string | Page cursor to fetch (optional)
  pageCursor: pageCursor_example,
  // number | Items per page (max 100) (optional)
  pageSize: 8.14,
  // Array<'ownershipLastUpdateTime' | 'name' | 'collection.name' | 'blockchainDescriptor'> | Sort by param, it can be one param or a list of params separated by comma (optional)
  sort: param_value,
  // 'DESC' | 'ASC' | Order direction, it can be `ASC` for ascending or `DESC` for descending (optional)
  order: order_example,
  // 'LISTED' | 'ARCHIVED' | Token ownership status (optional)
  status: status_example,
  // string | Search owned tokens and their collections. Possible criteria for search:  token name and id within the contract/collection, collection name, blockchain descriptor and name. (optional)
  search: search_example,
  // 'true' | 'false' | 'all' | Token ownership spam status. (optional)
  spam: spam_example,
};

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

Parameters

Name Type Description Notes
blockchainDescriptor [**'ETH' 'ETH_TEST3' 'ETH_TEST5'
vaultAccountIds [string] A comma separated list of Vault Account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=END_USER_WALLET or ncwId is provided. (optional) defaults to undefined
ncwId [string] Tenant&#39;s Non-Custodial Wallet ID (optional) defaults to undefined
ncwAccountIds [string] A comma separated list of Non-Custodial account IDs. Up to 100 are allowed in a single request. This field will be ignored when walletType=VAULT_ACCOUNT or ncwId is not provided. (optional) defaults to undefined
walletType [**'VAULT_ACCOUNT' 'END_USER_WALLET'**]Array<'VAULT_ACCOUNT' | 'END_USER_WALLET'> Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`
ids [string] A comma separated list of NFT IDs. Up to 100 are allowed in a single request. (optional) defaults to undefined
collectionIds [string] A comma separated list of collection IDs. Up to 100 are allowed in a single request. (optional) defaults to undefined
pageCursor [string] Page cursor to fetch (optional) defaults to undefined
pageSize [number] Items per page (max 100) (optional) defaults to undefined
sort Array<'ownershipLastUpdateTime' | 'name' | 'collection.name' | 'blockchainDescriptor'> Sort by param, it can be one param or a list of params separated by comma (optional) defaults to undefined
order [**'DESC' 'ASC'**]Array<'DESC' | 'ASC'> Order direction, it can be `ASC` for ascending or `DESC` for descending
status [**'LISTED' 'ARCHIVED'**]Array<'LISTED' | 'ARCHIVED'> Token ownership status
search [string] Search owned tokens and their collections. Possible criteria for search: token name and id within the contract/collection, collection name, blockchain descriptor and name. (optional) defaults to undefined
spam [**'true' 'false' 'all'**]Array<'true' | 'false' | 'all'>

Return type

GetOwnershipTokensResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 * X-Request-ID -

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

listOwnedCollections

ListOwnedCollectionsResponse listOwnedCollections()

Returns all collections in your workspace

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiListOwnedCollectionsRequest, ListOwnedCollectionsResponse } 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: NFTsApiListOwnedCollectionsRequest = {
  // string | Tenant\'s Non-Custodial Wallet ID (optional)
  ncwId: ncwId_example,
  // 'VAULT_ACCOUNT' | 'END_USER_WALLET' | Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET` (optional)
  walletType: walletType_example,
  // string | Search owned collections. Possible criteria for search: collection name, collection contract address. (optional)
  search: search_example,
  // string | Page cursor to fetch (optional)
  pageCursor: pageCursor_example,
  // number | Items per page (max 100) (optional)
  pageSize: 8.14,
  // Array<'name'> | Sort by param, it can be one param or a list of params separated by comma (optional)
  sort: param_value,
  // 'DESC' | 'ASC' | Order direction, it can be `ASC` for ascending or `DESC` for descending (optional)
  order: order_example,
  // 'LISTED' | 'ARCHIVED' | Token ownership status (optional)
  status: status_example,
};

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

Parameters

Name Type Description Notes
ncwId [string] Tenant&#39;s Non-Custodial Wallet ID (optional) defaults to undefined
walletType [**'VAULT_ACCOUNT' 'END_USER_WALLET'**]Array<'VAULT_ACCOUNT' | 'END_USER_WALLET'> Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`
search [string] Search owned collections. Possible criteria for search: collection name, collection contract address. (optional) defaults to undefined
pageCursor [string] Page cursor to fetch (optional) defaults to undefined
pageSize [number] Items per page (max 100) (optional) defaults to undefined
sort Array<'name'> Sort by param, it can be one param or a list of params separated by comma (optional) defaults to undefined
order [**'DESC' 'ASC'**]Array<'DESC' | 'ASC'> Order direction, it can be `ASC` for ascending or `DESC` for descending
status [**'LISTED' 'ARCHIVED'**]Array<'LISTED' | 'ARCHIVED'> Token ownership status

Return type

ListOwnedCollectionsResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 * X-Request-ID -

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

listOwnedTokens

ListOwnedTokensResponse listOwnedTokens()

Returns all owned distinct tokens (for your tenant) and their data in your workspace.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiListOwnedTokensRequest, ListOwnedTokensResponse } 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: NFTsApiListOwnedTokensRequest = {
  // string | Tenant\'s Non-Custodial Wallet ID (optional)
  ncwId: ncwId_example,
  // 'VAULT_ACCOUNT' | 'END_USER_WALLET' | Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET` (optional)
  walletType: walletType_example,
  // string | Page cursor to fetch (optional)
  pageCursor: pageCursor_example,
  // number | Items per page (max 100) (optional)
  pageSize: 8.14,
  // Array<'name'> | Sort by param, it can be one param or a list of params separated by comma (optional)
  sort: param_value,
  // 'DESC' | 'ASC' | Order direction, it can be `ASC` for ascending or `DESC` for descending (optional)
  order: order_example,
  // 'LISTED' | 'ARCHIVED' | Token ownership status (optional)
  status: status_example,
  // string | Search owned tokens by token name (optional)
  search: search_example,
  // 'true' | 'false' | 'all' | Token ownership spam status. (optional)
  spam: spam_example,
};

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

Parameters

Name Type Description Notes
ncwId [string] Tenant&#39;s Non-Custodial Wallet ID (optional) defaults to undefined
walletType [**'VAULT_ACCOUNT' 'END_USER_WALLET'**]Array<'VAULT_ACCOUNT' | 'END_USER_WALLET'> Wallet type, it can be `VAULT_ACCOUNT` or `END_USER_WALLET`
pageCursor [string] Page cursor to fetch (optional) defaults to undefined
pageSize [number] Items per page (max 100) (optional) defaults to undefined
sort Array<'name'> Sort by param, it can be one param or a list of params separated by comma (optional) defaults to undefined
order [**'DESC' 'ASC'**]Array<'DESC' | 'ASC'> Order direction, it can be `ASC` for ascending or `DESC` for descending
status [**'LISTED' 'ARCHIVED'**]Array<'LISTED' | 'ARCHIVED'> Token ownership status
search [string] Search owned tokens by token name (optional) defaults to undefined
spam [**'true' 'false' 'all'**]Array<'true' | 'false' | 'all'>

Return type

ListOwnedTokensResponse

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 * X-Request-ID -

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

refreshNFTMetadata

refreshNFTMetadata()

Updates the latest token metadata.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiRefreshNFTMetadataRequest } 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: NFTsApiRefreshNFTMetadataRequest = {
  // string | NFT ID
  id: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd,
  // 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.nfts.refreshNFTMetadata(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
id [string] NFT 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: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
202 * X-Request-ID -

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

updateOwnershipTokens

updateOwnershipTokens()

Updates all tokens and balances per blockchain and vault account.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiUpdateOwnershipTokensRequest } 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: NFTsApiUpdateOwnershipTokensRequest = {
  // 'ETH' | 'ETH_TEST3' | 'ETH_TEST5' | 'ETH_TEST6' | 'POLYGON' | 'POLYGON_TEST_MUMBAI' | 'AMOY_POLYGON_TEST' | 'BASECHAIN_ETH' | Blockchain descriptor filter
  blockchainDescriptor: blockchainDescriptor_example,
  // string | Vault account filter
  vaultAccountId: vaultAccountId_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.nfts.updateOwnershipTokens(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
blockchainDescriptor [**'ETH' 'ETH_TEST3' 'ETH_TEST5'
vaultAccountId [string] Vault account filter 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: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
202 * X-Request-ID -

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

updateTokenOwnershipStatus

updateTokenOwnershipStatus(updateTokenOwnershipStatusDto, )

Updates token status for a tenant, in all tenant vaults.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiUpdateTokenOwnershipStatusRequest } 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: NFTsApiUpdateTokenOwnershipStatusRequest = {
  // UpdateTokenOwnershipStatusDto
  updateTokenOwnershipStatusDto: param_value,
  // string | NFT ID
  id: NFT-abcdefabcdefabcdefabcdefabcdefabcdefabcd,
  // 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.nfts.updateTokenOwnershipStatus(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
updateTokenOwnershipStatusDto UpdateTokenOwnershipStatusDto
id [string] NFT 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: Not defined

HTTP response details

Status code Description Response headers
200 * X-Request-ID -

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

updateTokensOwnershipSpam

updateTokensOwnershipSpam(updateTokensOwnershipSpamRequest)

Updates tokens spam property for a tenant's token ownerships, in all tenant vaults.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiUpdateTokensOwnershipSpamRequest } 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: NFTsApiUpdateTokensOwnershipSpamRequest = {
  // UpdateTokensOwnershipSpamRequest
  updateTokensOwnershipSpamRequest: 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.nfts.updateTokensOwnershipSpam(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
updateTokensOwnershipSpamRequest UpdateTokensOwnershipSpamRequest
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: Not defined

HTTP response details

Status code Description Response headers
200 All token spam properties have been updated * X-Request-ID -
400 Invalid data sent * X-Request-ID -
404 When ownership for token ID is not found * X-Request-ID -

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

updateTokensOwnershipStatus

updateTokensOwnershipStatus(updateTokensOwnershipStatusRequest)

Updates tokens status for a tenant, in all tenant vaults.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NFTsApiUpdateTokensOwnershipStatusRequest } 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: NFTsApiUpdateTokensOwnershipStatusRequest = {
  // UpdateTokensOwnershipStatusRequest
  updateTokensOwnershipStatusRequest: 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.nfts.updateTokensOwnershipStatus(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
updateTokensOwnershipStatusRequest UpdateTokensOwnershipStatusRequest
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: Not defined

HTTP response details

Status code Description Response headers
200 All token statuses have been updated * X-Request-ID -
400 Invalid data sent * X-Request-ID -
404 When ownership for token ID is not found * X-Request-ID -

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