clvm_tools
Version:
Javascript implementation of clvm_tools
21 lines (20 loc) • 1.33 kB
TypeScript
import { SExp, CastableType, Bytes, Tuple, Optional, None } from "clvm";
export declare function ir_new(type: SExp | number | Tuple<any, any> | None, val: CastableType, offset?: number): SExp;
export declare function ir_cons(first: SExp | Tuple<any, any> | None, rest: SExp | Tuple<any, any> | None, offset?: number): SExp;
export declare function ir_list(...items: SExp[]): SExp;
export declare function ir_null(): SExp;
export declare function ir_type(ir_sexp: SExp): number;
export declare function ir_as_int(ir_sexp: SExp): number;
export declare function ir_offset(ir_sexp: SExp): number;
export declare function ir_val(ir_sexp: SExp): SExp;
export declare function ir_nullp(ir_sexp: SExp): boolean;
export declare function ir_listp(ir_sexp: SExp): boolean;
export declare function ir_as_sexp(ir_sexp: SExp): SExp | [];
export declare function ir_is_atom(ir_sexp: SExp): boolean;
export declare function ir_as_atom(ir_sexp: SExp): Bytes;
export declare function ir_first(ir_sexp: SExp): SExp;
export declare function ir_rest(ir_sexp: SExp): SExp;
export declare function ir_symbol(symbol: string): Tuple<number, Bytes>;
export declare function ir_as_symbol(ir_sexp: SExp): Optional<string>;
export declare function ir_iter(ir_sexp: SExp): Generator<SExp, void, unknown>;
export declare function is_ir(sexp: SExp): boolean;