Struct algonaut_transaction::transaction::AssetParams
source · [−]pub struct AssetParams {
pub asset_name: Option<String>,
pub decimals: Option<u32>,
pub default_frozen: Option<bool>,
pub total: Option<u64>,
pub unit_name: Option<String>,
pub meta_data_hash: Option<Vec<u8>>,
pub url: Option<String>,
pub clawback: Option<Address>,
pub freeze: Option<Address>,
pub manager: Option<Address>,
pub reserve: Option<Address>,
}
Expand description
This is used to create or configure an asset.
Fields
asset_name: Option<String>
The name of the asset. Supplied on creation. Example: Tether
decimals: Option<u32>
The number of digits to use after the decimal point when displaying the asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths.
default_frozen: Option<bool>
True to freeze holdings for this asset by default.
total: Option<u64>
The total number of base units of the asset to create. This number cannot be changed.
unit_name: Option<String>
The name of a unit of this asset. Supplied on creation. Example: USDT
meta_data_hash: Option<Vec<u8>>
This field is intended to be a 32-byte hash of some metadata that is relevant to your asset and/or asset holders. The format of this metadata is up to the application. This field can only be specified upon creation. An example might be the hash of some certificate that acknowledges the digitized asset as the official representation of a particular real-world asset.
url: Option<String>
Specifies a URL where more information about the asset can be retrieved. Max size is 32 bytes.
clawback: Option<Address>
The address of the account that can clawback holdings of this asset. If empty, clawback is not permitted.
freeze: Option<Address>
The address of the account used to freeze holdings of this asset. If empty, freezing is not permitted.
manager: Option<Address>
The address of the account that can manage the configuration of the asset and destroy it.
reserve: Option<Address>
The address of the account that holds the reserve (non-minted) units of the asset. This address has no specific authority in the protocol itself. It is used in the case where you want to signal to holders of your asset that the non-minted units of the asset reside in an account that is different from the default creator account (the sender).
Trait Implementations
sourceimpl Clone for AssetParams
impl Clone for AssetParams
sourcefn clone(&self) -> AssetParams
fn clone(&self) -> AssetParams
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for AssetParams
impl Debug for AssetParams
sourceimpl From<ApiAssetParams> for AssetParams
impl From<ApiAssetParams> for AssetParams
sourcefn from(params: ApiAssetParams) -> Self
fn from(params: ApiAssetParams) -> Self
sourceimpl From<AssetParams> for ApiAssetParams
impl From<AssetParams> for ApiAssetParams
sourcefn from(params: AssetParams) -> Self
fn from(params: AssetParams) -> Self
sourceimpl PartialEq<AssetParams> for AssetParams
impl PartialEq<AssetParams> for AssetParams
sourcefn eq(&self, other: &AssetParams) -> bool
fn eq(&self, other: &AssetParams) -> bool
impl Eq for AssetParams
impl StructuralEq for AssetParams
impl StructuralPartialEq for AssetParams
Auto Trait Implementations
impl RefUnwindSafe for AssetParams
impl Send for AssetParams
impl Sync for AssetParams
impl Unpin for AssetParams
impl UnwindSafe for AssetParams
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.