MyCrypto/common/libs/contracts/types.ts

47 lines
753 B
TypeScript

/**
* @export
* @interface Input
*/
export interface Input {
/**
* @type {string}
* @memberof Input
* @desc The name of the parameter.
*/
name: string;
/**
* @type {string}
* @memberof Input
* @desc The canonical type of the parameter.
*/
type: string;
}
export type Output = Input;
/**
*
* @export
* @interface ABIFunction
* @template T
*/
export interface ContractOutputMappings {
[key: string]: string[];
}
export type FunctionOutputMappings = string[];
export interface FuncParams {
[name: string]: {
type: string;
processInput(value: any): any;
};
}
export interface ITypeMapping {
[type: string]: (value: any) => any;
}
export interface ISuppliedArgs {
[argumentName: string]: any;
}