ton3-core
Version:
TON low-level API tools
34 lines (33 loc) • 1.09 kB
TypeScript
export declare type AddressType = 'base64' | 'raw';
interface AddressRewriteOptions {
workchain?: number;
bounceable?: boolean;
testOnly?: boolean;
}
interface AddressStringifyOptions extends AddressRewriteOptions {
urlSafe?: boolean;
}
declare class Address {
private readonly _hash;
private readonly _workchain;
private readonly _bounceable;
private readonly _testOnly;
constructor(address: string | Address, options?: AddressRewriteOptions);
get hash(): Uint8Array;
get workchain(): number;
get bounceable(): boolean;
get testOnly(): boolean;
private static isEncoded;
private static isRaw;
private static parseEncoded;
private static parseAddress;
private static parseRaw;
private static encodeTag;
private static decodeTag;
eq(address: Address): boolean;
toString(type?: AddressType, options?: AddressStringifyOptions): string;
static readonly NONE: any;
private static isAddress;
static isValid(address: any): boolean;
}
export { Address, AddressRewriteOptions, AddressStringifyOptions };