The main function of your hook
Concepts
Behaviour
hook
is a user defined function called byxrpld
in order to fire your hook.- Your
hook
function calls eitheraccept
orreject
to pass or reject the originating transaction. - If execution reaches the end of the function it is implicitly an
accept
.
Definition
int64_t hook (
uint32_t reserved
)
Example
int64_t hook(uint32_t reserved)
{
return 0;
}
Parameters
Name | Type | Description |
reserved | uint32_t | Reserved for future use. |
Return Code
Type | Description |
int64_t | An arbitrary return code you wish to return from your hook. This will be present in the metadata of the originating transaction. |