Expand description
§DataLayer Driver
Native Chia DataLayer Driver for storing and retrieving data in Chia blockchain.
This crate provides Rust APIs for interacting with Chia’s DataLayer, including minting, updating, and syncing data stores.
§Features
- Mint new data stores
- Update store metadata and ownership
- Sync stores from the blockchain
- Oracle spend functionality
- Server coin management
- Fee management utilities
Re-exports§
pub use async_api::connect_peer;
pub use async_api::connect_random;
pub use async_api::create_tls_connector;
pub use async_api::NetworkType;
pub use constants::get_mainnet_genesis_challenge;
pub use constants::get_testnet11_genesis_challenge;
pub use rust::BlsPair;
pub use rust::SimulatorPuzzle;
pub use rust::UnspentCoinsResponse;
pub use server_coin::morph_launcher_id;
pub use server_coin::ServerCoin;
pub use wallet::create_simple_did;
pub use wallet::generate_did_proof;
pub use wallet::generate_did_proof_from_chain;
pub use wallet::generate_did_proof_manual;
pub use wallet::get_fee_estimate;
pub use wallet::get_header_hash;
pub use wallet::get_store_creation_height;
pub use wallet::get_unspent_coin_states;
pub use wallet::is_coin_spent;
pub use wallet::look_up_possible_launchers;
pub use wallet::mint_nft;
pub use wallet::spend_server_coins;
pub use wallet::subscribe_to_coin_states;
pub use wallet::sync_store;
pub use wallet::sync_store_using_launcher_id;
pub use wallet::unsubscribe_from_coin_states;
pub use wallet::verify_signature;
pub use wallet::DataStoreInnerSpend;
pub use wallet::NewServerCoin;
pub use wallet::PossibleLaunchersResponse;
pub use wallet::SuccessResponse;
pub use wallet::SyncStoreResponse;
pub use wallet::TargetNetwork;
pub use wallet::UnspentCoinStates;
Modules§
- async_
api - Async functions for blockchain interaction (Rust API versions)
- constants
- Constants for different networks
- rust
- server_
coin - wallet
Structs§
- Address
- Bytes
- Coin
- Coin
Spend - Coin
State - Data
Store - Everything that is required to spend a
DataStore
coin. - Data
Store Info - Data
Store Metadata - EveProof
- Lineage
Proof - Output
- Output for send_xch function
- Peer
- Program
- Public
Key - Secret
Key - Signature
- Spend
Bundle
Enums§
Functions§
- add_fee
- Adds a fee to any transaction (Rust API version).
- address_
to_ puzzle_ hash - Converts an address to a puzzle hash using bech32m.
- admin_
delegated_ puzzle_ from_ key - Creates an admin delegated puzzle for a given key.
- create_
server_ coin - Creates a server coin (Rust API version).
- get_
coin_ id - Gets the coin ID for a given coin.
- get_
cost - Calculates the total cost of coin spends (Rust API version).
- hex_
spend_ bundle_ to_ coin_ spends - Converts hex-encoded spend bundle to coin spends.
- master_
public_ key_ to_ first_ puzzle_ hash - Converts a master public key to the first puzzle hash.
- master_
public_ key_ to_ wallet_ synthetic_ key - Converts a master public key to a wallet synthetic key.
- master_
secret_ key_ to_ wallet_ synthetic_ secret_ key - Converts a master secret key to a wallet synthetic secret key.
- master_
to_ wallet_ unhardened - melt_
store - Melts a store (Rust API version).
- mint_
store - Mints a new datastore (Rust API version).
- morph_
launcher_ id_ wrapper - Adds an offset to a launcher id to make it deterministically unique from the original.
- oracle_
delegated_ puzzle - Creates an oracle delegated puzzle.
- oracle_
spend - Spends a store in oracle mode (Rust API version).
- puzzle_
hash_ to_ address - Converts a puzzle hash to an address by encoding it using bech32m.
- secret_
key_ to_ public_ key - Converts a secret key to its corresponding public key.
- select_
coins - Selects coins using the knapsack algorithm (Rust API version).
- send_
xch - Sends XCH to a given set of puzzle hashes (Rust API version).
- sign_
coin_ spends - Signs coin spends using a list of keys (Rust API version).
- sign_
message - Signs a message using the provided private key (Rust API version).
- spend_
bundle_ to_ hex - Converts a spend bundle to hex encoding.
- synthetic_
key_ to_ puzzle_ hash - Converts a synthetic key to its corresponding standard puzzle hash.
- update_
store_ metadata - Updates the metadata of a store (Rust API version).
- update_
store_ ownership - Updates the ownership of a store (Rust API version).
- verify_
signed_ message - Verifies a signed message using the provided public key (Rust API version).
- writer_
delegated_ puzzle_ from_ key - Creates a writer delegated puzzle from a given key.