UNPKG

@ton/core

Version:

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

29 lines (23 loc) 676 B
/** * 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 { inspectSymbol } from "../inspect"; export class ExternalAddress { static isAddress(src: any): src is ExternalAddress { return src instanceof ExternalAddress; } readonly value: bigint; readonly bits: number; constructor(value: bigint, bits: number) { this.value = value; this.bits = bits; } toString() { return `External<${this.bits}:${this.value}>`; } private [inspectSymbol] = () => this.toString(); }