slpjs
Version:
Simple Ledger Protocol (SLP) JavaScript Library
27 lines (26 loc) • 1.49 kB
TypeScript
/// <reference types="node" />
import BigNumber from "bignumber.js";
import { AddressUtxoResult } from "bitcoin-com-rest";
import { SlpAddressUtxoResult, SlpPaymentRequest, utxo } from "../index";
export declare class Utils {
static isCashAddress(address: string): any;
static toCashAddress(address: string): string;
static slpAddressFromHash160(hash: Uint8Array, network?: string, addressType?: string): string;
static isSlpAddress(address: string): boolean;
static toSlpAddress(address: string): string;
static toRegtestAddress(address: string): string;
static isLegacyAddress(address: string): boolean;
static toLegacyAddress(address: string): string;
static isMainnet(address: string): boolean;
static txnBuilderString(address: string): "bitcoincash" | "bchtest";
static mapToSlpAddressUtxoResultArray(result: AddressUtxoResult): SlpAddressUtxoResult[];
static mapToUtxoArray(utxos: SlpAddressUtxoResult[]): utxo[];
static getPushDataOpcode(data: number[] | Buffer): number | number[];
static int2FixedBuffer(amount: BigNumber): Buffer;
static buffer2BigNumber(amount: Buffer): BigNumber;
static buildSlpUri(address: string, amountBch?: number, amountToken?: number, tokenId?: string): string;
static parseSlpUri(uri: string): SlpPaymentRequest;
static get_BIP62_locktime_hex(unixtime: number): string | null;
static convertBE2LE32(hex: string): string | null;
static isHexString(hex: string): boolean;
}