# Ethereum SDK

Types exported by @quip.network/ethereum-sdk, the account client for EVM chains.

Documented version: `1.0.6`.

TypeScript SDK for post-quantum-secured smart-contract wallets on EVM chains. Only the subpaths below can be imported: the package has no root entry point.

> **Read first**
>
> The package README describes it as in active development and not production-ready: APIs, contract addresses and the on-chain key schema may change between releases.

```sh
npm install @quip.network/ethereum-sdk@1.0.6
```

Generated at build from the type declarations in the published package. A description is the first paragraph of the package's own doc comment, and an export with none shows its type alone. For walkthroughs, see the [SDK guide](/docs/getting-started/quip-sdk).

## `@quip.network/ethereum-sdk/v1/shrincs`

The current wallet family: the SHRINCS clients.

### Classes

#### `QuipError`

```ts
constructor(code: string, message: string, opts?: QuipErrorOptions)
```

| Name | Type | Description |
| --- | --- | --- |
| `code` | `string` |  |
| `cause?` | `unknown` |  |
| `selector?` | `` `0x${string}` \| undefined `` |  |
| `data?` | `` `0x${string}` \| undefined `` |  |
| `name` | `string` |  |
| `message` | `string` |  |
| `stack?` | `string \| undefined` |  |

#### `ShrincsFactoryClient`

```ts
constructor(params: ShrincsFactoryClientParams)
```

| Name | Type | Description |
| --- | --- | --- |
| `chainId` | `number` |  |
| `account` | `` `0x${string}` `` |  |
| `factoryAddress` | `` `0x${string}` `` |  |
| `walletImplementation` | `` `0x${string}` `` |  |
| `createShrincsWallet` | `(params: CreateShrincsWalletParams, opts?: TxOptions) => Promise<ShrincsWalletClient>` |  |
| `estimateCreationCost` | `(params: EstimateCreationCostParams, opts?: TxOptions) => Promise<CreationCostEstimate>` |  |
| `getShrincsWallet` | `(params: GetShrincsWalletParams) => Promise<ShrincsWalletClient>` |  |
| `getWalletState` | `(commitment: Hex) => Promise<{ keyVersion: number; shrincsPublicKeyCommitment: Hex; maxSignatures: number; hashSuite: number; } \| null>` |  |
| `openShrincsWallet` | `(params: { commitment: Hex; keypair: ShrincsKeyPair; }) => Promise<ShrincsWalletClient \| null>` |  |
| `getShrincsWalletAddress` | `(statefulC: Hex, erc1271C: Hex, owner: Address) => Promise<Address>` |  |

#### `ShrincsKeyPair`

```ts
constructor(wasm: ShrincsWasmModule, stateful: ShrincsKeyMaterial, stateless?: ShrincsKeyMaterial)
```

| Name | Type | Description |
| --- | --- | --- |
| `publicKey` | `ShrincsPublicKey` |  |
| `publicKeyCommitment` | `` `0x${string}` `` |  |
| `signStatefulActionAt` | `(context: ActionContext, leaf: number) => StatefulSignature` |  |
| `signStatelessAction` | `(context: ActionContext) => StatelessSignature` |  |
| `signFullRotation` | `(context: RotationContext, nextKey: RotationTarget) => StatelessSignature` |  |
| `signOwnershipAcceptance` | `(domainSeparator: Hex, newOwner: Address, leaf?: number) => StatefulSignature` |  |
| `statefulActionMessageHash` | `(context: ActionContext) => Hex` |  |
| `statelessActionMessageHash` | `(context: ActionContext) => Hex` |  |
| `fullRotationMessageHash` | `(context: RotationContext, nextKey: RotationTarget) => Hex` |  |
| `signStatefulRawAt` | `(messageHex: Hex, leaf: number) => StatefulSignature` |  |
| `signStatelessRaw` | `(messageHex: Hex) => StatelessSignature` |  |
| `verifyStatefulRaw` | `(messageHex: Hex, signature: StatefulSignature) => boolean` |  |
| `verifyStatefulEnvelope` | `(publicKey: ShrincsPublicKey, messageHex: Hex, signature: StatefulSignature) => boolean` |  |
| `verifyStatelessAction` | `(context: ActionContext, signature: StatelessSignature) => boolean` |  |

#### `ShrincsPaymasterClient`

```ts
constructor(params: ShrincsPaymasterClientParams)
```

