sensible-sdk
Version:
Sensible-SDK
26 lines (25 loc) • 634 B
TypeScript
import * as bsv from "../bsv";
import { API_NET } from "../sensible-api";
export declare enum OutputType {
SENSIBLE_NFT = 0,
SENSIBLE_FT = 1,
P2PKH = 2,
OP_RETURN = 3,
UNKNOWN = 4
}
declare type DecodedOutput = {
type: OutputType;
satoshis: number;
data?: any;
address?: string;
};
export declare class TxDecoder {
static decodeOutput(output: bsv.Transaction.Output, network: API_NET): DecodedOutput;
static decodeTx(tx: bsv.Transaction, network?: API_NET): {
txId: string;
inputs: DecodedOutput[];
outputs: DecodedOutput[];
fee: number;
};
}
export {};