Crate datalayer_driver

Crate datalayer_driver 

Source
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
CoinSpend
CoinState
DataStore
Everything that is required to spend a DataStore coin.
DataStoreInfo
DataStoreMetadata
EveProof
LineageProof
Output
Output for send_xch function
Peer
Program
PublicKey
SecretKey
Signature
SpendBundle

Enums§

DelegatedPuzzle
Proof

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.

Type Aliases§

Bytes32
Result