@kiroboio/fct-core
Version:
Kirobo.io FCT Core library
54 lines • 3.11 kB
TypeScript
import { AllPlugins } from "@kiroboio/fct-plugins";
import { FCTInputCall } from "../../types";
import { BatchMultiSigCall } from "../batchMultiSigCall";
import { Call } from "../classes";
import { FCTCall, IFCT, MSCalls_Eff, VersionType } from "../types";
import { GenericExportOptions } from "../versions/types";
import { PluginParams } from "./types";
export declare function create(this: BatchMultiSigCall, call: FCTInputCall): Promise<Call>;
export declare function createMultiple(this: BatchMultiSigCall, calls: FCTInputCall[]): Promise<FCTCall[]>;
export declare function addAtIndex(this: BatchMultiSigCall, call: FCTInputCall, index: number): Promise<FCTCall>;
export declare function createPlugin<T extends AllPlugins>(this: BatchMultiSigCall, { plugin, initParams, }: {
plugin: T;
initParams?: PluginParams<T>;
}): import("@kiroboio/fct-plugins").NewPluginType<"FUNCTIONS", "COMPUTED", "compute", "compute", {
input: {
methodParams: {
id: import("@kiroboio/fct-plugins").FctString;
value1: import("@kiroboio/fct-plugins").FctValue;
operator1: import("@kiroboio/fct-plugins").FctString;
value2: import("@kiroboio/fct-plugins").FctValue;
operator2: import("@kiroboio/fct-plugins").FctString;
value3: import("@kiroboio/fct-plugins").FctValue;
operator3: import("@kiroboio/fct-plugins").FctString;
value4: import("@kiroboio/fct-plugins").FctValue;
};
};
output: {
result: import("@kiroboio/fct-plugins").FctValue;
};
}, Partial<{
methodParams: unknown;
}>>;
export declare function getCall(this: BatchMultiSigCall, index: number): FCTCall;
export declare function getCallByNodeId(this: BatchMultiSigCall, nodeId: string): FCTCall;
export declare function getIndexByNodeId(this: BatchMultiSigCall, nodeId: string): number;
export declare function exportMap(this: BatchMultiSigCall): {
calls: string[];
computed: string[];
validations: string[];
};
/**
* Prepares FCT data to be signed on and executed on the blockchain.
* @returns The IFCT object representing the current state of the FCT.
* @throws Error if no calls are added to FCT.
*/
export declare function exportFCT<V extends VersionType = `0x${string}`>(this: BatchMultiSigCall, exportOptions?: Partial<GenericExportOptions<V>>): IFCT;
export declare function exportWithApprovals(this: BatchMultiSigCall): Promise<IFCT>;
export declare function exportWithPayment(this: BatchMultiSigCall, payer: string): Promise<IFCT>;
export declare function exportNotificationFCT(this: BatchMultiSigCall): IFCT;
export declare function importFCT<FCT extends IFCT>(this: BatchMultiSigCall, fct: FCT): Call[];
export declare function importFCTWithMap<FCT extends IFCT>(this: BatchMultiSigCall, fct: FCT, map: ReturnType<BatchMultiSigCall["exportMap"]>): Call[];
export declare function impFCT(this: BatchMultiSigCall, fct: IFCT, map?: ReturnType<BatchMultiSigCall["exportMap"]>): Call[];
export declare function exportEfficientFCT(this: BatchMultiSigCall): MSCalls_Eff;
//# sourceMappingURL=FCT.d.ts.map