Minimal Miden RPC client with full API access using tonic-generated code from miden-node proto definitions.
let mut client = MidenRpcClient::connect("https://rpc.testnet.miden.io").await?;
let status = client.client_mut().status(tonic::Request::new(())).await?;
let block = client.client_mut().get_block_by_number(request).await?;Full method list:
Status- Node status informationCheckNullifiers- Nullifier proofsGetAccountDetails- Account state by IDGetAccountProof- Account state proofGetBlockByNumber- Raw block dataGetBlockHeaderByNumber- Block headers with optional MMR proofGetNotesById- Notes matching IDsGetNoteScriptByRoot- Note script by root hashSubmitProvenTransaction- Submit single transactionSubmitProvenBatch- Submit transaction batchSyncNullifiers- Nullifiers by prefixSyncAccountVault- Account vault updatesSyncNotes- Note synchronizationSyncState- Full state syncSyncStorageMaps- Storage map updatesSyncTransactions- Transaction records
// Get node status
let status = client.get_status().await?;
// Get block header (optionally with MMR proof)
let header = client.get_block_header(Some(12345), true).await?;
// Submit transaction
let response = client.submit_transaction(proven_tx_bytes).await?;
// Sync state for accounts and notes
let sync_response = client.sync_state(
block_num,
account_ids,
note_tags,
).await?;
// Check nullifiers
let proofs = client.check_nullifiers(nullifiers).await?;
// Get notes by ID
let notes = client.get_notes_by_id(note_ids).await?;
// Get account commitment (convenience wrapper)
let commitment = client.get_account_commitment(&account_id).await?;