ModuleSDK
Modules
Policies
getSpendingLimitsPolicy

getSpendingLimitsPolicy

Get the spending limits policy to use when creating a new session. The spending limits policy can be used to ensure that only a certain amount of ERC-20 tokens can be spent. For native value spends, use the value limit policy.

Usage

const spendingLimitsPolicy = getSpendingLimitsPolicy([
  {
    token: '0x1234...',
    limit: 100,
  },
])

Parameters

TokenWithLimits

Token with limits array. The limit is the maximum amount of the token that can be spent.

Returns

policy

The spending limits policy.