pub struct TokenInfo {Show 28 fields
pub token_id: TokenId,
pub name: String,
pub symbol: String,
pub decimals: u32,
pub total_supply: u64,
pub treasury_account_id: AccountId,
pub admin_key: Option<Key>,
pub kyc_key: Option<Key>,
pub freeze_key: Option<Key>,
pub wipe_key: Option<Key>,
pub supply_key: Option<Key>,
pub fee_schedule_key: Option<Key>,
pub default_freeze_status: Option<bool>,
pub default_kyc_status: Option<bool>,
pub is_deleted: bool,
pub auto_renew_account: Option<AccountId>,
pub auto_renew_period: Option<Duration>,
pub expiration_time: Option<OffsetDateTime>,
pub token_memo: String,
pub token_type: TokenType,
pub supply_type: TokenSupplyType,
pub max_supply: u64,
pub custom_fees: Vec<AnyCustomFee>,
pub pause_key: Option<Key>,
pub pause_status: Option<bool>,
pub ledger_id: LedgerId,
pub metadata: Vec<u8>,
pub metadata_key: Option<Key>,
}
Expand description
Response from TokenInfoQuery
.
Fields§
§token_id: TokenId
The ID of the token for which information is requested.
name: String
Name of token.
symbol: String
Symbol of token.
decimals: u32
The amount of decimal places that this token supports.
total_supply: u64
Total Supply of token.
treasury_account_id: AccountId
The ID of the account which is set as Treasury.
admin_key: Option<Key>
The key which can perform update/delete operations on the token.
kyc_key: Option<Key>
The key which can grant or revoke KYC of an account for the token’s transactions.
freeze_key: Option<Key>
The key which can freeze or unfreeze an account for token transactions.
wipe_key: Option<Key>
The key which can wipe token balance of an account.
supply_key: Option<Key>
The key which can change the supply of a token.
fee_schedule_key: Option<Key>
The key which can change the custom fees of the token.
default_freeze_status: Option<bool>
The default Freeze status (not applicable, frozen or unfrozen)
default_kyc_status: Option<bool>
The default KYC status (KycNotApplicable or Revoked) of Hedera accounts relative to this token.
is_deleted: bool
Specifies whether the token was deleted or not.
auto_renew_account: Option<AccountId>
An account which will be automatically charged to renew the token’s expiration, at autoRenewPeriod interval.
auto_renew_period: Option<Duration>
The interval at which the auto-renew account will be charged to extend the token’s expiry
expiration_time: Option<OffsetDateTime>
The epoch second at which the token will expire
token_memo: String
The memo associated with the token
token_type: TokenType
The token type.
supply_type: TokenSupplyType
The token supply type
max_supply: u64
The Maximum number of tokens that can be in circulation.
custom_fees: Vec<AnyCustomFee>
The custom fees to be assessed during a transfer that transfers units of this token.
pause_key: Option<Key>
The Key which can pause and unpause the Token.
pause_status: Option<bool>
Specifies whether the token is paused or not.
ledger_id: LedgerId
The ledger ID the response was returned from.
metadata: Vec<u8>
Represents the metadata of the token definition.
metadata_key: Option<Key>
The key which can change the metadata of a token (token definition and individual NFTs).
Implementations§
source§impl TokenInfo
impl TokenInfo
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a new TokenInfo
from protobuf-encoded bytes
.
§Errors
Error::FromProtobuf
if decoding the bytes fails to produce a valid protobuf.Error::FromProtobuf
if decoding the protobuf fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TokenInfo
impl RefUnwindSafe for TokenInfo
impl Send for TokenInfo
impl Sync for TokenInfo
impl Unpin for TokenInfo
impl UnwindSafe for TokenInfo
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request