java.lang.Object
com.hedera.hashgraph.sdk.TokenNftInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccountIdThe current owner of the NFTfinal InstantThe effective consensus timestamp at which the NFT was mintedfinal LedgerIdThe ledger ID the response was returned from; please see HIP-198 for the network-specific IDs.final byte[]Represents the unique metadata of the NFTfinal NftIdThe ID of the NFTfinal AccountIdIf an allowance is granted for the NFT, its corresponding spender account -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenNftInfofromBytes(byte[] bytes) Create token nft info from byte array.(package private) static TokenNftInfofromProtobuf(TokenNftInfo info) Create token nft info from a protobuf.byte[]toBytes()Create the byte array.(package private) TokenNftInfoCreate the protobuf.toString()
-
Field Details
-
nftId
The ID of the NFT -
accountId
The current owner of the NFT -
creationTime
The effective consensus timestamp at which the NFT was minted -
metadata
public final byte[] metadataRepresents the unique metadata of the NFT -
ledgerId
The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs. -
spenderId
If an allowance is granted for the NFT, its corresponding spender account
-
-
Constructor Details
-
TokenNftInfo
TokenNftInfo(NftId nftId, AccountId accountId, Instant creationTime, byte[] metadata, LedgerId ledgerId, @Nullable AccountId spenderId) Constructor.- Parameters:
nftId- the id of the nftaccountId- the current owner of the nftcreationTime- the effective consensus timemetadata- the unique metadataledgerId- the ledger id of the responsespenderId- the spender of the allowance (null if not an allowance)
-
-
Method Details
-
fromProtobuf
Create token nft info from a protobuf.- Parameters:
info- the protobuf- Returns:
- the new token nft info
-
fromBytes
public static TokenNftInfo fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Create token nft info from byte array.- Parameters:
bytes- the byte array- Returns:
- the new token nft info
- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobuf
TokenNftInfo toProtobuf()Create the protobuf.- Returns:
- the protobuf representation
-
toString
-
toBytes
public byte[] toBytes()Create the byte array.- Returns:
- the byte array representation
-