@okxweb3/coin-bitcoin
Version:
@okxweb3/coin-bitcoin is a Bitcoin SDK for building Web3 wallets and applications. It supports BTC, BSV, DOGE, LTC, and TBTC, enabling private key management, transaction signing, address generation, and inscriptions like BRC-20, Runes, CAT, and Atomicals
40 lines (39 loc) • 1.06 kB
TypeScript
/// <reference types="node" />
import { Rune } from "./type";
export declare function base26Encode(input: string): bigint;
export declare function base26Decode(s: bigint): string;
export declare function encodeLEB128(value: bigint): number[];
export declare function decodeLEB128(buf: number[]): {
n: bigint;
len: number;
};
export declare function applySpacers(str: string, spacers: number): string;
export declare function getSpacersVal(str: string): number;
export declare function removeSpacers(rune: string): string;
export declare enum Flag {
Etching = 0,
Terms = 1,
Turbo = 2,
Cenotaph = 127
}
export declare enum Tag {
Body = 0,
Flags = 2,
Rune = 4,
Premine = 6,
Cap = 8,
Amount = 10,
HeightStart = 12,
HeightEnd = 14,
OffsetStart = 16,
OffsetEnd = 18,
Mint = 20,
Pointer = 22,
Cenotaph = 126,
Divisibility = 1,
Spacers = 3,
Symbol = 5,
Nop = 127
}
export declare function commitment(rune: Rune): Buffer;
export declare function isUpper(data: string): boolean;