Class TokenInfo

java.lang.Object
com.hedera.hashgraph.sdk.TokenInfo

public class TokenInfo extends Object
Gets information about a fungible or non-fungible token instance. See Hedera Documentation
  • Field Details

    • tokenId

      public final TokenId tokenId
      The ID of the token for which information is requested.
    • name

      public final String name
      Name of token.
    • symbol

      public final String symbol
      Symbol of token.
    • decimals

      public final int decimals
      The amount of decimal places that this token supports.
    • totalSupply

      public final long totalSupply
      Total Supply of token.
    • treasuryAccountId

      public final AccountId treasuryAccountId
      The ID of the account which is set as Treasury
    • adminKey

      @Nullable public final Key adminKey
      The key which can perform update/delete operations on the token. If empty, the token can be perceived as immutable (not being able to be updated/deleted)
    • kycKey

      @Nullable public final Key kycKey
      The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required, and KYC grant or revoke operations are not possible.
    • freezeKey

      @Nullable public final Key freezeKey
      The key which can freeze or unfreeze an account for token transactions. If empty, freezing is not possible
    • wipeKey

      @Nullable public final Key wipeKey
      The key which can wipe token balance of an account. If empty, wipe is not possible
    • supplyKey

      @Nullable public final Key supplyKey
      The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations
    • feeScheduleKey

      @Nullable public final Key feeScheduleKey
      The key which can change the custom fees of the token; if not set, the fees are immutable
    • defaultFreezeStatus

      @Nullable public final Boolean defaultFreezeStatus
      The default Freeze status (not applicable, frozen or unfrozen) of Hedera accounts relative to this token. FreezeNotApplicable is returned if Token Freeze Key is empty. Frozen is returned if Token Freeze Key is set and defaultFreeze is set to true. Unfrozen is returned if Token Freeze Key is set and defaultFreeze is set to false
    • defaultKycStatus

      @Nullable public final Boolean defaultKycStatus
      The default KYC status (KycNotApplicable or Revoked) of Hedera accounts relative to this token. KycNotApplicable is returned if KYC key is not set, otherwise Revoked
    • isDeleted

      public final boolean isDeleted
      Specifies whether the token was deleted or not
    • autoRenewAccount

      @Nullable public final AccountId autoRenewAccount
      An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval
    • autoRenewPeriod

      @Nullable public final Duration autoRenewPeriod
      The interval at which the auto-renew account will be charged to extend the token's expiry
    • expirationTime

      @Nullable public final Instant expirationTime
      The epoch second at which the token will expire
    • tokenMemo

      public final String tokenMemo
      The memo associated with the token
    • customFees

      public final List<CustomFee> customFees
      The custom fees to be assessed during a CryptoTransfer that transfers units of this token
    • tokenType

      public final TokenType tokenType
      The token type
    • supplyType

      public final TokenSupplyType supplyType
      The token supply type
    • maxSupply

      public final long maxSupply
      For tokens of type FUNGIBLE_COMMON - The Maximum number of fungible tokens that can be in circulation. For tokens of type NON_FUNGIBLE_UNIQUE - the maximum number of NFTs (serial numbers) that can be in circulation
    • pauseKey

      @Nullable public final Key pauseKey
      The Key which can pause and unpause the Token.
    • pauseStatus

      @Nullable public final Boolean pauseStatus
      Specifies whether the token is paused or not. Null if pauseKey is not set.
    • metadata

      public byte[] metadata
      Represents the metadata of the token definition.
    • metadataKey

      @Nullable public final Key metadataKey
      The key which can change the metadata of a token (token definition and individual NFTs).
    • ledgerId

      public final LedgerId ledgerId
      The ledger ID the response was returned from; please see HIP-198 for the network-specific IDs.
  • Constructor Details

  • Method Details

    • freezeStatusFromProtobuf

      @Nullable static Boolean freezeStatusFromProtobuf(TokenFreezeStatus freezeStatus)
      Are we frozen?
      Parameters:
      freezeStatus - the freeze status
      Returns:
      true / false / null
    • kycStatusFromProtobuf

      @Nullable static Boolean kycStatusFromProtobuf(TokenKycStatus kycStatus)
      Is kyc required?
      Parameters:
      kycStatus - the kyc status
      Returns:
      true / false / null
    • pauseStatusFromProtobuf

      @Nullable static Boolean pauseStatusFromProtobuf(TokenPauseStatus pauseStatus)
      Are we paused?
      Parameters:
      pauseStatus - the paused status
      Returns:
      true / false / null
    • fromProtobuf

      static TokenInfo fromProtobuf(TokenGetInfoResponse response)
      Create a token info object from a protobuf.
      Parameters:
      response - the protobuf
      Returns:
      new token info object
    • fromBytes

      public static TokenInfo fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException
      Create a token info object from a byte array.
      Parameters:
      bytes - the byte array
      Returns:
      the new token info object
      Throws:
      com.google.protobuf.InvalidProtocolBufferException - when there is an issue with the protobuf
    • freezeStatusToProtobuf

      static TokenFreezeStatus freezeStatusToProtobuf(@Nullable Boolean freezeStatus)
      Create a token freeze status protobuf.
      Parameters:
      freezeStatus - the freeze status
      Returns:
      the protobuf
    • kycStatusToProtobuf

      static TokenKycStatus kycStatusToProtobuf(@Nullable Boolean kycStatus)
      Create a kyc status protobuf.
      Parameters:
      kycStatus - the kyc status
      Returns:
      the protobuf
    • pauseStatusToProtobuf

      static TokenPauseStatus pauseStatusToProtobuf(@Nullable Boolean pauseStatus)
      Create a pause status protobuf.
      Parameters:
      pauseStatus - the pause status
      Returns:
      the protobuf
    • toProtobuf

      TokenGetInfoResponse toProtobuf()
      Create the protobuf.
      Returns:
      the protobuf representation
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBytes

      public byte[] toBytes()
      Create the byte array.
      Returns:
      the byte array representation