import type { Address } from 'abitype' import type { Hex } from '../../../core/internal/types/data.js' import type { RpcSignature, Signature, } from '../../../core/internal/types/signature.js' import type { ExactPartial } from '../../../core/internal/types/utils.js' export type Authorization< biginteger = bigint, integer = number, signed extends boolean = false, > = { /** Address of the contract to set as code for the Authority. */ contractAddress: Address /** Chain ID to authorize. */ chainId: integer /** Nonce of the Authority to authorize. */ nonce: biginteger } & (signed extends true ? Signature : ExactPartial) export type RpcAuthorization = { /** Address of the contract to set as code for the Authority. */ address: Address /** Chain ID to authorize. */ chainId: Hex /** Nonce of the Authority to authorize. */ nonce: Hex } & RpcSignature export type AuthorizationList< biginteger = bigint, integer = number, signed extends boolean = false, > = readonly Authorization[] export type RpcAuthorizationList = readonly RpcAuthorization[] export type SignedAuthorization< biginteger = bigint, integer = number, > = Authorization export type SignedAuthorizationList< biginteger = bigint, integer = number, > = readonly SignedAuthorization[] export type SerializedAuthorization = readonly [ chainId: Hex, address: Hex, nonce: Hex, yParity: Hex, r: Hex, s: Hex, ] export type SerializedAuthorizationList = readonly SerializedAuthorization[]