| Name | Type | Description |
| --- | --- | --- |
| `paymasterAddress` | `` `0x${string}` `` |  |
| `chainId` | `number` |  |
| `account` | `` `0x${string}` `` |  |
| `commitment` | `` `0x${string}` `` |  |
| `derivationIndex?` | `number \| undefined` |  |
| `getShrincsVerifier` | `() => Promise<ShrincsVerifierState>` |  |
| `getDeposit` | `() => Promise<bigint>` |  |
| `isStatefulLeafUsed` | `(leaf: number) => Promise<boolean>` |  |
| `lowestUnusedLeaf` | `(verifier: ShrincsVerifierState) => Promise<number>` |  |
| `sponsorUserOp` | `(params: { userOp: PackedUserOperation; validUntil?: number; validAfter?: number; validitySeconds?: number; now?: number; verificationGasLimit?: bigint; postOpGasLimit?: bigint; leaf?: number; }) => Promise<{ paymasterAndData: Hex; leaf: number; validUntil: number; validAfter: number; }>` |  |
| `estimateSponsorshipCost` | `(params: { maxFeePerGas: bigint; verificationGasLimit?: bigint; postOpGasLimit?: bigint; }) => bigint` |  |
| `rotateStatefulKey` | `(params: { nextStatefulPublicKey: Hex; }, opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `markLeavesUsed` | `(leaves: readonly number[], opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `deposit` | `(value: bigint, opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `withdrawTo` | `(params: { to: Address; amount: bigint; }, opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `addStake` | `(params: { unstakeDelaySec: number; value: bigint; }, opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `unlockStake` | `(opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `withdrawStake` | `(to: Address, opts?: TxOptions) => Promise<TransactionReceipt>` |  |

#### `ShrincsSigner`

| Name | Type | Description |
| --- | --- | --- |
| `deriveSeedHex` | `(derivationIndex: number, pathOverride?: QuipHdPathOptions) => Hex` |  |
| `recoverKeyPair` | `(derivationIndex: number, opts: ShrincsKeygenOptions) => ShrincsKeyPair` |  |
| `deriveKeyPair` | `(params: DeriveKeyPairParams) => ShrincsKeyPair` |  |
| `keygenFromSeedHex` | `(seedHex: Hex, opts: ShrincsKeygenOptions) => ShrincsKeyPair` |  |

Static members:

| Name | Type | Description |
| --- | --- | --- |
| `create` | `(masterSeed: Uint8Array, opts?: QuipHdPathOptions) => Promise<ShrincsSigner>` |  |
| `fromMnemonic` | `(mnemonic: string, opts?: QuipHdPathOptions & { passphrase?: string; }) => Promise<ShrincsSigner>` |  |

#### `ShrincsWalletClient`

```ts
constructor(params: ShrincsWalletClientParams)
```

| Name | Type | Description |
| --- | --- | --- |
| `walletAddress` | `` `0x${string}` `` |  |
| `chainId` | `number` |  |
| `account` | `` `0x${string}` `` |  |
| `commitment` | `` `0x${string}` `` |  |
| `derivationIndex?` | `number \| undefined` |  |
| `getWalletState` | `() => Promise<ShrincsWalletState>` |  |
| `resolveVersion` | `() => Promise<WalletVersionDescriptor>` |  |
| `isStatefulLeafUsed` | `(leaf: number) => Promise<boolean>` |  |
| `lowestUnusedLeaf` | `(maxSignatures: number, statefulLeavesUsed: number, exclude?: ReadonlySet<number>) => Promise<number>` |  |
| `walletFactory` | `() => Promise<Address>` |  |
| `getShrincsVerifier` | `() => Promise<Address>` |  |
| `getDeposit` | `() => Promise<bigint>` |  |
| `isValidSignature` | `(hash: Hex, signature: Hex) => Promise<boolean>` |  |
| `debugIsValidSignature` | `(hash: Hex, signature: Hex) => Promise<Erc1271ValidationResult>` |  |
| `quipSignedHashEcdsaTarget` | `(hash: Hex) => Promise<Hex>` |  |
| `quipUserOpHashEcdsaTarget` | `(userOpHash: Hex) => Promise<Hex>` |  |
| `verifyUpgrade` | `(newImplementation: Address, data: Hex) => Promise<void>` |  |
| `buildUpgradeProbeVector` | `(newImplementation: Address) => Hex` |  |
| `execute` | `(params: ExecuteParams, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<TransactionReceipt>` |  |
| `prepareExecute` | `(params: ExecuteParams, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<PreparedExecute>` |  |
| `assertExecuteTargetHasCode` | `(target: Address) => Promise<void>` |  |
| `withdrawDepositTo` | `(params: { to: Address; amount: bigint; }, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<TransactionReceipt>` |  |
| `addDeposit` | `(amount: bigint, opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `setErc1271Key` | `(params: { newErc1271Key: ShrincsPublicKey; newHashSuite?: number; }, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<TransactionReceipt>` |  |
| `rotateKey` | `(params: { nextStatefulPublicKey: Hex; }, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<TransactionReceipt>` |  |
| `markLeavesUsed` | `(params: { leaves: readonly number[]; }, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<TransactionReceipt>` |  |
| `upgradeToAndCall` | `(params: { newImplementation: Address; shouldMigrate?: boolean; migratorPayload?: Hex; preflight?: boolean; }, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<TransactionReceipt>` |  |
| `transferOwnership` | `(params: { nextKey: ShrincsPublicKey; newOwner: Address; keyAcceptance?: StatefulSignature; ownerAcceptance?: Hex; }, opts?: TxOptions & ShrincsTxKeyOptions) => Promise<TransactionReceipt>` |  |
| `recoverWallet` | `(params: { nextKey: ShrincsPublicKey; }, opts?: TxOptions) => Promise<TransactionReceipt>` |  |
| `signErc1271` | `(params: { hash: Hex; erc1271KeyPair: ShrincsKeyPair; owner: LocalAccount; }) => Promise<Hex>` |  |
| `buildExecuteUserOp` | `(params: ShrincsCall & UserOpEnvelope & { maxFee: bigint; }) => PackedUserOperation` |  |
| `buildExecuteBatchUserOp` | `(params: { calls: readonly ShrincsCall[]; maxFee: bigint; } & UserOpEnvelope) => PackedUserOperation` |  |
| `signExecuteUserOp` | `(params: { userOp: PackedUserOperation; entryPoint: Address; owner: LocalAccount; }, opts?: ShrincsTxKeyOptions) => Promise<{ userOp: PackedUserOperation; userOpHash: Hex; leaf: number; }>` |  |

### Functions

| Name | Type | Description |
| --- | --- | --- |
| `v1Commitment` | `(statefulC: Hex, statelessC: Hex, owner: Address) => Hex` |  |
| `getShrincsWalletAddress` | `(factoryAddress: Address, statefulC: Hex, statelessC: Hex, owner: Address) => Address` |  |
| `getShrincsAddresses` | `(chainId?: number) => ShrincsNetworkAddresses` |  |
| `resolveWalletVersion` | `(implementation: Address) => WalletVersionDescriptor` |  |
| `resolveWalletVersionStrict` | `(implementation: Address) => WalletVersionDescriptor` |  |
| `readWalletImplementation` | `(publicClient: PublicClient, walletAddress: Address) => Promise<Address>` |  |
| `resolveWalletVersionFromChain` | `(publicClient: PublicClient, walletAddress: Address, opts?: { strict?: boolean; }) => Promise<WalletVersionDescriptor>` |  |
| `applyGasMultiplier` | `(estimate: bigint, opts?: TxOptions) => bigint` |  |
| `resolveGasMultiplier` | `(opts?: TxOptions) => number` |  |
| `resolveFeeOptions` | `(opts?: TxOptions) => FeeOverrides` |  |
| `preflightBalanceCheck` | `(publicClient: PublicClient, account: Address, required: bigint) => Promise<void>` |  |
| `prepareTx` | `(params: PrepareTxParams) => Promise<PreparedTx>` |  |
| `computeUserOpHash` | `(userOp: PackedUserOperation, entryPoint: Address, chainId: bigint) => Hex` |  |
| `buildUserOp` | `(params: BuildUserOpParams) => PackedUserOperation` |  |
| `signWalletUserOp` | `(params: SignWalletUserOpParams) => SignedWalletUserOp` |  |
| `packPaymasterHeader` | `(params: { paymaster: Address; verificationGasLimit: bigint; postOpGasLimit: bigint; validUntil: number; validAfter: number; }) => Hex` |  |
| `paymasterBindingHash` | `(userOp: PackedUserOperation, header64: Hex) => Hex` |  |
| `packPaymasterAndData` | `(params: { header64: Hex; publicKey: ShrincsPublicKey; signature: StatefulSignature; }) => Hex` |  |
| `resolveSponsorshipWindow` | `(params: { validUntil?: number; validAfter?: number; validitySeconds?: number; now?: number; }) => { validUntil: number; validAfter: number; now: number; }` |  |
| `signPaymasterUserOp` | `(params: SignPaymasterUserOpParams) => Hex` |  |
| `parseWalletInitialized` | `(src: LogSource) => WalletInitializedEvent[]` |  |
| `parseStatefulSignatureVerified` | `(src: LogSource) => StatefulSignatureVerifiedEvent[]` |  |
| `parseLeafConsumedOnly` | `(src: LogSource) => LeafConsumedOnlyEvent[]` |  |
| `parseLeafRevoked` | `(src: LogSource) => LeafRevokedEvent[]` |  |
| `parseLeafRevocationSkipped` | `(src: LogSource) => LeafRevocationSkippedEvent[]` |  |
| `parseExecutionSucceeded` | `(src: LogSource) => ExecutionSucceededEvent[]` |  |
| `parseErc1271KeySet` | `(src: LogSource) => Erc1271KeySetEvent[]` |  |
| `parseKeyRotated` | `(src: LogSource) => KeyRotatedEvent[]` |  |
| `parseWalletMigrated` | `(src: LogSource) => WalletMigratedEvent[]` |  |
| `parseUserOpValidationRejected` | `(src: LogSource) => UserOpValidationRejectedEvent[]` |  |
| `parsePaymasterInitialized` | `(src: LogSource) => PaymasterInitializedEvent[]` |  |
| `parseShrincsVerifierSet` | `(src: LogSource) => ShrincsVerifierSetEvent[]` |  |
| `parseSponsorshipVerified` | `(src: LogSource) => SponsorshipVerifiedEvent[]` |  |
| `parsePaymasterValidationRejected` | `(src: LogSource) => PaymasterValidationRejectedEvent[]` |  |
| `parseUserOpSponsored` | `(src: LogSource) => UserOpSponsoredEvent[]` |  |
| `assertHdIndex` | `(index: number, label: string) => void` |  |
| `deriveHardenedChild` | `(node: HdNode, index: number) => HdNode` |  |
| `deriveQuipSeed` | `(masterSeed: Uint8Array, index: number, opts?: QuipHdPathOptions) => Hex` |  |
| `generateMnemonic` | `(strength?: 128 \| 256) => string` |  |
| `masterNodeFromSeed` | `(seed: Uint8Array) => HdNode` |  |
| `mnemonicToSeed` | `(mnemonic: string, passphrase?: string) => Uint8Array` |  |
| `normalizeMnemonic` | `(mnemonic: string) => string` |  |
| `quipHdPath` | `(index: number, opts?: QuipHdPathOptions) => string` |  |
| `validateMnemonic` | `(mnemonic: string) => boolean` |  |
| `fetchShrincsWalletState` | `(publicClient: PublicClient, walletAddress: Address, version?: WalletVersionDescriptor) => Promise<ShrincsWalletState>` |  |
| `signOwnershipAcceptance` | `(params: { chainId: number; walletAddress: Address; nextKeyPair: ShrincsKeyPair; newOwner: LocalAccount; leaf?: number; }) => Promise<OwnershipAcceptance>` |  |
| `loadShrincsWasm` | `() => Promise<typeof import("./node_modules/@quip.network/hashsigs-wasm/dist/profiles/256s-keccak/nodejs/hashsigs_rs")>` |  |
| `decodeStatefulEnvelope` | `(envelope: Uint8Array) => StatefulEnvelopeParts` | Decode a stateful envelope (`shrincs.sign` / `signAtLeaf` / `signStatefulRawAt` output) into its `PublicKey` and `Signature` fields. Throws an `Error` with `code: "ERR_ENVELOPE_MALFORMED"` on any out-of-range offset or truncated field. |
| `decodeStatelessSignature` | `(signature: Uint8Array) => StatelessSignatureParts` | Decode a stateless signature (`shrincs.signStateless` / `sphincsPlusC.sign` output) into its FORS-C and hypertree-layer fields. Throws an `Error` with `code: "ERR_ENVELOPE_MALFORMED"` on any out-of-range offset or truncated field. |

### Constants

| Name | Type | Description |
| --- | --- | --- |
| `HASH_SUITE_KECCAK_256` | `1` |  |
| `HASH_SUITE_SHA2_256` | `2` |  |
| `HASH_SUITE_UNSUPPORTED` | `4294967295` |  |
| `STATEFUL_CHAINS` | `64` |  |
| `DEFAULT_VERIFICATION_GAS_LIMIT` | `2500000n` |  |
| `DEFAULT_CALL_GAS_LIMIT` | `500000n` |  |
| `DEFAULT_PRE_VERIFICATION_GAS` | `100000n` |  |
| `DEFAULT_PAYMASTER_VERIFICATION_GAS_LIMIT` | `2500000n` |  |
| `DEFAULT_SPONSORSHIP_VALIDITY_SECONDS` | `number` |  |
| `MAX_PAYMASTER_TIMESTAMP` | `number` |  |
| `DEFAULT_PAYMASTER_POST_OP_GAS_LIMIT` | `100000n` |  |
| `CANONICAL_ENTRYPOINT_V07` | `` `0x${string}` `` |  |
| `CHAIN_IDS` | `{ readonly MIDL_TESTNET: 777; readonly ETHEREUM_MAINNET: 1; readonly SEPOLIA: 11155111; readonly BASE: 8453; readonly BASE_SEPOLIA: 84532; readonly OPTIMISM: 10; readonly OPTIMISM_SEPOLIA: 11155420; }` | Chain IDs for supported networks |
| `SHRINCS_WALLET_BETA2_IMPLEMENTATION` | `` `0x${string}` `` |  |
| `V1_IDENTITY_DOMAIN` | `` `0x${string}` `` |  |
| `NETWORK_ADDRESSES` | `Record<number \| "default", ShrincsNetworkAddresses>` |  |
| `v1_0_1_beta2` | `WalletVersionDescriptor` |  |
| `ERC1967_IMPLEMENTATION_SLOT` | `"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"` |  |
| `LATEST_WALLET_VERSION` | `WalletVersionDescriptor` |  |
| `KNOWN_WALLET_VERSIONS` | `readonly WalletVersionDescriptor[]` |  |
| `DEFAULT_GAS_MULTIPLIER` | `1.2` |  |
| `MIN_GAS_MULTIPLIER` | `1` |  |
| `MAX_GAS_MULTIPLIER` | `2` |  |
| `PAYMASTER_DOMAIN_TAG` | `` `0x${string}` `` |  |
| `ACTION_PAYMASTER_APPROVE` | `` `0x${string}` `` |  |
| `ALGORITHM_EXPERIMENTAL` | `2147483647` |  |
| `HARDENED_OFFSET` | `2147483648` |  |
| `NETWORK_QUIP` | `20049` |  |
| `QUIP_HD_PURPOSE` | `20814` |  |

### ABIs and long literals

Their literal types run too long to print here.

| Export | Description |
| --- | --- |
| `shrincsPaymasterAbi` |  |
| `shrincsWalletAbi` |  |
| `shrincsWalletBeta2Abi` |  |

### Enums

#### `Erc1271ValidationResult`

| Name | Type | Description |
| --- | --- | --- |
| `Ok` | `Erc1271ValidationResult.Ok` |  |
| `BadSignatureLength` | `Erc1271ValidationResult.BadSignatureLength` |  |
| `InvalidEcdsaSignature` | `Erc1271ValidationResult.InvalidEcdsaSignature` |  |
| `InvalidShrincsSignature` | `Erc1271ValidationResult.InvalidShrincsSignature` |  |
| `MalformedErc1271Payload` | `Erc1271ValidationResult.MalformedErc1271Payload` |  |

#### `PaymasterValidationFailure`

| Name | Type | Description |
| --- | --- | --- |
| `MalformedPayload` | `PaymasterValidationFailure.MalformedPayload` |  |
| `StaleStatefulLeaf` | `PaymasterValidationFailure.StaleStatefulLeaf` |  |
| `InvalidSignature` | `PaymasterValidationFailure.InvalidSignature` |  |
| `StatefulBudgetExhausted` | `PaymasterValidationFailure.StatefulBudgetExhausted` |  |

#### `UserOpValidationFailure`

| Name | Type | Description |
| --- | --- | --- |
| `BadSignatureLength` | `UserOpValidationFailure.BadSignatureLength` |  |
| `StaleStatefulLeaf` | `UserOpValidationFailure.StaleStatefulLeaf` |  |
| `StatefulBudgetExhausted` | `UserOpValidationFailure.StatefulBudgetExhausted` |  |
| `InvalidSignature` | `UserOpValidationFailure.InvalidSignature` |  |
| `InvalidEcdsaSignature` | `UserOpValidationFailure.InvalidEcdsaSignature` |  |
| `MalformedSignature` | `UserOpValidationFailure.MalformedSignature` |  |

### Namespaces

#### `ShrincsCodec`

| Name | Type | Description |
| --- | --- | --- |
| `DOMAIN_TAG` | `` `0x${string}` `` |  |
| `PAYMASTER_DOMAIN_TAG` | `` `0x${string}` `` |  |
| `ACTION_ERC4337_EXECUTE` | `` `0x${string}` `` |  |
| `ACTION_EXECUTE` | `` `0x${string}` `` |  |
| `ACTION_WITHDRAW` | `` `0x${string}` `` |  |
| `ACTION_UPGRADE` | `` `0x${string}` `` |  |
| `ACTION_TRANSFER_OWNERSHIP` | `` `0x${string}` `` |  |
| `ACTION_SET_ERC1271_KEY` | `` `0x${string}` `` |  |
| `ACTION_ROTATE_KEY` | `` `0x${string}` `` |  |
| `ACTION_MARK_LEAVES_USED` | `` `0x${string}` `` |  |
| `ACTION_ERC1271` | `` `0x${string}` `` |  |
| `ACTION_PAYMASTER_APPROVE` | `` `0x${string}` `` |  |
| `ROTATION_DOMAIN_RECOVER_WALLET` | `` `0x${string}` `` |  |
| `ROTATION_DOMAIN_TRANSFER_OWNERSHIP` | `` `0x${string}` `` |  |
| `dataHash` | `(data: Hex) => Hex` |  |
| `domainSeparator` | `(chainId: bigint \| number, contractAddress: Address, domainTag?: Hex) => Hex` |  |
| `rotationDomainSeparator` | `(base: Hex, tag: Hex) => Hex` |  |
| `SHRINCS_PROFILE_NAME` | `"shrincs-256s-keccak"` |  |
| `publicKeyCommitment` | `(parts: { statefulPublicKey: Hex; pkSeed: Hex; hypertreeRoot: Hex; }) => Hex` |  |
| `OP_VERIFY_STATEFUL` | `` `0x${string}` `` |  |
| `OP_VERIFY_STATELESS` | `` `0x${string}` `` |  |
| `OP_ROTATE_FULL` | `` `0x${string}` `` |  |
| `statefulActionMessageHash` | `(expectedPublicKeyCommitment: Hex, context: ActionContext) => Hex` |  |
| `statelessActionMessageHash` | `(expectedPublicKeyCommitment: Hex, context: ActionContext) => Hex` |  |
| `statefulRawMessageHash` | `(expectedPublicKeyCommitment: Hex, hash: Hex) => Hex` |  |
| `statelessRawMessageHash` | `(expectedPublicKeyCommitment: Hex, hash: Hex) => Hex` |  |
| `fullRotationMessageHash` | `(expectedPublicKeyCommitment: Hex, currentPublicKey: ShrincsPublicKey, context: RotationContext, nextKey: RotationTarget) => Hex` |  |
| `erc4337PayloadHash` | `(userOpHash: Hex) => Hex` |  |
| `executePayloadHash` | `(target: Address, value: bigint, dataKeccak: Hex, maxFee: bigint) => Hex` |  |
| `withdrawPayloadHash` | `(to: Address, amount: bigint) => Hex` |  |
| `upgradePayloadHash` | `(newImplementation: Address, shouldMigrate: boolean, migratorHash: Hex) => Hex` |  |
| `transferOwnershipPayloadHash` | `(newOwner: Address, nextCommitment: Hex) => Hex` |  |
| `setErc1271KeyPayloadHash` | `(newCommitment: Hex, newHashSuite?: number) => Hex` |  |
| `rotateKeyPayloadHash` | `(nextCommitment: Hex) => Hex` |  |
| `leavesHash` | `(leaves: readonly number[]) => Hex` |  |
| `markLeavesUsedPayloadHash` | `(leavesHashValue: Hex) => Hex` |  |
| `buildActionContext` | `(params: { domainSeparator: Hex; nonce: bigint; keyVersion: bigint; actionType: Hex; payloadHash: Hex; }) => ActionContext` |  |
| `buildOwnershipAcceptanceContext` | `(params: { domainSeparator: Hex; newOwner: Address; nextCommitment: Hex; }) => ActionContext` |  |
| `buildRotationContext` | `(params: { domainSeparator: Hex; nonce: bigint; keyVersion: bigint; }) => RotationContext` |  |
| `publicKeyToAbi` | `` (pk: ShrincsPublicKey) => { statefulPublicKey: `0x${string}`; publicKeyCommitment: `0x${string}`; pkSeed: `0x${string}`; hypertreeRoot: `0x${string}`; } `` |  |
| `encodeInitPayload` | `(params: { mainBundle: ShrincsPublicKey; erc1271Bundle: ShrincsPublicKey; hashSuite?: number; erc1271HashSuite?: number; }) => Hex` |  |
| `decodeInitPayload` | `(payload: Hex) => { mainBundle: ShrincsPublicKey; erc1271Bundle: ShrincsPublicKey; }` |  |
| `encodeUserOpSignature` | `(publicKey: ShrincsPublicKey, signature: StatefulSignature, ecdsaSig: Hex) => Hex` |  |
| `decodeUserOpSignature` | `(blob: Hex) => { publicKey: ShrincsPublicKey; signature: StatefulSignature; ecdsaSig: Hex; }` |  |
| `encodeSponsorshipSignature` | `(publicKey: ShrincsPublicKey, signature: StatefulSignature) => Hex` |  |
| `decodeSponsorshipSignature` | `(blob: Hex) => { publicKey: ShrincsPublicKey; signature: StatefulSignature; }` |  |
| `encodePublicKeyBundle` | `(publicKey: ShrincsPublicKey) => Hex` |  |
| `probeDigest` | `(newImplementation: Address) => Hex` |  |
| `encodeProbeVector` | `(params: { bundle: ShrincsPublicKey; statefulSig: StatefulSignature; statelessSig: StatelessSignature; }) => Hex` |  |
| `encodeUpgradeData` | `(params: { publicKey: ShrincsPublicKey; signature: StatefulSignature; shouldMigrate: boolean; migratorPayload: Hex; nonce: bigint; probePayload: Hex; }) => Hex` |  |
| `encodeErc1271Signature` | `(params: { publicKey: ShrincsPublicKey; signature: StatelessSignature; ecdsaSig: Hex; }) => Hex` |  |
| `statefulTreeId` | `(statefulPublicKey: Hex) => Hex` |  |
| `statefulMaxSignatures` | `(statefulPublicKey: Hex) => number` |  |
| `statelessTreeId` | `(pkSeed: Hex, hypertreeRoot: Hex) => Hex` |  |
| `buildStatefulRotationTarget` | `(params: { nextStatefulPublicKey: Hex; currentPkSeed: Hex; currentHypertreeRoot: Hex; }) => StatefulRotationTarget` |  |
| `toRotationTarget` | `(pk: ShrincsPublicKey) => RotationTarget` |  |
| `abiTuples` | `{ publicKey: AbiParameter; statefulSignature: AbiParameter; statelessSignature: AbiParameter; }` |  |

### Error classes

| Error | Constructor |
| --- | --- |
| `AccountChangedError` | `constructor(expectedAccount: string, availableAccounts: readonly string[], opts?: QuipErrorOptions)` |
| `AlreadyInitializedError` | `constructor(opts?: QuipErrorOptions)` |
| `AuthLeafInTargetsError` | `constructor(leaf: number, opts?: QuipErrorOptions)` |
| `BalanceTooLowError` | `constructor(required: bigint, available: bigint, opts?: QuipErrorOptions)` |
| `ChainChangedError` | `constructor(expectedChainId: number, actualChainId: number, opts?: QuipErrorOptions)` |
| `ClassicalTransferOwnershipDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `ClassicalWithdrawDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `CommitmentMismatchError` | `constructor(suppliedCommitment?: Hex, onChainCommitment?: Hex, opts?: QuipErrorOptions)` |
| `DelegateExecuteDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `EmptyLeavesError` | `constructor(opts?: QuipErrorOptions)` |
| `ExecuteFeeExceedsCapError` | `constructor(fee?: bigint, maxFee?: bigint, opts?: QuipErrorOptions)` |
| `ExecuteTargetHasNoCodeError` | `constructor(target: Address, opts?: QuipErrorOptions)` |
| `GasEstimationError` | `constructor(message: string, opts?: QuipErrorOptions)` |
| `GuardedSlotTamperedError` | `constructor(slotIndex: number, opts?: QuipErrorOptions)` |
| `IdentityMismatchError` | `constructor(opts?: QuipErrorOptions)` |
| `ImplementationDeprecatedError` | `constructor(opts?: QuipErrorOptions)` |
| `ImplementationNotVettedError` | `constructor(opts?: QuipErrorOptions)` |
| `InsufficientWalletBalanceError` | `constructor(required: bigint, available: bigint, opts?: QuipErrorOptions)` |
| `InvalidEntryPointError` | `constructor(opts?: QuipErrorOptions)` |
| `InvalidFactoryError` | `constructor(opts?: QuipErrorOptions)` |
| `InvalidKeyAcceptanceError` | `constructor(reason?: string, opts?: QuipErrorOptions)` |
| `InvalidOwnerAcceptanceError` | `constructor(reason?: string, opts?: QuipErrorOptions)` |
| `InvalidSignatureError` | `constructor(opts?: QuipErrorOptions)` |
| `InvalidSponsorshipWindowError` | `constructor(validUntil: number, validAfter: number, reason: string, opts?: QuipErrorOptions)` |
| `LeafBitmapReadError` | `constructor(wordIndex: number, opts?: QuipErrorOptions)` |
| `LeafOutOfRangeError` | `constructor(leaf: number, maxSignatures?: number, opts?: QuipErrorOptions)` |
| `MalformedCodecPayloadError` | `constructor(expectedMin: bigint, actual: bigint, opts?: QuipErrorOptions)` |
| `NotUpgradingError` | `constructor(opts?: QuipErrorOptions)` |
| `OwnerMismatchError` | `constructor(expected: Address, actual: Address, opts?: QuipErrorOptions)` |
| `OwnershipHandoverDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `RenounceDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `ShrincsHdDerivationError` | `constructor(message: string, opts?: QuipErrorOptions)` |
| `ShrincsInvalidMnemonicError` | `constructor(opts?: QuipErrorOptions)` |
| `ShrincsKeyDerivationSelfTestError` | `constructor(publicKeyCommitment: Hex, opts?: QuipErrorOptions)` |
| `StaleActionNonceError` | `constructor(expected?: bigint, provided?: bigint, opts?: QuipErrorOptions)` |
| `StaleStatefulLeafError` | `constructor(leaf?: number, opts?: QuipErrorOptions)` |
| `StandardExecuteDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `StatefulBudgetExhaustedError` | `constructor(maxSignatures?: number, used?: number, opts?: QuipErrorOptions)` |
| `StatefulTreeSpentError` | `constructor(treeId?: Hex, opts?: QuipErrorOptions)` |
| `StatelessTreeSpentError` | `constructor(treeId?: Hex, opts?: QuipErrorOptions)` |
| `StorageStoreDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `TransactionRevertedError` | `constructor(transactionHash: Hex, opts?: QuipErrorOptions)` |
| `UnauthorizedError` | `constructor(opts?: QuipErrorOptions)` |
| `UnknownContractError` | `constructor(errorName: string \| undefined, args: readonly unknown[] \| undefined, opts?: QuipErrorOptions)` |
| `UnknownWalletVersionError` | `constructor(implementation: Hex, opts?: QuipErrorOptions)` |
| `UnsupportedByWalletVersionError` | `constructor(versionLabel: string, operation: string, opts?: QuipErrorOptions)` |
| `UnsupportedHashSuiteError` | `constructor(opts?: QuipErrorOptions)` |
| `UnsupportedNetworkError` | `constructor(chainId: number, opts?: QuipErrorOptions)` |
| `UpgradeFailedError` | `constructor(opts?: QuipErrorOptions)` |
| `VerifierMismatchError` | `constructor(suppliedCommitment: Hex, onChainCommitment: Hex, opts?: QuipErrorOptions)` |
| `VerifierProfileMismatchError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroAddressFactoryError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroAddressOwnerError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroAddressVerifierError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroErc1271CommitmentError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroMaxSignaturesError` | `constructor(opts?: QuipErrorOptions)` |

### Interfaces

#### `ActionContext`

| Name | Type | Description |
| --- | --- | --- |
| `domainSeparator` | `` `0x${string}` `` |  |
| `nonce` | `` `0x${string}` `` |  |
| `keyVersion` | `` `0x${string}` `` |  |
| `actionType` | `` `0x${string}` `` |  |
| `payloadHash` | `` `0x${string}` `` |  |

#### `BuildUserOpParams`

| Name | Type | Description |
| --- | --- | --- |
| `sender` | `` `0x${string}` `` |  |
| `nonce` | `bigint` |  |
| `callData` | `` `0x${string}` `` |  |
| `initCode?` | `` `0x${string}` \| undefined `` |  |
| `verificationGasLimit?` | `bigint \| undefined` |  |
| `callGasLimit?` | `bigint \| undefined` |  |
| `preVerificationGas?` | `bigint \| undefined` |  |
| `maxFeePerGas` | `bigint` |  |
| `maxPriorityFeePerGas` | `bigint` |  |
| `paymasterAndData?` | `` `0x${string}` \| undefined `` |  |

#### `ContractCallParams`

| Name | Type | Description |
| --- | --- | --- |
| `address` | `` `0x${string}` `` |  |
| `abi` | `readonly unknown[]` |  |
| `functionName` | `string` |  |
| `args?` | `readonly unknown[] \| undefined` |  |
| `value?` | `bigint \| undefined` |  |
| `account` | `` `0x${string}` \| Account `` |  |
| `stateOverride?` | `StateOverride \| undefined` |  |

#### `CostEstimate`

| Name | Type | Description |
| --- | --- | --- |
| `gasUnits` | `bigint` |  |
| `gasPrice` | `bigint` |  |
| `expectedGasUnits` | `bigint` |  |
| `expectedGasPrice` | `bigint` |  |

#### `CreateShrincsWalletParams`

| Name | Type | Description |
| --- | --- | --- |
| `signer` | `ShrincsSigner` |  |
| `maxSignatures` | `number` |  |
| `derivationIndex` | `number` |  |
| `erc1271` | `Erc1271KeySpec` |  |

#### `CreationCostEstimate`

| Name | Type | Description |
| --- | --- | --- |
| `creationFee` | `bigint` |  |
| `gasUnits` | `bigint` |  |
| `gasPrice` | `bigint` |  |
| `expectedGasUnits` | `bigint` |  |
| `expectedGasPrice` | `bigint` |  |

#### `DeriveKeyPairParams`

| Name | Type | Description |
| --- | --- | --- |
| `statefulIndex` | `number` |  |
| `statelessIndex` | `number` |  |
| `maxSignatures` | `number` |  |
| `statefulPath?` | `QuipHdPathOptions \| undefined` |  |
| `statelessPath?` | `QuipHdPathOptions \| undefined` |  |

#### `Erc1271KeySetEvent`

| Name | Type | Description |
| --- | --- | --- |
| `oldCommitment` | `` `0x${string}` `` |  |
| `newCommitment` | `` `0x${string}` `` |  |

#### `ExecuteCostEstimate`

| Name | Type | Description |
| --- | --- | --- |
| `executeFee` | `bigint` |  |
| `gasUnits` | `bigint` |  |
| `gasPrice` | `bigint` |  |
| `expectedGasUnits` | `bigint` |  |
| `expectedGasPrice` | `bigint` |  |

#### `ExecuteParams`

| Name | Type | Description |
| --- | --- | --- |
| `target` | `` `0x${string}` `` |  |
| `value?` | `bigint \| undefined` |  |
| `data?` | `` `0x${string}` \| undefined `` |  |
| `maxFee?` | `bigint \| undefined` |  |
| `fundFrom?` | `ExecuteFundingSource \| undefined` |  |

#### `ExecutionSucceededEvent`

| Name | Type | Description |
| --- | --- | --- |
| `target` | `` `0x${string}` `` |  |
| `value` | `bigint` |  |
| `dataHash` | `` `0x${string}` `` |  |

#### `FeeOverrides`

| Name | Type | Description |
| --- | --- | --- |
| `maxFeePerGas?` | `bigint \| undefined` |  |
| `maxPriorityFeePerGas?` | `bigint \| undefined` |  |
| `gasPrice?` | `bigint \| undefined` |  |

#### `ForsEntry`

| Name | Type | Description |
| --- | --- | --- |
| `secretLeaf` | `` `0x${string}` `` |  |
| `authPath` | `` `0x${string}`[] `` |  |

#### `ForsSignature`

| Name | Type | Description |
| --- | --- | --- |
| `randomizer` | `` `0x${string}` `` |  |
| `counter` | `number` |  |
| `entries` | `ForsEntry[]` |  |

#### `GetShrincsWalletParams`

| Name | Type | Description |
| --- | --- | --- |
| `derivationIndex` | `number` |  |
| `erc1271` | `Erc1271KeySpec` |  |
| `owner` | `` `0x${string}` `` |  |
| `signer` | `ShrincsSigner` |  |
| `maxSignatures` | `number` |  |

#### `HdNode`

| Name | Type | Description |
| --- | --- | --- |
| `key` | `Uint8Array<ArrayBufferLike>` |  |
| `chainCode` | `Uint8Array<ArrayBufferLike>` |  |

#### `HypertreeLayerSignature`

| Name | Type | Description |
| --- | --- | --- |
| `wotsCPkHash` | `` `0x${string}` `` |  |
| `wotsCSignature` | `WotsCSignature` |  |
| `authPath` | `` `0x${string}`[] `` |  |

#### `KeyRotatedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `previousCommitment` | `` `0x${string}` `` |  |
| `nextCommitment` | `` `0x${string}` `` |  |
| `keyVersion` | `bigint` |  |

#### `LeafConsumedOnlyEvent`

| Name | Type | Description |
| --- | --- | --- |
| `leaf` | `number` |  |

#### `LeafRevocationSkippedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `leaf` | `number` |  |
| `keyVersion` | `bigint` |  |

#### `LeafRevokedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `leaf` | `number` |  |
| `keyVersion` | `bigint` |  |

#### `OwnershipAcceptance`

| Name | Type | Description |
| --- | --- | --- |
| `nextKey` | `ShrincsPublicKey` |  |
| `newOwner` | `` `0x${string}` `` |  |
| `keyAcceptance` | `StatefulSignature` |  |
| `ownerAcceptance` | `` `0x${string}` `` |  |

#### `PackedUserOperation`

| Name | Type | Description |
| --- | --- | --- |
| `sender` | `` `0x${string}` `` |  |
| `nonce` | `bigint` |  |
| `initCode` | `` `0x${string}` `` |  |
| `callData` | `` `0x${string}` `` |  |
| `accountGasLimits` | `` `0x${string}` `` |  |
| `preVerificationGas` | `bigint` |  |
| `gasFees` | `` `0x${string}` `` |  |
| `paymasterAndData` | `` `0x${string}` `` |  |
| `signature` | `` `0x${string}` `` |  |

#### `PaymasterInitializedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `owner` | `` `0x${string}` `` |  |

#### `PaymasterValidationRejectedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `wallet` | `` `0x${string}` `` |  |
| `reason` | `PaymasterValidationFailure` |  |

#### `PreparedExecute`

| Name | Type | Description |
| --- | --- | --- |
| `leaf` | `number` |  |
| `maxFee` | `bigint` |  |
| `executeFee` | `bigint` |  |
| `totalValue` | `bigint` |  |
| `estimate` | `ExecuteCostEstimate` |  |
| `send` | `() => Promise<TransactionReceipt>` |  |

#### `PreparedTx`

| Name | Type | Description |
| --- | --- | --- |
| `gas` | `bigint` |  |
| `fees` | `FeeOverrides` |  |
| `nonce?` | `number \| undefined` |  |

#### `PrepareTxParams`

| Name | Type | Description |
| --- | --- | --- |
| `publicClient` | `PublicClient` |  |
| `contractParams` | `ContractCallParams` |  |
| `totalValue` | `bigint` |  |
| `opts?` | `TxOptions \| undefined` |  |

#### `QuipErrorOptions`

| Name | Type | Description |
| --- | --- | --- |
| `cause?` | `unknown` |  |
| `selector?` | `` `0x${string}` \| undefined `` |  |
| `data?` | `` `0x${string}` \| undefined `` |  |

#### `QuipHdPathOptions`

| Name | Type | Description |
| --- | --- | --- |
| `algorithm?` | `number \| undefined` |  |
| `network?` | `number \| undefined` |  |
| `account?` | `number \| undefined` |  |

#### `RotationContext`

| Name | Type | Description |
| --- | --- | --- |
| `domainSeparator` | `` `0x${string}` `` |  |
| `nonce` | `` `0x${string}` `` |  |
| `keyVersion` | `` `0x${string}` `` |  |

#### `RotationTarget`

| Name | Type | Description |
| --- | --- | --- |
| `statefulPublicKey` | `` `0x${string}` `` |  |
| `publicKeyCommitment` | `` `0x${string}` `` |  |
| `pkSeed` | `` `0x${string}` `` |  |
| `hypertreeRoot` | `` `0x${string}` `` |  |

#### `ShrincsCall`

| Name | Type | Description |
| --- | --- | --- |
| `target` | `` `0x${string}` `` |  |
| `value?` | `bigint \| undefined` |  |
| `data?` | `` `0x${string}` \| undefined `` |  |

#### `ShrincsFactoryClientParams`

| Name | Type | Description |
| --- | --- | --- |
| `publicClient` | `PublicClient` |  |
| `walletClient` | `WalletClient` |  |
| `account` | `` `0x${string}` `` |  |
| `chainId` | `number` |  |
| `factoryAddress?` | `` `0x${string}` \| undefined `` |  |
| `walletImplementation?` | `` `0x${string}` \| undefined `` |  |

#### `ShrincsKeygenOptions`

| Name | Type | Description |
| --- | --- | --- |
| `maxSignatures` | `number` |  |

#### `ShrincsNetworkAddresses`

| Name | Type | Description |
| --- | --- | --- |
| `EntryPoint` | `` `0x${string}` `` |  |
| `ShrincsWalletImplementation` | `` `0x${string}` `` |  |
| `ShrincsPaymaster` | `` `0x${string}` `` |  |
| `ShrincsPaymasterImpl` | `` `0x${string}` `` |  |
| `ShrincsVerifier` | `` `0x${string}` `` |  |

#### `ShrincsPaymasterClientParams`

| Name | Type | Description |
| --- | --- | --- |
| `paymasterAddress` | `` `0x${string}` `` |  |
| `publicClient` | `PublicClient` |  |
| `walletClient` | `WalletClient` |  |
| `signer` | `ShrincsSigner` |  |
| `commitment` | `` `0x${string}` `` |  |
| `derivationIndex?` | `number \| undefined` |  |
| `chainId` | `number` |  |
| `account` | `` `0x${string}` `` |  |
| `keypair?` | `ShrincsKeyPair \| undefined` |  |

#### `ShrincsPublicKey`

| Name | Type | Description |
| --- | --- | --- |
| `statefulPublicKey` | `` `0x${string}` `` |  |
| `publicKeyCommitment` | `` `0x${string}` `` |  |
| `pkSeed` | `` `0x${string}` `` |  |
| `hypertreeRoot` | `` `0x${string}` `` |  |

#### `ShrincsTxKeyOptions`

| Name | Type | Description |
| --- | --- | --- |
| `leaf?` | `number \| undefined` |  |

#### `ShrincsVerifierSetEvent`

| Name | Type | Description |
| --- | --- | --- |
| `previousCommitment` | `` `0x${string}` `` |  |
| `newCommitment` | `` `0x${string}` `` |  |
| `hashSuite` | `number` |  |
| `maxSignatures` | `number` |  |
| `keyVersion` | `bigint` |  |

#### `ShrincsVerifierState`

| Name | Type | Description |
| --- | --- | --- |
| `commitment` | `` `0x${string}` `` |  |
| `hashSuite` | `number` |  |
| `keyVersion` | `bigint` |  |
| `maxSignatures` | `number` |  |
| `statefulLeavesUsed` | `number` |  |

#### `ShrincsWalletClientParams`

| Name | Type | Description |
| --- | --- | --- |
| `walletAddress` | `` `0x${string}` `` |  |
| `publicClient` | `PublicClient` |  |
| `walletClient` | `WalletClient` |  |
| `signer?` | `ShrincsSigner \| undefined` |  |
| `keypair?` | `ShrincsKeyPair \| undefined` |  |
| `commitment` | `` `0x${string}` `` |  |
| `derivationIndex?` | `number \| undefined` |  |
| `chainId` | `number` |  |
| `account` | `` `0x${string}` `` |  |

#### `ShrincsWalletState`

| Name | Type | Description |
| --- | --- | --- |
| `owner` | `` `0x${string}` `` |  |
| `version` | `bigint` |  |
| `executeFee` | `bigint` |  |
| `shrincsPublicKeyCommitment` | `` `0x${string}` `` |  |
| `erc1271PublicKeyCommitment` | `` `0x${string}` `` |  |
| `hashSuite` | `number` |  |
| `erc1271HashSuite` | `number` |  |
| `keyVersion` | `bigint` |  |
| `actionNonce` | `bigint` |  |
| `maxSignatures` | `number` |  |
| `statefulLeavesUsed` | `number` |  |
| `remainingStatefulSignatures` | `number` |  |

#### `SignedWalletUserOp`

| Name | Type | Description |
| --- | --- | --- |
| `signature` | `` `0x${string}` `` |  |
| `userOpHash` | `` `0x${string}` `` |  |

#### `SignPaymasterUserOpParams`

| Name | Type | Description |
| --- | --- | --- |
| `keypair` | `ShrincsKeyPair` |  |
| `userOp` | `PackedUserOperation` |  |
| `paymaster` | `` `0x${string}` `` |  |
| `chainId` | `bigint` |  |
| `keyVersion` | `bigint` |  |
| `verificationGasLimit?` | `bigint \| undefined` |  |
| `postOpGasLimit?` | `bigint \| undefined` |  |
| `validUntil?` | `number \| undefined` |  |
| `validAfter?` | `number \| undefined` |  |
| `validitySeconds?` | `number \| undefined` |  |
| `now?` | `number \| undefined` |  |
| `leaf` | `number` |  |

#### `SignWalletUserOpParams`

| Name | Type | Description |
| --- | --- | --- |
| `keypair` | `ShrincsKeyPair` |  |
| `userOp` | `PackedUserOperation` |  |
| `entryPoint` | `` `0x${string}` `` |  |
| `chainId` | `bigint` |  |
| `wallet` | `` `0x${string}` `` |  |
| `keyVersion` | `bigint` |  |
| `leaf` | `number` |  |
| `actionNonce` | `bigint` |  |
| `ownerEcdsaSig` | `` `0x${string}` `` |  |

#### `SponsorshipVerifiedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `wallet` | `` `0x${string}` `` |  |
| `leaf` | `number` |  |
| `keyVersion` | `bigint` |  |

#### `StatefulRotationTarget`

| Name | Type | Description |
| --- | --- | --- |
| `statefulPublicKey` | `` `0x${string}` `` |  |
| `publicKeyCommitment` | `` `0x${string}` `` |  |

#### `StatefulSignature`

| Name | Type | Description |
| --- | --- | --- |
| `randomizer` | `` `0x${string}` `` |  |
| `counter` | `number` |  |
| `chains` | `` `0x${string}`[] `` |  |
| `authPath` | `` `0x${string}`[] `` |  |

#### `StatefulSignatureVerifiedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `leaf` | `number` |  |
| `keyVersion` | `bigint` |  |

#### `StatelessSignature`

| Name | Type | Description |
| --- | --- | --- |
| `fors` | `ForsSignature` |  |
| `hypertree` | `HypertreeLayerSignature[]` |  |

#### `TxOptions`

| Name | Type | Description |
| --- | --- | --- |
| `gas?` | `bigint \| undefined` |  |
| `gasMultiplier?` | `number \| undefined` |  |
| `maxFeePerGas?` | `bigint \| undefined` |  |
| `maxPriorityFeePerGas?` | `bigint \| undefined` |  |
| `gasPrice?` | `bigint \| undefined` |  |
| `nonce?` | `number \| undefined` |  |
| `skipPreflightChecks?` | `boolean \| undefined` |  |

#### `UserOpEnvelope`

| Name | Type | Description |
| --- | --- | --- |
| `nonce` | `bigint` |  |
| `maxFeePerGas` | `bigint` |  |
| `maxPriorityFeePerGas` | `bigint` |  |
| `verificationGasLimit?` | `bigint \| undefined` |  |
| `callGasLimit?` | `bigint \| undefined` |  |
| `preVerificationGas?` | `bigint \| undefined` |  |
| `initCode?` | `` `0x${string}` \| undefined `` |  |
| `paymasterAndData?` | `` `0x${string}` \| undefined `` |  |

#### `UserOpSponsoredEvent`

| Name | Type | Description |
| --- | --- | --- |
| `wallet` | `` `0x${string}` `` |  |
| `mode` | `number` |  |
| `actualGasCost` | `bigint` |  |
| `actualUserOpFeePerGas` | `bigint` |  |

#### `UserOpValidationRejectedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `reason` | `UserOpValidationFailure` |  |

#### `WalletInitializedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `factory` | `` `0x${string}` `` |  |
| `owner` | `` `0x${string}` `` |  |
| `shrincsPublicKeyCommitment` | `` `0x${string}` `` |  |
| `erc1271PublicKeyCommitment` | `` `0x${string}` `` |  |

#### `WalletMigratedEvent`

| Name | Type | Description |
| --- | --- | --- |
| `shrincsPublicKeyCommitment` | `` `0x${string}` `` |  |
| `keyVersion` | `bigint` |  |

#### `WalletVersionDescriptor`

| Name | Type | Description |
| --- | --- | --- |
| `id` | `WalletVersionId` |  |
| `label` | `string` |  |
| `abi` | `Abi` |  |
| `implementations` | `` readonly `0x${string}`[] `` |  |
| `quirks` | `WalletVersionQuirks` |  |

#### `WalletVersionQuirks`

| Name | Type | Description |
| --- | --- | --- |
| `erc1271CommitmentGetter` | `"getErc1271Commitment" \| "getErc1271PublicKeyCommitment"` |  |
| `erc1271KeyArgument` | `"bytes32Commitment" \| "publicKeyBundle"` |  |
| `hasStatefulLeafBitmapWord` | `boolean` |  |
| `enforcesSpentTreeFreshnessOnMigrate` | `boolean` |  |
| `handoverAcceptance` | `"hybrid" \| "none"` |  |

#### `WotsCSignature`

| Name | Type | Description |
| --- | --- | --- |
| `randomizer` | `` `0x${string}` `` |  |
| `counter` | `number` |  |
| `chains` | `` `0x${string}`[] `` |  |

### Type aliases

#### `Erc1271KeySpec`

```ts
type Erc1271KeySpec = {
    derivationIndex: number;
    maxSignatures?: number;
} | {
    publicKey: ShrincsPublicKey;
};
```

#### `EstimateCreationCostParams`

```ts
type EstimateCreationCostParams = CreateShrincsWalletParams;
```

#### `ExecuteFundingSource`

```ts
type ExecuteFundingSource = "sender" | "wallet";
```

#### `LogSource`

```ts
type LogSource = TransactionReceipt | readonly Log[];
```

#### `ShrincsWasmModule`

```ts
type ShrincsWasmModule = typeof import("./profiles/256s-keccak/nodejs/hashsigs_rs.js");
```

#### `WalletVersionId`

```ts
type WalletVersionId = "v1.0.1-beta.2" | "latest";
```

## `@quip.network/ethereum-sdk/v1`

The surface shared across wallet families.

Also exports these, documented above: `DEFAULT_GAS_MULTIPLIER`, `MIN_GAS_MULTIPLIER`, `MAX_GAS_MULTIPLIER`, `applyGasMultiplier`, `resolveGasMultiplier`, `resolveFeeOptions`, `preflightBalanceCheck`, `TxOptions`, `FeeOverrides`, `PreparedTx`, `ContractCallParams`, `PrepareTxParams`, `CANONICAL_ENTRYPOINT_V07`, `CHAIN_IDS`, `QuipErrorOptions`, `QuipError`, `UnsupportedNetworkError`, `ChainChangedError`, `AccountChangedError`, `GasEstimationError`, `BalanceTooLowError`, `computeUserOpHash`, `PackedUserOperation`.

### Functions

| Name | Type | Description |
| --- | --- | --- |
| `getNetworkAddresses` | `(chainId?: number) => WotsNetworkAddresses` | Get contract addresses for a specific network by chain ID. Parameter chainId - The chain ID of the network (e.g., 777 for MIDL testnet) Returns: WotsNetworkAddresses for the specified chain |
| `isMidlNetwork` | `(chainId: number) => boolean` | Check if a chain ID represents the MIDL network |
| `getVaultAddress` | `(commitment: Hex, chainId?: number) => Address` | Compute the deterministic CREATE3 address of a Quip Vault. The address depends only on (factory, commitment). Parameter commitment - The identity (used as CREATE3 salt) Parameter chainId - Optional chain ID for network-specific factory resolution Returns: The address where the vault contract would be deployed |
| `computeVaultAddress` | `(factoryAddress: Address, commitment: Hex) => Address` | Compute a CREATE3 vault address with an explicit factory address. Parameter factoryAddress - The WalletFactory contract address Parameter commitment - The identity (used as CREATE3 salt) Returns: The address where the vault contract would be deployed |
| `computeCreate3Address` | `(factoryAddress: Address, salt: Hex) => Address` | Compute a Solady CREATE3 address from a factory and a 32-byte salt. The address depends only on (factory, salt), never on the deployed bytecode. Parameter factoryAddress - The factory that runs CREATE3 Parameter salt - The 32-byte CREATE3 salt Returns: The deterministic deployment address |
| `packUint128Pair` | `(hi: bigint, lo: bigint) => Hex` |  |
| `packAccountGasLimits` | `(verificationGasLimit: bigint, callGasLimit: bigint) => Hex` |  |
| `packGasFees` | `(maxPriorityFeePerGas: bigint, maxFeePerGas: bigint) => Hex` |  |
| `unpackAccountGasLimits` | `(packed: Hex) => { verificationGasLimit: bigint; callGasLimit: bigint; }` |  |
| `unpackGasFees` | `(packed: Hex) => { maxPriorityFeePerGas: bigint; maxFeePerGas: bigint; }` |  |
| `prepareTx` | `(params: PrepareTxParams) => Promise<PreparedTx>` |  |

### Constants

| Name | Type | Description |
| --- | --- | --- |
| `NETWORK_ADDRESSES` | `Record<number \| "default", WotsNetworkAddresses>` | WOTS+-family address registry. Maps chain IDs to the sunset family's contract addresses. Serves the WOTS+ clients under `./deprecated/v1`; the live SHRINCS family resolves through `getShrincsAddresses`. |

### ABIs and long literals

Their literal types run too long to print here.

| Export | Description |
| --- | --- |
| `entryPointV07Abi` |  |
| `walletFactoryAbi` |  |

### Enums

#### `Erc1271ValidationResult`

| Name | Type | Description |
| --- | --- | --- |
| `Ok` | `Erc1271ValidationResult.Ok` |  |
| `BadSignatureLength` | `Erc1271ValidationResult.BadSignatureLength` |  |
| `InvalidEcdsaSignature` | `Erc1271ValidationResult.InvalidEcdsaSignature` |  |
| `UnknownVerifier` | `Erc1271ValidationResult.UnknownVerifier` |  |
| `InvalidPqSignature` | `Erc1271ValidationResult.InvalidPqSignature` |  |

#### `PaymasterValidationFailure`

| Name | Type | Description |
| --- | --- | --- |
| `MalformedPayload` | `PaymasterValidationFailure.MalformedPayload` |  |
| `ZeroNextVerifier` | `PaymasterValidationFailure.ZeroNextVerifier` |  |
| `NoVerifierRegistered` | `PaymasterValidationFailure.NoVerifierRegistered` |  |
| `NextEqualsCurrent` | `PaymasterValidationFailure.NextEqualsCurrent` |  |
| `NextVerifierKeyInUse` | `PaymasterValidationFailure.NextVerifierKeyInUse` |  |
| `InvalidSignature` | `PaymasterValidationFailure.InvalidSignature` |  |

#### `UserOpValidationFailure`

| Name | Type | Description |
| --- | --- | --- |
| `ZeroNextKey` | `UserOpValidationFailure.ZeroNextKey` |  |
| `StaleCurrentKey` | `UserOpValidationFailure.StaleCurrentKey` |  |
| `NextKeyAlreadyInUse` | `UserOpValidationFailure.NextKeyAlreadyInUse` |  |
| `InvalidSignature` | `UserOpValidationFailure.InvalidSignature` |  |

### Error classes

| Error | Constructor |
| --- | --- |
| `AlreadyVettedError` | `constructor(opts?: QuipErrorOptions)` |
| `ClassicalTransferOwnershipDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `ClassicalWithdrawDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `DuplicateKeyError` | `constructor(opts?: QuipErrorOptions)` |
| `EmptyCodeError` | `constructor(opts?: QuipErrorOptions)` |
| `EmptyKeysError` | `constructor(opts?: QuipErrorOptions)` |
| `FeeExceedsMaxError` | `constructor(fee: bigint, maxFee: bigint, opts?: QuipErrorOptions)` |
| `GuardedSlotTamperedError` | `constructor(slotIndex: number, opts?: QuipErrorOptions)` |
| `GuardedSlotWriteDeniedError` | `constructor(opts?: QuipErrorOptions)` |
| `ImplementationDeprecatedError` | `constructor(opts?: QuipErrorOptions)` |
| `ImplementationNotVettedError` | `constructor(opts?: QuipErrorOptions)` |
| `IncorrectRecoveryKeyAmountError` | `constructor(opts?: QuipErrorOptions)` |
| `IncorrectTransactionKeyAmountError` | `constructor(opts?: QuipErrorOptions)` |
| `IncorrectVerificationKeyAmountError` | `constructor(opts?: QuipErrorOptions)` |
| `InsufficientBalanceError` | `constructor(requested: bigint, available: bigint, opts?: QuipErrorOptions)` |
| `InsufficientCreationFeeError` | `constructor(sent: bigint, required: bigint, opts?: QuipErrorOptions)` |
| `InvalidEntryPointError` | `constructor(opts?: QuipErrorOptions)` |
| `InvalidFactoryError` | `constructor(opts?: QuipErrorOptions)` |
| `InvalidSignatureError` | `constructor(opts?: QuipErrorOptions)` |
| `InvalidSigningKeysetError` | `constructor(opts?: QuipErrorOptions)` |
| `KeyAdditionFailedError` | `constructor(opts?: QuipErrorOptions)` |
| `KeyInUseError` | `constructor(opts?: QuipErrorOptions)` |
| `KeyRemovalFailedError` | `constructor(opts?: QuipErrorOptions)` |
| `MalformedCodecPayloadError` | `constructor(expected: bigint, actual: bigint, opts?: QuipErrorOptions)` |
| `MalformedPayloadError` | `constructor(opts?: QuipErrorOptions)` |
| `NoActiveImplementationError` | `constructor(opts?: QuipErrorOptions)` |
| `NotDeprecatedError` | `constructor(opts?: QuipErrorOptions)` |
| `NotUpgradingError` | `constructor(opts?: QuipErrorOptions)` |
| `NoVaultFoundError` | `constructor(vaultId: Hex, opts?: QuipErrorOptions)` |
| `OnlyWalletError` | `constructor(opts?: QuipErrorOptions)` |
| `OwnershipHandoverDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `OwnerStateMismatchError` | `constructor(opts?: QuipErrorOptions)` |
| `PqVerifierNotRegisteredError` | `constructor(opts?: QuipErrorOptions)` |
| `RegistryDesyncError` | `constructor(opts?: QuipErrorOptions)` |
| `RenounceDisabledError` | `constructor(opts?: QuipErrorOptions)` |
| `SameKeyError` | `constructor(opts?: QuipErrorOptions)` |
| `SameOwnerError` | `constructor(opts?: QuipErrorOptions)` |
| `UnknownContractError` | `constructor(errorName: string \| undefined, args: readonly unknown[] \| undefined, opts?: QuipErrorOptions)` |
| `UnknownDisasterRecoveryKeyError` | `constructor(opts?: QuipErrorOptions)` |
| `UnknownKeyError` | `constructor(opts?: QuipErrorOptions)` |
| `UnknownOwnershipKeyError` | `constructor(opts?: QuipErrorOptions)` |
| `VerifierKeyInUseError` | `constructor(opts?: QuipErrorOptions)` |
| `VerifierMismatchError` | `constructor(sender: Hex, suppliedVerifier: { publicSeed: Hex; publicKeyHash: Hex; }, onChainVerifier: { publicSeed: Hex; publicKeyHash: Hex; }, opts?: QuipErrorOptions)` |
| `WalletAlreadyExistsError` | `constructor(vaultId: Hex, opts?: QuipErrorOptions)` |
| `ZeroAddressFactoryError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroAddressOwnerError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroCommitmentError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroMaxFeeError` | `constructor(opts?: QuipErrorOptions)` |
| `ZeroValuePqVerifierKeyError` | `constructor(opts?: QuipErrorOptions)` |

### Interfaces

#### `NetworkAddresses`

Shared, wallet-family-agnostic network addresses. Both the SHRINCS family (through its own `getShrincsAddresses`) and the sunset WOTS+ family rely on the same ERC-4337 EntryPoint; the WalletFactory address is shared across every chain reached by the same operator (CreateX sender-guarded CREATE3).

| Name | Type | Description |
| --- | --- | --- |
| `WalletFactory` | `` `0x${string}` `` |  |
| `EntryPoint` | `` `0x${string}` `` |  |

#### `WotsNetworkAddresses`

WOTS+-family address set. The WOTS+ wallet family (QuipSigner, QuipClient, QuipPaymasterClient, …) moved to `./deprecated/v1`; these fields exist only for that sunset family and are not part of the shared `NetworkAddresses` surface. The live SHRINCS family resolves through `getShrincsAddresses`.

| Name | Type | Description |
| --- | --- | --- |
| `Deployer` | `` `0x${string}` `` |  |
| `WOTSPlus` | `` `0x${string}` `` |  |
| `WOTSPlusImplementation` | `` `0x${string}` `` |  |
| `QuipPaymaster` | `` `0x${string}` `` |  |
| `QuipPaymasterImpl` | `` `0x${string}` `` |  |
| `WalletFactory` | `` `0x${string}` `` |  |
| `EntryPoint` | `` `0x${string}` `` |  |

## `@quip.network/ethereum-sdk/v1/abi`

Also exports these, documented above: `walletFactoryAbi`, `entryPointV07Abi`.

### Constants

| Name | Type | Description |
| --- | --- | --- |
| `deployerAbi` | `readonly [{ readonly type: "function"; readonly name: "deploy"; readonly inputs: readonly [{ readonly name: "bytecode"; readonly type: "bytes"; readonly internalType: "bytes"; }, { readonly name: "salt"; readonly type: "bytes32"; readonly internalType: "bytes32"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "address"; readonly internalType: "address"; }]; readonly stateMutability: "nonpayable"; }, { readonly type: "function"; readonly name: "predictAddress"; readonly inputs: readonly [{ readonly name: "salt"; readonly type: "bytes32"; readonly internalType: "bytes32"; }]; readonly outputs: readonly [{ readonly name: ""; readonly type: "address"; readonly internalType: "address"; }]; readonly stateMutability: "view"; }, { readonly type: "event"; readonly name: "Deploy"; readonly inputs: readonly [{ readonly name: "addr"; readonly type: "address"; readonly indexed: true; readonly internalType: "address"; }]; readonly anonymous: false; }]` |  |

### ABIs and long literals

Their literal types run too long to print here.

| Export | Description |
| --- | --- |
| `quipPaymasterAbi` |  |
| `wotsPlusImplementationAbi` |  |

## `@quip.network/ethereum-sdk/v1/addresses`

Also exports these, documented above: `getNetworkAddresses`, `isMidlNetwork`, `getVaultAddress`, `computeVaultAddress`, `computeCreate3Address`, `NetworkAddresses`, `WotsNetworkAddresses`, `CANONICAL_ENTRYPOINT_V07`, `CHAIN_IDS`, `NETWORK_ADDRESSES`.

## `@quip.network/ethereum-sdk/v1/errors`

Also exports these, documented above: `QuipErrorOptions`, `QuipError`, `ZeroAddressFactoryError`, `ZeroAddressOwnerError`, `InvalidFactoryError`, `InvalidSignatureError`, `RenounceDisabledError`, `ClassicalWithdrawDisabledError`, `ClassicalTransferOwnershipDisabledError`, `OwnershipHandoverDisabledError`, `OnlyWalletError`, `OwnerStateMismatchError`, `SameOwnerError`, `RegistryDesyncError`, `ZeroCommitmentError`, `DuplicateKeyError`, `KeyInUseError`, `SameKeyError`, `UnknownKeyError`, `KeyAdditionFailedError`, `KeyRemovalFailedError`, `EmptyKeysError`, `IncorrectRecoveryKeyAmountError`, `NotUpgradingError`, `IncorrectTransactionKeyAmountError`, `IncorrectVerificationKeyAmountError`, `InvalidSigningKeysetError`, `MalformedPayloadError`, `MalformedCodecPayloadError`, `ImplementationNotVettedError`, `ImplementationDeprecatedError`, `UnknownDisasterRecoveryKeyError`, `UnknownOwnershipKeyError`, `GuardedSlotTamperedError`, `GuardedSlotWriteDeniedError`, `InsufficientBalanceError`, `FeeExceedsMaxError`, `EmptyCodeError`, `AlreadyVettedError`, `NotDeprecatedError`, `NoActiveImplementationError`, `InsufficientCreationFeeError`, `ZeroMaxFeeError`, `InvalidEntryPointError`, `ZeroValuePqVerifierKeyError`, `PqVerifierNotRegisteredError`, `VerifierKeyInUseError`, `VerifierMismatchError`, `UserOpValidationFailure`, `PaymasterValidationFailure`, `Erc1271ValidationResult`, `WalletAlreadyExistsError`, `NoVaultFoundError`, `UnsupportedNetworkError`, `ChainChangedError`, `AccountChangedError`, `GasEstimationError`, `BalanceTooLowError`, `UnknownContractError`.

## `@quip.network/ethereum-sdk/v1/gas`

Also exports these, documented above: `applyGasMultiplier`, `resolveGasMultiplier`, `resolveFeeOptions`, `preflightBalanceCheck`, `prepareTx`, `DEFAULT_GAS_MULTIPLIER`, `MIN_GAS_MULTIPLIER`, `MAX_GAS_MULTIPLIER`, `TxOptions`, `FeeOverrides`, `PreparedTx`, `ContractCallParams`, `PrepareTxParams`, `QuipError`.

### Functions

| Name | Type | Description |
| --- | --- | --- |
| `prepareTxCore` | `(params: PrepareTxParams, decode: (err: unknown) => QuipError \| null) => Promise<PreparedTx>` |  |

## `@quip.network/ethereum-sdk/v1/userOpCodec`

Also exports these, documented above: `packUint128Pair`, `packAccountGasLimits`, `packGasFees`, `unpackAccountGasLimits`, `unpackGasFees`, `computeUserOpHash`, `PackedUserOperation`.

## `@quip.network/ethereum-sdk/deprecated/v0`

Deprecated. This module targets the original (pre-v1) QuipWallet/QuipFactory deployments: the single-`pqOwner` model, the two-key recovery payload, and the v0 upgrade payload layout. It is kept solely so existing v0 wallets remain operable. For all new integrations import from `@quip.network/ethereum-sdk/v1` instead.

No tables for this entry point. It exports these:

`CHAIN_IDS`, `DEFAULT_CONFIRMATIONS`, `DEPLOYER_ADDRESS`, `DeployEvent`, `DeployerInterface`, `Deployer`, `ERRORS`, `EVENTS`, `NETWORK_ADDRESSES`, `NetworkAddresses`, `NetworkType`, `QUIP_FACTORY_ADDRESS`, `QuipClient`, `QuipCreatedEvent`, `QuipFactory__factory`, `QuipFactory`, `QuipSigner`, `QuipWalletClient`, `QuipWallet__factory`, `QuipWallet`, `SUPPORTED_NETWORKS`, `WOTSPLUS_GAS_ESTIMATE`, `WOTS_PLUS_ADDRESS`, `WalletProvider`, `WinternitzKeyPair`, `WinternitzPublicKey`, `computeVaultAddress`, `getNetworkAddresses`, `getVaultAddress`, `isMidlNetwork`, `pqTransferEvent`
