import { type PublicClient, type Hex } from 'viem'; import { MetaTransaction, MetaTransactionNormalised, TypedDataPayload } from './types'; import type { WalletSigner } from '../types'; export declare const getNormalisedTransactions: (txs: MetaTransaction[]) => MetaTransactionNormalised[]; export declare const digestOfTransactionsAndNonce: (nonce: bigint, normalisedTransactions: MetaTransactionNormalised[]) => Hex; export declare const encodedTransactions: (normalisedTransactions: MetaTransactionNormalised[]) => Hex; /** * This helper function is used to coerce the type to bigint for the * getNonce function above. * @param nonceSpace - An unsigned 256 bit value that can be used to encode a nonce into a distinct space. * @returns The passed in nonceSpace or instead initialises the nonce to 0. */ export declare const coerceNonceSpace: (nonceSpace?: bigint) => bigint; /** * This helper function is used to encode the nonce into a 256 bit value where the space is encoded into * the first 160 bits, and the nonce the remaining 96 bits. * @param nonceSpace - An unsigned 256 bit value that can be used to encode a nonce into a distinct space. * @param nonce - Sequential number starting at 0, and incrementing in single steps e.g. 0,1,2,... * @returns The encoded value where the space is left shifted 96 bits, and the nonce is in the first 96 bits. */ export declare const encodeNonce: (nonceSpace: bigint, nonce: bigint) => bigint; /** * When we retrieve a nonce for a smart contract wallet we can retrieve the nonce in a given 256 bit space. * Nonces in each 256 bit space need to be sequential per wallet address. Nonces across 256 bit spaces per * wallet address do not. This function overload can be used to invoke transactions in parallel per smart * contract wallet if required. */ export declare const getNonce: (rpcProvider: PublicClient, smartContractWalletAddress: string, nonceSpace?: bigint) => Promise; export declare const encodeMessageSubDigest: (chainId: bigint, walletAddress: string, digest: string) => Hex; export declare const signMetaTransactions: (metaTransactions: MetaTransaction[], nonce: bigint, chainId: bigint, walletAddress: string, signer: WalletSigner) => Promise; export declare const packSignatures: (EOASignature: string, EOAAddress: string, relayerSignature: string) => string; export declare const signAndPackTypedData: (typedData: TypedDataPayload, relayerSignature: string, chainId: bigint, walletAddress: string, signer: WalletSigner) => Promise; export declare const signERC191Message: (chainId: bigint, payload: string, signer: WalletSigner, walletAddress: string) => Promise; export declare const getEip155ChainId: (chainId: number) => string;