Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt

Use this file to discover all available pages before exploring further.

Limit how many times a session function can be called.
const session = toSession({
  chain: base,
  owners: {
    type: 'ecdsa',
    accounts: [sessionOwnerAccount],
  },
  permissions: [
    {
      abi: erc20Abi,
      address: usdcAddress,
      functions: {
        transfer: {
          policies: [
            {
              type: 'usage-limit',
              limit: 10n,
            },
          ],
        },
      },
    },
  ],
})
This caps the function at 10 calls.