Generate a 32 byte nonce for use in an emitted transaction
Write a 32 byte random value to the write_ptr
C
C
write_ptr
uint32_t
Pointer to a buffer of a suitable size to store the output. Should be at least 32 bytes.
write_len
uint32_t
Length of the output buffer.
int64_t
The number of bytes written
If negative, an error:
OUT_OF_BOUNDS
- pointers/lengths specified outside of hook memory.
Fetch the last closed ledger's timestamp
Return the Xahau Timestamp from the last closed ledger.
📘TipXahau timestamps are identical to a unix timestamps except that they are offset by
-946684800
.The equivalent unix timestamp is:
ledger_last_time() + 946684800;
C
C
This API takes no parameters.
int64_t
The XRPL timestamp of the last closed ledger
Fetch the fee base of the current ledger
Return the fee base from the current ledger
C
C
This API takes no parameters.
int64_t
The fee base of the current ledger
int64_t
The number of bytes written
If negative, an error:
OUT_OF_BOUNDS
- pointers/lengths specified outside of hook memory.
write_ptr
uint32_t
Pointer to a buffer of a suitable size to store the output. Should be at least 32 bytes.
write_len
uint32_t
Length of the output buffer.
Search for a keylet within a specified range on the current ledger
Read a 34 byte Keylet from the lread_ptr
Read a 32 byte Keylet from the hread_ptr
Search the ledger for the first (lowest) Keylet of this type in this range.
If any matching Keylet is found, write it to write_ptr
.
C
C
write_ptr
uint32_t
Pointer to a buffer to store the output serialised Keylet. .
write_len
uint32_t
Length of the output buffer. Must be 34 bytes
lread_ptr
uint32_t
Pointer to the 34 byte serialised Keylet that represents the lower boundary of the Keylet range to search.
lread_len
uint32_t
Always 34 bytes
hread_ptr
uint32_t
Pointer to the 34 byte serialised Keylet that represents the upper boundary of the Keylet range to search.
hread_len
uint32_t
Always 34 bytes
int64_t
The number of bytes written (34 bytes) on success.
If negative, an error:
OUT_OF_BOUNDS
- pointers/lengths specified outside of hook memory.
TOO_SMALL
/ TOO_BIG
- write_len
, lread_len
or hread_len
was not 34 bytes
INVALID_ARGUMENT
- One or more of the provided Keylets was not a valid serialised Keylet
DOES_NOT_MATCH
- The two provided Keylets were not of the same Keylet Type.
DOESNT_EXIST
- No matching Keylet was found in the specified range.