A hook often needs information about the current state of the Account that is being executed.
Vault can provide the following information to running hooks:
Postings timeseries
Balances timeseries
Parameters timeseries
Not all hooks are allowed to access all types of data - see "Allowed Requirements" for more details.
For safety and performance reasons, running Smart Contracts are not allowed to access the database directly. Instead, all data requirements must be specified upfront via statically-parsable means.
In API version 3.0.0 and above, a hook can specify the data it needs by using the @requires decorator as follows: