Module xdr_utils

Source
Expand description

XDR utility functions for Stellar transaction processing.

This module provides utilities for parsing, validating, and manipulating Stellar transaction XDR (External Data Representation) structures. It includes support for regular transactions, fee-bump transactions, and various transaction formats (V0, V1).

Functionsยง

attach_signatures_to_envelope
Attach signatures to a transaction envelope This function handles all envelope types (V0, V1, and FeeBump)
build_fee_bump_envelope
Build a fee-bump transaction envelope
calculate_transaction_hash
Calculate the hash of a transaction envelope
extract_inner_transaction_hash
Extract the inner transaction hash from a fee-bump envelope
extract_operations
Extract operations from a transaction envelope
extract_source_account
Extract the source account from a transaction envelope
is_fee_bump
Check if a transaction envelope is a fee-bump transaction
is_signed
Check if a transaction envelope is signed
muxed_account_to_string
Convert a MuxedAccount to a string representation
parse_transaction_xdr
Parse a transaction XDR string into a TransactionEnvelope
string_to_muxed_account
Convert a string address to a MuxedAccount
update_xdr_fee
Update the fee in an XDR envelope
update_xdr_sequence
Update the sequence number in an XDR envelope
validate_source_account
Validate that the source account of a transaction matches the expected account
xdr_needs_simulation
Check if a transaction envelope contains operations that require simulation