Skip to main content

Calibur Account

Calibur7702Account upgrades an EOA to a smart account via EIP-7702 delegation to the Calibur singleton. It provides batched transactions, passkey authentication, multi-key management with per-key hooks, and full ERC-4337 support through EntryPoint v0.8.

Use Calibur when your users already have an EOA and must keep its address. For a new account, use SafeMultiChainSigAccountV1 on EntryPoint v0.9 instead.

Root key

The EOA's own key (the root key, keyHash = bytes32(0)) is always admin and cannot be revoked. Registering passkeys or other keys adds signers alongside it and never replaces it. See Calibur Key Management.

Methods at a Glance​

This page covers the core flow: create the account from an existing EOA, delegate it with an EIP-7702 authorization, then build, sign and send UserOperations. Key management (passkeys, secondary keys, settings, revocation) is on Calibur Key Management. Lower-level helpers are on Calibur Utility Methods.

MethodSignatureReturns
constructornew Calibur7702Account(accountAddress: string, overrides?: { entrypointAddress?: string; delegateeAddress?: string })Calibur7702Account
createUserOperationcreateUserOperation(transactions, providerRpc?, bundlerRpc?, overrides?)Promise<UserOperationV8>
signUserOperationsignUserOperation(userOperation, privateKey, chainId, overrides?)string
signUserOperationWithSignersignUserOperationWithSigner(userOperation, signer, chainId, overrides?)Promise<string>
sendUserOperationsendUserOperation(userOperation, bundlerRpc)Promise<SendUseroperationResponse>
isDelegatedToThisAccountisDelegatedToThisAccount(providerRpc)Promise<boolean>
createRevokeDelegationRawTransactioncreateRevokeDelegationRawTransaction(chainId, eoaPrivateKey, providerRpc, overrides?)Promise<string>
createSecp256k1Key (static)Calibur7702Account.createSecp256k1Key(address)CaliburKey
createWebAuthnP256Key (static)Calibur7702Account.createWebAuthnP256Key(x, y)CaliburKey
createP256Key (static)Calibur7702Account.createP256Key(x, y)CaliburKey
getKeyHash (static)Calibur7702Account.getKeyHash(key)string
createRegisterKeyMetaTransactions (static)Calibur7702Account.createRegisterKeyMetaTransactions(key, settings?)[SimpleMetaTransaction, SimpleMetaTransaction]
createRevokeKeyMetaTransaction (static)Calibur7702Account.createRevokeKeyMetaTransaction(keyHash)SimpleMetaTransaction
createRevokeAllKeysMetaTransactionscreateRevokeAllKeysMetaTransactions(providerRpc)Promise<SimpleMetaTransaction[]>
createUpdateKeySettingsMetaTransaction (static)Calibur7702Account.createUpdateKeySettingsMetaTransaction(keyHash, settings)SimpleMetaTransaction
packKeySettings (static)Calibur7702Account.packKeySettings(settings)bigint
unpackKeySettings (static)Calibur7702Account.unpackKeySettings(packed)CaliburKeySettingsResult
isKeyRegisteredisKeyRegistered(providerRpc, keyHash)Promise<boolean>
getKeySettingsgetKeySettings(providerRpc, keyHash)Promise<CaliburKeySettingsResult>
getKeygetKey(providerRpc, keyHash)Promise<CaliburKey>
getKeysgetKeys(providerRpc, overrides?)Promise<CaliburKey[]>
formatWebAuthnSignatureformatWebAuthnSignature(keyHash, webAuthnAuth, overrides?)string
createDummyWebAuthnSignature (static)Calibur7702Account.createDummyWebAuthnSignature(keyHash)string
getNoncegetNonce(providerRpc, sequenceKey?)Promise<bigint>
getUserOperationHashgetUserOperationHash(userOperation, chainId)string
createAccountCallData (static)Calibur7702Account.createAccountCallData(transactions, revertOnFailure?)string
wrapSignature (static)Calibur7702Account.wrapSignature(keyHash, rawSignature, hookData?)string
prependTokenPaymasterApproveToCallDataprependTokenPaymasterApproveToCallData(callData, tokenAddress, paymasterAddress, approveAmount)string
createInvalidateNonceMetaTransaction (static)Calibur7702Account.createInvalidateNonceMetaTransaction(newNonce)SimpleMetaTransaction

