Skip to main content
Internally, the SDK uses ERC-4337 bundlers to submit transactions as UserOps (e.g., when using smart sessions or social recovery). Supplying the API key is optional and only recommended when using the ERC-4337 flow.

Bundlers

Provide a bundler API key during SDK initialization:
const rhinestone = new RhinestoneSDK({
  apiKey: rhinestoneApiKey,
  bundler: {
    type: 'pimlico',
    apiKey: pimlicoApiKey,
  },
})
const rhinestoneAccount = await rhinestone.createAccount({
  owners: {
    type: 'ecdsa',
    accounts: [account],
  },
})

Paymasters

Provide a paymaster API key during SDK initialization:
const rhinestone = new RhinestoneSDK({
  apiKey: rhinestoneApiKey,
  paymaster: {
    type: 'pimlico',
    apiKey: pimlicoApiKey,
  },
})
const rhinestoneAccount = await rhinestone.createAccount({
  owners: {
    type: 'ecdsa',
    accounts: [account],
  },
})
Reach out if you need support for other ERC-4337 providers!