Agent deployment
activateAgent
Initializes the user’s smart wallet for agents. Deploys the Safe contract and creates a session key if not already set up.
- If
agentIdis omitted: initializes all available agents on the specified chain. - If
agentIdis provided: initializes all listed agents.
Requires wallet connection: Yes
- Signature
- Example
activateAgent(
chainId: number,
agentId?: AgentId[]
): Promise<void>
await owney.activateAgent(8453); // Specify the blockchain (e.g. Base)
Parameters
chainId: number— Target chain ID (SeeAgent Compatibilityfor details).agentId?: AgentId[]— One or more agents to initialize (SeeAgentIdfor details). If omitted, all chain-compatible agents are initialized.
Returns
Promise<void>
getActiveChainId
Returns the active chain ID currently set by activateAgent.
- Signature
- Example
- Example Output
getActiveChainId(): number | null
const chainId = owney.getActiveChainId();
console.log(chainId);
8453
Returns
number | null— The active chain ID, ornullif no chain has been activated yet.