Invoke
An Invoke transaction is used to call a hook, which is a piece of code that is executed in response to certain ledger operations.
[Source]
(Added by the [Hooks amendment][].)
Example
Field | JSON Type | [Internal Type][] | Description |
---|---|---|---|
| String | AccountID | The address of the account that is invoking the hook. |
| String | Blob | (Optional) A blob of data that is passed to the hook. (512 byte max) |
| String | AccountID | (Optional) The address of the account that is the target of the hook. |
| String | Hash256 | (Optional) Arbitrary 256-bit hash representing a specific reason or identifier for this payment. |
Special Transaction Cost
The Invoke transaction has a standard transaction cost, plus an additional cost based on the size of the Blob and HookParameters fields.
Error Cases
Besides errors that can occur for all transactions, Invoke transactions can result in the following transaction result codes:
Error Code | Description |
---|---|
| Occurs if the Hooks amendment is not enabled. |
| Occurs if the Blob field is larger than 128 KiB. |
| Occurs if the sending account or the destination account does not exist. |
Last updated