Expand description
Helper functions for Stellar-specific operations.
This module provides utility functions for working with Stellar-specific data types and formatting, including address normalization, XDR value parsing, and operation processing.
Enums§
- Stellar
Type - Represents all possible Stellar smart contract types
- Stellar
Value - Represents all possible Stellar smart contract values
Functions§
- are_
same_ address - Compares two Stellar addresses for equality, ignoring case and whitespace.
- are_
same_ signature - Compares two Stellar function signatures for equality, ignoring case and whitespace.
- combine_
i128 - Combines the parts of an Int128 into a single string representation.
- combine_
i256 - Combines the parts of an Int256 into a single string representation. Note: hi_hi is signed (i64) while other components are unsigned (u64)
- combine_
u128 - Combines the parts of a UInt128 into a single string representation.
- combine_
u256 - Combines the parts of a UInt256 into a single string representation.
- get_
contract_ code_ ledger_ key - Extracts contract code ledger key from a contract’s XDR-encoded executable.
- get_
contract_ instance_ ledger_ key - Creates a LedgerKey for the contract instance.
- get_
contract_ spec - Parse a WASM contract from hex and return a vector of ScSpecEntry.
- get_
contract_ spec_ functions - Get contract spec functions from a contract spec.
- get_
contract_ spec_ with_ function_ input_ parameters - Parse contract spec functions and populate input parameters.
- get_
function_ signature - Gets the function signature for a Stellar host function operation.
- get_
kind_ from_ value - Get the kind of a value from a JSON value.
- get_
wasm_ code_ from_ ledger_ entry_ data - Get WASM code from a contract’s XDR-encoded executable.
- get_
wasm_ hash_ from_ ledger_ entry_ data - Get WASM hash from a contract’s XDR-encoded executable.
- hex_
to_ bytes - Convert a hexadecimal string to a byte vector.
- is_
address - Checks if a string is a valid Stellar address.
- normalize_
address - Normalizes a Stellar address by removing whitespace and converting to lowercase.
- normalize_
signature - Normalizes a Stellar function signature by removing whitespace and converting to lowercase.
- parse_
sc_ val - Parses a Stellar Contract Value into a decoded parameter entry.
- parse_
xdr_ value - Parses XDR-encoded bytes into a decoded parameter entry.
- process_
invoke_ host_ function - Processes a Stellar host function operation into a parsed result.