Hook State


(Added by the [Hooks amendment][].)

A HookState object describes the state of a hook, which is a piece of code running on Xahau that can interact with transactions. The HookState object stores the state of the hook, which can be modified by the hook's code.

Example JSON

  "OwnerNode": "0000000000000000",
  "HookStateKey": "49647F0D748DC3FE26BDACBC57F251AADEFFF391403EC9BF87C97F67E9977FB0",
  "HookStateData": "46060241FABCF692D4D934BA2A6C4427CD4279083E38C77CBE642243E43BE291",
  "LedgerEntryType": "HookState",
  "index": "5463C6E08862A1FAE5EDAC12D70ADB16546A1F674930521295BC082494B62924"


A HookState object has the following fields:

HookState ID Format


The ID of a HookState object is the [SHA-512Half][] of the following values, concatenated in order:

  • The HookState space key (0x0076)

  • The AccountID of the account that owns the hook

  • The HookStateKey of the HookState object

  • The HookNamespace of the hook.

Last updated