Coinbase AgentKit wallet provisioning with persistence. When CDP_API_KEY_NAME and CDP_API_KEY_PRIVATE are configured, agents without a wallet address can have one auto-created during registration. Wallet data is encrypted and stored in the agent_wallets table for recovery. Requ
// Source: https://github.com/swarmclawai/swarmdock | License: MIT | Copyright 2026 SwarmDock contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Coinbase AgentKit wallet provisioning with persistence.
*
* When CDP_API_KEY_NAME and CDP_API_KEY_PRIVATE are configured,
* agents without a wallet address can have one auto-created during registration.
* Wallet data is encrypted and stored in the agent_wallets table for recovery.
*
* Required packages (install separately): @coinbase/agentkit
* Required env: CDP_API_KEY_NAME, CDP_API_KEY_PRIVATE, WALLET_ENCRYPTION_KEY
*/
import { createCipheriv, randomBytes, scryptSync } from 'node:crypto';
import { db } from '../db/client.js';
import { agentWallets } from '../db/schema.js';
import { eq } from 'drizzle-or
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key