| Crates.io | pyra-tokens |
| lib.rs | pyra-tokens |
| version | 0.2.8 |
| created_at | 2025-08-06 00:22:09.391052+00 |
| updated_at | 2026-01-19 21:04:14.456795+00 |
| description | Token definitions for supported assets on Pyra |
| homepage | |
| repository | https://github.com/pyra-labs/pyra-rust-sdk |
| max_upload_size | |
| id | 1783216 |
| size | 22,921 |
A Rust crate containing supported tokens for Pyra Solana smart contracts. This crate provides a shared interface for token metadata that can be used by both on-chain programs and backend services.
Add this to your Cargo.toml:
[dependencies]
pyra-tokens = "0.1.0"
use pyra_tokens::{Token, SUPPORTED_TOKENS};
// Access all supported tokens
for token in SUPPORTED_TOKENS.iter() {
println!("Token at market index {}: {}", token.market_index, token.mint);
}
// Find token by market index
if let Some(token) = Token::find_by_market_index(0) {
println!("USDC mint: {}", token.mint);
}
// Find token by mint address
use solana_program::pubkey;
let usdc_mint = pubkey!("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v");
if let Some(token) = Token::find_by_mint(&usdc_mint) {
println!("USDC market index: {}", token.market_index);
}
This project is licensed under MIT license.