sensible-sdk
Version:
Sensible-SDK
23 lines (22 loc) • 998 B
TypeScript
/// <reference types="node" />
import BN = require("../../bn.js");
import * as proto from "../../common/protoheader";
export declare const PROTO_VERSION = 1;
export declare function getNftID(script: Buffer): string;
export declare function getSatoshisPrice(script: Buffer): BN;
export declare function getSellerAddress(script: Buffer): string;
export declare function getTokenIndex(script: Buffer): BN;
export declare function getGenesis(script: Buffer): string;
export declare function getCodeHash(script: Buffer): string;
export declare type FormatedDataPart = {
codehash: string;
genesis: string;
tokenIndex: BN;
sellerAddress: string;
satoshisPrice: BN;
nftID: string;
protoVersion?: number;
protoType?: proto.PROTO_TYPE;
};
export declare function newDataPart({ codehash, genesis, tokenIndex, sellerAddress, satoshisPrice, nftID, protoVersion, protoType, }: FormatedDataPart): Buffer;
export declare function parseDataPart(scriptBuf: Buffer): FormatedDataPart;