When to Use Calibur Account​

  • Multi-key support: Register passkeys, session keys, or secondary signers alongside the EOA root key.
  • Per-key hooks: Attach custom validation logic to individual keys (e.g., spending limits, time locks).
  • Key expiration and admin separation: Set expiration timestamps and distinguish admin keys from non-admin keys.
  • WebAuthn/passkey authentication: Sign transactions with biometrics through the WebAuthn standard.
  • Production-grade contracts: Built by Uniswap, audited by OpenZeppelin and Cantina.

Supported ERCs: ERC-4337 (Account Abstraction), EIP-7702 (EOA delegation).

Supported key types:

TypeDescription
Secp256k1Standard Ethereum EOA key (keyType = 2). Used for EOA private keys and secondary signers.
WebAuthnP256P-256 key signed through the browser's WebAuthn API (keyType = 1). Used for passkeys, Face ID, fingerprint, and security keys. The signature includes WebAuthn metadata (authenticatorData, clientDataJSON) that the contract parses before verifying the underlying P-256 signature.
P256Raw P-256 / secp256r1 key (keyType = 0). Same elliptic curve as WebAuthnP256, but with a raw (r, s) signature format. Used when you have direct access to a P-256 key (e.g., from a secure enclave or HSM) without the WebAuthn wrapper.

Smart Contracts and Audits​

The contracts were developed by Uniswap and audited by OpenZeppelin and Cantina.

  • Smart Contracts
  • Singleton v1.1.0 (SDK default): 0x000000005c84F8Fd50b21CAC312528A64437030e
  • Singleton v1.0.0: 0x000000009B1D0aF20D8C6d0A44e162d11F9b8f00

How to Use​

Prerequisites​

Before using Calibur7702Account, you must have:

  • Node.js: Version 18.0 or higher.
  • EIP-7702 Compatible Network: Ethereum mainnet, Sepolia, or other EIP-7702 enabled chains.
  • Private Key Access: Required for signing authorizations and user operations.

Installation​

npm install abstractionkit

The contracts are audited by OpenZeppelin and Cantina.

Usage​

import { Calibur7702Account } from "abstractionkit";

const eoaAddress = "0xBdbc5FBC9cA8C3F514D073eC3de840Ac84FC6D31"; // EOA public address
const smartAccount = new Calibur7702Account(eoaAddress);

Constructor defaults:

  • entrypointAddress: 0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108 (EntryPoint v0.8)
  • delegateeAddress: 0x000000005c84F8Fd50b21CAC312528A64437030e (Uniswap Calibur v1.1.0, exported as CALIBUR_UNISWAP_V1_1_0_SINGLETON_ADDRESS)

Both can be overridden by passing an overrides object as the second constructor argument.

const smartAccount = new Calibur7702Account(eoaAddress, {
entrypointAddress: "0x...", // optional
delegateeAddress: "0x...", // optional
});

Calibur v1.0.0 and v1.1.0​

Since AbstractionKit v1.0.0, Calibur7702Account delegates to Calibur v1.1.0 by default. Before that, the default was v1.0.0 (0x000000009B1D0aF20D8C6d0A44e162d11F9b8f00), and CALIBUR_UNISWAP_V1_0_0_SINGLETON_ADDRESS was replaced by CALIBUR_UNISWAP_V1_1_0_SINGLETON_ADDRESS.

v1.1.0 keeps the EIP-712 domain ("Calibur", "1.0.0"), every selector the SDK uses and the storage layout. Keys registered under v1.0.0 survive a re-delegation to v1.1.0. Two behavior changes:

  • v1.1.0 rejects a nonzero hook that has no deployed code or no enabled callback flag in its address, so update calls (including the one in createRegisterKeyMetaTransactions) with such a hook revert with InvalidHook.
  • Only admin keys can call the EntryPoint. A batch signed by a non-admin key that calls the EntryPoint (for example depositTo or withdrawTo) reverts with OnlyAdminCanCallEntryPoint. Sign those calls with the root key or an admin key.

