UNPKG

clvm

Version:

Javascript implementation of chia lisp

37 lines (36 loc) 1.4 kB
import type { G1Element } from "bls-signatures"; import { None, Optional } from "./__python_types__"; import { CLVMType } from "./CLVMObject"; import { Bytes, Tuple } from "./__type_compatibility__"; export type CastableType = SExp | CLVMType | Bytes | string | number | bigint | None | G1Element | CastableType[] | Tuple<CastableType, CastableType>; export declare function looks_like_clvm_object(o: any): o is CLVMType; export declare function convert_atom_to_bytes(v: any): Bytes; export declare function to_sexp_type(value: CastableType): CLVMType; export declare class SExp implements CLVMType { private readonly _atom; private readonly _pair; get atom(): Optional<Bytes>; get pair(): Optional<Tuple<any, any>>; static readonly TRUE: SExp; static readonly FALSE: SExp; static readonly __NULL__: SExp; static to(v: CastableType): SExp; static null(): SExp; constructor(v: CLVMType); as_pair(): Tuple<SExp, SExp> | None; listp(): boolean; nullp(): boolean; as_int(): number; as_bigint(): bigint; as_bin(): Bytes; cons(right: any): SExp; first(): SExp; rest(): SExp; as_iter(): Generator<SExp, void, unknown>; equal_to(other: any): boolean; list_len(): number; as_javascript(): import("./as_javascript").TToJavascript; toString(): string; toJSON(): string | Tuple<any, any>; __repr__(): string; }