pub struct SolanaToken {
pub mint_address: SolanaTokenMintAddress,
pub name: Option<String>,
pub symbol: Option<String>,
}
Expand description
General information about a Solana token. Includes the mint address, and other identifying information.
JSON schema
{
"description": "General information about a Solana token. Includes the mint address, and other identifying information.",
"examples": [
{
"mintAddress": "So11111111111111111111111111111111111111111",
"name": "Solana",
"symbol": "SOL"
}
],
"type": "object",
"required": [
"mintAddress"
],
"properties": {
"mintAddress": {
"description": "The mint address of the token.\nFor native SOL, the mint address is `So11111111111111111111111111111111111111111`. For SPL tokens, this is the mint address where the token is defined.",
"examples": [
"So11111111111111111111111111111111111111111"
],
"type": "string",
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
},
"name": {
"description": "The name of this token (ex: \"Solana\", \"USD Coin\", \"Raydium\").\nThe token name is not unique. It is possible for two different tokens to have the same name.\nFor the native SOL token, this name is \"Solana\". For SPL tokens, this name is defined in the token's metadata.\nNot all tokens have a name. This field will only be populated when the token has metadata available.",
"examples": [
"Solana"
],
"type": "string"
},
"symbol": {
"description": "The symbol of this token (ex: SOL, USDC, RAY).\nThe token symbol is not unique. It is possible for two different tokens to have the same symbol.\nFor the native SOL token, this symbol is \"SOL\". For SPL tokens, this symbol is defined in the token's metadata.\nNot all tokens have a symbol. This field will only be populated when the token has metadata available.",
"examples": [
"SOL"
],
"type": "string"
}
}
}
Fields§
§mint_address: SolanaTokenMintAddress
The mint address of the token.
For native SOL, the mint address is So11111111111111111111111111111111111111111
. For SPL tokens, this is the mint address where the token is defined.
name: Option<String>
The name of this token (ex: “Solana”, “USD Coin”, “Raydium”). The token name is not unique. It is possible for two different tokens to have the same name. For the native SOL token, this name is “Solana”. For SPL tokens, this name is defined in the token’s metadata. Not all tokens have a name. This field will only be populated when the token has metadata available.
symbol: Option<String>
The symbol of this token (ex: SOL, USDC, RAY). The token symbol is not unique. It is possible for two different tokens to have the same symbol. For the native SOL token, this symbol is “SOL”. For SPL tokens, this symbol is defined in the token’s metadata. Not all tokens have a symbol. This field will only be populated when the token has metadata available.
Implementations§
Source§impl SolanaToken
impl SolanaToken
pub fn builder() -> SolanaToken
Trait Implementations§
Source§impl Clone for SolanaToken
impl Clone for SolanaToken
Source§fn clone(&self) -> SolanaToken
fn clone(&self) -> SolanaToken
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more