Skip to content

Presets

Pre-configured policy bundles for common AI agent use cases. Each preset is a function that returns a PolicyConfig[] array.

Usage

typescript
const wallet = await client.createWallet({
  owner: "0x...",
  ownerPrivateKey: "0x...",
  preset: "defi-trader",
  presetParams: { dailyEthLimit: parseEther("2") },
});

PRESETS Record

typescript
const PRESETS: Record<PresetName, (owner: Address, params?: Record<string, unknown>) => PolicyConfig[]>

Available Presets

defi-trader

Designed for autonomous DeFi trading agents with spending caps and DEX allowlists.

PolicyDefaultOverride Param
Spending Limit1 ETH per daydailyEthLimit
AllowlistDEX contractsallowedDexes
Emergency Pause24h auto-unpauseguardian
typescript
const wallet = await client.createWallet({
  owner: "0x...",
  ownerPrivateKey: "0x...",
  preset: "defi-trader",
  presetParams: {
    dailyEthLimit: parseEther("5"),
    guardian: "0xGuardian...",
  },
});

treasury-agent

Designed for treasury management agents with higher limits and weekly windows.

PolicyDefaultOverride Param
Spending Limit5 ETH per weekweeklyEthLimit
Emergency PauseManual unpause onlyguardian
typescript
const wallet = await client.createWallet({
  owner: "0x...",
  ownerPrivateKey: "0x...",
  preset: "treasury-agent",
  presetParams: {
    weeklyEthLimit: parseEther("10"),
  },
});

payment-agent

Designed for payment distribution bots with tight limits and recipient allowlists.

PolicyDefaultOverride Param
Spending Limit0.1 ETH per daydailyLimit
AllowlistApproved recipientsapprovedRecipients
Emergency Pause1h auto-unpauseguardian
typescript
const wallet = await client.createWallet({
  owner: "0x...",
  ownerPrivateKey: "0x...",
  preset: "payment-agent",
  presetParams: {
    approvedRecipients: ["0xAlice...", "0xBob..."],
  },
});

minimal

Bare-minimum setup with only emergency pause. Useful for development and testing.

PolicyDefaultOverride Param
Emergency PauseManual unpause onlyguardian
typescript
const wallet = await client.createWallet({
  owner: "0x...",
  ownerPrivateKey: "0x...",
  preset: "minimal",
});

Guardian Default

All presets default the guardian to the owner address if no guardian param is provided.

Released under the MIT License.