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.
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.
| Method | Signature | Returns |
|---|---|---|
| constructor | new Calibur7702Account(accountAddress: string, overrides?: { entrypointAddress?: string; delegateeAddress?: string }) | Calibur7702Account |
| createUserOperation | createUserOperation(transactions, providerRpc?, bundlerRpc?, overrides?) | Promise<UserOperationV8> |
| signUserOperation | signUserOperation(userOperation, privateKey, chainId, overrides?) | string |
| signUserOperationWithSigner | signUserOperationWithSigner(userOperation, signer, chainId, overrides?) | Promise<string> |
| sendUserOperation | sendUserOperation(userOperation, bundlerRpc) | Promise<SendUseroperationResponse> |
| isDelegatedToThisAccount | isDelegatedToThisAccount(providerRpc) | Promise<boolean> |
| createRevokeDelegationRawTransaction | createRevokeDelegationRawTransaction(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 |
| createRevokeAllKeysMetaTransactions | createRevokeAllKeysMetaTransactions(providerRpc) | Promise<SimpleMetaTransaction[]> |
| createUpdateKeySettingsMetaTransaction (static) | Calibur7702Account.createUpdateKeySettingsMetaTransaction(keyHash, settings) | SimpleMetaTransaction |
| packKeySettings (static) | Calibur7702Account.packKeySettings(settings) | bigint |
| unpackKeySettings (static) | Calibur7702Account.unpackKeySettings(packed) | CaliburKeySettingsResult |
| isKeyRegistered | isKeyRegistered(providerRpc, keyHash) | Promise<boolean> |
| getKeySettings | getKeySettings(providerRpc, keyHash) | Promise<CaliburKeySettingsResult> |
| getKey | getKey(providerRpc, keyHash) | Promise<CaliburKey> |
| getKeys | getKeys(providerRpc, overrides?) | Promise<CaliburKey[]> |
| formatWebAuthnSignature | formatWebAuthnSignature(keyHash, webAuthnAuth, overrides?) | string |
| createDummyWebAuthnSignature (static) | Calibur7702Account.createDummyWebAuthnSignature(keyHash) | string |
| getNonce | getNonce(providerRpc, sequenceKey?) | Promise<bigint> |
| getUserOperationHash | getUserOperationHash(userOperation, chainId) | string |
| createAccountCallData (static) | Calibur7702Account.createAccountCallData(transactions, revertOnFailure?) | string |
| wrapSignature (static) | Calibur7702Account.wrapSignature(keyHash, rawSignature, hookData?) | string |
| prependTokenPaymasterApproveToCallData | prependTokenPaymasterApproveToCallData(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:
| Type | Description |
|---|---|
Secp256k1 | Standard Ethereum EOA key (keyType = 2). Used for EOA private keys and secondary signers. |
WebAuthnP256 | P-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. |
P256 | Raw 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. |
Calibur Quickstart
Upgrade an EOA to a Calibur smart account with batch transactions and gas sponsorship
Passkey Authentication
Register a WebAuthn passkey and sign transactions with it
Key Management
Register, update, and revoke keys on a Calibur account
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 asCALIBUR_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
hookthat has no deployed code or no enabled callback flag in its address, soupdatecalls (including the one increateRegisterKeyMetaTransactions) with such a hook revert withInvalidHook. - Only admin keys can call the EntryPoint. A batch signed by a non-admin key that calls the EntryPoint (for example
depositToorwithdrawTo) reverts withOnlyAdminCanCallEntryPoint. 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
eip7702AuthtocreateUserOperationfor the next UserOperation to re-delegate the EOA.createUserOperationfills the authorization with placeholderr/svalues, so sign the delegation authorization before sending it. With the default class,isDelegatedToThisAccountreturnsfalsefor 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
- Param Types
- Return Type
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
},
}
);
| key | type | description |
|---|---|---|
transactions | SimpleMetaTransaction[] | Array of transactions to include in the user operation |
providerRpc? | string | Transport | JsonRpcNode | JSON-RPC provider URL for nonce and gas price queries |
bundlerRpc? | string | Transport | Bundler | Bundler RPC URL for gas estimation |
overrides? | object | Optional overrides for gas, nonce, and EIP-7702 auth fields |
overrides?.nonce? | bigint | Set the nonce instead of querying from the RPC node |
overrides?.callData? | string | Set the callData instead of encoding the provided MetaTransactions |
overrides?.callGasLimit? | bigint | Set the callGasLimit instead of estimating via the bundler |
overrides?.verificationGasLimit? | bigint | Set the verificationGasLimit instead of estimating via the bundler |
overrides?.preVerificationGas? | bigint | Set the preVerificationGas instead of estimating via the bundler |
overrides?.maxFeePerGas? | bigint | Set the maxFeePerGas instead of querying current gas price |
overrides?.maxPriorityFeePerGas? | bigint | Set the maxPriorityFeePerGas instead of querying current gas price |
overrides?.callGasLimitPercentageMultiplier? | number | Percentage added on top of the estimated callGasLimit (for example, 20 adds 20%) |
overrides?.verificationGasLimitPercentageMultiplier? | number | Percentage added on top of the estimated verificationGasLimit (for example, 20 adds 20%) |
overrides?.preVerificationGasPercentageMultiplier? | number | Percentage added on top of the estimated preVerificationGas (for example, 20 adds 20%) |
overrides?.maxFeePerGasPercentageMultiplier? | number | Percentage added on top of the fetched maxFeePerGas (for example, 20 adds 20%) |
overrides?.maxPriorityFeePerGasPercentageMultiplier? | number | Percentage added on top of the fetched maxPriorityFeePerGas (for example, 20 adds 20%) |
overrides?.state_override_set? | StateOverrideSet | State overrides for gas estimation |
overrides?.dummySignature? | string | Override the dummy signature used during gas estimation |
overrides?.gasLevel? | GasOption | Gas price level preference |
overrides?.polygonGasStation? | PolygonChain | Polygon chain identifier for fetching gas prices from Polygon Gas Station |
overrides?.revertOnFailure? | boolean | Whether BatchedCall should revert on individual call failure (default: true) |
overrides?.paymasterFields? | ParallelPaymasterInitValues | Paymaster init values for gas estimation. Set these to include paymaster data during gas estimation so preVerificationGas is accurate. |
overrides?.eip7702Auth? | object | EIP-7702 authorization fields. Required for the first UserOperation to delegate the EOA to the Calibur singleton. |
overrides?.eip7702Auth?.chainId | bigint | Chain ID where the authorization is valid |
overrides?.eip7702Auth?.address? | string | Address to delegate the EOA to. Defaults to the account's delegateeAddress |
overrides?.eip7702Auth?.nonce? | bigint | Authorization nonce. Defaults to the EOA's transaction count fetched from the node |
overrides?.eip7702Auth?.yParity? | string | Y parity of the authorization signature as a hex string ('0x0' or '0x1'). Defaults to '0x0' |
overrides?.eip7702Auth?.r? | string | R component of the authorization signature. Defaults to a placeholder value |
overrides?.eip7702Auth?.s? | string | S component of the authorization signature. Defaults to a placeholder value |
overrides?.skipGasEstimation? | boolean | When true, skip the bundler's eth_estimateUserOperationGas call. Gas limits fall back to any overrides or 0n. The returned UserOperation is always populated with a dummy signature so it stays valid for downstream paymaster sponsorship calls. |
SimpleMetaTransaction
| key | type | description |
|---|---|---|
SimpleMetaTransaction | object | SimpleMetaTransaction is the type of transaction used with Calibur7702Account. |
SimpleMetaTransaction.to | string | Target contract address for the transaction |
SimpleMetaTransaction.value | bigint | Value transferred in the transaction (usually 0n for contract interactions) |
SimpleMetaTransaction.data | string | The call data for the transaction |
| key | type | description |
|---|---|---|
userOperation | object | The constructed unsigned UserOperation for EIP-7702 |
userOperation.sender | string | The account making the operation |
userOperation.nonce | bigint | Anti-replay parameter (see Semi-abstracted Nonce Support) |
userOperation.factory | string | null | Account factory address, only for new accounts (null if account already exists) |
userOperation.factoryData | string | null | Data for account factory (null if account already exists) |
userOperation.callData | string | The data to pass to the sender during the main execution call |
userOperation.callGasLimit | bigint | The amount of gas to allocate the main execution call |
userOperation.verificationGasLimit | bigint | The amount of gas to allocate for the verification step |
userOperation.preVerificationGas | bigint | The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata |
userOperation.maxFeePerGas | bigint | Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) |
userOperation.maxPriorityFeePerGas | bigint | Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) |
userOperation.paymaster | string | null | Address of paymaster contract (null if account pays for itself) |
userOperation.paymasterVerificationGasLimit | bigint | null | The amount of gas to allocate for the paymaster verification step (null if no paymaster) |
userOperation.paymasterPostOpGasLimit | bigint | null | The amount of gas to allocate for the paymaster post-operation code (null if no paymaster) |
userOperation.paymasterData | string | null | Data for paymaster (null if no paymaster) |
userOperation.eip7702Auth | Authorization7702Hex | null | EIP-7702 authorization data for EOA delegation (null if not using EIP-7702) |
userOperation.signature | string | Data passed into the account to verify authorization. Resolves to '0x' when the user did not provide their signature yet |
Source code
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
- Param Types
- Return Type
// 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" }
);
| key | type | description |
|---|---|---|
userOperation | object | The user operation to sign |
userOperation.sender | string | The account making the operation |
userOperation.nonce | bigint | Anti-replay parameter (see Semi-abstracted Nonce Support) |
userOperation.factory | string | null | Account factory address, only for new accounts (null if account already exists) |
userOperation.factoryData | string | null | Data for account factory (null if account already exists) |
userOperation.callData | string | The data to pass to the sender during the main execution call |
userOperation.callGasLimit | bigint | The amount of gas to allocate the main execution call |
userOperation.verificationGasLimit | bigint | The amount of gas to allocate for the verification step |
userOperation.preVerificationGas | bigint | The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata |
userOperation.maxFeePerGas | bigint | Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) |
userOperation.maxPriorityFeePerGas | bigint | Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) |
userOperation.paymaster | string | null | Address of paymaster contract (null if account pays for itself) |
userOperation.paymasterVerificationGasLimit | bigint | null | The amount of gas to allocate for the paymaster verification step (null if no paymaster) |
userOperation.paymasterPostOpGasLimit | bigint | null | The amount of gas to allocate for the paymaster post-operation code (null if no paymaster) |
userOperation.paymasterData | string | null | Data for paymaster (null if no paymaster) |
userOperation.eip7702Auth | Authorization7702Hex | null | EIP-7702 authorization data for EOA delegation (null if not using EIP-7702) |
userOperation.signature | string | Data passed into the account to verify authorization. Resolves to '0x' when the user did not provide their signature yet |
privateKey | string | Hex-encoded private key to sign the user operation with |
chainId | bigint | Chain ID for the target blockchain |
overrides? | object | Optional overrides (keyHash for secondary keys, hookData) |
overrides?.hookData? | string | Hook data to append to the signature (default: "0x" = empty) |
overrides?.keyHash? | string | Key hash of a registered secondary key. If omitted, the root key hash is used. |
| key | type | description |
|---|---|---|
signature | string | Hex-encoded wrapped signature in Calibur format |
Source code
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
- Param Types
- Return Type
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.
| key | type | description |
|---|---|---|
userOperation | object | The user operation to sign |
userOperation.sender | string | The account making the operation |
userOperation.nonce | bigint | Anti-replay parameter (see Semi-abstracted Nonce Support) |
userOperation.factory | string | null | Account factory address, only for new accounts (null if account already exists) |
userOperation.factoryData | string | null | Data for account factory (null if account already exists) |
userOperation.callData | string | The data to pass to the sender during the main execution call |
userOperation.callGasLimit | bigint | The amount of gas to allocate the main execution call |
userOperation.verificationGasLimit | bigint | The amount of gas to allocate for the verification step |
userOperation.preVerificationGas | bigint | The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata |
userOperation.maxFeePerGas | bigint | Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) |
userOperation.maxPriorityFeePerGas | bigint | Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) |
userOperation.paymaster | string | null | Address of paymaster contract (null if account pays for itself) |
userOperation.paymasterVerificationGasLimit | bigint | null | The amount of gas to allocate for the paymaster verification step (null if no paymaster) |
userOperation.paymasterPostOpGasLimit | bigint | null | The amount of gas to allocate for the paymaster post-operation code (null if no paymaster) |
userOperation.paymasterData | string | null | Data for paymaster (null if no paymaster) |
userOperation.eip7702Auth | Authorization7702Hex | null | EIP-7702 authorization data for EOA delegation (null if not using EIP-7702) |
userOperation.signature | string | Data passed into the account to verify authorization. Resolves to '0x' when the user did not provide their signature yet |
signer | ExternalSigner | A capability-oriented signer: { address, signHash?, signTypedData? }. Use one of the built-in adapters (fromPrivateKey, fromViem, fromEthersWallet, fromViemWalletClient) or implement the interface yourself to integrate hardware wallets, HSMs, MPC, or WebAuthn. Calibur accepts a signer that implements either signTypedData or signHash. |
chainId | bigint | Chain ID for the target blockchain |
overrides? | object | Optional overrides (keyHash for secondary keys, hookData) |
overrides?.hookData? | string | Hook data to append to the signature (default: "0x" = empty) |
overrides?.keyHash? | string | Key hash of a registered secondary key. If omitted, the root key hash is used. |
| key | type | description |
|---|---|---|
signature | string | Hex-encoded wrapped signature in Calibur format |
Source code
sendUserOperation
Sends a signed UserOperation to the bundler for execution on-chain.
- example.ts
- Param Types
- Return Type
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);
| key | type | description |
|---|---|---|
userOperation | object | The signed user operation to submit |
userOperation.sender | string | The account making the operation |
userOperation.nonce | bigint | Anti-replay parameter (see Semi-abstracted Nonce Support) |
userOperation.factory | string | null | Account factory address, only for new accounts (null if account already exists) |
userOperation.factoryData | string | null | Data for account factory (null if account already exists) |
userOperation.callData | string | The data to pass to the sender during the main execution call |
userOperation.callGasLimit | bigint | The amount of gas to allocate the main execution call |
userOperation.verificationGasLimit | bigint | The amount of gas to allocate for the verification step |
userOperation.preVerificationGas | bigint | The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata |
userOperation.maxFeePerGas | bigint | Maximum fee per gas (similar to EIP-1559 max_fee_per_gas) |
userOperation.maxPriorityFeePerGas | bigint | Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas) |
userOperation.paymaster | string | null | Address of paymaster contract (null if account pays for itself) |
userOperation.paymasterVerificationGasLimit | bigint | null | The amount of gas to allocate for the paymaster verification step (null if no paymaster) |
userOperation.paymasterPostOpGasLimit | bigint | null | The amount of gas to allocate for the paymaster post-operation code (null if no paymaster) |
userOperation.paymasterData | string | null | Data for paymaster (null if no paymaster) |
userOperation.eip7702Auth | Authorization7702Hex | null | EIP-7702 authorization data for EOA delegation (null if not using EIP-7702) |
userOperation.signature | string | Data passed into the account to verify authorization. Resolves to '0x' when the user did not provide their signature yet |
bundlerRpc | string | Transport | Bundler | Bundler RPC endpoint to send the user operation to |
| key | type | description |
|---|---|---|
response | object | Response containing user operation hash and bundler details |
response.userOperationHash | string | The hash over the userOp (except signature), entryPoint and chainId |
response.bundler | Bundler | The Bundler class |
response.entrypointAddress | string | The entrypoint address where the useroperation got executed |
response.included() | Promise<UserOperationReceiptResult | BundlerJsonRpcError> | Waits for the user operation to be included onchain and returns the user operation receipt on success, or the bundler error on failture |
SendUseroperationResponse
| key | type | description |
|---|---|---|
userOperationHash | string | The hash over the userOp (except signature), entryPoint and chainId |
bundler | Bundler | The Bundler class |
entrypointAddress | string | The entrypoint address where the useroperation got executed |
included() | Promise<UserOperationReceiptResult | BundlerJsonRpcError> | Waits for the user operation to be included onchain and returns the user operation receipt on success, or the bundler error on failture |
BundlerJsonRpcError
| key | type | description |
|---|---|---|
code | number | Bundler RPC error code |
message | string | Bundler RPC error message description |
UserOperationReceiptResult
| key | type | description |
|---|---|---|
userOpHash | string | The hash of the user operation. |
entryPoint | string | The address of the entry point contract that processed the operation. |
sender | string | The address of the sender of the user operation. |
nonce | bigint | The nonce of the user operation. |
paymaster | string | The address of the paymaster that paid for the gas of the user operation. |
actualGasCost | bigint | The actual gas cost incurred for executing the user operation. |
actualGasUsed | bigint | The actual amount of gas used for the user operation. |
success | boolean | Indicates whether the user operation was successful. |
logs | Log[] | The logs produced during the execution of the user operation. |
receipt | object | The detailed receipt of the user operation. |
receipt.blockHash | string | The hash of the block in which the transaction was included. |
receipt.blockNumber | bigint | The number of the block in which the transaction was included. |
receipt.from | string | The address that initiated the transaction. |
receipt.cumulativeGasUsed | bigint | The total amount of gas used in the block up to and including this transaction. |
receipt.gasUsed | bigint | The amount of gas used by this transaction. |
receipt.logs | Log[] | Logs generated by the transaction. |
receipt.logsBloom | string | The bloom filter for the logs generated by the transaction. |
receipt.transactionHash | string | The unique hash of the transaction. |
receipt.transactionIndex | bigint | The index of the transaction within the block. |
receipt.effectiveGasPrice | bigint | The effective gas price for the transaction. This field is optional and may not be present in all receipts. |
Source code
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
- Param Types
- Return Type
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.");
}
| key | type | description |
|---|---|---|
providerRpc | string | Transport | JsonRpcNode | JSON-RPC endpoint for blockchain queries |
| key | type | description |
|---|---|---|
isDelegated | boolean | True if the EOA is delegated to this account's Calibur singleton, false otherwise |