createAutomationClient
Create an Automation client to interact with the automation service.
Usage
import { createAutomationClient } from "@rhinestone/automations-sdk";
const automationClient = createAutomationClient({
account: "0x...",
accountType: 'SAFE', // 'SAFE', 'KERNEL',
apiKey: "YOUR_API_KEY",
accountInitCode: "0x",
network: 11155111,
validator: "0x...",
permissionId: '0xabcd...'
});
Parameters
account
Account address you want to setup automation for.
accountType
- Type:
SAFE | KERNEL
Type of the account. Currently Safe and Kernel accounts are supported.
apiKey
- Type:
string
API key to authenticate with the automation service.
accountInitCode
- Type:
Hex
(opens in a new tab)
Account initCode in case account is not deployed yet.
network
- Type:
number
Chain id of the network. Note: Currently only sepolia testnet is supported.
validator
Address of the ECDSA validator module to use when constructing user ops in the automation service. The validator module should be installed in the account and automation service account should be added as an owner of the validator module before start using the automation service.
permissionId
- Type:
Hex
(opens in a new tab)
Permission id of the session enabled in smart session validator module to use when constructing user ops in the automation service. The smart session module should be installed in the account and automation service account should be added as an owner of the validator module of the session that is enabled for the permission id before start using the automation service.
Returns
AutomationClientInstance
- Type:
AutomationClientInstance
Automation Client Instance to interact with the automation service.