UNPKG

@muirglacier/jellyfish-transaction

Version:

A collection of TypeScript + JavaScript tools and libraries for DeFi Blockchain developers to build decentralized finance for Bitcoin

98 lines 2.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OP_RETURN = exports.OP_VERIFY = exports.OP_ENDIF = exports.OP_ELSE = exports.OP_VERNOTIF = exports.OP_VERIF = exports.OP_NOTIF = exports.OP_IF = exports.OP_VER = exports.OP_NOP = void 0; const opcode_1 = require("./opcode"); /** * Does nothing. */ class OP_NOP extends opcode_1.StaticCode { constructor() { super(0x61, 'OP_NOP'); } } exports.OP_NOP = OP_NOP; /** * Puts the version of the protocol under which this transaction will be evaluated onto the stack. */ class OP_VER extends opcode_1.StaticCode { constructor() { super(0x62, 'OP_VER'); } } exports.OP_VER = OP_VER; /** * If the top stack value is true, the statements are executed */ class OP_IF extends opcode_1.StaticCode { constructor() { super(0x63, 'OP_IF'); } } exports.OP_IF = OP_IF; /** * If the top stack value is false, the statements are executed. */ class OP_NOTIF extends opcode_1.StaticCode { constructor() { super(0x64, 'OP_NOTIF'); } } exports.OP_NOTIF = OP_NOTIF; /** * If the top stack value is equal to the version of the protocol under which * this transaction will be evaluated, the statements between IF and ELSE are executed. */ class OP_VERIF extends opcode_1.StaticCode { constructor() { super(0x65, 'OP_VERIF'); } } exports.OP_VERIF = OP_VERIF; /** * If the top stack value is not equal to the version of the protocol under which this * transaction will be evaluated, the statements between IF and ELSE are executed. */ class OP_VERNOTIF extends opcode_1.StaticCode { constructor() { super(0x66, 'OP_VERNOTIF'); } } exports.OP_VERNOTIF = OP_VERNOTIF; /** * If the preceding OP_IF or OP_NOTIF or OP_ELSE was not executed then these * statements are and otherwise if executed. */ class OP_ELSE extends opcode_1.StaticCode { constructor() { super(0x67, 'OP_ELSE'); } } exports.OP_ELSE = OP_ELSE; /** * Ends an if/else block. All blocks must end, or the transaction is invalid. */ class OP_ENDIF extends opcode_1.StaticCode { constructor() { super(0x68, 'OP_ENDIF'); } } exports.OP_ENDIF = OP_ENDIF; /** * Marks transaction as invalid if top stack value is not true. */ class OP_VERIFY extends opcode_1.StaticCode { constructor() { super(0x69, 'OP_VERIFY'); } } exports.OP_VERIFY = OP_VERIFY; /** * Marks transaction as invalid. */ class OP_RETURN extends opcode_1.StaticCode { constructor() { super(0x6a, 'OP_RETURN'); } } exports.OP_RETURN = OP_RETURN; //# sourceMappingURL=control.js.map