NFT interface: messages and get methods NFT messages and methods specified in TEPs.
Field Type Description transferuint32tag equal to 0x5fcc3d14 query_iduint64arbitrary request number new_ownerMsgAddressaddress of the new owner of the NFT item response_destinationMsgAddressoptional address to receive excess Toncoin, usually the sender's address custom_payloadMaybe ^Celloptional custom data forward_amountVarUInteger 16the amount of Toncoin to be sent to the new owner forward_payloadEither Cell ^Celloptional data that should be forwarded to the new owner
To send a simple comment in the forward_payload, the forward_payload must start with 0x00000000 (32-bit unsigned integer equal to zero); the remainder of the forward_payload contains the comment.
If the comment does not begin with the byte 0xff, the comment is a text one; it can be displayed "as is" to the end user of a wallet (after filtering invalid and control characters and checking that it is a valid UTF-8 string). For instance, users may indicate the purpose ("for coffee") of a simple transfer from their wallet to the wallet of another user in this text field.
On the other hand, if the comment begins with the byte 0xff, the remainder is a "binary comment", which should not be displayed to the end user as text (only as a hex dump if necessary). The intended use of "binary comments" is, e.g., to contain a purchase identifier for payments in a store, to be automatically generated and processed by the store's software.
If the forward_payload contains a binary message for interacting with the destination smart contract (for example, with DEX), then there are no prefixes.
Field Type Description ownership_assigneduint32tag equal to 0x05138d91 query_iduint64should be equal to request's query_id prev_ownerMsgAddressaddress of the previous owner of this NFT item forward_payloadEither Cell ^Cellshould be equal to request's forward_payload
Field Type Description excessesuint32tag equal to 0xd53276db query_iduint64should be equal to request's query_id
Field Type Description get_static_datauint32tag equal to 0x2fcb26a2 query_iduint64arbitrary request number
Field Type Description report_static_datauint32tag equal to 0x8b771735 query_iduint64should be equal to request's query_id indexuint256numerical index of this NFT in the collection collectionMsgAddressaddress of the smart contract of the collection to which this NFT belongs
No arguments. Outputs:
Field Type Description init?intif not zero, then this NFT is fully initialized and ready for interaction indexintnumerical index of this NFT in the collection collection_addressMsgAddressaddress of the smart contract of the collection to which this NFT belongs owner_addressMsgAddressaddress of the current owner of this NFT individual_contentCellindividual NFT content in any format
No arguments. Outputs:
Field Type Description next_item_indexintthe count of currently deployed NFT items in collection collection_contentCellcollection content in a format that complies with TEP-64 owner_addressMsgAddresscollection owner address, zero address if no owner
Argument: index as int.
Output: address as MsgAddress.
Arguments:
index as int
individual_content as Cell
Output: full_content as Cell.
Field Type Description get_royalty_paramsuint32tag equal to 0x693d3950 query_iduint64arbitrary request number
Field Type Description report_royalty_paramsuint32tag equal to 0xa8cb00ad query_iduint64should be equal to request's query_id numeratoruint16royalty numerator denominatoruint16royalty denominator destinationMsgAddressaddress to send royalty
No arguments. Outputs:
Field Type Description numeratorintroyalty numerator (e.g., 11) denominatorintroyalty denominator (e.g., 1000) destinationMsgAddressaddress to send royalty
Royalty share is numerator / denominator. For example, if numerator = 11 and denominator = 1000, then royalty share is 11 / 1000 * 100% = 1.1%.
Field Type Description prove_ownershipuint32tag equal to 0x04ded148 query_iduint64arbitrary request number destinationMsgAddressaddress of the contract to which the ownership should be proven forward_payload^Cellany data for sending to the destination address from SBT with_contentBoolif true, SBT's individual content cell will be included in the message
Should be rejected if sender address is not the owner's address.
Field Type Description request_owneruint32tag equal to 0xd0c3bfea query_iduint64arbitrary request number destinationMsgAddressaddress of the contract to which the ownership should be proven forward_payload^Cellany data for sending to the destination address from SBT with_contentBoolif true, SBT's individual content cell will be included in the message
Field Type Description destroyuint32tag equal to 0x1f04537a query_iduint64arbitrary request number
Should be rejected if sender address is not the owner's address. Sets the owner's address and authority to null, and sends an excesses message with the contract's balance.
Field Type Description revokeuint32tag equal to 0x6f89f5e3 query_iduint64arbitrary request number
Should be rejected if sender address is not the authority's address or if already revoked. Sets revoked_at to current unix time.
Field Type Description ownership_proofuint32tag equal to 0x0524c7ae query_iduint64should be equal to request's query_id item_iduint256ID of an SBT ownerMsgAddressSBT owner's address data^Celldata cell passed in prove_ownership revoked_atuint64unix time when SBT was revoked, 0 if it was not individual_contentMaybe ^CellSBT's individual content if with_content was true, null if not
Field Type Description owner_infouint32tag equal to 0x0dd607e3 query_iduint64should be equal to request's query_id item_iduint256ID of an SBT initiatorMsgAddressaddress of request initiator ownerMsgAddressSBT owner's address data^Celldata cell equal to request's forward_payload revoked_atuint64unix time when SBT was revoked, 0 if it was not contentMaybe ^CellSBT's content if with_content was true, null if not
Same as NFT standard . No arguments. Outputs:
Field Type Description init?intif not zero, then this SBT is fully initialized and ready for interaction indexintnumerical index of this SBT in the collection collection_addressMsgAddressaddress of the smart contract of the collection to which this SBT belongs owner_addressMsgAddressSBT owner's address individual_contentCellindividual SBT content in any format
No arguments. Outputs:
Field Type Description authoritysliceauthority's address that can revoke SBT, returns addr_none (2 zero bits) if no authority
This method is mandatory for SBT. If there is no authority it should return addr_none (2 zero bits).
No arguments. Outputs:
Field Type Description revoked_atintunix time of when SBT was revoked, 0 when not revoked