Script Functions ================ .. c:function:: int wally_scriptpubkey_get_type(const unsigned char *bytes, size_t bytes_len, size_t *written) Determine the type of a scriptPubkey script. :param bytes: Bytes of the scriptPubkey. :param bytes_len: Length of ``bytes`` in bytes. :param written: Destination for the script type, one of the :ref:`script-type`. :return: See :ref:`error-codes` .. c:function:: int wally_scriptpubkey_p2pkh_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a P2PKH scriptPubkey. :param bytes: Bytes to create a scriptPubkey for. :param bytes_len: The length of ``bytes`` in bytes. If `WALLY_SCRIPT_HASH160` is given in ``flags``, ``bytes`` is a public key to hash160 before creating the P2PKH, and ``bytes_len`` must be `EC_PUBLIC_KEY_LEN` or `EC_PUBLIC_KEY_UNCOMPRESSED_LEN`. Otherwise, ``bytes_len`` must be `HASH160_LEN` and ``bytes`` must contain the hash160 to use. :param flags: `WALLY_SCRIPT_HASH160` or 0. :param bytes_out: Destination for the resulting scriptPubkey. :param len: Size of ``bytes_out``. Passing `WALLY_SCRIPTPUBKEY_P2PKH_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_scriptsig_p2pkh_from_sig(const unsigned char *pub_key, size_t pub_key_len, const unsigned char *sig, size_t sig_len, uint32_t sighash, unsigned char *bytes_out, size_t len, size_t *written) Create a P2PKH scriptSig from a pubkey and compact signature. This function creates the scriptSig by converting ``sig`` to DER encoding, appending the given sighash, then calling `wally_scriptsig_p2pkh_from_der`. :param pub_key: The public key to create a scriptSig with. :param pub_key_len: Length of ``pub_key`` in bytes. Must be `EC_PUBLIC_KEY_LEN` or `EC_PUBLIC_KEY_UNCOMPRESSED_LEN`. :param sig: The compact signature to create a scriptSig with. :param sig_len: The length of ``sig`` in bytes. Must be `EC_SIGNATURE_LEN`. :param sighash: ``WALLY_SIGHASH_`` flags specifying the type of signature desired. :param bytes_out: Destination for the resulting scriptSig. :param len: The length of ``bytes_out`` in bytes. :param len: Size of ``bytes_out``. Passing `WALLY_SCRIPTSIG_P2PKH_MAX_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_witness_p2wpkh_from_sig(const unsigned char *pub_key, size_t pub_key_len, const unsigned char *sig, size_t sig_len, uint32_t sighash, struct wally_tx_witness_stack **witness) Create a P2WPKH witness from a pubkey and compact signature. :param pub_key: The public key to create a witness with. :param pub_key_len: Length of ``pub_key`` in bytes. Must be `EC_PUBLIC_KEY_LEN` or `EC_PUBLIC_KEY_UNCOMPRESSED_LEN`. :param sig: The compact signature to create a witness with. :param sig_len: The length of ``sig`` in bytes. Must be `EC_SIGNATURE_LEN`. :param sighash: ``WALLY_SIGHASH_`` flags specifying the type of signature desired. :param witness: Destination for the newly created witness. :return: See :ref:`error-codes` .. c:function:: int wally_scriptsig_p2pkh_from_der(const unsigned char *pub_key, size_t pub_key_len, const unsigned char *sig, size_t sig_len, unsigned char *bytes_out, size_t len, size_t *written) Create a P2PKH scriptSig from a pubkey and DER signature plus sighash. :param pub_key: The public key to create a scriptSig with. :param pub_key_len: Length of ``pub_key`` in bytes. Must be `EC_PUBLIC_KEY_LEN` `EC_PUBLIC_KEY_UNCOMPRESSED_LEN`. :param sig: The DER encoded signature to create a scriptSig, with the sighash byte appended to it. :param sig_len: The length of ``sig`` in bytes. :param bytes_out: Destination for the resulting scriptSig. :param len: Size of ``bytes_out``. Passing `WALLY_SCRIPTSIG_P2PKH_MAX_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_witness_p2wpkh_from_der(const unsigned char *pub_key, size_t pub_key_len, const unsigned char *sig, size_t sig_len, struct wally_tx_witness_stack **witness) Create a P2WPKH witness from a pubkey and DER signature plus sighash. :param pub_key: The public key to create a witness with. :param pub_key_len: Length of ``pub_key`` in bytes. Must be `EC_PUBLIC_KEY_LEN` `EC_PUBLIC_KEY_UNCOMPRESSED_LEN`. :param sig: The DER encoded signature to create a witness, with the sighash byte appended to it. :param sig_len: The length of ``sig`` in bytes. :param witness: Destination for the newly created witness. :return: See :ref:`error-codes` .. c:function:: int wally_scriptpubkey_p2tr_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a P2TR scriptPubkey from a compressed or x-only public key. :param bytes: Compressed or x-only public key to create a scriptPubkey for. :param bytes_len: The length of ``bytes`` in bytes. Must be ``EC_PUBLIC_KEY_LEN`` or ``EC_XONLY_PUBLIC_KEY_LEN``. :param flags: Must be 0 or EC_FLAG_ELEMENTS to create an elements p2tr sctipt. :param bytes_out: Destination for the resulting scriptPubkey. :param len: Size of ``bytes_out``. Passing `WALLY_SCRIPTPUBKEY_P2TR_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. .. note:: Compressed pubkeys are tweaked according to BIP341. X-only pubkeys are assumed to already be tweaked, and are used as-is. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_witness_p2tr_from_sig(const unsigned char *sig, size_t sig_len, struct wally_tx_witness_stack **witness) Create a P2TR keyspend witness from a BIP340 signature plus optional sighash. :param sig: The BIP340-encoded keyspend signature, including a sighash byte for non `WALLY_SIGHASH_DEFAULT` sighashes. :param sig_len: The length of ``sig`` in bytes. Must be 64 or 65. :param witness: Destination for the newly created witness. :return: See :ref:`error-codes` .. c:function:: int wally_scriptpubkey_op_return_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create an OP_RETURN scriptPubkey. :param bytes: Bytes to create a scriptPubkey for. :param bytes_len: Length of ``bytes`` in bytes. Must be less than or equal to `WALLY_MAX_OP_RETURN_LEN`. :param flags: Currently unused, must be 0. :param bytes_out: Destination for the resulting scriptPubkey. :param len: Size of ``bytes_out``. Passing `WALLY_SCRIPTPUBKEY_OP_RETURN_MAX_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_scriptpubkey_p2sh_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a P2SH scriptPubkey. :param bytes: Bytes to create a scriptPubkey for. If `WALLY_SCRIPT_HASH160` is given, ``bytes`` is a redeem script to hash160 before creating the P2SH. Otherwise, bytes_len must be `HASH160_LEN` and ``bytes`` must contain the hash160 to use. :param bytes_len: Length of ``bytes`` in bytes. :param flags: `WALLY_SCRIPT_HASH160` or 0. :param bytes_out: Destination for the resulting scriptPubkey. :param len: Size of ``bytes_out``. Passing `WALLY_SCRIPTPUBKEY_P2SH_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_scriptpubkey_multisig_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t threshold, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a multisig scriptPubkey. :param bytes: Compressed public keys to create a scriptPubkey from. :param bytes_len: Length of ``bytes`` in bytes. Must be a multiple of `EC_PUBLIC_KEY_LEN`. :param threshold: The number of signatures that must match to satisfy the script. :param flags: Must be `WALLY_SCRIPT_MULTISIG_SORTED` for BIP67 sorting or 0. :param bytes_out: Destination for the resulting scriptPubkey. :param len: The length of ``bytes_out`` in bytes. :param written: Destination for the number of bytes written to ``bytes_out``. .. note:: A maximum of 15 keys are allowed to be passed. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_scriptsig_multisig_from_bytes(const unsigned char *script, size_t script_len, const unsigned char *bytes, size_t bytes_len, const uint32_t *sighash, size_t sighash_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a multisig scriptSig. :param script: The redeem script this scriptSig provides signatures for. :param script_len: The length of ``script`` in bytes. :param bytes: Compact signatures to place in the scriptSig. :param bytes_len: Length of ``bytes`` in bytes. Must be a multiple of `EC_SIGNATURE_LEN`. :param sighash: ``WALLY_SIGHASH_`` flags for each signature in ``bytes``. :param sighash_len: The number of sighash flags in ``sighash``. :param flags: Must be zero. :param bytes_out: Destination for the resulting scriptSig. :param len: The length of ``bytes_out`` in bytes. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_witness_multisig_from_bytes(const unsigned char *script, size_t script_len, const unsigned char *bytes, size_t bytes_len, const uint32_t *sighash, size_t sighash_len, uint32_t flags, struct wally_tx_witness_stack **witness) Create a multisig scriptWitness. :param script: The witness script this scriptWitness provides signatures for. :param script_len: The length of ``script`` in bytes. :param bytes: Compact signatures to place in the scriptWitness. :param bytes_len: Length of ``bytes`` in bytes. Must be a multiple of `EC_SIGNATURE_LEN`. :param sighash: ``WALLY_SIGHASH_`` flags for each signature in ``bytes``. :param sighash_len: The number of sighash flags in ``sighash``. :param flags: Must be zero. :param witness: Destination for newly allocated witness. :return: See :ref:`error-codes` .. c:function:: int wally_scriptpubkey_csv_2of2_then_1_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t csv_blocks, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a CSV 2of2 multisig with a single key recovery scriptPubkey. The resulting output can be spent at any time with both of the two keys given, and by the last (recovery) key alone, ``csv_blocks`` after the output confirms. :param bytes: Compressed public keys to create a scriptPubkey from. The second key given will be used as the recovery key. :param bytes_len: Length of ``bytes`` in bytes. Must 2 * `EC_PUBLIC_KEY_LEN`. :param csv_blocks: The number of blocks before the recovery key can be used. Must be between 17 and 65536. :param flags: Must be zero. :param bytes_out: Destination for the resulting scriptPubkey. :param len: The length of ``bytes_out`` in bytes. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_scriptpubkey_csv_2of2_then_1_from_bytes_opt(const unsigned char *bytes, size_t bytes_len, uint32_t csv_blocks, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create an optimised CSV 2of2 multisig with a single key recovery scriptPubkey. Works like `wally_scriptpubkey_csv_2of2_then_1_from_bytes` but produces a script that is smaller and compatible with the miniscript expression "and(pk(key_user),or(99@pk(key_service),older()))". :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_scriptpubkey_csv_blocks_from_csv_2of2_then_1(const unsigned char *bytes, size_t bytes_len, uint32_t *value_out) Get the number of CSV blocks from a CSV 2of2 multisig scriptPubkey. Returns the number of blocks that must have passed since confirmation of the transaction input before the recovery key alone can be used to spend the input. Can be used with scriptPubkeys generated by either `wally_scriptpubkey_csv_2of2_then_1_from_bytes` or `wally_scriptpubkey_csv_2of2_then_1_from_bytes_opt`. :param bytes: The scriptPubkey to fetch the CSV blocks from. :param bytes_len: Length of ``bytes`` in bytes. :param value_out: Destination for the resulting number of CSV blocks (between 17 and 65536). :return: See :ref:`error-codes` .. c:function:: int wally_script_push_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a bitcoin script that pushes data to the stack. :param bytes: Bytes to create a push script for. :param bytes_len: Length of ``bytes`` in bytes. :param flags: `WALLY_SCRIPT_HASH160` or `WALLY_SCRIPT_SHA256` to hash ``bytes`` before pushing it. :param bytes_out: Destination for the resulting push script. :param len: The length of ``bytes_out`` in bytes. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_varint_get_length(uint64_t value, size_t *written) Get the length of an integer serialized to a varint. :param value: The integer value to be find the length of. :param written: Destination for the length of the integer when serialized. :return: See :ref:`error-codes` .. c:function:: int wally_varint_to_bytes(uint64_t value, unsigned char *bytes_out, size_t len, size_t *written) Serialize an integer to a buffer as a varint. :param value: The integer value to be serialized. :param bytes_out: Destination for the resulting serialized varint. :param len: The length of ``bytes_out`` in bytes. Must be at least wally_varint_get_length(value). :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_varbuff_get_length(const unsigned char *bytes, size_t bytes_len, size_t *written) Get the length of a buffer serialized to a varbuff (varint size, followed by the buffer). :param bytes: The buffer to get the length of. :param bytes_len: Length of ``bytes`` in bytes. :param written: Destination for the length of the buffer when serialized. :return: See :ref:`error-codes` .. c:function:: int wally_varbuff_to_bytes(const unsigned char *bytes, size_t bytes_len, unsigned char *bytes_out, size_t len, size_t *written) Serialize a buffer to a varbuff (varint size, followed by the buffer). :param bytes: The buffer to be serialized. :param bytes_len: Length of ``bytes`` in bytes. :param bytes_out: Destination for the resulting serialized varbuff. :param len: The length of ``bytes_out`` in bytes. Must be at least wally_varbuff_get_length(bytes, bytes_len). :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_witness_program_from_bytes(const unsigned char *bytes, size_t bytes_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a segwit witness program from a script or hash. :param bytes: Script or hash bytes to create a witness program from. :param bytes_len: Length of ``bytes`` in bytes. Must be `HASH160_LEN` or `SHA256_LEN` if neither `WALLY_SCRIPT_HASH160` or `WALLY_SCRIPT_SHA256` is given. :param flags: `WALLY_SCRIPT_HASH160` or `WALLY_SCRIPT_SHA256` to hash the input script before using it. `WALLY_SCRIPT_AS_PUSH` to generate a push of the generated script as used for the scriptSig in p2sh-p2wpkh and p2sh-p2wsh. :param bytes_out: Destination for the resulting witness program. :param len: Size of ``bytes_out``. Passing `WALLY_WITNESSSCRIPT_MAX_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_witness_program_from_bytes_and_version(const unsigned char *bytes, size_t bytes_len, uint32_t version, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a segwit witness program from a script or hash using witness version. :param bytes: Script or hash bytes to create a witness program from. :param bytes_len: Length of ``bytes`` in bytes. :param version: Witness version to create a witness program from. Specify a value of 16 or less. :param flags: `WALLY_SCRIPT_HASH160` or `WALLY_SCRIPT_SHA256` to hash the input script before using it. `WALLY_SCRIPT_AS_PUSH` to generate a push of the generated script as used for the scriptSig in p2sh-p2wpkh and p2sh-p2wsh. :param bytes_out: Destination for the resulting witness program. :param len: Size of ``bytes_out``. Passing `WALLY_WITNESSSCRIPT_MAX_LEN` will ensure the buffer is large enough. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_elements_pegout_script_size(size_t genesis_blockhash_len, size_t mainchain_script_len, size_t sub_pubkey_len, size_t whitelistproof_len, size_t *written) Get the pegout script size. :param genesis_blockhash_len: Length of ``genesis_blockhash`` in bytes. Must be `SHA256_LEN`. :param mainchain_script_len: Length of ``mainchain_script`` in bytes. :param sub_pubkey_len: Length of ``sub_pubkey`` in bytes. Must be `EC_PUBLIC_KEY_LEN`. :param whitelistproof_len: The length of ``whitelistproof`` in bytes. :param written: Destination for the number of bytes required to hold the pegout script. :return: See :ref:`error-codes` .. c:function:: int wally_elements_pegout_script_from_bytes(const unsigned char *genesis_blockhash, size_t genesis_blockhash_len, const unsigned char *mainchain_script, size_t mainchain_script_len, const unsigned char *sub_pubkey, size_t sub_pubkey_len, const unsigned char *whitelistproof, size_t whitelistproof_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a pegout script. :param genesis_blockhash: The genesis blockhash of the parent chain. :param genesis_blockhash_len: Length of ``genesis_blockhash`` in bytes. Must be `SHA256_LEN`. :param mainchain_script: The parent chain script. :param mainchain_script_len: Length of ``mainchain_script`` in bytes. :param sub_pubkey: The whitelisted public key. :param sub_pubkey_len: Length of ``sub_pubkey`` in bytes. Must be `EC_PUBLIC_KEY_LEN`. :param whitelistproof: The whitelist proof. :param whitelistproof_len: The length of ``whitelistproof`` in bytes. :param flags: Must be zero. :param bytes_out: Destination for the resulting pegout script. :param len: The length of ``bytes_out`` in bytes. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` .. c:function:: int wally_elements_pegin_contract_script_from_bytes(const unsigned char *redeem_script, size_t redeem_script_len, const unsigned char *script, size_t script_len, uint32_t flags, unsigned char *bytes_out, size_t len, size_t *written) Create a script for P2CH pegin transactions. :param redeem_script: The federation redeem script. :param redeem_script_len: Length of ``redeem_script`` in bytes. :param script: The claim script. :param script_len: Length of ``script`` in bytes. :param flags: Must be zero. :param bytes_out: Destination for the resulting script. :param len: Length of ``bytes_out`` in bytes. :param written: Destination for the number of bytes written to ``bytes_out``. :return: See :ref:`variable-length-output-buffers` Script Constants ---------------- .. _script-type: Script type constants ^^^^^^^^^^^^^^^^^^^^^ .. c:macro:: WALLY_SCRIPT_TYPE_UNKNOWN .. c:macro:: WALLY_SCRIPT_TYPE_OP_RETURN .. c:macro:: WALLY_SCRIPT_TYPE_P2PKH .. c:macro:: WALLY_SCRIPT_TYPE_P2SH .. c:macro:: WALLY_SCRIPT_TYPE_P2WPKH .. c:macro:: WALLY_SCRIPT_TYPE_P2WSH .. c:macro:: WALLY_SCRIPT_TYPE_MULTISIG .. c:macro:: WALLY_SCRIPT_TYPE_P2TR .. c:macro:: WALLY_SCRIPT_TYPE_CSV2OF2_1 .. c:macro:: WALLY_SCRIPT_TYPE_CSV2OF2_1_OPT .. c:macro:: WALLY_SCRIPTPUBKEY_P2PKH_LEN OP_DUP OP_HASH160 [HASH160] OP_EQUALVERIFY OP_CHECKSIG .. c:macro:: WALLY_SCRIPTPUBKEY_P2SH_LEN OP_HASH160 [HASH160] OP_EQUAL .. c:macro:: WALLY_SCRIPTPUBKEY_P2WPKH_LEN OP_0 [HASH160] .. c:macro:: WALLY_SCRIPTPUBKEY_P2WSH_LEN OP_0 [SHA256] .. c:macro:: WALLY_SCRIPTPUBKEY_P2TR_LEN OP_1 [X-ONLY-PUBKEY] .. c:macro:: WALLY_SCRIPTPUBKEY_OP_RETURN_MAX_LEN OP_RETURN [80 bytes of data] .. c:macro:: WALLY_MAX_OP_RETURN_LEN .. c:macro:: WALLY_SCRIPTSIG_P2PKH_MAX_LEN [SIG+SIGHASH] [PUBKEY] .. c:macro:: WALLY_SCRIPTSIG_MAX_LEN MAX_SCRIPT_ELEMENT_SIZE from core .. c:macro:: WALLY_WITNESSSCRIPT_MAX_LEN (PUSH OF)0 [Up to 40 bytes of data] .. c:macro:: WALLY_SCRIPT_VARINT_MAX_SIZE .. c:macro:: WALLY_SCRIPT_HASH160 hash160 input bytes before using them .. c:macro:: WALLY_SCRIPT_SHA256 sha256 input bytes before using them .. c:macro:: WALLY_SCRIPT_AS_PUSH Return a push of the generated script .. c:macro:: WALLY_SCRIPT_MULTISIG_SORTED Sort public keys (BIP67) .. c:macro:: OP_0 .. c:macro:: OP_FALSE .. c:macro:: OP_PUSHDATA1 .. c:macro:: OP_PUSHDATA2 .. c:macro:: OP_PUSHDATA4 .. c:macro:: OP_1NEGATE .. c:macro:: OP_RESERVED .. c:macro:: OP_1 .. c:macro:: OP_TRUE .. c:macro:: OP_2 .. c:macro:: OP_3 .. c:macro:: OP_4 .. c:macro:: OP_5 .. c:macro:: OP_6 .. c:macro:: OP_7 .. c:macro:: OP_8 .. c:macro:: OP_9 .. c:macro:: OP_10 .. c:macro:: OP_11 .. c:macro:: OP_12 .. c:macro:: OP_13 .. c:macro:: OP_14 .. c:macro:: OP_15 .. c:macro:: OP_16 .. c:macro:: OP_NOP .. c:macro:: OP_VER .. c:macro:: OP_IF .. c:macro:: OP_NOTIF .. c:macro:: OP_VERIF .. c:macro:: OP_VERNOTIF .. c:macro:: OP_ELSE .. c:macro:: OP_ENDIF .. c:macro:: OP_VERIFY .. c:macro:: OP_RETURN .. c:macro:: OP_TOALTSTACK .. c:macro:: OP_FROMALTSTACK .. c:macro:: OP_2DROP .. c:macro:: OP_2DUP .. c:macro:: OP_3DUP .. c:macro:: OP_2OVER .. c:macro:: OP_2ROT .. c:macro:: OP_2SWAP .. c:macro:: OP_IFDUP .. c:macro:: OP_DEPTH .. c:macro:: OP_DROP .. c:macro:: OP_DUP .. c:macro:: OP_NIP .. c:macro:: OP_OVER .. c:macro:: OP_PICK .. c:macro:: OP_ROLL .. c:macro:: OP_ROT .. c:macro:: OP_SWAP .. c:macro:: OP_TUCK .. c:macro:: OP_CAT .. c:macro:: OP_SUBSTR .. c:macro:: OP_LEFT .. c:macro:: OP_RIGHT .. c:macro:: OP_SIZE .. c:macro:: OP_INVERT .. c:macro:: OP_AND .. c:macro:: OP_OR .. c:macro:: OP_XOR .. c:macro:: OP_EQUAL .. c:macro:: OP_EQUALVERIFY .. c:macro:: OP_RESERVED1 .. c:macro:: OP_RESERVED2 .. c:macro:: OP_1ADD .. c:macro:: OP_1SUB .. c:macro:: OP_2MUL .. c:macro:: OP_2DIV .. c:macro:: OP_NEGATE .. c:macro:: OP_ABS .. c:macro:: OP_NOT .. c:macro:: OP_0NOTEQUAL .. c:macro:: OP_ADD .. c:macro:: OP_SUB .. c:macro:: OP_MUL .. c:macro:: OP_DIV .. c:macro:: OP_MOD .. c:macro:: OP_LSHIFT .. c:macro:: OP_RSHIFT .. c:macro:: OP_BOOLAND .. c:macro:: OP_BOOLOR .. c:macro:: OP_NUMEQUAL .. c:macro:: OP_NUMEQUALVERIFY .. c:macro:: OP_NUMNOTEQUAL .. c:macro:: OP_LESSTHAN .. c:macro:: OP_GREATERTHAN .. c:macro:: OP_LESSTHANOREQUAL .. c:macro:: OP_GREATERTHANOREQUAL .. c:macro:: OP_MIN .. c:macro:: OP_MAX .. c:macro:: OP_WITHIN .. c:macro:: OP_RIPEMD160 .. c:macro:: OP_SHA1 .. c:macro:: OP_SHA256 .. c:macro:: OP_HASH160 .. c:macro:: OP_HASH256 .. c:macro:: OP_CODESEPARATOR .. c:macro:: OP_CHECKSIG .. c:macro:: OP_CHECKSIGVERIFY .. c:macro:: OP_CHECKMULTISIG .. c:macro:: OP_CHECKMULTISIGVERIFY .. c:macro:: OP_NOP1 .. c:macro:: OP_CHECKLOCKTIMEVERIFY .. c:macro:: OP_NOP2 .. c:macro:: OP_CHECKSEQUENCEVERIFY .. c:macro:: OP_NOP3 .. c:macro:: OP_NOP4 .. c:macro:: OP_NOP5 .. c:macro:: OP_NOP6 .. c:macro:: OP_NOP7 .. c:macro:: OP_NOP8 .. c:macro:: OP_NOP9 .. c:macro:: OP_NOP10 .. c:macro:: OP_INVALIDOPCODE