UNPKG

lotus-sdk

Version:

Central repository for several classes of tools for integrating with, and building for, the Lotusia ecosystem

98 lines 3.63 kB
import { Script } from '../script.js'; import { BN } from '../crypto/bn.js'; import type { Transaction } from '../transaction/transaction.js'; export interface InterpreterData { script?: Script; tx?: Transaction; nin?: number; flags?: number; satoshisBN?: bigint; outputScript?: Script; } export interface InterpreterObject { script?: Script; tx?: Transaction; nin?: number; flags?: number; satoshisBN?: bigint; outputScript?: Script; stack?: Buffer[]; } export declare class Interpreter { static SCRIPT_VERIFY_NONE: number; static SCRIPT_VERIFY_P2SH: number; static SCRIPT_VERIFY_STRICTENC: number; static SCRIPT_VERIFY_DERSIG: number; static SCRIPT_VERIFY_LOW_S: number; static SCRIPT_VERIFY_NULLDUMMY: number; static SCRIPT_VERIFY_SIGPUSHONLY: number; static SCRIPT_VERIFY_MINIMALDATA: number; static SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS: number; static SCRIPT_VERIFY_CLEANSTACK: number; static SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY: number; static SCRIPT_VERIFY_CHECKSEQUENCEVERIFY: number; static SCRIPT_VERIFY_MINIMALIF: number; static SCRIPT_VERIFY_NULLFAIL: number; static SCRIPT_VERIFY_COMPRESSED_PUBKEYTYPE: number; static SCRIPT_ENABLE_SIGHASH_FORKID: number; static SCRIPT_ENABLE_REPLAY_PROTECTION: number; static SCRIPT_ENABLE_CHECKDATASIG: number; static SCRIPT_DISALLOW_SEGWIT_RECOVERY: number; static SCRIPT_ENABLE_SCHNORR_MULTISIG: number; static SCRIPT_VERIFY_INPUT_SIGCHECKS: number; static SCRIPT_TAPROOT_KEY_SPEND_PATH: number; static SCRIPT_DISABLE_TAPROOT_SIGHASH_LOTUS: number; static MAX_SCRIPT_ELEMENT_SIZE: number; static MAX_SCRIPT_SIZE: number; static MAX_STACK_SIZE: number; static MAX_OPCODE_COUNT: number; static false: Buffer<ArrayBuffer>; static true: Buffer<ArrayBuffer>; static MAXIMUM_ELEMENT_SIZE: number; static LOCKTIME_THRESHOLD: number; static LOCKTIME_THRESHOLD_BN: BN; static SEQUENCE_LOCKTIME_DISABLE_FLAG: number; static SEQUENCE_LOCKTIME_TYPE_FLAG: number; static SEQUENCE_LOCKTIME_MASK: number; script: Script; tx?: Transaction; nin?: number; flags: number; satoshisBN?: bigint; outputScript?: Script; stack: Buffer[]; altstack: Buffer[]; pc: number; pbegincodehash: number; nOpCount: number; vfExec: boolean[]; errstr: string; constructor(obj?: InterpreterObject); static create(obj?: InterpreterObject): Interpreter; initialize(): void; set(obj: InterpreterObject): Interpreter; verify(scriptSig: Script, scriptPubkey: Script, tx: Transaction, nin: number, flags: number, satoshisBN: bigint): boolean; checkRawSignatureEncoding(buf: Buffer): boolean; checkSignatureEncoding(buf: Buffer): boolean; checkTxSignatureEncoding(buf: Buffer): boolean; checkDataSignatureEncoding(buf: Buffer): boolean; checkPubkeyEncoding(buf: Buffer): boolean; private isCompressedOrUncompressedPubkey; evaluate(): boolean; private toScriptNumBuffer; private fromScriptNumBuffer; private castToBool; step(): boolean; private decodeBitfield; private countBits; private stacktop; private isOpcodeDisabled; checkLockTime(nLockTime: BN): boolean; checkSequence(nSequence: BN): boolean; static castToBool(buf: Buffer): boolean; static isSchnorrSig(buf: Buffer): boolean; private _verifyScriptType; static _isMinimallyEncoded(buf: Buffer, nMaxNumSize?: number): boolean; static _minimallyEncode(buf: Buffer): Buffer; } //# sourceMappingURL=interpreter.d.ts.map