meta-contract
Version:
Meta Contract SDK
39 lines (38 loc) • 1.68 kB
TypeScript
import * as mvc from '../../mvc';
import { ContractAdapter } from '../../common/ContractAdapter';
import { Bytes, FunctionCall, PubKey, Ripemd160, Sig, SigHashPreimage } from '../../scryptlib';
import * as nftProto from '../contract-proto/nft.proto';
export declare class NftGenesis extends ContractAdapter {
private _formatedDataPart;
constructor();
clone(): NftGenesis;
setFormatedDataPart(dataPart: nftProto.FormatedDataPart): void;
getFormatedDataPart(): nftProto.FormatedDataPart;
setFormatedDataPartFromLockingScript(script: mvc.Script): void;
isFirstGenesis(): boolean;
unlock({ txPreimage, pubKey, sig, genesisTxHeader, prevInputIndex, genesisTxInputProof, prevGenesisTxHeader, prevTxOutputHashProof, prevTxOutputSatoshiBytes, nftScript, genesisSatoshis, nftSatoshis, changeAddress, changeSatoshis, opReturnScript, }: {
txPreimage: SigHashPreimage;
pubKey: PubKey;
sig: Sig;
genesisTxHeader: Bytes;
prevInputIndex: number;
genesisTxInputProof: Bytes;
prevGenesisTxHeader: Bytes;
prevTxOutputHashProof: Bytes;
prevTxOutputSatoshiBytes: Bytes;
nftScript: Bytes;
genesisSatoshis: number;
nftSatoshis: number;
changeAddress: Ripemd160;
changeSatoshis: number;
opReturnScript: Bytes;
}): FunctionCall;
}
export declare class NftGenesisFactory {
static lockingScriptSize: number;
static getLockingScriptSize(): number;
static createContract(): NftGenesis;
static getDummyInstance(): NftGenesis;
static calLockingScriptSize(): number;
static calUnlockingScriptSize(opreturnData: any): number;
}