Expand description
Rust SDK for interacting with Mina Protocol nodes via GraphQL.
§Quick Start
use mina_sdk::{MinaClient, Currency};
let client = MinaClient::new("http://127.0.0.1:3085/graphql");
// Query node status
let status = client.get_sync_status().await?;
println!("Node is {status}");
// Send a payment
let result = client.send_payment(
"B62q..sender..",
"B62q..receiver..",
Currency::from_mina("1.5")?,
Currency::from_mina("0.01")?,
Some("hello"),
None,
).await?;
println!("Payment hash: {}", result.hash);Re-exports§
Modules§
Structs§
- Account
Balance - Account balance with total, liquid, and locked amounts.
- Account
Data - Account data returned by the daemon.
- Block
Info - Block info from the best chain.
- Client
Config - Configuration for the Mina daemon client.
- Currency
- Represents a Mina currency amount stored internally as nanomina (atomic units).
- Daemon
Status - Comprehensive daemon status.
- Mina
Client - Client for interacting with a Mina daemon via its GraphQL API.
- Peer
Info - Information about a connected peer.
- Pooled
User Command - A pooled user command from the transaction pool.
- Send
Delegation Result - Result of a send_delegation mutation.
- Send
Payment Result - Result of a send_payment mutation.
Enums§
- Sync
Status - Sync status of a Mina daemon node.