UNPKG

ton3-core

Version:
44 lines (43 loc) 1.5 kB
import type { Bit } from '../types/bit'; import type { Coins } from '../coins'; import type { HashmapE } from './hashmap'; import { Address } from '../address'; import { Slice } from './slice'; import { Cell, CellType } from './cell'; declare type BitLike = Bit | number | boolean; declare class Builder { private _size; private _refs; private _bits; constructor(size?: number); private checkSliceType; private checkAddressType; private checkBitsTypeAndNormalize; private checkBitsOverflow; private checkRefsType; private checkRefsOverflow; private storeNumber; get size(): number; get bits(): Bit[]; get bytes(): Uint8Array; get refs(): Cell[]; get remainder(): number; storeSlice(slice: Slice): this; storeRef(ref: Cell): this; storeMaybeRef(ref: Cell | null): this; storeRefs(refs: Cell[]): this; storeBit(bit: BitLike): this; storeBits(bits: BitLike[]): this; storeInt(value: number | bigint, size: number): this; storeUint(value: number | bigint, size: number): this; storeVarInt(value: number | bigint, length: number): this; storeVarUint(value: number | bigint, length: number): this; storeBytes(value: Uint8Array | number[]): this; storeString(value: string): this; storeAddress(address: Address | null): this; storeCoins(coins: Coins): this; storeDict(hashmap: HashmapE<any, any>): this; clone(): Builder; cell(type?: CellType): Cell; } export { Builder };