@tezwell/michelson-sdk
Version:
Michelson SDK is a framework for generating Michelson values and types from Javascript.
33 lines (32 loc) • 1 kB
TypeScript
import { Prim } from '../enums/prim';
export declare type MichelsonJSON_Prim = {
prim: keyof typeof Prim;
args?: MichelsonJSON[];
annots?: string[];
};
export declare type MichelsonJSON_Int = {
int: string;
annots?: string[];
};
export declare type MichelsonJSON_String = {
string: string;
annots?: string[];
};
export declare type MichelsonJSON_Bytes = {
bytes: string;
annots?: string[];
};
export declare type MichelsonJSON = MichelsonJSON_Prim | MichelsonJSON_Int | MichelsonJSON_String | MichelsonJSON_Bytes | MichelsonJSON[];
export declare type MichelsonMicheline = string;
export declare type PairsOfKeys<K> = (K | PairsOfKeys<K>)[];
export interface IValue {
toMicheline: (wrap?: boolean) => MichelsonMicheline;
toJSON: () => MichelsonJSON;
}
export interface IType {
setAnnotation: (annotation: string) => IType;
toMicheline: () => MichelsonMicheline;
toJSON: () => MichelsonJSON;
}
export * from './literal';
export * from './type';