UNPKG

@okcontract/sdk

Version:

One-stop-shop permissionless SDK for building any blockchain frontend

32 lines (31 loc) 1.22 kB
import type { AbiFunction } from "abitype"; import type { ABIMethod } from "@okcontract/coredata"; import { type Environment, Program } from "@okcontract/lambdascript"; /** * createProgram creates the program for a given method (step) * @param step the current step (method) we create the program on * @param abix ABIExtra is used to get extra definitions * @returns the program for the given method / step */ export declare const createProgram: (abiMethod: ABIMethod) => Promise<Program>; /** * getMissingInputs returns the missing inputs for a given program * @param program the program where we check the missing inputs * @param abiFunc the AbiFunc we compare against * @param env * @returns * * @todo maybe no need to re-check in env for existing value */ export declare const getMissingInputs: (program: Program, abiFunc: AbiFunction, env: Environment, cases?: string[]) => string[]; /** * getRequiredValues returns a program missing required values * @param prog * @param fn * @param req * @returns * * @todo remove optional req ? * @todo do we need the filter on $ ? */ export declare const getRequiredValues: (prog: Program, fn: AbiFunction, env: Environment, cases: string[]) => string[];