delegateeAddress is what the SDK delegates to in the eip7702Auth of a new UserOperation, and what isDelegatedToThisAccount and createRevokeDelegationRawTransaction check against. For an EOA that is still delegated to v1.0.0, either:

  • Stay on v1.0.0: pass the v1.0.0 address as delegateeAddress.

    const smartAccount = new Calibur7702Account(eoaAddress, {
    delegateeAddress: "0x000000009B1D0aF20D8C6d0A44e162d11F9b8f00", // Calibur v1.0.0
    });
  • Move to v1.1.0: use the default class and pass eip7702Auth to createUserOperation for the next UserOperation to re-delegate the EOA. createUserOperation fills the authorization with placeholder r/s values, so sign the delegation authorization before sending it. With the default class, isDelegatedToThisAccount returns false for an EOA delegated to v1.0.0.

Essential Methods​

createUserOperation​

Creates a UserOperation for EIP-7702 accounts that can be sent to bundlers for execution. Handles nonce fetching, gas estimation, and optional EIP-7702 delegation authorization.

example.ts
import { Calibur7702Account } from "abstractionkit";

const eoaAddress = "0xBdbc5FBC9cA8C3F514D073eC3de840Ac84FC6D31";
const smartAccount = new Calibur7702Account(eoaAddress);

const transactions = [
{
to: "0x9a7af758aE5d7B6aAE84fe4C5Ba67c041dFE5336",
value: 0n,
data: "0x...",
},
];

const userOperation = await smartAccount.createUserOperation(
transactions,
"https://ethereum-sepolia-rpc.publicnode.com", // provider RPC
"https://api.candide.dev/public/v3/11155111", // bundler RPC
{
eip7702Auth: {
chainId: 11155111n, // required for the first UserOperation
},
}
);

Source code​

createUserOperation

signUserOperation​

Signs a UserOperation with a private key. Computes the UserOperation hash and wraps the ECDSA signature in Calibur's format. By default signs with the root key. To sign with a registered secondary key, pass its key hash via overrides.keyHash.

example.ts
// Sign with the root key (EOA private key)
userOperation.signature = smartAccount.signUserOperation(
userOperation,
"0x...private-key",
11155111n // chain ID
);

// Sign with a registered secondary key
userOperation.signature = smartAccount.signUserOperation(
userOperation,
"0x...secondary-private-key",
11155111n,
{ keyHash: "0x...registered-key-hash" }
);

Source code​

signUserOperation

signUserOperationWithSigner​

Signs a UserOperation using an ExternalSigner instead of a raw private key. Integrates viem, ethers, browser wallets, hardware wallets, HSMs, MPC, and WebAuthn through the same API. By default signs with the root key; pass { keyHash } to sign with a registered secondary key.

Since v0.3.8, Calibur accepts signers that implement either signHash or signTypedData. signTypedData signatures are wrapped into Calibur's (keyHash, sig, hookData) layout automatically.

example.ts
import { fromViem } from "abstractionkit";
import { privateKeyToAccount } from "viem/accounts";

const viemAccount = privateKeyToAccount("0x...private-key");

// Sign with the root key
userOperation.signature = await smartAccount.signUserOperationWithSigner(
userOperation,
fromViem(viemAccount),
11155111n, // chain ID
);

// Sign with a registered secondary key
userOperation.signature = await smartAccount.signUserOperationWithSigner(
userOperation,
fromViem(viemAccount),
11155111n,
{ keyHash: "0x...registered-key-hash" },
);

See External Signers for the full list of adapters (viem, ethers, custom) and the Calibur external-signer example for a full end-to-end flow.

Source code​

signUserOperationWithSigner

sendUserOperation​

Sends a signed UserOperation to the bundler for execution on-chain.

example.ts
const response = await smartAccount.sendUserOperation(
userOperation,
"https://api.candide.dev/public/v3/11155111" // bundler URL
);

console.log("UserOperation hash:", response.userOperationHash);

// Wait for the transaction to be included
const receipt = await response.included();
console.log("Transaction receipt:", receipt);

Source code​

sendUserOperation

Delegation Check​

isDelegatedToThisAccount​

Checks if the EOA is delegated to this account's Calibur singleton. Returns true only when delegated to the account's delegateeAddress, false if not delegated or delegated to a different singleton.

example.ts
const isDelegated = await smartAccount.isDelegatedToThisAccount(
"https://ethereum-sepolia-rpc.publicnode.com"
);

if (isDelegated) {
console.log("EOA is delegated to the Calibur singleton");
} else {
console.log("EOA is not delegated. Include eip7702Auth in createUserOperation.");
}

Source code​

isDelegatedToThisAccount