List Hooks
List modules in Story Protocol
This is a SDK for Alpha
This SDK is alpha and not production complete yet, which means that we could change the schemas, smart contract deployment and backend endpoints that at any time without warning or notice to you. When this SDK is production ready, we will remove this warning and will endeavor to ensure the production quality of the SDK and update the SDK in regular basis with formal notice.
Developers can use the HookClient
to list hooks in Story Protocol.
Usage
const { hooks } = await client.hook.list({moduleId, options});
Response
hooks: Hook[]
: A list ofHook
objects. TheHook
object is defined as below:
{
id: string // The ID of the hook
moduleId: string // The module ID of the hook
hookType: number // The hook type: 0 - pre-action hook, 1 - post-action hook
registryKey: string // The registry key of the hook
registeredAt: string // ISO 8601 timestamp for when the hook is registered
txHash: string // The transaction hash of registrating the hook
}
Example
You can refer to the source code of the list
function examples at:
Updated 8 months ago