Module rshooks_api::api
source · Expand description
XRPL Hooks API
Re-exports§
pub use self::Result::*;
Structs§
- XFL floating point numbers
Enums§
- Account type
- Amount type
- Data representation
- Possible errors returned by Hook APIs.
- Field type
- Field or amount type
- Keylet type
- Flags for slot_type
- Transaction type
- Flags for otxn_id
If 0:
Write the canonical hash of the originating transaction.\ - XFL compare mode
Constants§
- Account id buffer lenght
- Currency code buffer lenght
- Emit details buffer lenght
- Hash buffer lenght
- IOU amount buffer lenght
- Keylet buffer lenght
- Ledger hash buffer lenght
- NameSpace buffer lenght
- Native amount buffer lenght
- Nonce buffer lenght
- Public key buffer lenght
- State key buffer lenght
- Flags canonical
Functions§
- Guard function
- Accept the originating transaction and commit any changes the hook made
- Emit a new transaction from the hook
- Get the burden of a hypothetically emitted transaction
- Produce an sfEmitDetails suitable for a soon-to-be emitted transaction
- Estimate the required fee for a txn to be emitted successfully
- Get the generation of a hypothetically emitted transaction
- Estimate the required fee for a txn to be emitted successfully
- Fetch the fee base of the current ledger
- Perform a comparison on two XFL floating point numbers
- Divide an XFL by another XFL floating point number
- Convert an XFL floating point into an integer (floor)
- Divide one by an XFL floating point number
- Get the mantissa of an XFL enclosing number
- Multiply an XFL floating point by a non-XFL numerator and denominator
- Multiply two XFL numbers together
- Negate an XFL floating point number
- Return the number 1 represented in an XFL enclosing number
- Create a float from an exponent and mantissa
- Get the sign of an XFL enclosing number
- Output an XFL as a serialized object
- Read a serialized amount into an XFL
- Add two XFL numbers together
- Retreive the 20 byte Account ID the Hook is executing on
- Retreive the 32 byte namespace biased SHA512H of the currently executing Hook
- Retreive the 32 byte namespace biased SHA512H of the last closed ledger
- Generate a 32 byte nonce for use in an emitted transaction
- Fetch the current ledger sequence number
- Get the burden of the originating transaction
- Serialize and output a field from the originating transaction
- Get the generation of the originating transaction
- Output the canonical hash of the originating transaction
- Load the originating transaction into a slot
- Get the Transaction Type of the originating transaction
- Reject the originating transaction and discard any changes the hook made
- Serialize and output a slotted object
- Free up a currently occupied slot
- Count the elements of an array object in a slot
- Parse the STI_AMOUNT in the specified slot and return it as an XFL enclosed number
- Locate an object based on its keylet and place it into a slot
- Compute the serialized size of an object in a slot
- Index into a slotted array and assign a sub-object to another slot
- Index into a slotted object and assign a sub-object to another slot
- Retrieve the field code of an object in a slot and, optionally, some other information
- Retrieve the data pointed to by a Hook State key and write it to an output buffer
- Retrieve the data pointed to, on another account, by a Hook State key and write it to an output buffer
- Set the Hook State on another account for a given key, value and namespace
- Set the Hook State for a given key and value
- Emplace a field into an existing STObject at its canonical placement
- Remove a field from an STObject
- Index into a xrpld serialized array and return the location and length of an index
- Index into a xrpld serialized object and return the location and length of a subfield
- Validate an STObject
- Write the contents of a buffer to the XRPLD trace log
- Write a XFL float to the XRPLD trace log
- Write an integer to the XRPLD trace log
- Convert an r-address into a 20 byte Account ID
- Compute a serialized keylet of a given type
- Convert a 20 byte Account ID to an r-address
- Compute an sha512-half over some data
- Verify a cryptographic signature
Type Aliases§
- Account id buffer
- Buffer of the specified size
- Currency code buffer
- Emit details buffer
- Hash buffer
- Keylet buffer
- Namespace key buffer
- Native amount buffer
- IOU amount buffer
- Nonce buffer
- Public key buffer
- State key buffer