import type { InferInput } from 'valibot'; import { Argument } from './data/internal.js'; import type { CallArg, Command } from './data/internal.js'; import type { AsyncTransactionThunk, Transaction } from './Transaction.js'; export type TransactionArgument = InferInput | ((tx: Transaction) => InferInput) | AsyncTransactionThunk; export type TransactionInput = CallArg; export declare enum UpgradePolicy { COMPATIBLE = 0, ADDITIVE = 128, DEP_ONLY = 192 } type TransactionShape = { $kind: T; } & { [K in T]: Extract[T]; }; /** * Simple helpers used to construct transactions: */ export declare const Commands: { MoveCall(input: { package: string; module: string; function: string; arguments?: Argument[]; typeArguments?: string[]; } | { target: string; arguments?: Argument[]; typeArguments?: string[]; }): TransactionShape<"MoveCall">; TransferObjects(objects: InferInput[], address: InferInput): TransactionShape<"TransferObjects">; SplitCoins(coin: InferInput, amounts: InferInput[]): TransactionShape<"SplitCoins">; MergeCoins(destination: InferInput, sources: InferInput[]): TransactionShape<"MergeCoins">; Publish({ modules, dependencies, }: { modules: number[][] | string[]; dependencies: string[]; }): TransactionShape<"Publish">; Upgrade({ modules, dependencies, package: packageId, ticket, }: { modules: number[][] | string[]; dependencies: string[]; package: string; ticket: InferInput; }): TransactionShape<"Upgrade">; MakeMoveVec({ type, elements, }: { type?: string; elements: InferInput[]; }): TransactionShape<"MakeMoveVec">; Intent({ name, inputs, data, }: { name: string; inputs?: Record | InferInput[]>; data?: Record; }): TransactionShape<"$Intent">; }; export {};