import { HexString, TxnBuilderTypes, Types } from "aptos"; import type { SDK } from "../sdk"; import { MomentumSafeCreation } from "../types/creation"; import { Options } from "../utils"; export declare class CreationHelper { /** * CreationHelper is the helper for momentum safe creation process. * Each CreationHelper is used for creation for one momentum safe wallet. * The class can be initialized with to methods: * 1. Directly through constructor. This shall be used when initializing * a new momentum safe. * * ```ts * const ch = CreationHelper.fromUserRequest(owners, threshold, initBalance); * ``` * * 2. By reading momentum safe data from the MOVE resources with the address. * * ```ts * const ch = MomentumSafe.fromPendingCreation(addr); * ``` **/ protected _sdk: SDK; address: HexString; rawPublicKey: TxnBuilderTypes.MultiEd25519PublicKey; owners: HexString[]; ownerPubKeys: HexString[]; threshold: number; creationNonce: bigint; initBalance?: bigint; constructor(sdk: SDK); init(owners: HexString[], ownerPubKeys: HexString[], threshold: number, creationNonce: bigint, initBalance?: bigint): void; fromPendingCreation(addr: HexString): Promise; fromUserRequest(owners: HexString[], threshold: number, initBalance: bigint): Promise; signInitTx(multiOption?: Options): Promise<{ rawTx: Uint8Array; sig: TxnBuilderTypes.Ed25519Signature; }>; estimateInitGas(rawTx: Uint8Array, sig: TxnBuilderTypes.Ed25519Signature): Promise; submitInitTx(rawTx: Uint8Array, sig: TxnBuilderTypes.Ed25519Signature, singleOption?: Options, needInterval?: boolean): Promise<{ hash: string; sender: string; sequence_number: string; max_gas_amount: string; gas_unit_price: string; expiration_timestamp_secs: string; payload: Types.TransactionPayload; signature?: ({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature) | ({ type: string; } & { sender: ({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature); secondary_signer_addresses: string[]; secondary_signers: (({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature))[]; }); }>; initCreation(needInterval?: boolean, multiOption?: Options, singleOption?: Options): Promise<{ hash: string; sender: string; sequence_number: string; max_gas_amount: string; gas_unit_price: string; expiration_timestamp_secs: string; payload: Types.TransactionPayload; signature?: ({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature) | ({ type: string; } & { sender: ({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature); secondary_signer_addresses: string[]; secondary_signers: (({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature))[]; }); }>; collectedSignatures(): Promise[]>; isReadyToSubmit(extraPubKey?: HexString): Promise; getConfirmSig(): Promise; estimateSubmitSigGas(sig: TxnBuilderTypes.Ed25519Signature): Promise; submitSignature(sig?: TxnBuilderTypes.Ed25519Signature, opts?: Options, needInterval?: boolean): Promise; assembleAndSubmitTx(needSelfSignature?: boolean): Promise<{ hash: string; sender: string; sequence_number: string; max_gas_amount: string; gas_unit_price: string; expiration_timestamp_secs: string; payload: Types.TransactionPayload; signature?: ({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature) | ({ type: string; } & { sender: ({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature); secondary_signer_addresses: string[]; secondary_signers: (({ type: string; } & Types.Ed25519Signature) | ({ type: string; } & Types.MultiEd25519Signature))[]; }); }>; private signPendingCreation; private makeSubmitSignatureTxnBuilder; private findPkIndex; private makeInitCreationTxnBuilder; getResourceData(): Promise; }