Expand description
Host bindings and utilities exposed to WASM smart contracts.
This module exposes the low-level host ABI plus typed primitives (Result, Error, helpers).
Most users should prefer the safe, high-level APIs in crate::core, which wrap these bindings.
§Float Operations for Fungible Tokens (IOUs)
The host provides float arithmetic functions for XRPL’s fungible token amounts. These operations use rippled’s Number class via FFI to ensure exact consensus compatibility:
float_from_int/float_from_uint- Convert integers to float formatfloat_set- Create float from exponent and mantissafloat_add/float_subtract/float_multiply/float_divide- Arithmeticfloat_pow/float_root/float_log- Mathematical functionsfloat_compare- Comparison operations
All operations support explicit rounding modes (0=ToNearest, 1=TowardsZero, 2=Downward, 3=Upward).
See the host_bindings documentation for detailed function signatures.
Modules§
- assert
- Assertion macros for WASM environments.
- error_
codes - trace
Enums§
- Error
- Possible errors returned by XRPL Programmability APIs.
- Result
Resultis a type that represents either a success (Ok) or failure (Err) result from the host.
Functions§
- account_
keylet ⚠ - amendment_
enabled ⚠ - amm_
keylet ⚠ - cache_
ledger_ ⚠obj - check_
keylet ⚠ - check_
sig ⚠ - compute_
sha512_ ⚠half - credential_
keylet ⚠ - delegate_
keylet ⚠ - deposit_
preauth_ ⚠keylet - did_
keylet ⚠ - escrow_
keylet ⚠ - float_
add ⚠ - float_
compare ⚠ - float_
divide ⚠ - float_
from_ ⚠int - float_
from_ ⚠uint - float_
log ⚠ - float_
multiply ⚠ - float_
pow ⚠ - float_
root ⚠ - float_
set ⚠ - float_
subtract ⚠ - get_
base_ ⚠fee - get_
current_ ⚠ledger_ obj_ array_ len - get_
current_ ⚠ledger_ obj_ field - get_
current_ ⚠ledger_ obj_ nested_ array_ len - get_
current_ ⚠ledger_ obj_ nested_ field - get_
ledger_ ⚠obj_ array_ len - get_
ledger_ ⚠obj_ field - get_
ledger_ ⚠obj_ nested_ array_ len - get_
ledger_ ⚠obj_ nested_ field - get_
ledger_ ⚠sqn - get_nft⚠
- get_
nft_ ⚠flags - get_
nft_ ⚠issuer - get_
nft_ ⚠serial - get_
nft_ ⚠taxon - get_
nft_ ⚠transfer_ fee - get_
parent_ ⚠ledger_ hash - get_
parent_ ⚠ledger_ time - get_
tx_ ⚠array_ len - get_
tx_ ⚠field - get_
tx_ ⚠nested_ array_ len - get_
tx_ ⚠nested_ field - line_
keylet ⚠ - mpt_
issuance_ ⚠keylet - mptoken_
keylet ⚠ - nft_
offer_ ⚠keylet - offer_
keylet ⚠ - oracle_
keylet ⚠ - paychan_
keylet ⚠ - permissioned_
domain_ ⚠keylet - signers_
keylet ⚠ - ticket_
keylet ⚠ - trace⚠
- trace_
account ⚠ - trace_
amount ⚠ - trace_
num ⚠ - trace_
opaque_ ⚠float - update_
data ⚠ - vault_
keylet ⚠