{"repo":"ronanyeah/solana-rust-examples","free":true,"listed":false,"github":"https://github.com/ronanyeah/solana-rust-examples","clone":"git clone https://github.com/ronanyeah/solana-rust-examples.git","description":"Demonstrating how to use Rust to interact with the Solana blockchain.","language":"Rust","stars":168,"topics":["rust","solana","web3"],"license":null,"category":"blockchain-web3","readme_excerpt":"Solana Scripts This is a library of Rust scripts for specific purposes: - Generate a new wallet - Create an SPL token - Mint an SPL token - Get an associated token balance - Get the creation date of an account - Get the owner of an NFT - List NFTs in wallet - Subscribe to events - Fetch onchain Anchor IDL The scripts are found in the src/bin folder. They can be configured using environment variables, which are documented below. Open an issue if you have any requests or suggestions. --- New wallet cargo run --bin new wallet Code Generates a new wallet and prints the pubkey, Base58 private key, and JSON private key. --- Create an SPL token cargo run --bin create spl Code Creates a new SPL token mint account. Environment Variable Note -------------------- ---------------------------------------------------------- RPC URL e.g. https://api.mainnet-beta.solana.com SIGNER KEYPAIR Base58 encoded keypair, to pay for the transaction. MINT KEYPAIR Base58 encoded keypair, representing the new mint account. --- Mint SPL tokens cargo run --bin mint spl Code Mints 10,000 SPL tokens from a specified mint to the associated token account of a specified wallet. Environment Variable Note -------------------- ------------------------------------------------------------------ RPC URL e.g. https://api.mainnet-beta.solana.com SIGNER KEYPAIR Base58 encoded keypair, which has mint authority. MINT ACCOUNT PUBKEY The pubkey address of the SPL Token mint account. RECEIVER PUBKEY The pubkey address of the","default_branch":null,"files":null,"tree":[],"storefront":"/r/ronanyeah","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ronanyeah/solana-rust-examples/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}