import { ethers } from 'ethers'; import { commons } from "../index.js"; export type SignerLeaf = { address: string; weight: ethers.BigNumberish; signature?: string; }; export type SubdigestLeaf = { subdigest: string; }; export type NestedLeaf = { tree: Topology; weight: ethers.BigNumberish; threshold: ethers.BigNumberish; }; export type NodeLeaf = { nodeHash: string; }; export type Leaf = SignerLeaf | SubdigestLeaf | NestedLeaf | NodeLeaf; export declare function isSignerLeaf(leaf: any): leaf is SignerLeaf; export declare function isSubdigestLeaf(leaf: any): leaf is SubdigestLeaf; export declare function topologyToJSON(tree: Topology): string; export declare function topologyFromJSON(json: string | object): Topology; export declare function isNestedLeaf(leaf: any): leaf is NestedLeaf; export declare function isNodeLeaf(leaf: any): leaf is NodeLeaf; export declare function isLeaf(leaf: any): leaf is Leaf; export type Node = { left: Node | Leaf; right: Node | Leaf; }; export type Topology = Node | Leaf; export declare function isNode(node: any): node is Node; export declare function isTopology(topology: any): topology is Topology; export declare function encodeSignerLeaf(leaf: SignerLeaf): string; export declare function decodeSignerLeaf(encoded: string): SignerLeaf; export declare function isEncodedSignerLeaf(encoded: string): boolean; export declare function hashNode(node: Node | Leaf): string; export declare function leftFace(topology: Topology): Topology[]; export type WalletConfig = commons.config.Config & { threshold: ethers.BigNumberish; checkpoint: ethers.BigNumberish; tree: Topology; }; export declare function isWalletConfig(config: any): config is WalletConfig; export declare function imageHash(config: WalletConfig): string; export type SimpleNestedMember = { threshold: ethers.BigNumberish; weight: ethers.BigNumberish; members: SimpleConfigMember[]; }; export type SimpleConfigMember = SubdigestLeaf | SignerLeaf | SimpleNestedMember; export type SimpleWalletConfig = { threshold: ethers.BigNumberish; checkpoint: ethers.BigNumberish; members: SimpleConfigMember[]; }; export declare function isSimpleNestedMember(member: any): member is SimpleNestedMember; export declare function topologyToMembers(tree: Topology): SimpleConfigMember[]; export declare function hasUnknownNodes(tree: Topology): boolean; export declare function toSimpleWalletConfig(config: WalletConfig): SimpleWalletConfig; export type TopologyBuilder = (members: SimpleConfigMember[]) => Topology; export declare function legacyTopologyBuilder(members: SimpleConfigMember[]): Topology; export declare function merkleTopologyBuilder(members: SimpleConfigMember[]): Topology; export declare function optimized2SignersTopologyBuilder(members: SimpleConfigMember[]): Topology; export declare function toWalletConfig(simpleWalletConfig: SimpleWalletConfig, builder?: TopologyBuilder): WalletConfig; export declare function hasSubdigest(tree: Topology, subdigest: string): boolean; export declare function signersOf(tree: Topology): { address: string; weight: number; }[]; export declare function isComplete(tree: Topology): boolean; export declare const ConfigCoder: commons.config.ConfigCoder;