Enum ArkadeOpcode
Arkade Script extension opcodes — the introspection / byte-string / asset / EC helpers that ArkadeScript adds on top of standard Bitcoin Script.
public enum ArkadeOpcode : byte
Fields
OP_BIN2NUM = 2160xd8 — Normalise a byte string into a minimally-encoded BigNum.
OP_CHECKSIGFROMSTACK = 2040xcc — Verify a Schnorr signature against an arbitrary message + pubkey.
OP_DIGEST = 1950xc3 — Compute a digest of the top stack element.
OP_ECADD = 2240xe0 — Add two affine points on the selected curve (
(0,0)is the point at infinity).OP_ECMUL = 2250xe1 — Multiply an affine point by a scalar on the selected curve.
OP_ECMULSCALARVERIFY = 2270xe3 — Verify
Q = k·Pon secp256k1 (ka 32-byte scalar,P/Qcompressed pubkeys).OP_ECPAIRING = 2260xe2 — Verify that the product of
alt_bn128pairings is the identity in GT.OP_FINDASSETGROUPBYASSETID = 2320xe8 — Find an asset group by asset ID.
OP_INSPECTASSETGROUP = 2350xeb — Push the full asset group struct by index.
OP_INSPECTASSETGROUPASSETID = 2300xe6 — Push the asset ID of an asset group by index.
OP_INSPECTASSETGROUPCTRL = 2310xe7 — Push the control-asset reference of an asset group by index.
OP_INSPECTASSETGROUPMETADATAHASH = 2330xe9 — Push the metadata-Merkle-root of an asset group by index.
OP_INSPECTASSETGROUPNUM = 2340xea — Push the number of inputs/outputs in an asset group by index.
OP_INSPECTASSETGROUPSUM = 2360xec — Push the per-asset-group sum of inputs/outputs.
OP_INSPECTINASSETAT = 2410xf1 — Push an asset attached to an input by (input index, asset index).
OP_INSPECTINASSETCOUNT = 2400xf0 — Push the count of assets attached to an input by index.
OP_INSPECTINASSETLOOKUP = 2420xf2 — Look up an asset attached to an input by asset ID.
OP_INSPECTINPUTARKADESCRIPTHASH = 2000xc8 — Push the ArkadeScript hash of an input by index.
OP_INSPECTINPUTARKADEWITNESSHASH = 2060xce — Push the ArkadeScriptWitness hash of an input by index.
OP_INSPECTINPUTOUTPOINT = 1990xc7 — Push the outpoint of an input by index.
OP_INSPECTINPUTPACKET = 2450xf5 — Look up a packet by type in the Arkade tx spent by input
input_index; push(content, 1)or(empty, 0).OP_INSPECTINPUTSCRIPTPUBKEY = 2020xca — Push the scriptPubKey of an input by index.
OP_INSPECTINPUTSEQUENCE = 2030xcb — Push the nSequence of an input by index.
OP_INSPECTINPUTVALUE = 2010xc9 — Push the value (sats) of an input by index.
OP_INSPECTLOCKTIME = 2110xd3 — Push the transaction nLockTime.
OP_INSPECTNUMASSETGROUPS = 2290xe5 — Push the number of asset groups in the current Arkade transaction.
OP_INSPECTNUMINPUTS = 2120xd4 — Push the number of inputs.
OP_INSPECTNUMOUTPUTS = 2130xd5 — Push the number of outputs.
OP_INSPECTOUTASSETAT = 2380xee — Push an asset attached to an output by (output index, asset index).
OP_INSPECTOUTASSETCOUNT = 2370xed — Push the count of assets attached to an output by index.
OP_INSPECTOUTASSETLOOKUP = 2390xef — Look up an asset attached to an output by asset ID.
OP_INSPECTOUTPUTSCRIPTPUBKEY = 2090xd1 — Push the scriptPubKey of an output by index.
OP_INSPECTOUTPUTVALUE = 2070xcf — Push the value (sats) of an output by index.
OP_INSPECTPACKET = 2440xf4 — Look up a packet by type in the current tx's extension; push
(content, 1)on hit or(empty, 0).OP_INSPECTVERSION = 2100xd2 — Push the transaction nVersion.
OP_MERKLEBRANCHVERIFY = 1790xb3 — Verify a Merkle branch (repurposed NOP4 slot).
OP_MODEXP = 2180xda — Modular exponentiation: push
base^exp mod modulusin[0, modulus)(operands ≤ 64 bytes).OP_NUM2BIN = 2150xd7 — Pad a BigNum to exactly
sizebytes; fails if it doesn't fit orsizeis out of range.OP_PUSHCURRENTINPUTINDEX = 2050xcd — Push the index of the input currently being executed.
OP_REVERSEBYTES = 2170xd9 — Reverse the byte order of the top stack element.
OP_SHA256FINALIZE = 1980xc6 — Finalise a streaming SHA-256 state, push the digest.
OP_SHA256INITIALIZE = 1960xc4 — Initialise a streaming SHA-256 state.
OP_SHA256UPDATE = 1970xc5 — Feed bytes into a streaming SHA-256 state.
OP_SIGHASH = 2460xf6 — Push the Arkade tapscript sighash (non-BIP342) of the current input under a sighash flag.
OP_TWEAKVERIFY = 2280xe4 — Verify a tweaked public key:
internal + hash · G ?= tweaked.OP_TXID = 2430xf3 — Push the txid of the current transaction.
OP_TXWEIGHT = 2140xd6 — Push the transaction weight.
Remarks
Byte values track the deployed Arkade VM in arkade-os/emulator
(pkg/arkade/opcode.go) — the service that actually executes these
opcodes, and therefore the authority on what each byte means. Values match
the ts-sdk ARKADE_OP table (emulator v0.0.4).
The values fall in 0xb3 (repurposed NOP4 slot) and 0xc3–0xf6,
with 0xd0 and 0xdb–0xdf unassigned; standard Bitcoin
opcodes are emitted via NBitcoin's NBitcoin.Op type and are NOT
re-declared here.