ModuleSDK
Modules
getColdStorageHook

getColdStorageHook

Gets the cold storage hook module object.

Usage

const coldStorageHook = await getColdStorageHook({
  client,
  account,
  waitPeriod: 100,
  owner: "0x123...",
  moduleType: "hook",
});

Parameters

client

  • Type: PublicClient

The rpc client to use for the chain you want to query.

account

The account to get the cold storage hook for.

waitPeriod

  • Type: number

The wait period for executions on the cold storage account.

owner

The owner of the subaccount. In most cases this will be the users' main smart account.

moduleType

  • Type: 'hook' | 'fallback' | 'executor'

The type of the module to get. The options are 'hook', 'fallback', and 'executor'. Note that the module needs to be installed as all three of these types.

hook (optional)

The address of the hook module to get. This is only required for the Kernel account.

Returns

moodule

The module object.