@ton/core
Version:
Core TypeScript library that implements low level primitives for TON blockchain.
29 lines (23 loc) • 668 B
text/typescript
/**
* 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 'symbol.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}>`;
}
[inspectSymbol] = () => this.toString()
}