UNPKG

@ton/core

Version:

Core TypeScript library that implements low level primitives for TON blockchain.

42 lines (41 loc) 1.15 kB
/** * Copyright (c) Whales Corp. * All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import { Builder } from "../boc/Builder"; import { Cell } from "../boc/Cell"; import { Slice } from "../boc/Slice"; export type Tuple = { type: "tuple"; items: TupleItem[]; }; export type TupleItemNull = { type: "null"; }; export type TupleItemInt = { type: "int"; value: bigint; }; export type TupleItemNaN = { type: "nan"; }; export type TupleItemCell = { type: "cell"; cell: Cell; }; export type TupleItemSlice = { type: "slice"; cell: Cell; }; export type TupleItemBuilder = { type: "builder"; cell: Cell; }; export type TupleItem = TupleItemNull | TupleItemInt | TupleItemNaN | TupleItemCell | TupleItemSlice | TupleItemBuilder | Tuple; export declare function serializeTupleItem(src: TupleItem, builder: Builder): void; export declare function parseTupleItem(cs: Slice): TupleItem; export declare function serializeTuple(src: TupleItem[]): Cell; export declare function parseTuple(src: Cell): TupleItem[];