etxn_nonce
Concepts
Section titled “Concepts”Behaviour
Section titled “Behaviour”- Write the 32 byte Hash to the write_ptr
- Returns an ErrorCode if there is an error, or an array containing the nonce value on success.
Definition
Section titled “Definition”int64_t etxn_nonce ( uint32_t write_ptr, uint32_t write_len);
function etxn_nonce(): ErrorCode | ByteArray
Example
Section titled “Example”uint8_t n[32];int64_t bytes_written = etxn_nonce(n, 32);
const nonce = etxn_nonce()
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
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. |
No parameters
Return Code
Section titled “Return Code”Type | Description |
---|---|
int64_t | The number of bytes written If negative, an error: OUT_OF_BOUNDS - pointers/lengths specified outside of hook memory. |
Type | Description |
---|---|
ErrorCode | ByteArray | Returns an ErrorCode if there is an error, or an array containing the nonce value on success. |