1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//! # pyde-rust-sdk
//!
//! Rust SDK for building dapps + wallets on the [Pyde](https://pyde.network)
//! blockchain. Comprehensive surface — account generation, FALCON-512
//! signing, transaction construction, RPC client (HTTP + WebSocket),
//! event subscriptions, typed contract interaction via the
//! [`pyde_abi!`] macro, and the small utility helpers every
//! wallet/dapp needs.
//!
//! Sister SDK in TypeScript: `pyde-ts-sdk`. Both target the same
//! chain wire format (Tx, TxType, AuthKeys, FALCON/Poseidon2 byte
//! shapes are pinned across both), and both write the canonical Pyde
//! account keystore (Argon2id + AES-256-GCM, the shared multi-account
//! vault), so a keystore made by one opens in the other and in the
//! `otigen` CLI. See `docs/12-compatibility.md`.
//!
//! ## Quick start
//!
//! ```rust,ignore
//! use std::sync::Arc;
//! use pyde_rust_sdk::provider::{HttpTransport, RootProvider};
//! use pyde_rust_sdk::{Provider, Signer, TxBuilder, Wallet};
//! use pyde_rust_sdk::types::Address;
//! use pyde_rust_sdk::util::parse_quanta;
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! // `otigen devnet` picks a random RPC port — set PYDE_RPC_URL
//! // to its advertised URL, or substitute the URL directly.
//! let url = std::env::var("PYDE_RPC_URL")
//! .unwrap_or_else(|_| "http://127.0.0.1:9933".to_string());
//! let transport = HttpTransport::new(&url)?;
//! let provider = Arc::new(RootProvider::new(transport));
//! let wallet = Wallet::generate()?;
//! let recipient = Address::from_hex("0xaa…")?;
//!
//! let chain_id = provider.chain_id().await?;
//! let nonce = provider.get_nonce(&wallet.address()).await?;
//! let mut tx = TxBuilder::new()
//! .from(wallet.address())
//! .chain_id(chain_id)
//! .nonce(nonce)
//! .transfer(recipient, parse_quanta("1.5")?)
//! .build()?;
//! wallet.sign_tx(&mut tx).await?;
//! let pending = provider.send_transaction(&tx).await?;
//! let receipt = pending.wait_for_receipt().await?;
//! println!("committed in wave {}", receipt.wave_id_u64());
//! Ok(())
//! }
//! ```
//!
//! See [`PROPOSAL.md`](https://github.com/pyde-net/pyde-rust-sdk/blob/main/PROPOSAL.md)
//! for the full v1 surface plan + phased build schedule.
// ── Module declarations ──────────────────────────────────────────────
// ── Top-level re-exports — what 95% of users reach for. ──────────────
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use TxBuilder;
pub use ;
pub use ;
pub use ;