pub struct TxBody;Expand description
Factory methods for creating transaction bodies (matching Dart SDK TxBody)
Implementations§
Source§impl TxBody
impl TxBody
Sourcepub fn add_credits(recipient: &str, amount: &str, oracle: u64) -> Value
pub fn add_credits(recipient: &str, amount: &str, oracle: u64) -> Value
Create an AddCredits transaction body
Sourcepub fn create_identity(
url: &str,
key_book_url: &str,
public_key_hash: &str,
) -> Value
pub fn create_identity( url: &str, key_book_url: &str, public_key_hash: &str, ) -> Value
Create a CreateIdentity transaction body
Sourcepub fn create_token_account(url: &str, token_url: &str) -> Value
pub fn create_token_account(url: &str, token_url: &str) -> Value
Create a CreateTokenAccount transaction body
Sourcepub fn create_data_account(url: &str) -> Value
pub fn create_data_account(url: &str) -> Value
Create a CreateDataAccount transaction body
Sourcepub fn create_token(
url: &str,
symbol: &str,
precision: u64,
supply_limit: Option<&str>,
) -> Value
pub fn create_token( url: &str, symbol: &str, precision: u64, supply_limit: Option<&str>, ) -> Value
Create a CreateToken transaction body
Sourcepub fn send_tokens_single(to_url: &str, amount: &str) -> Value
pub fn send_tokens_single(to_url: &str, amount: &str) -> Value
Create a SendTokens transaction body for a single recipient
Sourcepub fn send_tokens_multi(recipients: &[(&str, &str)]) -> Value
pub fn send_tokens_multi(recipients: &[(&str, &str)]) -> Value
Create a SendTokens transaction body for multiple recipients
Sourcepub fn issue_tokens_single(to_url: &str, amount: &str) -> Value
pub fn issue_tokens_single(to_url: &str, amount: &str) -> Value
Create an IssueTokens transaction body for a single recipient
Sourcepub fn write_data(entries: &[&str]) -> Value
pub fn write_data(entries: &[&str]) -> Value
Create a WriteData transaction body Data entries are hex-encoded and sent as a DoubleHash data entry
Sourcepub fn write_data_hex(entries_hex: &[&str]) -> Value
pub fn write_data_hex(entries_hex: &[&str]) -> Value
Create a WriteData transaction body with hex entries
Sourcepub fn write_data_to_hex(recipient: &str, entries_hex: &[&str]) -> Value
pub fn write_data_to_hex(recipient: &str, entries_hex: &[&str]) -> Value
Create a WriteDataTo transaction body with hex entries (entries already hex-encoded)
Sourcepub fn create_key_page(key_hashes: &[&[u8]]) -> Value
pub fn create_key_page(key_hashes: &[&[u8]]) -> Value
Create a CreateKeyPage transaction body
Sourcepub fn create_key_book(url: &str, public_key_hash: &str) -> Value
pub fn create_key_book(url: &str, public_key_hash: &str) -> Value
Create a CreateKeyBook transaction body
Sourcepub fn update_key_page_add_key(key_hash: &[u8]) -> Value
pub fn update_key_page_add_key(key_hash: &[u8]) -> Value
Create an UpdateKeyPage transaction body to add a key
Sourcepub fn update_key_page_remove_key(key_hash: &[u8]) -> Value
pub fn update_key_page_remove_key(key_hash: &[u8]) -> Value
Create an UpdateKeyPage transaction body to remove a key
Sourcepub fn update_key_page_set_threshold(threshold: u64) -> Value
pub fn update_key_page_set_threshold(threshold: u64) -> Value
Create an UpdateKeyPage transaction body to set threshold
Sourcepub fn burn_tokens(amount: &str) -> Value
pub fn burn_tokens(amount: &str) -> Value
Create a BurnTokens transaction body
Sourcepub fn transfer_credits(to_url: &str, amount: u64) -> Value
pub fn transfer_credits(to_url: &str, amount: u64) -> Value
Create a TransferCredits transaction body
Sourcepub fn burn_credits(amount: u64) -> Value
pub fn burn_credits(amount: u64) -> Value
Create a BurnCredits transaction body
Sourcepub fn update_key(new_key_hash: &str) -> Value
pub fn update_key(new_key_hash: &str) -> Value
Create an UpdateKey transaction body (key rotation)
Sourcepub fn lock_account(height: u64) -> Value
pub fn lock_account(height: u64) -> Value
Create a LockAccount transaction body
Sourcepub fn update_account_auth(operations: &Value) -> Value
pub fn update_account_auth(operations: &Value) -> Value
Create an UpdateAccountAuth transaction body
Sourcepub fn write_data_to(recipient: &str, entries: &[&str]) -> Value
pub fn write_data_to(recipient: &str, entries: &[&str]) -> Value
Create a WriteDataTo transaction body (write data to a remote data account)
Sourcepub fn update_key_page(operations: &Value) -> Value
pub fn update_key_page(operations: &Value) -> Value
Create a generic UpdateKeyPage transaction body with raw operations
For simple cases, prefer update_key_page_add_key, update_key_page_remove_key, or update_key_page_set_threshold.