/accounts/{address}/roles/collections

Returns NFT/SFT/MetaESDT collections where the account is owner or has some special roles assigned to it.

Parameters

  • address: REQUIRED (string) - the address to query

  • from OPTIONAL (number) - the number of items to skip for the result set

  • size OPTIONAL (number) - the number of items to retrieve

  • search OPTIONAL (string) - search by collection identifier

  • type OPTIONAL (array[string]) - filter by type (NonFungibleESDT/SemiFungibleESDT/MetaESDT)

  • ownerOPTIONAL (string) - filter by collection owner

  • canCreateOPTIONAL (boolean) - filter by property canCreate

  • canBurnOPTIONAL (boolean) - filter by property canBurn

  • canAddQuantityOPTIONAL (boolean) - filter by property canAddQuantity

  • canUpdateAttributesOPTIONAL (boolean) - filter by property canUpdateAttributes

  • canAddUriOPTIONAL (boolean) - filter by property canAddUri

  • canTransferRoleOPTIONAL (boolean) - filter by property canTransferRole

Returns

  • collection : (string) - represents additional information about the NFT or SFT, like picture traits or tags for your NFT/collection. The field should follow a metadata:ipfsCID/fileName.json;tags:tag1,tag2,tag3 format

  • type : (string) - enum [NonFungibleESDT, SemiFungibleESDT, MetaESDT]

  • name : (string) - the username specific to this account

  • ticker : (string) - a random string that starts with “-” and has 6 more random characters

  • owner : (string) - the owner's address

  • timestamp : (number) - u64 format

  • canFreeze: (boolean) - the token manager may freeze the token balance in a specific account, preventing transfers to and from that account - default value: false

  • canWipe: (boolean) - the token manager may wipe out the tokens held by a frozen account, reducing the supply - default value: false

  • canPause: (boolean) - the token manager may prevent all transactions of the token, apart from minting and burning - default value: false

  • _canTransferNFTCreateRole _ : (boolean) - the addresses with the transfer role can transfer anywhere

  • decimals: (number) - the number of decimals in order to display balance

  • assets :

    • website : (string)

    • description : (string)

    • status : active/inactive

    • pngUrl : (string)

    • svgUrl : (string)

    • lockedAccounts : (array[string])

    • extraTokens : (array[string])

  • roles :

    • address: (string) Account bech32 address

    • canCreate : (boolean) - This role allows one to create

    • canBurn: (boolean) - Users may "burn" some of their tokens, reducing the supply - default value: false

    • canAddQuantity : (boolean) - This role allows one to add quantity of a specific SFT

    • canUpdateAttributes : (boolean) - This role allows one to change the attributes of a specific NFT

    • canAddUri : (boolean) - This role allows one add URIs for a specific NFT

    • canTransferRole : (boolean) - this role enables transfer only to specified addresses

Example Request and Result for /accounts/{address}/roles/collections

Request:

curl -X 'GET' \
  'https://elrond-api.public.blastapi.io/accounts/erd1xvmata3rkwmp4h4jxr5ngzzq2zm0p2ev6672xvj3mpmvj2zwlttq87uh9q/roles/collections?from=2&size=1&canCreate=false&canBurn=true&canAddQuantity=true&canUpdateAttributes=true&canAddUri=true&canTransferRole=false' \
  -H 'accept: application/json'

Result:

[
  {
    "collection": "string",
    "type": "NonFungibleESDT",
    "name": "string",
    "ticker": "string",
    "owner": "string",
    "timestamp": 0,
    "canFreeze": false,
    "canWipe": false,
    "canPause": false,
    "canTransferNftCreateRole": false,
    "decimals": 0,
    "assets": {
      "website": "string",
      "description": "string",
      "status": "inactive",
      "pngUrl": "string",
      "svgUrl": "string",
      "lockedAccounts": [
        "string"
      ],
      "extraTokens": [
        "string"
      ]
    },
    "roles": {
      "address": "string",
      "canCreate": false,
      "canBurn": false,
      "canAddQuantity": false,
      "canUpdateAttributes": false,
      "canAddUri": false,
      "canTransferRole": false,
      "roles": [
        "string"
      ]
    },
    "canCreate": true,
    "canBurn": true,
    "canAddQuantity": true,
    "canUpdateAttributes": true,
    "canAddUri": true,
    "canTransferRole": true
  }
]

Last updated