# 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.

## When to Use Calibur Account[​](#when-to-use-calibur-account "Direct link to 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](https://docs.candide.dev/wallet/guides/getting-started-calibur.md)

[Upgrade an EOA to a Calibur smart account with batch transactions and gas sponsorship](https://docs.candide.dev/wallet/guides/getting-started-calibur.md)

[Passkey Authentication](https://docs.candide.dev/wallet/guides/calibur-passkeys.md)

[Register a WebAuthn passkey and sign transactions with it](https://docs.candide.dev/wallet/guides/calibur-passkeys.md)

[Key Management](https://docs.candide.dev/wallet/guides/calibur-key-management.md)

[Register, update, and revoke keys on a Calibur account](https://docs.candide.dev/wallet/guides/calibur-key-management.md)

## Smart Contracts and Audits[​](#smart-contracts-and-audits "Direct link to Smart Contracts and Audits")

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

* [Smart Contracts](https://github.com/Uniswap/calibur)
* Singleton v1.1.0 (SDK default): `0x000000005c84F8Fd50b21CAC312528A64437030e`
* Singleton v1.0.0: `0x000000009B1D0aF20D8C6d0A44e162d11F9b8f00`

## How to Use[​](#how-to-use "Direct link to How to Use")

### Prerequisites[​](#prerequisites "Direct link to 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[​](#installation "Direct link to Installation")

```
npm install abstractionkit
```

The contracts are audited by OpenZeppelin and Cantina.

### Usage[​](#usage "Direct link to 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[​](#calibur-v100-and-v110 "Direct link to 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](https://docs.candide.dev/wallet/guides/getting-started-calibur.md#step-5-sign-the-delegation-authorization) before sending it. With the default class, `isDelegatedToThisAccount` returns `false` for an EOA delegated to v1.0.0.

## Essential Methods[​](#essential-methods "Direct link to Essential Methods")

### createUserOperation[​](#createuseroperation "Direct link to 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

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

    },

  }

);
```

| key                                                    | type                          | description                                                                                                                                                                                                                                        |
| :----------------------------------------------------- | :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `transactions`                                         | `SimpleMetaTransaction[]`     | Array of transactions to include in the user operation                                                                                                                                                                                             |
| `providerRpc?`                                         | `string`                      | JSON-RPC provider URL for nonce and gas price queries                                                                                                                                                                                              |
| `bundlerRpc?`                                          | `string`                      | 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 multiplier applied to estimated callGasLimit                                                                                                                                                                                            |
| `overrides?.verificationGasLimitPercentageMultiplier?` | `number`                      | Percentage multiplier applied to estimated verificationGasLimit                                                                                                                                                                                    |
| `overrides?.preVerificationGasPercentageMultiplier?`   | `number`                      | Percentage multiplier applied to estimated preVerificationGas                                                                                                                                                                                      |
| `overrides?.maxFeePerGasPercentageMultiplier?`         | `number`                      | Percentage multiplier applied to fetched maxFeePerGas                                                                                                                                                                                              |
| `overrides?.maxPriorityFeePerGasPercentageMultiplier?` | `number`                      | Percentage multiplier applied to fetched maxPriorityFeePerGas                                                                                                                                                                                      |
| `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`                      | `string`                      | Chain ID in hexadecimal format where the authorization is valid                                                                                                                                                                                    |
| `overrides?.eip7702Auth?.address`                      | `string`                      | Address to authorize for the EOA delegation                                                                                                                                                                                                        |
| `overrides?.eip7702Auth?.nonce`                        | `string`                      | Authorization nonce in hexadecimal format                                                                                                                                                                                                          |
| `overrides?.eip7702Auth?.yParity`                      | `string`                      | Y parity of the authorization signature                                                                                                                                                                                                            |
| `overrides?.eip7702Auth?.r`                            | `string`                      | R component of the authorization signature                                                                                                                                                                                                         |
| `overrides?.eip7702Auth?.s`                            | `string`                      | S component of the authorization signature                                                                                                                                                                                                         |
| `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[​](#source-code "Direct link to Source code")

[createUserOperation](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L331)

### signUserOperation[​](#signuseroperation "Direct link to 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

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" }

);
```

| 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[​](#source-code-1 "Direct link to Source code")

[signUserOperation](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L675)

### signUserOperationWithSigner[​](#signuseroperationwithsigner "Direct link to signUserOperationWithSigner")

Signs a UserOperation using an [`ExternalSigner`](https://docs.candide.dev/wallet/abstractionkit/external-signers.md) 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

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](https://docs.candide.dev/wallet/abstractionkit/external-signers.md) for the full list of adapters (viem, ethers, custom) and the [Calibur external-signer example](https://github.com/candidelabs/abstractionkit-examples/blob/main/eip-7702/calibur-account/04-external-signer.ts) 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 requires a signer that implements 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[​](#source-code-2 "Direct link to Source code")

[signUserOperationWithSigner](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L719)

### formatWebAuthnSignature[​](#formatwebauthnsignature "Direct link to formatWebAuthnSignature")

Formats a WebAuthn (passkey) assertion into Calibur's signature format. Use this after getting an assertion from the browser's `navigator.credentials.get()` API. The challenge for the assertion should be the UserOperation hash.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account, WebAuthnSignatureData } from "abstractionkit";



// After getting a WebAuthn assertion from the browser

const webAuthnSignatureData: WebAuthnSignatureData = {

  authenticatorData: "0x...",

  clientDataJSON: '{"type":"webauthn.get","challenge":"...","origin":"https://example.com"}',

  challengeIndex: 36n,

  typeIndex: 8n,

  r: 0x...n,

  s: 0x...n,

};



const keyHash = Calibur7702Account.getKeyHash(webAuthnKey);



// Format the WebAuthn signature for the UserOperation

userOperation.signature = smartAccount.formatWebAuthnSignature(

  keyHash,

  webAuthnSignatureData,

);
```

| key                                                    | type     | description                                                                                                                  |
| :----------------------------------------------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------- |
| `keyHash`                                              | `string` | The key hash of the registered passkey (from getKeyHash)                                                                     |
| `webAuthnAuth`                                         | `object` | WebAuthn assertion data from the browser                                                                                     |
| `webAuthnAuth.WebAuthnSignatureData`                   | `object` | WebAuthn assertion data matching the on-chain WebAuthn.WebAuthnAuth struct. Used when signing UserOperations with a passkey. |
| `webAuthnAuth.WebAuthnSignatureData.authenticatorData` | `string` | Authenticator data bytes (hex string)                                                                                        |
| `webAuthnAuth.WebAuthnSignatureData.clientDataJSON`    | `string` | Client data JSON string (UTF-8)                                                                                              |
| `webAuthnAuth.WebAuthnSignatureData.challengeIndex`    | `bigint` | Index of the challenge in clientDataJSON                                                                                     |
| `webAuthnAuth.WebAuthnSignatureData.typeIndex`         | `bigint` | Index of the type field in clientDataJSON                                                                                    |
| `webAuthnAuth.WebAuthnSignatureData.r`                 | `bigint` | ECDSA signature r component                                                                                                  |
| `webAuthnAuth.WebAuthnSignatureData.s`                 | `bigint` | ECDSA signature s component                                                                                                  |
| `overrides?`                                           | `object` | Optional signature overrides (e.g., 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.                                               |

WebAuthnSignatureData

| key                                       | type     | description                                                                                                                  |
| :---------------------------------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------- |
| `WebAuthnSignatureData`                   | `object` | WebAuthn assertion data matching the on-chain WebAuthn.WebAuthnAuth struct. Used when signing UserOperations with a passkey. |
| `WebAuthnSignatureData.authenticatorData` | `string` | Authenticator data bytes (hex string)                                                                                        |
| `WebAuthnSignatureData.clientDataJSON`    | `string` | Client data JSON string (UTF-8)                                                                                              |
| `WebAuthnSignatureData.challengeIndex`    | `bigint` | Index of the challenge in clientDataJSON                                                                                     |
| `WebAuthnSignatureData.typeIndex`         | `bigint` | Index of the type field in clientDataJSON                                                                                    |
| `WebAuthnSignatureData.r`                 | `bigint` | ECDSA signature r component                                                                                                  |
| `WebAuthnSignatureData.s`                 | `bigint` | ECDSA signature s component                                                                                                  |

| key         | type     | description                                     |
| :---------- | :------- | :---------------------------------------------- |
| `signature` | `string` | Hex-encoded wrapped signature in Calibur format |

#### Source code[​](#source-code-3 "Direct link to Source code")

[formatWebAuthnSignature](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L760)

### sendUserOperation[​](#senduseroperation "Direct link to sendUserOperation")

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

* example.ts
* Param Types
* Return Type

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);
```

| 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`                       | 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[​](#source-code-4 "Direct link to Source code")

[sendUserOperation](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L794)

## Key Management Methods[​](#key-management-methods "Direct link to Key Management Methods")

### createSecp256k1Key[​](#createsecp256k1key "Direct link to createSecp256k1Key")

Static method. Creates a secp256k1 key descriptor from an Ethereum address.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const secondaryAddress = "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18";

const key = Calibur7702Account.createSecp256k1Key(secondaryAddress);



console.log(key);

// { keyType: 2, publicKey: "0x000...742d35Cc6634C0532925a3b844Bc9e7595f2bD18" }
```

| key       | type     | description                               |
| :-------- | :------- | :---------------------------------------- |
| `address` | `string` | The Ethereum address (EOA public address) |

| key                        | type             | description                                                      |
| :------------------------- | :--------------- | :--------------------------------------------------------------- |
| `key`                      | `object`         | A CaliburKey with type Secp256k1                                 |
| `key.CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `key.CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `key.CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

CaliburKey

| key                    | type             | description                                                      |
| :--------------------- | :--------------- | :--------------------------------------------------------------- |
| `CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

#### Source code[​](#source-code-5 "Direct link to Source code")

[createSecp256k1Key](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L814)

### createWebAuthnP256Key[​](#createwebauthnp256key "Direct link to createWebAuthnP256Key")

Static method. Creates a WebAuthn P-256 key descriptor from public key coordinates. Use this when registering a passkey on the account.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



// Extract x, y coordinates from a WebAuthn credential

const x = 0x1234...n; // P-256 public key x coordinate

const y = 0x5678...n; // P-256 public key y coordinate



const webAuthnKey = Calibur7702Account.createWebAuthnP256Key(x, y);

const keyHash = Calibur7702Account.getKeyHash(webAuthnKey);

console.log("Key hash:", keyHash);
```

| key | type     | description                              |
| :-- | :------- | :--------------------------------------- |
| `x` | `bigint` | The x coordinate of the P-256 public key |
| `y` | `bigint` | The y coordinate of the P-256 public key |

| key                        | type             | description                                                      |
| :------------------------- | :--------------- | :--------------------------------------------------------------- |
| `key`                      | `object`         | A CaliburKey with type WebAuthnP256                              |
| `key.CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `key.CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `key.CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

CaliburKey

| key                    | type             | description                                                      |
| :--------------------- | :--------------- | :--------------------------------------------------------------- |
| `CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

#### Source code[​](#source-code-6 "Direct link to Source code")

[createWebAuthnP256Key](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L827)

### createP256Key[​](#createp256key "Direct link to createP256Key")

Static method. Creates a raw P-256 (secp256r1) key descriptor from public key coordinates. Use this for non-WebAuthn P-256 keys.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const x = 0x1234...n; // P-256 public key x coordinate

const y = 0x5678...n; // P-256 public key y coordinate



const p256Key = Calibur7702Account.createP256Key(x, y);

const keyHash = Calibur7702Account.getKeyHash(p256Key);

console.log("Key hash:", keyHash);
```

| key | type     | description                              |
| :-- | :------- | :--------------------------------------- |
| `x` | `bigint` | The x coordinate of the P-256 public key |
| `y` | `bigint` | The y coordinate of the P-256 public key |

| key                        | type             | description                                                      |
| :------------------------- | :--------------- | :--------------------------------------------------------------- |
| `key`                      | `object`         | A CaliburKey with type P256                                      |
| `key.CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `key.CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `key.CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

CaliburKey

| key                    | type             | description                                                      |
| :--------------------- | :--------------- | :--------------------------------------------------------------- |
| `CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

#### Source code[​](#source-code-7 "Direct link to Source code")

[createP256Key](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L840)

### getKeyHash[​](#getkeyhash "Direct link to getKeyHash")

Static method. Computes the key hash for a Calibur key. Uses double hashing: `keccak256(abi.encode(uint8 keyType, bytes32 keccak256(publicKey)))`.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const key = Calibur7702Account.createSecp256k1Key("0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18");

const keyHash = Calibur7702Account.getKeyHash(key);



console.log("Key hash:", keyHash);

// bytes32 hex string, e.g. "0xabc123..."
```

| key                        | type             | description                                                      |
| :------------------------- | :--------------- | :--------------------------------------------------------------- |
| `key`                      | `object`         | The key to compute the hash for                                  |
| `key.CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `key.CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `key.CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

CaliburKey

| key                    | type             | description                                                      |
| :--------------------- | :--------------- | :--------------------------------------------------------------- |
| `CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

| key       | type     | description                          |
| :-------- | :------- | :----------------------------------- |
| `keyHash` | `string` | The key hash as a bytes32 hex string |

#### Source code[​](#source-code-8 "Direct link to Source code")

[getKeyHash](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L854)

### createRegisterKeyMetaTransactions[​](#createregisterkeymetatransactions "Direct link to createRegisterKeyMetaTransactions")

Static method. Creates meta-transactions to register a new key on the Calibur account. Returns two transactions (`[register, update]`) that must both be included in the same UserOperation. For safety, `isAdmin` is always forced to `false`.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



// Create the key to register

const newKey = Calibur7702Account.createSecp256k1Key("0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18");



// Build register + update transactions (both required in the same UserOp)

const registerTxs = Calibur7702Account.createRegisterKeyMetaTransactions(

  newKey,

  {

    expiration: Math.floor(Date.now() / 1000) + 30 * 24 * 60 * 60, // 30 days

  }

);



// Include both transactions in the UserOperation

const userOperation = await smartAccount.createUserOperation(

  registerTxs, // array of two SimpleMetaTransactions

  nodeRpc,

  bundlerRpc,

);
```

| key                                        | type             | description                                                                                               |
| :----------------------------------------- | :--------------- | :-------------------------------------------------------------------------------------------------------- |
| `key`                                      | `object`         | The key to register                                                                                       |
| `key.CaliburKey`                           | `object`         | A key registered on a Calibur account.                                                                    |
| `key.CaliburKey.keyType`                   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1)                                          |
| `key.CaliburKey.publicKey`                 | `string`         | ABI-encoded public key bytes (hex string)                                                                 |
| `settings?`                                | `object`         | Optional key settings. isAdmin is always forced to false for safety.                                      |
| `settings?.CaliburKeySettings`             | `object`         | Settings for a key registered on a Calibur account. All fields are optional.                              |
| `settings?.CaliburKeySettings.hook?`       | `string`         | Hook contract address called during validation (zero address = no hook)                                   |
| `settings?.CaliburKeySettings.expiration?` | `number`         | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40. |
| `settings?.CaliburKeySettings.isAdmin?`    | `boolean`        | Whether the key has admin privileges                                                                      |

CaliburKeySettings

| key                              | type      | description                                                                                               |
| :------------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------- |
| `CaliburKeySettings`             | `object`  | Settings for a key registered on a Calibur account. All fields are optional.                              |
| `CaliburKeySettings.hook?`       | `string`  | Hook contract address called during validation (zero address = no hook)                                   |
| `CaliburKeySettings.expiration?` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40. |
| `CaliburKeySettings.isAdmin?`    | `boolean` | Whether the key has admin privileges                                                                      |

| key            | type                                             | description                                                                                                              |
| :------------- | :----------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------- |
| `transactions` | `[SimpleMetaTransaction, SimpleMetaTransaction]` | A tuple of exactly two SimpleMetaTransactions: \[registerTx, updateTx]. Both must be included in the same UserOperation. |

#### Source code[​](#source-code-9 "Direct link to Source code")

[createRegisterKeyMetaTransactions](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L913)

### createRevokeKeyMetaTransaction[​](#createrevokekeymetatransaction "Direct link to createRevokeKeyMetaTransaction")

Static method. Creates a meta-transaction to revoke a key from the Calibur account. Only admin keys can execute revoke operations.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const keyHash = "0x...key-hash-to-revoke";

const revokeTx = Calibur7702Account.createRevokeKeyMetaTransaction(keyHash);



// Include in a UserOperation signed by an admin key

const userOperation = await smartAccount.createUserOperation(

  [revokeTx],

  nodeRpc,

  bundlerRpc,

);
```

| key       | type     | description                       |
| :-------- | :------- | :-------------------------------- |
| `keyHash` | `string` | The key hash of the key to revoke |

| key                                       | type     | description                                                                    |
| :---------------------------------------- | :------- | :----------------------------------------------------------------------------- |
| `transaction`                             | `object` | A SimpleMetaTransaction that calls revoke(bytes32)                             |
| `transaction.SimpleMetaTransaction`       | `object` | SimpleMetaTransaction is the type of transaction used with Calibur7702Account. |
| `transaction.SimpleMetaTransaction.to`    | `string` | Target contract address for the transaction                                    |
| `transaction.SimpleMetaTransaction.value` | `bigint` | Value transferred in the transaction (usually 0n for contract interactions)    |
| `transaction.SimpleMetaTransaction.data`  | `string` | The call data for the transaction                                              |

#### Source code[​](#source-code-10 "Direct link to Source code")

[createRevokeKeyMetaTransaction](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L953)

### createUpdateKeySettingsMetaTransaction[​](#createupdatekeysettingsmetatransaction "Direct link to createUpdateKeySettingsMetaTransaction")

Static method. Creates a meta-transaction to update settings for a registered key. Only admin keys can execute update operations. Throws if `isAdmin` is set to `true` in the settings.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const keyHash = "0x...registered-key-hash";



// Extend key expiration to 1 year from now

const updateTx = Calibur7702Account.createUpdateKeySettingsMetaTransaction(

  keyHash,

  {

    expiration: Math.floor(Date.now() / 1000) + 365 * 24 * 60 * 60,

  }

);



const userOperation = await smartAccount.createUserOperation(

  [updateTx],

  nodeRpc,

  bundlerRpc,

);
```

| key                                       | type      | description                                                                                               |
| :---------------------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------- |
| `keyHash`                                 | `string`  | The key hash of the key to update                                                                         |
| `settings`                                | `object`  | New settings for the key. isAdmin must not be true (throws if true).                                      |
| `settings.CaliburKeySettings`             | `object`  | Settings for a key registered on a Calibur account. All fields are optional.                              |
| `settings.CaliburKeySettings.hook?`       | `string`  | Hook contract address called during validation (zero address = no hook)                                   |
| `settings.CaliburKeySettings.expiration?` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40. |
| `settings.CaliburKeySettings.isAdmin?`    | `boolean` | Whether the key has admin privileges                                                                      |

CaliburKeySettings

| key                              | type      | description                                                                                               |
| :------------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------- |
| `CaliburKeySettings`             | `object`  | Settings for a key registered on a Calibur account. All fields are optional.                              |
| `CaliburKeySettings.hook?`       | `string`  | Hook contract address called during validation (zero address = no hook)                                   |
| `CaliburKeySettings.expiration?` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40. |
| `CaliburKeySettings.isAdmin?`    | `boolean` | Whether the key has admin privileges                                                                      |

| key                                       | type     | description                                                                    |
| :---------------------------------------- | :------- | :----------------------------------------------------------------------------- |
| `transaction`                             | `object` | A SimpleMetaTransaction that calls update(bytes32, uint256)                    |
| `transaction.SimpleMetaTransaction`       | `object` | SimpleMetaTransaction is the type of transaction used with Calibur7702Account. |
| `transaction.SimpleMetaTransaction.to`    | `string` | Target contract address for the transaction                                    |
| `transaction.SimpleMetaTransaction.value` | `bigint` | Value transferred in the transaction (usually 0n for contract interactions)    |
| `transaction.SimpleMetaTransaction.data`  | `string` | The call data for the transaction                                              |

#### Source code[​](#source-code-11 "Direct link to Source code")

[createUpdateKeySettingsMetaTransaction](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1141)

### packKeySettings[​](#packkeysettings "Direct link to packKeySettings")

Static method. Packs key settings into a single uint256 value. Layout: `(isAdmin << 200) | (expiration << 160) | hook`.

`expiration` is a unix timestamp in seconds. Since v0.4.1, `packKeySettings` throws a `RangeError` if `expiration` does not fit the contract's `uint40` field (for example, a millisecond timestamp from `Date.now()`) or if `hook` is outside the 160-bit address range. `hook` is parsed with `BigInt`, so a non-numeric string throws a `SyntaxError` instead.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const packed = Calibur7702Account.packKeySettings({

  hook: "0x0000000000000000000000000000000000000000",

  expiration: Math.floor(Date.now() / 1000) + 86400, // 1 day

  isAdmin: false,

});



console.log("Packed settings:", packed);
```

| key                                       | type      | description                                                                                               |
| :---------------------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------- |
| `settings`                                | `object`  | The key settings to pack                                                                                  |
| `settings.CaliburKeySettings`             | `object`  | Settings for a key registered on a Calibur account. All fields are optional.                              |
| `settings.CaliburKeySettings.hook?`       | `string`  | Hook contract address called during validation (zero address = no hook)                                   |
| `settings.CaliburKeySettings.expiration?` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40. |
| `settings.CaliburKeySettings.isAdmin?`    | `boolean` | Whether the key has admin privileges                                                                      |

CaliburKeySettings

| key                              | type      | description                                                                                               |
| :------------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------- |
| `CaliburKeySettings`             | `object`  | Settings for a key registered on a Calibur account. All fields are optional.                              |
| `CaliburKeySettings.hook?`       | `string`  | Hook contract address called during validation (zero address = no hook)                                   |
| `CaliburKeySettings.expiration?` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40. |
| `CaliburKeySettings.isAdmin?`    | `boolean` | Whether the key has admin privileges                                                                      |

| key      | type     | description                                                                                            |
| :------- | :------- | :----------------------------------------------------------------------------------------------------- |
| `packed` | `bigint` | The packed settings as a single uint256 value. Layout: (isAdmin << 200) \| (expiration << 160) \| hook |

#### Source code[​](#source-code-12 "Direct link to Source code")

[packKeySettings](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L867)

### unpackKeySettings[​](#unpackkeysettings "Direct link to unpackKeySettings")

Static method. Unpacks a uint256 settings value into a `CaliburKeySettingsResult` object with all fields populated.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const packed = 0x...n; // packed settings from the contract



const settings = Calibur7702Account.unpackKeySettings(packed);

console.log("Admin:", settings.isAdmin);

console.log("Expiration:", settings.expiration);

console.log("Hook:", settings.hook);
```

| key      | type     | description                                 |
| :------- | :------- | :------------------------------------------ |
| `packed` | `bigint` | The packed settings uint256 value to unpack |

| key                                            | type      | description                                                                                                                    |
| :--------------------------------------------- | :-------- | :----------------------------------------------------------------------------------------------------------------------------- |
| `settings`                                     | `object`  | Parsed key settings with all fields populated                                                                                  |
| `settings.CaliburKeySettingsResult`            | `object`  | Concrete key settings returned from on-chain reads. All fields are required since the contract always returns concrete values. |
| `settings.CaliburKeySettingsResult.hook`       | `string`  | Hook contract address called during validation (zero address = no hook)                                                        |
| `settings.CaliburKeySettingsResult.expiration` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40.                      |
| `settings.CaliburKeySettingsResult.isAdmin`    | `boolean` | Whether the key has admin privileges                                                                                           |

CaliburKeySettingsResult

| key                                   | type      | description                                                                                                                    |
| :------------------------------------ | :-------- | :----------------------------------------------------------------------------------------------------------------------------- |
| `CaliburKeySettingsResult`            | `object`  | Concrete key settings returned from on-chain reads. All fields are required since the contract always returns concrete values. |
| `CaliburKeySettingsResult.hook`       | `string`  | Hook contract address called during validation (zero address = no hook)                                                        |
| `CaliburKeySettingsResult.expiration` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40.                      |
| `CaliburKeySettingsResult.isAdmin`    | `boolean` | Whether the key has admin privileges                                                                                           |

#### Source code[​](#source-code-13 "Direct link to Source code")

[unpackKeySettings](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L891)

## Read Methods[​](#read-methods "Direct link to Read Methods")

### isKeyRegistered[​](#iskeyregistered "Direct link to isKeyRegistered")

Checks if a key is registered on this account by querying the on-chain `isRegistered(bytes32)` function.

* example.ts
* Param Types
* Return Type

example.ts

```
const keyHash = Calibur7702Account.getKeyHash(key);

const isRegistered = await smartAccount.isKeyRegistered(

  "https://ethereum-sepolia-rpc.publicnode.com",

  keyHash,

);



console.log("Key registered:", isRegistered);
```

| key           | type     | description                              |
| :------------ | :------- | :--------------------------------------- |
| `providerRpc` | `string` | JSON-RPC endpoint for blockchain queries |
| `keyHash`     | `string` | The key hash to check                    |

| key            | type      | description                                   |
| :------------- | :-------- | :-------------------------------------------- |
| `isRegistered` | `boolean` | True if the key is registered on this account |

#### Source code[​](#source-code-14 "Direct link to Source code")

[isKeyRegistered](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1207)

### getKeySettings[​](#getkeysettings "Direct link to getKeySettings")

Gets the settings for a registered key. Returns a `CaliburKeySettingsResult` with hook address, expiration timestamp, and admin flag.

* example.ts
* Param Types
* Return Type

example.ts

```
const keyHash = Calibur7702Account.getKeyHash(key);

const settings = await smartAccount.getKeySettings(

  "https://ethereum-sepolia-rpc.publicnode.com",

  keyHash,

);



console.log("Admin:", settings.isAdmin);

console.log("Expiration:", settings.expiration === 0 ? "never" : new Date(settings.expiration * 1000).toISOString());

console.log("Hook:", settings.hook);
```

| key           | type     | description                              |
| :------------ | :------- | :--------------------------------------- |
| `providerRpc` | `string` | JSON-RPC endpoint for blockchain queries |
| `keyHash`     | `string` | The key hash to query settings for       |

| key                                            | type      | description                                                                                                                    |
| :--------------------------------------------- | :-------- | :----------------------------------------------------------------------------------------------------------------------------- |
| `settings`                                     | `object`  | Parsed key settings with all fields populated                                                                                  |
| `settings.CaliburKeySettingsResult`            | `object`  | Concrete key settings returned from on-chain reads. All fields are required since the contract always returns concrete values. |
| `settings.CaliburKeySettingsResult.hook`       | `string`  | Hook contract address called during validation (zero address = no hook)                                                        |
| `settings.CaliburKeySettingsResult.expiration` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40.                      |
| `settings.CaliburKeySettingsResult.isAdmin`    | `boolean` | Whether the key has admin privileges                                                                                           |

CaliburKeySettingsResult

| key                                   | type      | description                                                                                                                    |
| :------------------------------------ | :-------- | :----------------------------------------------------------------------------------------------------------------------------- |
| `CaliburKeySettingsResult`            | `object`  | Concrete key settings returned from on-chain reads. All fields are required since the contract always returns concrete values. |
| `CaliburKeySettingsResult.hook`       | `string`  | Hook contract address called during validation (zero address = no hook)                                                        |
| `CaliburKeySettingsResult.expiration` | `number`  | Unix timestamp in seconds (not milliseconds) after which the key expires (0 = never). Must fit in uint40.                      |
| `CaliburKeySettingsResult.isAdmin`    | `boolean` | Whether the key has admin privileges                                                                                           |

#### Source code[​](#source-code-15 "Direct link to Source code")

[getKeySettings](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1233)

### getKey[​](#getkey "Direct link to getKey")

Gets the full key data for a registered key, including the key type and ABI-encoded public key bytes.

* example.ts
* Param Types
* Return Type

example.ts

```
const keyHash = "0x...registered-key-hash";

const key = await smartAccount.getKey(

  "https://ethereum-sepolia-rpc.publicnode.com",

  keyHash,

);



console.log("Key type:", key.keyType); // 0 = P256, 1 = WebAuthnP256, 2 = Secp256k1

console.log("Public key:", key.publicKey);
```

| key           | type     | description                              |
| :------------ | :------- | :--------------------------------------- |
| `providerRpc` | `string` | JSON-RPC endpoint for blockchain queries |
| `keyHash`     | `string` | The key hash to query                    |

| key                        | type             | description                                                      |
| :------------------------- | :--------------- | :--------------------------------------------------------------- |
| `key`                      | `object`         | The CaliburKey associated with the given key hash                |
| `key.CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `key.CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `key.CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

CaliburKey

| key                    | type             | description                                                      |
| :--------------------- | :--------------- | :--------------------------------------------------------------- |
| `CaliburKey`           | `object`         | A key registered on a Calibur account.                           |
| `CaliburKey.keyType`   | `CaliburKeyType` | The type of cryptographic key (P256, WebAuthnP256, or Secp256k1) |
| `CaliburKey.publicKey` | `string`         | ABI-encoded public key bytes (hex string)                        |

#### Source code[​](#source-code-16 "Direct link to Source code")

[getKey](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1262)

### getKeys[​](#getkeys "Direct link to getKeys")

Returns all keys registered on this account. Iterates `keyCount()` and `keyAt(i)` to enumerate all keys.

* example.ts
* Param Types
* Return Type

example.ts

```
const keys = await smartAccount.getKeys(

  "https://ethereum-sepolia-rpc.publicnode.com",

);



for (const key of keys) {

  const keyHash = Calibur7702Account.getKeyHash(key);

  const settings = await smartAccount.getKeySettings(nodeRpc, keyHash);

  console.log("Key:", keyHash.slice(0, 18) + "...");

  console.log("  Type:", key.keyType);

  console.log("  Admin:", settings.isAdmin);

}
```

| key           | type     | description                              |
| :------------ | :------- | :--------------------------------------- |
| `providerRpc` | `string` | JSON-RPC endpoint for blockchain queries |

| key    | type           | description                                         |
| :----- | :------------- | :-------------------------------------------------- |
| `keys` | `CaliburKey[]` | Array of all registered CaliburKeys on this account |

#### Source code[​](#source-code-17 "Direct link to Source code")

[getKeys](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1295)

### isDelegatedToThisAccount[​](#isdelegatedtothisaccount "Direct link to 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

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.");

}
```

| key           | type     | description                              |
| :------------ | :------- | :--------------------------------------- |
| `providerRpc` | `string` | 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 |

#### Source code[​](#source-code-18 "Direct link to Source code")

[isDelegatedToThisAccount](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1183)

### getNonce[​](#getnonce "Direct link to getNonce")

Gets the account nonce from the EntryPoint. Supports parallel nonce channels via the optional `sequenceKey` parameter.

* example.ts
* Param Types
* Return Type

example.ts

```
// Default nonce (sequence key = 0)

const nonce = await smartAccount.getNonce(

  "https://ethereum-sepolia-rpc.publicnode.com"

);

console.log("Nonce:", nonce);



// Parallel nonce channel

const parallelNonce = await smartAccount.getNonce(

  "https://ethereum-sepolia-rpc.publicnode.com",

  1 // sequence key

);
```

| key            | type     | description                                                    |
| :------------- | :------- | :------------------------------------------------------------- |
| `providerRpc`  | `string` | JSON-RPC endpoint for blockchain queries                       |
| `sequenceKey?` | `number` | Optional sequence key for parallel nonce channels (default: 0) |

| key     | type     | description                                            |
| :------ | :------- | :----------------------------------------------------- |
| `nonce` | `bigint` | The fully constructed nonce (sequenceKey << 64) \| seq |

#### Source code[​](#source-code-19 "Direct link to Source code")

[getNonce](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1196)

## Utility Methods[​](#utility-methods "Direct link to Utility Methods")

### createAccountCallData[​](#createaccountcalldata "Direct link to createAccountCallData")

Static method. Encodes calldata for `executeUserOp` with BatchedCall format. All transactions (even single ones) go through the same BatchedCall path.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const transactions = [

  { to: "0x...", value: 0n, data: "0x..." },

  { to: "0x...", value: 1000000000000000000n, data: "0x" },

];



const callData = Calibur7702Account.createAccountCallData(transactions);



// With revertOnFailure disabled (individual calls can fail without reverting the batch)

const callDataNoRevert = Calibur7702Account.createAccountCallData(transactions, false);
```

| key                | type                      | description                                                          |
| :----------------- | :------------------------ | :------------------------------------------------------------------- |
| `transactions`     | `SimpleMetaTransaction[]` | One or more transactions to encode into BatchedCall format           |
| `revertOnFailure?` | `boolean`                 | Whether to revert the entire batch if any call fails (default: true) |

| key        | type     | description                                     |
| :--------- | :------- | :---------------------------------------------- |
| `callData` | `string` | Encoded calldata for the executeUserOp function |

#### Source code[​](#source-code-20 "Direct link to Source code")

[createAccountCallData](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L302)

### wrapSignature[​](#wrapsignature "Direct link to wrapSignature")

Static method. Wraps a raw ECDSA signature in Calibur's signature format: `abi.encode(bytes32 keyHash, bytes signature, bytes hookData)`. Use this when signing externally (e.g., with viem, hardware wallet, MPC) to avoid manually ABI-encoding the wrapped signature.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



// Root key hash (bytes32 zero) for the EOA's own key

const ROOT_KEY_HASH = "0x0000000000000000000000000000000000000000000000000000000000000000";



const rawEcdsaSignature = "0x..."; // 65-byte ECDSA signature



// Wrap for root key

const wrappedSignature = Calibur7702Account.wrapSignature(

  ROOT_KEY_HASH,

  rawEcdsaSignature,

);



// Wrap for a secondary key with hook data

const wrappedWithHook = Calibur7702Account.wrapSignature(

  "0x...secondary-key-hash",

  rawEcdsaSignature,

  "0x...hook-data",

);
```

| key            | type     | description                                       |
| :------------- | :------- | :------------------------------------------------ |
| `keyHash`      | `string` | The key hash (use 0x00...00 for the EOA root key) |
| `rawSignature` | `string` | The raw ECDSA signature (65 bytes, hex-encoded)   |
| `hookData?`    | `string` | Optional hook data (default: "0x")                |

| key         | type     | description                                              |
| :---------- | :------- | :------------------------------------------------------- |
| `signature` | `string` | Hex-encoded wrapped signature ready for userOp.signature |

#### Source code[​](#source-code-21 "Direct link to Source code")

[wrapSignature](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L172)

### createDummyWebAuthnSignature[​](#createdummywebauthnsignature "Direct link to createDummyWebAuthnSignature")

Static method. Creates a dummy WebAuthn signature for gas estimation when signing with a passkey. The key hash must correspond to an actually registered key on the account, otherwise the contract's `validateUserOp` will revert.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



const keyHash = Calibur7702Account.getKeyHash(webAuthnKey);



const dummySignature = Calibur7702Account.createDummyWebAuthnSignature(keyHash);



// Pass as override during UserOperation creation for accurate gas estimation

const userOperation = await smartAccount.createUserOperation(

  transactions,

  nodeRpc,

  bundlerRpc,

  { dummySignature },

);
```

| key       | type     | description                                                                                            |
| :-------- | :------- | :----------------------------------------------------------------------------------------------------- |
| `keyHash` | `string` | The key hash of a registered passkey (from getKeyHash). Must correspond to an actually registered key. |

| key         | type     | description                                                                             |
| :---------- | :------- | :-------------------------------------------------------------------------------------- |
| `signature` | `string` | A dummy signature suitable for passing as dummySignature override during gas estimation |

#### Source code[​](#source-code-22 "Direct link to Source code")

[createDummyWebAuthnSignature](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L133)

### getUserOperationHash[​](#getuseroperationhash "Direct link to getUserOperationHash")

Computes the UserOperation hash for this account's EntryPoint. Convenience wrapper that automatically uses this account's EntryPoint address.

* example.ts
* Param Types
* Return Type

example.ts

```
const userOpHash = smartAccount.getUserOperationHash(

  userOperation,

  11155111n // chain ID

);



console.log("UserOperation hash:", userOpHash);

// Use this hash as the challenge for WebAuthn assertions
```

| key                                           | type                           | description                                                                                                              |
| :-------------------------------------------- | :----------------------------- | :----------------------------------------------------------------------------------------------------------------------- |
| `userOperation`                               | `object`                       | The UserOperation to hash                                                                                                |
| `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 |
| `chainId`                                     | `bigint`                       | Target chain ID                                                                                                          |

| key    | type     | description                            |
| :----- | :------- | :------------------------------------- |
| `hash` | `string` | The UserOperation hash as a hex string |

#### Source code[​](#source-code-23 "Direct link to Source code")

[getUserOperationHash](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L236)

### prependTokenPaymasterApproveToCallData[​](#prependtokenpaymasterapprovetocalldata "Direct link to prependTokenPaymasterApproveToCallData")

Prepends a token `approve` call to existing calldata for a token paymaster. Decodes the existing BatchedCall, prepends an ERC-20 approve transaction, and re-encodes.

* example.ts
* Param Types
* Return Type

example.ts

```
const callDataWithApproval = smartAccount.prependTokenPaymasterApproveToCallData(

  userOperation.callData,

  "0xa0b86a33e6b3e96bb24b8e4b28e80e0fb3a4f4b6", // USDC token address

  "0x...", // paymaster address

  1000000n // approve amount (1 USDC)

);



userOperation.callData = callDataWithApproval;
```

| key                | type     | description                                             |
| :----------------- | :------- | :------------------------------------------------------ |
| `callData`         | `string` | Existing encoded calldata (executeUserOp format)        |
| `tokenAddress`     | `string` | Address of the ERC-20 token contract to approve         |
| `paymasterAddress` | `string` | Address of the paymaster contract to approve as spender |
| `approveAmount`    | `bigint` | Amount of tokens to approve for the paymaster           |

| key        | type     | description                                           |
| :--------- | :------- | :---------------------------------------------------- |
| `callData` | `string` | Re-encoded calldata with the token approval prepended |

#### Source code[​](#source-code-24 "Direct link to Source code")

[prependTokenPaymasterApproveToCallData](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1381)

### createInvalidateNonceMetaTransaction[​](#createinvalidatenoncemetatransaction "Direct link to createInvalidateNonceMetaTransaction")

Static method. Creates a meta-transaction to invalidate nonces up to a given value. All nonces below the specified value become invalid, preventing replay of previously signed but unsubmitted UserOperations.

* example.ts
* Param Types
* Return Type

example.ts

```
import { Calibur7702Account } from "abstractionkit";



// Invalidate all nonces below 100

const invalidateTx = Calibur7702Account.createInvalidateNonceMetaTransaction(100n);



const userOperation = await smartAccount.createUserOperation(

  [invalidateTx],

  nodeRpc,

  bundlerRpc,

);
```

| key        | type     | description                                                 |
| :--------- | :------- | :---------------------------------------------------------- |
| `newNonce` | `bigint` | The new nonce value (all nonces below this are invalidated) |

| key                                       | type     | description                                                                    |
| :---------------------------------------- | :------- | :----------------------------------------------------------------------------- |
| `transaction`                             | `object` | A SimpleMetaTransaction that calls invalidateNonce(uint256)                    |
| `transaction.SimpleMetaTransaction`       | `object` | SimpleMetaTransaction is the type of transaction used with Calibur7702Account. |
| `transaction.SimpleMetaTransaction.to`    | `string` | Target contract address for the transaction                                    |
| `transaction.SimpleMetaTransaction.value` | `bigint` | Value transferred in the transaction (usually 0n for contract interactions)    |
| `transaction.SimpleMetaTransaction.data`  | `string` | The call data for the transaction                                              |

#### Source code[​](#source-code-25 "Direct link to Source code")

[createInvalidateNonceMetaTransaction](https://github.com/candidelabs/abstractionkit/blob/v1.0.0/src/account/Calibur/Calibur7702Account.ts#L1166)
