@neuraiproject/neurai-scripts 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,6 +156,26 @@ var NeuraiScriptsBundle = (function (exports) {
156
156
  const OP_CHECKSIGVERIFY = 0xad;
157
157
  const OP_CHECKMULTISIG = 0xae;
158
158
  const OP_CHECKMULTISIGVERIFY = 0xaf;
159
+ // ---------- Extended hash opcodes ----------
160
+ // NIP-030: KECCAK256 / BLAKE2B in previously unassigned slots.
161
+ const OP_KECCAK256 = 0xba;
162
+ const OP_BLAKE2B = 0xbb;
163
+ // NIP-034a: modern hash opcodes (BLAKE3, SHA3-256, SHA-512).
164
+ // NIP-036: OP_POSEIDON — SNARK-friendly Poseidon hash over the BN254
165
+ // scalar field. Occupies slot 0xc9.
166
+ const OP_BLAKE3 = 0xc8;
167
+ const OP_POSEIDON = 0xc9;
168
+ const OP_SHA3_256 = 0xca;
169
+ const OP_SHA512 = 0xcb;
170
+ // ---------- Extended signature opcodes ----------
171
+ // NIP-035: strict-profile RFC 8032 PureEd25519 verifier in slot 0xdd.
172
+ // Stack contract: (sig64, msg, pubkey32 -- 0|1). Slots 0xd8..0xdc are
173
+ // reserved by NIP-033 (BLS12-381 family), unassigned in current code.
174
+ const OP_CHECKSIG_ED25519 = 0xdd;
175
+ // NIP-039: generic OP_CHECKSIG-compatible signature accumulator in slot
176
+ // 0xde. Stack contract: (sig, count, pubkey -- count + 0|1). Works with
177
+ // both legacy secp256k1 and PQ ML-DSA-44 keys via CPubKey::Verify().
178
+ const OP_CHECKSIGADD = 0xde;
159
179
  // ---------- Expansion / NOPs ----------
160
180
  // Only the NOPs not aliased by DePIN-Test opcodes are exported as NOPs.
161
181
  // OP_NOP2 == OP_CHECKLOCKTIMEVERIFY (0xb1)
@@ -195,6 +215,17 @@ var NeuraiScriptsBundle = (function (exports) {
195
215
  // scriptPubKey. Symmetric to TXFIELD_AUTHSCRIPT_COMMITMENT for inputs;
196
216
  // ignores any trailing OP_XNA_ASSET asset wrapper bytes.
197
217
  const OP_OUTPUTAUTHCOMMITMENT = 0xd5;
218
+ // ---------- Input value introspection (NIP-024) ----------
219
+ // Pushes the satoshi value of a selected input's spent prevout.
220
+ const OP_INPUTVALUE = 0xd6;
221
+ // ---------- Chain context introspection (NIP-026) ----------
222
+ // Pushes chain-context fields (block height, median time, etc.) selected
223
+ // by a single-byte selector consumed from the stack.
224
+ const OP_CHAINCONTEXT = 0xd7;
225
+ // ---------- Merkle inclusion (NIP-031) ----------
226
+ // Native Merkle inclusion verifier. Consumes (leaf, scheme_id, proof,
227
+ // root) and pushes a boolean. Flag off → bad-opcode.
228
+ const OP_CHECKMERKLEINCLUSION = 0xc1;
198
229
  // ---------- Byte manipulation (DePIN-Test) ----------
199
230
  const OP_CAT = 0x7e;
200
231
  const OP_SPLIT = 0xb7;
@@ -269,16 +300,22 @@ var NeuraiScriptsBundle = (function (exports) {
269
300
  OP_9: OP_9,
270
301
  OP_ABS: OP_ABS,
271
302
  OP_ADD: OP_ADD,
303
+ OP_BLAKE2B: OP_BLAKE2B,
304
+ OP_BLAKE3: OP_BLAKE3,
272
305
  OP_BOOLAND: OP_BOOLAND,
273
306
  OP_BOOLOR: OP_BOOLOR,
274
307
  OP_CAT: OP_CAT,
308
+ OP_CHAINCONTEXT: OP_CHAINCONTEXT,
275
309
  OP_CHECKLOCKTIMEVERIFY: OP_CHECKLOCKTIMEVERIFY,
310
+ OP_CHECKMERKLEINCLUSION: OP_CHECKMERKLEINCLUSION,
276
311
  OP_CHECKMULTISIG: OP_CHECKMULTISIG,
277
312
  OP_CHECKMULTISIGVERIFY: OP_CHECKMULTISIGVERIFY,
278
313
  OP_CHECKSEQUENCEVERIFY: OP_CHECKSEQUENCEVERIFY,
279
314
  OP_CHECKSIG: OP_CHECKSIG,
315
+ OP_CHECKSIGADD: OP_CHECKSIGADD,
280
316
  OP_CHECKSIGFROMSTACK: OP_CHECKSIGFROMSTACK,
281
317
  OP_CHECKSIGVERIFY: OP_CHECKSIGVERIFY,
318
+ OP_CHECKSIG_ED25519: OP_CHECKSIG_ED25519,
282
319
  OP_CHECKTEMPLATEVERIFY: OP_CHECKTEMPLATEVERIFY,
283
320
  OP_CODESEPARATOR: OP_CODESEPARATOR,
284
321
  OP_DEPTH: OP_DEPTH,
@@ -299,6 +336,8 @@ var NeuraiScriptsBundle = (function (exports) {
299
336
  OP_IFDUP: OP_IFDUP,
300
337
  OP_INPUTASSETFIELD: OP_INPUTASSETFIELD,
301
338
  OP_INPUTCOUNT: OP_INPUTCOUNT,
339
+ OP_INPUTVALUE: OP_INPUTVALUE,
340
+ OP_KECCAK256: OP_KECCAK256,
302
341
  OP_LESSTHAN: OP_LESSTHAN,
303
342
  OP_LESSTHANOREQUAL: OP_LESSTHANOREQUAL,
304
343
  OP_MAX: OP_MAX,
@@ -323,6 +362,7 @@ var NeuraiScriptsBundle = (function (exports) {
323
362
  OP_OUTPUTVALUE: OP_OUTPUTVALUE,
324
363
  OP_OVER: OP_OVER,
325
364
  OP_PICK: OP_PICK,
365
+ OP_POSEIDON: OP_POSEIDON,
326
366
  OP_PUSHDATA1: OP_PUSHDATA1,
327
367
  OP_PUSHDATA2: OP_PUSHDATA2,
328
368
  OP_PUSHDATA4: OP_PUSHDATA4,
@@ -337,6 +377,8 @@ var NeuraiScriptsBundle = (function (exports) {
337
377
  OP_ROT: OP_ROT,
338
378
  OP_SHA1: OP_SHA1,
339
379
  OP_SHA256: OP_SHA256,
380
+ OP_SHA3_256: OP_SHA3_256,
381
+ OP_SHA512: OP_SHA512,
340
382
  OP_SIZE: OP_SIZE,
341
383
  OP_SPLIT: OP_SPLIT,
342
384
  OP_SUB: OP_SUB,