Skip to main content
Version: 1.2.0

NFT REST API

Endpoints the node exposes under /centerchain/nft/*.

Endpoints​

GET /centerchain/nft/v1/class_detail​

NameInTypeRequiredDescription
class_idquerystringno
pagination.keyquerystring (byte)nokey is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.
pagination.offsetquerystring (uint64)nooffset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.
pagination.limitquerystring (uint64)nolimit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.
pagination.count_totalquerybooleannocount_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.
pagination.reversequerybooleannoreverse is set to true if results are to be returned in the descending order.

Response 200: centerchain.nft.v1.QueryClassDetailResponse

GET /centerchain/nft/v1/class_issuer​

class_id can contain '/', so every query binds class_id (and other identifiers) as a query parameter instead of a path segment.

NameInTypeRequiredDescription
class_idquerystringno

Response 200: centerchain.nft.v1.QueryClassIssuerResponse

GET /centerchain/nft/v1/classes_by_issuer​

NameInTypeRequiredDescription
issuerquerystringno
pagination.keyquerystring (byte)nokey is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.
pagination.offsetquerystring (uint64)nooffset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.
pagination.limitquerystring (uint64)nolimit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.
pagination.count_totalquerybooleannocount_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.
pagination.reversequerybooleannoreverse is set to true if results are to be returned in the descending order.

Response 200: centerchain.nft.v1.QueryClassesByIssuerResponse

GET /centerchain/nft/v1/nft_lock​

NameInTypeRequiredDescription
class_idquerystringno
token_idquerystringno

Response 200: centerchain.nft.v1.QueryNFTLockResponse

GET /centerchain/nft/v1/params​

Response 200: centerchain.nft.v1.QueryParamsResponse

GET /centerchain/nft/v1/tokens_by_class​

NameInTypeRequiredDescription
class_idquerystringno
pagination.keyquerystring (byte)nokey is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.
pagination.offsetquerystring (uint64)nooffset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.
pagination.limitquerystring (uint64)nolimit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.
pagination.count_totalquerybooleannocount_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.
pagination.reversequerybooleannoreverse is set to true if results are to be returned in the descending order.

Response 200: centerchain.nft.v1.QueryTokensByClassResponse

GET /centerchain/nft/v1/tokens_by_owner​

NameInTypeRequiredDescription
ownerquerystringno
pagination.keyquerystring (byte)nokey is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set.
pagination.offsetquerystring (uint64)nooffset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.
pagination.limitquerystring (uint64)nolimit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.
pagination.count_totalquerybooleannocount_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set.
pagination.reversequerybooleannoreverse is set to true if results are to be returned in the descending order.

Response 200: centerchain.nft.v1.QueryTokensByOwnerResponse