lotus-sdk
Version:
Central repository for several classes of tools for integrating with, and building for, the Lotusia ecosystem
45 lines • 1.68 kB
TypeScript
import { Network } from './networks.js';
import { PublicKey } from './publickey.js';
export interface XAddressData {
hashBuffer?: Buffer;
network?: Network;
type?: string;
prefix?: string;
}
export interface XAddressObject {
hash: string;
type: string;
network: string;
prefix?: string;
}
export type XAddressInput = string | Buffer | XAddressData | PublicKey;
export declare class XAddress {
static readonly PayToPublicKeyHash = "pubkeyhash";
static readonly PayToScriptHash = "scripthash";
static readonly PayToTaproot = "taproot";
readonly prefix: string;
readonly hashBuffer: Buffer;
readonly network: Network;
readonly type: string;
constructor(data?: XAddressInput, network?: Network | string, type?: string, prefix?: string);
private _classifyArguments;
private static _transformObject;
private static _classifyFromVersion;
private static _transformString;
private static _transformBuffer;
static fromString(str: string, network?: Network | string, type?: string): XAddress;
static fromObject(obj: XAddressObject): XAddress;
static getValidationError(data: XAddressInput, network?: Network | string, type?: string): Error | null;
static isValid(data: XAddressInput, network?: Network | string, type?: string): boolean;
static _decode(address: string): XAddressData;
toBuffer(): Buffer;
toObject(): XAddressObject;
toJSON(): XAddressObject;
toXAddress(): string;
toString(): string;
isPayToPublicKeyHash(): boolean;
isPayToScriptHash(): boolean;
isPayToTaproot(): boolean;
inspect(): string;
}
//# sourceMappingURL=xaddress.d.ts.map