@bitgo/wasm-utxo 4.26.0 → 4.27.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.
@@ -0,0 +1,45 @@
1
+ import { ZcashV6Transaction as WasmZcashV6Transaction } from "../wasm/wasm_utxo.js";
2
+ /**
3
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
4
+ *
5
+ * The transaction id is an instance method ({@link getId}) returning the canonical
6
+ * display-order hex, consistent with the `getId()` convention on the other
7
+ * transaction/PSBT wrappers. Callers never pass raw bytes to a txid function or have
8
+ * to reverse internal byte order themselves.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const tx = ZcashV6Transaction.fromBytes(rawV6Bytes);
13
+ * tx.getId(); // canonical (display-order) txid hex
14
+ * tx.ironwoodActionCount; // 0 when the Ironwood slot is empty
15
+ * ```
16
+ */
17
+ export declare class ZcashV6Transaction {
18
+ private _wasm;
19
+ private constructor();
20
+ /**
21
+ * Decode a v6 transaction from raw wire bytes.
22
+ * @throws If the bytes are not a valid v6 (Ironwood) transaction
23
+ */
24
+ static fromBytes(bytes: Uint8Array): ZcashV6Transaction;
25
+ /** Serialize back to raw v6 wire bytes. */
26
+ toBytes(): Uint8Array;
27
+ /** The canonical (display-order) ZIP-244 txid as a lowercase hex string. */
28
+ getId(): string;
29
+ /** The ZIP-244 txid in internal (non-reversed) byte order. */
30
+ txidBytes(): Uint8Array;
31
+ /** Consensus branch id carried in the v6 header. */
32
+ get consensusBranchId(): number;
33
+ /** Expiry height. */
34
+ get expiryHeight(): number;
35
+ /** Number of Ironwood actions (0 when the Ironwood slot is empty). */
36
+ get ironwoodActionCount(): number;
37
+ /** Net value crossing the Ironwood pool boundary (0 when there is no bundle). */
38
+ get ironwoodValueBalance(): bigint;
39
+ /** The Ironwood bundle flag byte, or `undefined` when there is no bundle. */
40
+ get ironwoodFlags(): number | undefined;
41
+ /** The Ironwood note-commitment tree anchor (32 bytes), or `undefined`. */
42
+ get ironwoodAnchor(): Uint8Array | undefined;
43
+ /** @internal */
44
+ get wasm(): WasmZcashV6Transaction;
45
+ }
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZcashV6Transaction = void 0;
4
+ const wasm_utxo_js_1 = require("../wasm/wasm_utxo.js");
5
+ /**
6
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
7
+ *
8
+ * The transaction id is an instance method ({@link getId}) returning the canonical
9
+ * display-order hex, consistent with the `getId()` convention on the other
10
+ * transaction/PSBT wrappers. Callers never pass raw bytes to a txid function or have
11
+ * to reverse internal byte order themselves.
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const tx = ZcashV6Transaction.fromBytes(rawV6Bytes);
16
+ * tx.getId(); // canonical (display-order) txid hex
17
+ * tx.ironwoodActionCount; // 0 when the Ironwood slot is empty
18
+ * ```
19
+ */
20
+ class ZcashV6Transaction {
21
+ _wasm;
22
+ constructor(_wasm) {
23
+ this._wasm = _wasm;
24
+ }
25
+ /**
26
+ * Decode a v6 transaction from raw wire bytes.
27
+ * @throws If the bytes are not a valid v6 (Ironwood) transaction
28
+ */
29
+ static fromBytes(bytes) {
30
+ return new ZcashV6Transaction(wasm_utxo_js_1.ZcashV6Transaction.fromBytes(bytes));
31
+ }
32
+ /** Serialize back to raw v6 wire bytes. */
33
+ toBytes() {
34
+ return this._wasm.toBytes();
35
+ }
36
+ /** The canonical (display-order) ZIP-244 txid as a lowercase hex string. */
37
+ getId() {
38
+ return this._wasm.getId();
39
+ }
40
+ /** The ZIP-244 txid in internal (non-reversed) byte order. */
41
+ txidBytes() {
42
+ return this._wasm.txidBytes();
43
+ }
44
+ /** Consensus branch id carried in the v6 header. */
45
+ get consensusBranchId() {
46
+ return this._wasm.consensusBranchId;
47
+ }
48
+ /** Expiry height. */
49
+ get expiryHeight() {
50
+ return this._wasm.expiryHeight;
51
+ }
52
+ /** Number of Ironwood actions (0 when the Ironwood slot is empty). */
53
+ get ironwoodActionCount() {
54
+ return this._wasm.ironwoodActionCount;
55
+ }
56
+ /** Net value crossing the Ironwood pool boundary (0 when there is no bundle). */
57
+ get ironwoodValueBalance() {
58
+ return this._wasm.ironwoodValueBalance;
59
+ }
60
+ /** The Ironwood bundle flag byte, or `undefined` when there is no bundle. */
61
+ get ironwoodFlags() {
62
+ return this._wasm.ironwoodFlags;
63
+ }
64
+ /** The Ironwood note-commitment tree anchor (32 bytes), or `undefined`. */
65
+ get ironwoodAnchor() {
66
+ return this._wasm.ironwoodAnchor;
67
+ }
68
+ /** @internal */
69
+ get wasm() {
70
+ return this._wasm;
71
+ }
72
+ }
73
+ exports.ZcashV6Transaction = ZcashV6Transaction;
@@ -10,6 +10,7 @@ export { BitGoPsbt, getWalletKeysFromPsbt, type NetworkName, type ScriptId, type
10
10
  export { BitGoKeySubtype, type PsbtKvKey } from "./BitGoKeySubtype.js";
11
11
  export { ZcashBitGoPsbt, type ZcashNetworkName, type CreateEmptyZcashOptions, } from "./ZcashBitGoPsbt.js";
12
12
  export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
13
+ export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
13
14
  import type { ScriptType } from "./scriptType.js";
14
15
  /**
15
16
  * Check if a network supports a given fixed-script wallet script type
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ZcashUnifiedAddress = exports.ZcashBitGoPsbt = exports.BitGoKeySubtype = exports.getWalletKeysFromPsbt = exports.BitGoPsbt = exports.requiresPrevTxForP2sh = exports.assertChainCode = exports.chainCodes = exports.ChainCode = exports.inputScriptTypes = exports.outputScriptTypes = exports.Dimensions = exports.address = exports.outputScript = exports.ReplayProtection = exports.RootWalletKeys = void 0;
3
+ exports.ZcashV6Transaction = exports.ZcashUnifiedAddress = exports.ZcashBitGoPsbt = exports.BitGoKeySubtype = exports.getWalletKeysFromPsbt = exports.BitGoPsbt = exports.requiresPrevTxForP2sh = exports.assertChainCode = exports.chainCodes = exports.ChainCode = exports.inputScriptTypes = exports.outputScriptTypes = exports.Dimensions = exports.address = exports.outputScript = exports.ReplayProtection = exports.RootWalletKeys = void 0;
4
4
  exports.supportsScriptType = supportsScriptType;
5
5
  exports.createOpReturnScript = createOpReturnScript;
6
6
  exports.p2shP2pkOutputScript = p2shP2pkOutputScript;
@@ -36,6 +36,9 @@ Object.defineProperty(exports, "ZcashBitGoPsbt", { enumerable: true, get: functi
36
36
  // Zcash ZIP-316 Unified Address
37
37
  var ZcashUnifiedAddress_js_1 = require("./ZcashUnifiedAddress.js");
38
38
  Object.defineProperty(exports, "ZcashUnifiedAddress", { enumerable: true, get: function () { return ZcashUnifiedAddress_js_1.ZcashUnifiedAddress; } });
39
+ // Zcash v6 (Ironwood / NU6.3) transaction
40
+ var ZcashV6Transaction_js_1 = require("./ZcashV6Transaction.js");
41
+ Object.defineProperty(exports, "ZcashV6Transaction", { enumerable: true, get: function () { return ZcashV6Transaction_js_1.ZcashV6Transaction; } });
39
42
  /**
40
43
  * Check if a network supports a given fixed-script wallet script type
41
44
  *
@@ -1621,6 +1621,64 @@ export class ZcashUnifiedAddress {
1621
1621
  readonly transparentScript: Uint8Array | undefined;
1622
1622
  }
1623
1623
 
1624
+ /**
1625
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
1626
+ *
1627
+ * This wraps the raw v6 wire codec. The transaction id is exposed as an instance
1628
+ * method [`ZcashV6Transaction::get_id`] (canonical display-order hex), matching the
1629
+ * `getId()` convention used by the other transaction/PSBT wrappers, so callers never
1630
+ * pass raw bytes to a txid function or juggle internal vs display byte order.
1631
+ */
1632
+ export class ZcashV6Transaction {
1633
+ private constructor();
1634
+ free(): void;
1635
+ [Symbol.dispose](): void;
1636
+ /**
1637
+ * Decode a v6 transaction from raw wire bytes. Throws if the bytes are not a
1638
+ * valid v6 (Ironwood) transaction.
1639
+ */
1640
+ static fromBytes(bytes: Uint8Array): ZcashV6Transaction;
1641
+ /**
1642
+ * The canonical (display-order) ZIP-244 txid as a lowercase hex string.
1643
+ *
1644
+ * `Txid`'s `Display` emits display-order (byte-reversed) hex, matching how a
1645
+ * transaction id is printed everywhere else in the codebase.
1646
+ */
1647
+ getId(): string;
1648
+ /**
1649
+ * Serialize back to raw v6 wire bytes.
1650
+ */
1651
+ toBytes(): Uint8Array;
1652
+ /**
1653
+ * The ZIP-244 txid in internal (non-reversed) byte order.
1654
+ */
1655
+ txidBytes(): Uint8Array;
1656
+ /**
1657
+ * Consensus branch id carried in the v6 header.
1658
+ */
1659
+ readonly consensusBranchId: number;
1660
+ /**
1661
+ * Expiry height.
1662
+ */
1663
+ readonly expiryHeight: number;
1664
+ /**
1665
+ * Number of Ironwood actions (0 when the Ironwood slot is empty).
1666
+ */
1667
+ readonly ironwoodActionCount: number;
1668
+ /**
1669
+ * The Ironwood note-commitment tree anchor (32 bytes), or `undefined`.
1670
+ */
1671
+ readonly ironwoodAnchor: Uint8Array | undefined;
1672
+ /**
1673
+ * The Ironwood bundle flag byte, or `undefined` when there is no bundle.
1674
+ */
1675
+ readonly ironwoodFlags: number | undefined;
1676
+ /**
1677
+ * Net value crossing the Ironwood pool boundary (0 when there is no bundle).
1678
+ */
1679
+ readonly ironwoodValueBalance: bigint;
1680
+ }
1681
+
1624
1682
  /**
1625
1683
  * Check if the inspect feature is enabled.
1626
1684
  *
@@ -6355,6 +6355,181 @@ class ZcashUnifiedAddress {
6355
6355
  if (Symbol.dispose) ZcashUnifiedAddress.prototype[Symbol.dispose] = ZcashUnifiedAddress.prototype.free;
6356
6356
  exports.ZcashUnifiedAddress = ZcashUnifiedAddress;
6357
6357
 
6358
+ /**
6359
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
6360
+ *
6361
+ * This wraps the raw v6 wire codec. The transaction id is exposed as an instance
6362
+ * method [`ZcashV6Transaction::get_id`] (canonical display-order hex), matching the
6363
+ * `getId()` convention used by the other transaction/PSBT wrappers, so callers never
6364
+ * pass raw bytes to a txid function or juggle internal vs display byte order.
6365
+ */
6366
+ class ZcashV6Transaction {
6367
+ static __wrap(ptr) {
6368
+ ptr = ptr >>> 0;
6369
+ const obj = Object.create(ZcashV6Transaction.prototype);
6370
+ obj.__wbg_ptr = ptr;
6371
+ ZcashV6TransactionFinalization.register(obj, obj.__wbg_ptr, obj);
6372
+ return obj;
6373
+ }
6374
+ __destroy_into_raw() {
6375
+ const ptr = this.__wbg_ptr;
6376
+ this.__wbg_ptr = 0;
6377
+ ZcashV6TransactionFinalization.unregister(this);
6378
+ return ptr;
6379
+ }
6380
+ free() {
6381
+ const ptr = this.__destroy_into_raw();
6382
+ wasm.__wbg_zcashv6transaction_free(ptr, 0);
6383
+ }
6384
+ /**
6385
+ * Consensus branch id carried in the v6 header.
6386
+ * @returns {number}
6387
+ */
6388
+ get consensusBranchId() {
6389
+ const ret = wasm.zcashv6transaction_consensusBranchId(this.__wbg_ptr);
6390
+ return ret >>> 0;
6391
+ }
6392
+ /**
6393
+ * Expiry height.
6394
+ * @returns {number}
6395
+ */
6396
+ get expiryHeight() {
6397
+ const ret = wasm.zcashv6transaction_expiryHeight(this.__wbg_ptr);
6398
+ return ret >>> 0;
6399
+ }
6400
+ /**
6401
+ * Decode a v6 transaction from raw wire bytes. Throws if the bytes are not a
6402
+ * valid v6 (Ironwood) transaction.
6403
+ * @param {Uint8Array} bytes
6404
+ * @returns {ZcashV6Transaction}
6405
+ */
6406
+ static fromBytes(bytes) {
6407
+ try {
6408
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6409
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
6410
+ const len0 = WASM_VECTOR_LEN;
6411
+ wasm.zcashv6transaction_fromBytes(retptr, ptr0, len0);
6412
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6413
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6414
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6415
+ if (r2) {
6416
+ throw takeObject(r1);
6417
+ }
6418
+ return ZcashV6Transaction.__wrap(r0);
6419
+ } finally {
6420
+ wasm.__wbindgen_add_to_stack_pointer(16);
6421
+ }
6422
+ }
6423
+ /**
6424
+ * The canonical (display-order) ZIP-244 txid as a lowercase hex string.
6425
+ *
6426
+ * `Txid`'s `Display` emits display-order (byte-reversed) hex, matching how a
6427
+ * transaction id is printed everywhere else in the codebase.
6428
+ * @returns {string}
6429
+ */
6430
+ getId() {
6431
+ let deferred1_0;
6432
+ let deferred1_1;
6433
+ try {
6434
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6435
+ wasm.zcashv6transaction_getId(retptr, this.__wbg_ptr);
6436
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6437
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6438
+ deferred1_0 = r0;
6439
+ deferred1_1 = r1;
6440
+ return getStringFromWasm0(r0, r1);
6441
+ } finally {
6442
+ wasm.__wbindgen_add_to_stack_pointer(16);
6443
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
6444
+ }
6445
+ }
6446
+ /**
6447
+ * Number of Ironwood actions (0 when the Ironwood slot is empty).
6448
+ * @returns {number}
6449
+ */
6450
+ get ironwoodActionCount() {
6451
+ const ret = wasm.zcashv6transaction_ironwoodActionCount(this.__wbg_ptr);
6452
+ return ret >>> 0;
6453
+ }
6454
+ /**
6455
+ * The Ironwood note-commitment tree anchor (32 bytes), or `undefined`.
6456
+ * @returns {Uint8Array | undefined}
6457
+ */
6458
+ get ironwoodAnchor() {
6459
+ try {
6460
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6461
+ wasm.zcashv6transaction_ironwoodAnchor(retptr, this.__wbg_ptr);
6462
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6463
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6464
+ let v1;
6465
+ if (r0 !== 0) {
6466
+ v1 = getArrayU8FromWasm0(r0, r1).slice();
6467
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
6468
+ }
6469
+ return v1;
6470
+ } finally {
6471
+ wasm.__wbindgen_add_to_stack_pointer(16);
6472
+ }
6473
+ }
6474
+ /**
6475
+ * The Ironwood bundle flag byte, or `undefined` when there is no bundle.
6476
+ * @returns {number | undefined}
6477
+ */
6478
+ get ironwoodFlags() {
6479
+ const ret = wasm.zcashv6transaction_ironwoodFlags(this.__wbg_ptr);
6480
+ return ret === 0xFFFFFF ? undefined : ret;
6481
+ }
6482
+ /**
6483
+ * Net value crossing the Ironwood pool boundary (0 when there is no bundle).
6484
+ * @returns {bigint}
6485
+ */
6486
+ get ironwoodValueBalance() {
6487
+ const ret = wasm.zcashv6transaction_ironwoodValueBalance(this.__wbg_ptr);
6488
+ return ret;
6489
+ }
6490
+ /**
6491
+ * Serialize back to raw v6 wire bytes.
6492
+ * @returns {Uint8Array}
6493
+ */
6494
+ toBytes() {
6495
+ try {
6496
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6497
+ wasm.zcashv6transaction_toBytes(retptr, this.__wbg_ptr);
6498
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6499
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6500
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6501
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
6502
+ if (r3) {
6503
+ throw takeObject(r2);
6504
+ }
6505
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
6506
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
6507
+ return v1;
6508
+ } finally {
6509
+ wasm.__wbindgen_add_to_stack_pointer(16);
6510
+ }
6511
+ }
6512
+ /**
6513
+ * The ZIP-244 txid in internal (non-reversed) byte order.
6514
+ * @returns {Uint8Array}
6515
+ */
6516
+ txidBytes() {
6517
+ try {
6518
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6519
+ wasm.zcashv6transaction_txidBytes(retptr, this.__wbg_ptr);
6520
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6521
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6522
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
6523
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
6524
+ return v1;
6525
+ } finally {
6526
+ wasm.__wbindgen_add_to_stack_pointer(16);
6527
+ }
6528
+ }
6529
+ }
6530
+ if (Symbol.dispose) ZcashV6Transaction.prototype[Symbol.dispose] = ZcashV6Transaction.prototype.free;
6531
+ exports.ZcashV6Transaction = ZcashV6Transaction;
6532
+
6358
6533
  /**
6359
6534
  * Check if the inspect feature is enabled.
6360
6535
  *
@@ -6858,6 +7033,9 @@ const WrapPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
6858
7033
  const ZcashUnifiedAddressFinalization = (typeof FinalizationRegistry === 'undefined')
6859
7034
  ? { register: () => {}, unregister: () => {} }
6860
7035
  : new FinalizationRegistry(ptr => wasm.__wbg_zcashunifiedaddress_free(ptr >>> 0, 1));
7036
+ const ZcashV6TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
7037
+ ? { register: () => {}, unregister: () => {} }
7038
+ : new FinalizationRegistry(ptr => wasm.__wbg_zcashv6transaction_free(ptr >>> 0, 1));
6861
7039
 
6862
7040
  function addHeapObject(obj) {
6863
7041
  if (heap_next === heap.length) heap.push(heap.length + 1);
Binary file
@@ -1,24 +1,16 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
5
4
  export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
6
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
7
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
8
5
  export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
9
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
10
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
6
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
11
7
  export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
12
8
  export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
13
9
  export const __wbg_wrappsbt_free: (a: number, b: number) => void;
14
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
15
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
10
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
11
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
16
12
  export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
17
13
  export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
18
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
19
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
20
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
21
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
22
14
  export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
23
15
  export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
24
16
  export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
@@ -29,26 +21,16 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
29
21
  export const wasmdashtransaction_output_count: (a: number) => number;
30
22
  export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
31
23
  export const wasmdashtransaction_version: (a: number) => number;
32
- export const wasmdimensions_empty: () => number;
33
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
34
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
35
- export const wasmdimensions_from_output_script_length: (a: number) => number;
36
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
37
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
38
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
39
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
40
- export const wasmdimensions_get_output_vsize: (a: number) => number;
41
- export const wasmdimensions_get_output_weight: (a: number) => number;
42
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
43
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
44
- export const wasmdimensions_has_segwit: (a: number) => number;
45
- export const wasmdimensions_plus: (a: number, b: number) => number;
46
- export const wasmdimensions_times: (a: number, b: number) => number;
47
- export const wasmrootwalletkeys_backup_key: (a: number) => number;
48
- export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
49
- export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
50
- export const wasmrootwalletkeys_user_key: (a: number) => number;
51
- export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
24
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
25
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
26
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
27
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
28
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
29
+ export const wasmecpair_private_key: (a: number) => number;
30
+ export const wasmecpair_public_key: (a: number) => number;
31
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
32
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
33
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
52
34
  export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
53
35
  export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
54
36
  export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
@@ -110,6 +92,22 @@ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: nu
110
92
  export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
111
93
  export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
112
94
  export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
95
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
96
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
97
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
98
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
99
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
100
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
101
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
102
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
103
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
104
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
105
+ export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
106
+ export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
107
+ export const zcashv6transaction_ironwoodFlags: (a: number) => number;
108
+ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
109
+ export const zcashv6transaction_toBytes: (a: number, b: number) => void;
110
+ export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
113
111
  export const wasmtransaction_input_count: (a: number) => number;
114
112
  export const wasmtransaction_output_count: (a: number) => number;
115
113
  export const wasmzcashtransaction_input_count: (a: number) => number;
@@ -120,13 +118,35 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
120
118
  export const wasmzcashtransaction_version: (a: number) => number;
121
119
  export const wrappsbt_lock_time: (a: number) => number;
122
120
  export const wrappsbt_version: (a: number) => number;
121
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
122
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
123
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
124
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
125
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
126
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
127
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
128
+ export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
129
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
130
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
131
+ export const wrapdescriptor_node: (a: number, b: number) => void;
132
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
133
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
134
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
135
+ export const wrapminiscript_encode: (a: number, b: number) => void;
136
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
137
+ export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
138
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
139
+ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
140
+ export const wrapminiscript_node: (a: number, b: number) => void;
141
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
142
+ export const wrapminiscript_toString: (a: number, b: number) => void;
123
143
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
124
144
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
125
145
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
146
+ export const __wbg_messagenamespace_free: (a: number, b: number) => void;
126
147
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
127
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
128
148
  export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
129
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
149
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
130
150
  export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
131
151
  export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
132
152
  export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
@@ -216,8 +236,8 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
216
236
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
217
237
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
218
238
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
219
- export const isInspectEnabled: () => number;
220
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
239
+ export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
240
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
221
241
  export const wasmbip32_chain_code: (a: number) => number;
222
242
  export const wasmbip32_depth: (a: number) => number;
223
243
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -240,55 +260,46 @@ export const wasmbip32_private_key: (a: number) => number;
240
260
  export const wasmbip32_public_key: (a: number) => number;
241
261
  export const wasmbip32_to_base58: (a: number, b: number) => void;
242
262
  export const wasmbip32_to_wif: (a: number, b: number) => void;
243
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
244
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
245
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
246
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
247
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
248
- export const wasmecpair_private_key: (a: number) => number;
249
- export const wasmecpair_public_key: (a: number) => number;
250
- export const wasmecpair_to_wif: (a: number, b: number) => void;
251
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
252
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
253
263
  export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
254
264
  export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
255
265
  export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
256
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
257
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
258
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
259
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
260
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
261
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
266
+ export const wasmrootwalletkeys_backup_key: (a: number) => number;
267
+ export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
268
+ export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
269
+ export const wasmrootwalletkeys_user_key: (a: number) => number;
270
+ export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
262
271
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
263
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
264
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
272
+ export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
265
273
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
266
274
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
267
- export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
275
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
276
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
277
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
268
278
  export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
269
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
270
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
279
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
280
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
281
+ export const isInspectEnabled: () => number;
282
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
283
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
284
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
285
+ export const wasmdimensions_empty: () => number;
286
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
287
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
288
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
289
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
290
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
291
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
292
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
293
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
294
+ export const wasmdimensions_get_output_weight: (a: number) => number;
295
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
296
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
297
+ export const wasmdimensions_has_segwit: (a: number) => number;
298
+ export const wasmdimensions_plus: (a: number, b: number) => number;
299
+ export const wasmdimensions_times: (a: number, b: number) => number;
271
300
  export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
272
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
273
- export const wrapdescriptor_descType: (a: number, b: number) => void;
274
- export const wrapdescriptor_encode: (a: number, b: number) => void;
275
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
276
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
277
- export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
278
- export const wrapdescriptor_hasWildcard: (a: number) => number;
279
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
280
- export const wrapdescriptor_node: (a: number, b: number) => void;
281
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
282
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
283
- export const wrapdescriptor_toString: (a: number, b: number) => void;
284
- export const wrapminiscript_encode: (a: number, b: number) => void;
285
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
286
- export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
287
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
288
- export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
289
- export const wrapminiscript_node: (a: number, b: number) => void;
290
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
291
- export const wrapminiscript_toString: (a: number, b: number) => void;
301
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
302
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
292
303
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
293
304
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
294
305
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
@@ -0,0 +1,45 @@
1
+ import { ZcashV6Transaction as WasmZcashV6Transaction } from "../wasm/wasm_utxo.js";
2
+ /**
3
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
4
+ *
5
+ * The transaction id is an instance method ({@link getId}) returning the canonical
6
+ * display-order hex, consistent with the `getId()` convention on the other
7
+ * transaction/PSBT wrappers. Callers never pass raw bytes to a txid function or have
8
+ * to reverse internal byte order themselves.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const tx = ZcashV6Transaction.fromBytes(rawV6Bytes);
13
+ * tx.getId(); // canonical (display-order) txid hex
14
+ * tx.ironwoodActionCount; // 0 when the Ironwood slot is empty
15
+ * ```
16
+ */
17
+ export declare class ZcashV6Transaction {
18
+ private _wasm;
19
+ private constructor();
20
+ /**
21
+ * Decode a v6 transaction from raw wire bytes.
22
+ * @throws If the bytes are not a valid v6 (Ironwood) transaction
23
+ */
24
+ static fromBytes(bytes: Uint8Array): ZcashV6Transaction;
25
+ /** Serialize back to raw v6 wire bytes. */
26
+ toBytes(): Uint8Array;
27
+ /** The canonical (display-order) ZIP-244 txid as a lowercase hex string. */
28
+ getId(): string;
29
+ /** The ZIP-244 txid in internal (non-reversed) byte order. */
30
+ txidBytes(): Uint8Array;
31
+ /** Consensus branch id carried in the v6 header. */
32
+ get consensusBranchId(): number;
33
+ /** Expiry height. */
34
+ get expiryHeight(): number;
35
+ /** Number of Ironwood actions (0 when the Ironwood slot is empty). */
36
+ get ironwoodActionCount(): number;
37
+ /** Net value crossing the Ironwood pool boundary (0 when there is no bundle). */
38
+ get ironwoodValueBalance(): bigint;
39
+ /** The Ironwood bundle flag byte, or `undefined` when there is no bundle. */
40
+ get ironwoodFlags(): number | undefined;
41
+ /** The Ironwood note-commitment tree anchor (32 bytes), or `undefined`. */
42
+ get ironwoodAnchor(): Uint8Array | undefined;
43
+ /** @internal */
44
+ get wasm(): WasmZcashV6Transaction;
45
+ }
@@ -0,0 +1,69 @@
1
+ import { ZcashV6Transaction as WasmZcashV6Transaction } from "../wasm/wasm_utxo.js";
2
+ /**
3
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
4
+ *
5
+ * The transaction id is an instance method ({@link getId}) returning the canonical
6
+ * display-order hex, consistent with the `getId()` convention on the other
7
+ * transaction/PSBT wrappers. Callers never pass raw bytes to a txid function or have
8
+ * to reverse internal byte order themselves.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const tx = ZcashV6Transaction.fromBytes(rawV6Bytes);
13
+ * tx.getId(); // canonical (display-order) txid hex
14
+ * tx.ironwoodActionCount; // 0 when the Ironwood slot is empty
15
+ * ```
16
+ */
17
+ export class ZcashV6Transaction {
18
+ _wasm;
19
+ constructor(_wasm) {
20
+ this._wasm = _wasm;
21
+ }
22
+ /**
23
+ * Decode a v6 transaction from raw wire bytes.
24
+ * @throws If the bytes are not a valid v6 (Ironwood) transaction
25
+ */
26
+ static fromBytes(bytes) {
27
+ return new ZcashV6Transaction(WasmZcashV6Transaction.fromBytes(bytes));
28
+ }
29
+ /** Serialize back to raw v6 wire bytes. */
30
+ toBytes() {
31
+ return this._wasm.toBytes();
32
+ }
33
+ /** The canonical (display-order) ZIP-244 txid as a lowercase hex string. */
34
+ getId() {
35
+ return this._wasm.getId();
36
+ }
37
+ /** The ZIP-244 txid in internal (non-reversed) byte order. */
38
+ txidBytes() {
39
+ return this._wasm.txidBytes();
40
+ }
41
+ /** Consensus branch id carried in the v6 header. */
42
+ get consensusBranchId() {
43
+ return this._wasm.consensusBranchId;
44
+ }
45
+ /** Expiry height. */
46
+ get expiryHeight() {
47
+ return this._wasm.expiryHeight;
48
+ }
49
+ /** Number of Ironwood actions (0 when the Ironwood slot is empty). */
50
+ get ironwoodActionCount() {
51
+ return this._wasm.ironwoodActionCount;
52
+ }
53
+ /** Net value crossing the Ironwood pool boundary (0 when there is no bundle). */
54
+ get ironwoodValueBalance() {
55
+ return this._wasm.ironwoodValueBalance;
56
+ }
57
+ /** The Ironwood bundle flag byte, or `undefined` when there is no bundle. */
58
+ get ironwoodFlags() {
59
+ return this._wasm.ironwoodFlags;
60
+ }
61
+ /** The Ironwood note-commitment tree anchor (32 bytes), or `undefined`. */
62
+ get ironwoodAnchor() {
63
+ return this._wasm.ironwoodAnchor;
64
+ }
65
+ /** @internal */
66
+ get wasm() {
67
+ return this._wasm;
68
+ }
69
+ }
@@ -10,6 +10,7 @@ export { BitGoPsbt, getWalletKeysFromPsbt, type NetworkName, type ScriptId, type
10
10
  export { BitGoKeySubtype, type PsbtKvKey } from "./BitGoKeySubtype.js";
11
11
  export { ZcashBitGoPsbt, type ZcashNetworkName, type CreateEmptyZcashOptions, } from "./ZcashBitGoPsbt.js";
12
12
  export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
13
+ export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
13
14
  import type { ScriptType } from "./scriptType.js";
14
15
  /**
15
16
  * Check if a network supports a given fixed-script wallet script type
@@ -14,6 +14,8 @@ export { BitGoKeySubtype } from "./BitGoKeySubtype.js";
14
14
  export { ZcashBitGoPsbt, } from "./ZcashBitGoPsbt.js";
15
15
  // Zcash ZIP-316 Unified Address
16
16
  export { ZcashUnifiedAddress } from "./ZcashUnifiedAddress.js";
17
+ // Zcash v6 (Ironwood / NU6.3) transaction
18
+ export { ZcashV6Transaction } from "./ZcashV6Transaction.js";
17
19
  /**
18
20
  * Check if a network supports a given fixed-script wallet script type
19
21
  *
@@ -1621,6 +1621,64 @@ export class ZcashUnifiedAddress {
1621
1621
  readonly transparentScript: Uint8Array | undefined;
1622
1622
  }
1623
1623
 
1624
+ /**
1625
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
1626
+ *
1627
+ * This wraps the raw v6 wire codec. The transaction id is exposed as an instance
1628
+ * method [`ZcashV6Transaction::get_id`] (canonical display-order hex), matching the
1629
+ * `getId()` convention used by the other transaction/PSBT wrappers, so callers never
1630
+ * pass raw bytes to a txid function or juggle internal vs display byte order.
1631
+ */
1632
+ export class ZcashV6Transaction {
1633
+ private constructor();
1634
+ free(): void;
1635
+ [Symbol.dispose](): void;
1636
+ /**
1637
+ * Decode a v6 transaction from raw wire bytes. Throws if the bytes are not a
1638
+ * valid v6 (Ironwood) transaction.
1639
+ */
1640
+ static fromBytes(bytes: Uint8Array): ZcashV6Transaction;
1641
+ /**
1642
+ * The canonical (display-order) ZIP-244 txid as a lowercase hex string.
1643
+ *
1644
+ * `Txid`'s `Display` emits display-order (byte-reversed) hex, matching how a
1645
+ * transaction id is printed everywhere else in the codebase.
1646
+ */
1647
+ getId(): string;
1648
+ /**
1649
+ * Serialize back to raw v6 wire bytes.
1650
+ */
1651
+ toBytes(): Uint8Array;
1652
+ /**
1653
+ * The ZIP-244 txid in internal (non-reversed) byte order.
1654
+ */
1655
+ txidBytes(): Uint8Array;
1656
+ /**
1657
+ * Consensus branch id carried in the v6 header.
1658
+ */
1659
+ readonly consensusBranchId: number;
1660
+ /**
1661
+ * Expiry height.
1662
+ */
1663
+ readonly expiryHeight: number;
1664
+ /**
1665
+ * Number of Ironwood actions (0 when the Ironwood slot is empty).
1666
+ */
1667
+ readonly ironwoodActionCount: number;
1668
+ /**
1669
+ * The Ironwood note-commitment tree anchor (32 bytes), or `undefined`.
1670
+ */
1671
+ readonly ironwoodAnchor: Uint8Array | undefined;
1672
+ /**
1673
+ * The Ironwood bundle flag byte, or `undefined` when there is no bundle.
1674
+ */
1675
+ readonly ironwoodFlags: number | undefined;
1676
+ /**
1677
+ * Net value crossing the Ironwood pool boundary (0 when there is no bundle).
1678
+ */
1679
+ readonly ironwoodValueBalance: bigint;
1680
+ }
1681
+
1624
1682
  /**
1625
1683
  * Check if the inspect feature is enabled.
1626
1684
  *
@@ -5,5 +5,5 @@ import { __wbg_set_wasm } from "./wasm_utxo_bg.js";
5
5
  __wbg_set_wasm(wasm);
6
6
 
7
7
  export {
8
- AddressNamespace, Bip322Namespace, BitGoPsbt, FixedScriptWalletNamespace, InscriptionsNamespace, MessageNamespace, UtxolibCompatNamespace, WasmBIP32, WasmDashTransaction, WasmDimensions, WasmECPair, WasmReplayProtection, WasmRootWalletKeys, WasmTransaction, WasmUtxoNamespace, WasmZcashTransaction, WrapDescriptor, WrapMiniscript, WrapPsbt, ZcashUnifiedAddress, isInspectEnabled, parsePsbtRawToJson, parsePsbtToJson, parseTxToJson, zcash_branch_id_for_height
8
+ AddressNamespace, Bip322Namespace, BitGoPsbt, FixedScriptWalletNamespace, InscriptionsNamespace, MessageNamespace, UtxolibCompatNamespace, WasmBIP32, WasmDashTransaction, WasmDimensions, WasmECPair, WasmReplayProtection, WasmRootWalletKeys, WasmTransaction, WasmUtxoNamespace, WasmZcashTransaction, WrapDescriptor, WrapMiniscript, WrapPsbt, ZcashUnifiedAddress, ZcashV6Transaction, isInspectEnabled, parsePsbtRawToJson, parsePsbtToJson, parseTxToJson, zcash_branch_id_for_height
9
9
  } from "./wasm_utxo_bg.js";
@@ -6333,6 +6333,180 @@ export class ZcashUnifiedAddress {
6333
6333
  }
6334
6334
  if (Symbol.dispose) ZcashUnifiedAddress.prototype[Symbol.dispose] = ZcashUnifiedAddress.prototype.free;
6335
6335
 
6336
+ /**
6337
+ * A parsed Zcash v6 (Ironwood / NU6.3) transaction — for inspection and txid.
6338
+ *
6339
+ * This wraps the raw v6 wire codec. The transaction id is exposed as an instance
6340
+ * method [`ZcashV6Transaction::get_id`] (canonical display-order hex), matching the
6341
+ * `getId()` convention used by the other transaction/PSBT wrappers, so callers never
6342
+ * pass raw bytes to a txid function or juggle internal vs display byte order.
6343
+ */
6344
+ export class ZcashV6Transaction {
6345
+ static __wrap(ptr) {
6346
+ ptr = ptr >>> 0;
6347
+ const obj = Object.create(ZcashV6Transaction.prototype);
6348
+ obj.__wbg_ptr = ptr;
6349
+ ZcashV6TransactionFinalization.register(obj, obj.__wbg_ptr, obj);
6350
+ return obj;
6351
+ }
6352
+ __destroy_into_raw() {
6353
+ const ptr = this.__wbg_ptr;
6354
+ this.__wbg_ptr = 0;
6355
+ ZcashV6TransactionFinalization.unregister(this);
6356
+ return ptr;
6357
+ }
6358
+ free() {
6359
+ const ptr = this.__destroy_into_raw();
6360
+ wasm.__wbg_zcashv6transaction_free(ptr, 0);
6361
+ }
6362
+ /**
6363
+ * Consensus branch id carried in the v6 header.
6364
+ * @returns {number}
6365
+ */
6366
+ get consensusBranchId() {
6367
+ const ret = wasm.zcashv6transaction_consensusBranchId(this.__wbg_ptr);
6368
+ return ret >>> 0;
6369
+ }
6370
+ /**
6371
+ * Expiry height.
6372
+ * @returns {number}
6373
+ */
6374
+ get expiryHeight() {
6375
+ const ret = wasm.zcashv6transaction_expiryHeight(this.__wbg_ptr);
6376
+ return ret >>> 0;
6377
+ }
6378
+ /**
6379
+ * Decode a v6 transaction from raw wire bytes. Throws if the bytes are not a
6380
+ * valid v6 (Ironwood) transaction.
6381
+ * @param {Uint8Array} bytes
6382
+ * @returns {ZcashV6Transaction}
6383
+ */
6384
+ static fromBytes(bytes) {
6385
+ try {
6386
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6387
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
6388
+ const len0 = WASM_VECTOR_LEN;
6389
+ wasm.zcashv6transaction_fromBytes(retptr, ptr0, len0);
6390
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6391
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6392
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6393
+ if (r2) {
6394
+ throw takeObject(r1);
6395
+ }
6396
+ return ZcashV6Transaction.__wrap(r0);
6397
+ } finally {
6398
+ wasm.__wbindgen_add_to_stack_pointer(16);
6399
+ }
6400
+ }
6401
+ /**
6402
+ * The canonical (display-order) ZIP-244 txid as a lowercase hex string.
6403
+ *
6404
+ * `Txid`'s `Display` emits display-order (byte-reversed) hex, matching how a
6405
+ * transaction id is printed everywhere else in the codebase.
6406
+ * @returns {string}
6407
+ */
6408
+ getId() {
6409
+ let deferred1_0;
6410
+ let deferred1_1;
6411
+ try {
6412
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6413
+ wasm.zcashv6transaction_getId(retptr, this.__wbg_ptr);
6414
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6415
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6416
+ deferred1_0 = r0;
6417
+ deferred1_1 = r1;
6418
+ return getStringFromWasm0(r0, r1);
6419
+ } finally {
6420
+ wasm.__wbindgen_add_to_stack_pointer(16);
6421
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
6422
+ }
6423
+ }
6424
+ /**
6425
+ * Number of Ironwood actions (0 when the Ironwood slot is empty).
6426
+ * @returns {number}
6427
+ */
6428
+ get ironwoodActionCount() {
6429
+ const ret = wasm.zcashv6transaction_ironwoodActionCount(this.__wbg_ptr);
6430
+ return ret >>> 0;
6431
+ }
6432
+ /**
6433
+ * The Ironwood note-commitment tree anchor (32 bytes), or `undefined`.
6434
+ * @returns {Uint8Array | undefined}
6435
+ */
6436
+ get ironwoodAnchor() {
6437
+ try {
6438
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6439
+ wasm.zcashv6transaction_ironwoodAnchor(retptr, this.__wbg_ptr);
6440
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6441
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6442
+ let v1;
6443
+ if (r0 !== 0) {
6444
+ v1 = getArrayU8FromWasm0(r0, r1).slice();
6445
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
6446
+ }
6447
+ return v1;
6448
+ } finally {
6449
+ wasm.__wbindgen_add_to_stack_pointer(16);
6450
+ }
6451
+ }
6452
+ /**
6453
+ * The Ironwood bundle flag byte, or `undefined` when there is no bundle.
6454
+ * @returns {number | undefined}
6455
+ */
6456
+ get ironwoodFlags() {
6457
+ const ret = wasm.zcashv6transaction_ironwoodFlags(this.__wbg_ptr);
6458
+ return ret === 0xFFFFFF ? undefined : ret;
6459
+ }
6460
+ /**
6461
+ * Net value crossing the Ironwood pool boundary (0 when there is no bundle).
6462
+ * @returns {bigint}
6463
+ */
6464
+ get ironwoodValueBalance() {
6465
+ const ret = wasm.zcashv6transaction_ironwoodValueBalance(this.__wbg_ptr);
6466
+ return ret;
6467
+ }
6468
+ /**
6469
+ * Serialize back to raw v6 wire bytes.
6470
+ * @returns {Uint8Array}
6471
+ */
6472
+ toBytes() {
6473
+ try {
6474
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6475
+ wasm.zcashv6transaction_toBytes(retptr, this.__wbg_ptr);
6476
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6477
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6478
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
6479
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
6480
+ if (r3) {
6481
+ throw takeObject(r2);
6482
+ }
6483
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
6484
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
6485
+ return v1;
6486
+ } finally {
6487
+ wasm.__wbindgen_add_to_stack_pointer(16);
6488
+ }
6489
+ }
6490
+ /**
6491
+ * The ZIP-244 txid in internal (non-reversed) byte order.
6492
+ * @returns {Uint8Array}
6493
+ */
6494
+ txidBytes() {
6495
+ try {
6496
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
6497
+ wasm.zcashv6transaction_txidBytes(retptr, this.__wbg_ptr);
6498
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
6499
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
6500
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
6501
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
6502
+ return v1;
6503
+ } finally {
6504
+ wasm.__wbindgen_add_to_stack_pointer(16);
6505
+ }
6506
+ }
6507
+ }
6508
+ if (Symbol.dispose) ZcashV6Transaction.prototype[Symbol.dispose] = ZcashV6Transaction.prototype.free;
6509
+
6336
6510
  /**
6337
6511
  * Check if the inspect feature is enabled.
6338
6512
  *
@@ -6820,6 +6994,9 @@ const WrapPsbtFinalization = (typeof FinalizationRegistry === 'undefined')
6820
6994
  const ZcashUnifiedAddressFinalization = (typeof FinalizationRegistry === 'undefined')
6821
6995
  ? { register: () => {}, unregister: () => {} }
6822
6996
  : new FinalizationRegistry(ptr => wasm.__wbg_zcashunifiedaddress_free(ptr >>> 0, 1));
6997
+ const ZcashV6TransactionFinalization = (typeof FinalizationRegistry === 'undefined')
6998
+ ? { register: () => {}, unregister: () => {} }
6999
+ : new FinalizationRegistry(ptr => wasm.__wbg_zcashv6transaction_free(ptr >>> 0, 1));
6823
7000
 
6824
7001
  function addHeapObject(obj) {
6825
7002
  if (heap_next === heap.length) heap.push(heap.length + 1);
Binary file
@@ -1,24 +1,16 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_addressnamespace_free: (a: number, b: number) => void;
5
4
  export const __wbg_inscriptionsnamespace_free: (a: number, b: number) => void;
6
- export const __wbg_messagenamespace_free: (a: number, b: number) => void;
7
- export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
8
5
  export const __wbg_wasmdashtransaction_free: (a: number, b: number) => void;
9
- export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
10
- export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
6
+ export const __wbg_wasmecpair_free: (a: number, b: number) => void;
11
7
  export const __wbg_wasmtransaction_free: (a: number, b: number) => void;
12
8
  export const __wbg_wasmzcashtransaction_free: (a: number, b: number) => void;
13
9
  export const __wbg_wrappsbt_free: (a: number, b: number) => void;
14
- export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
15
- export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
10
+ export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
11
+ export const __wbg_zcashv6transaction_free: (a: number, b: number) => void;
16
12
  export const inscriptionsnamespace_create_inscription_reveal_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
17
13
  export const inscriptionsnamespace_sign_reveal_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint) => void;
18
- export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
19
- export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
20
- export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
21
- export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
22
14
  export const wasmdashtransaction_from_bytes: (a: number, b: number, c: number) => void;
23
15
  export const wasmdashtransaction_get_inputs: (a: number, b: number) => void;
24
16
  export const wasmdashtransaction_get_outputs: (a: number, b: number) => void;
@@ -29,26 +21,16 @@ export const wasmdashtransaction_lock_time: (a: number) => number;
29
21
  export const wasmdashtransaction_output_count: (a: number) => number;
30
22
  export const wasmdashtransaction_to_bytes: (a: number, b: number) => void;
31
23
  export const wasmdashtransaction_version: (a: number) => number;
32
- export const wasmdimensions_empty: () => number;
33
- export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
34
- export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
35
- export const wasmdimensions_from_output_script_length: (a: number) => number;
36
- export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
37
- export const wasmdimensions_from_psbt: (a: number, b: number) => void;
38
- export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
39
- export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
40
- export const wasmdimensions_get_output_vsize: (a: number) => number;
41
- export const wasmdimensions_get_output_weight: (a: number) => number;
42
- export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
43
- export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
44
- export const wasmdimensions_has_segwit: (a: number) => number;
45
- export const wasmdimensions_plus: (a: number, b: number) => number;
46
- export const wasmdimensions_times: (a: number, b: number) => number;
47
- export const wasmrootwalletkeys_backup_key: (a: number) => number;
48
- export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
49
- export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
50
- export const wasmrootwalletkeys_user_key: (a: number) => number;
51
- export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
24
+ export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
25
+ export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
26
+ export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
27
+ export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
28
+ export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
29
+ export const wasmecpair_private_key: (a: number) => number;
30
+ export const wasmecpair_public_key: (a: number) => number;
31
+ export const wasmecpair_to_wif: (a: number, b: number) => void;
32
+ export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
33
+ export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
52
34
  export const wasmtransaction_add_input: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
53
35
  export const wasmtransaction_add_input_at_index: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
54
36
  export const wasmtransaction_add_output: (a: number, b: number, c: number, d: bigint) => number;
@@ -110,6 +92,22 @@ export const wrappsbt_update_input_with_descriptor: (a: number, b: number, c: nu
110
92
  export const wrappsbt_update_output_with_descriptor: (a: number, b: number, c: number, d: number) => void;
111
93
  export const wrappsbt_validate_signature_at_input: (a: number, b: number, c: number, d: number, e: number) => void;
112
94
  export const wrappsbt_verify_signature_with_key: (a: number, b: number, c: number, d: number) => void;
95
+ export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
96
+ export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
97
+ export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
98
+ export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
99
+ export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
100
+ export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
101
+ export const zcashv6transaction_consensusBranchId: (a: number) => number;
102
+ export const zcashv6transaction_expiryHeight: (a: number) => number;
103
+ export const zcashv6transaction_fromBytes: (a: number, b: number, c: number) => void;
104
+ export const zcashv6transaction_getId: (a: number, b: number) => void;
105
+ export const zcashv6transaction_ironwoodActionCount: (a: number) => number;
106
+ export const zcashv6transaction_ironwoodAnchor: (a: number, b: number) => void;
107
+ export const zcashv6transaction_ironwoodFlags: (a: number) => number;
108
+ export const zcashv6transaction_ironwoodValueBalance: (a: number) => bigint;
109
+ export const zcashv6transaction_toBytes: (a: number, b: number) => void;
110
+ export const zcashv6transaction_txidBytes: (a: number, b: number) => void;
113
111
  export const wasmtransaction_input_count: (a: number) => number;
114
112
  export const wasmtransaction_output_count: (a: number) => number;
115
113
  export const wasmzcashtransaction_input_count: (a: number) => number;
@@ -120,13 +118,35 @@ export const wasmzcashtransaction_lock_time: (a: number) => number;
120
118
  export const wasmzcashtransaction_version: (a: number) => number;
121
119
  export const wrappsbt_lock_time: (a: number) => number;
122
120
  export const wrappsbt_version: (a: number) => number;
121
+ export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
122
+ export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
123
+ export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
124
+ export const wrapdescriptor_descType: (a: number, b: number) => void;
125
+ export const wrapdescriptor_encode: (a: number, b: number) => void;
126
+ export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
127
+ export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
128
+ export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
129
+ export const wrapdescriptor_hasWildcard: (a: number) => number;
130
+ export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
131
+ export const wrapdescriptor_node: (a: number, b: number) => void;
132
+ export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
133
+ export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
134
+ export const wrapdescriptor_toString: (a: number, b: number) => void;
135
+ export const wrapminiscript_encode: (a: number, b: number) => void;
136
+ export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
137
+ export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
138
+ export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
139
+ export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
140
+ export const wrapminiscript_node: (a: number, b: number) => void;
141
+ export const wrapminiscript_toAsmString: (a: number, b: number) => void;
142
+ export const wrapminiscript_toString: (a: number, b: number) => void;
123
143
  export const __wbg_bip322namespace_free: (a: number, b: number) => void;
124
144
  export const __wbg_bitgopsbt_free: (a: number, b: number) => void;
125
145
  export const __wbg_fixedscriptwalletnamespace_free: (a: number, b: number) => void;
146
+ export const __wbg_messagenamespace_free: (a: number, b: number) => void;
126
147
  export const __wbg_wasmbip32_free: (a: number, b: number) => void;
127
- export const __wbg_wasmecpair_free: (a: number, b: number) => void;
128
148
  export const __wbg_wasmreplayprotection_free: (a: number, b: number) => void;
129
- export const __wbg_zcashunifiedaddress_free: (a: number, b: number) => void;
149
+ export const __wbg_wasmrootwalletkeys_free: (a: number, b: number) => void;
130
150
  export const bip322namespace_add_bip322_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
131
151
  export const bip322namespace_get_bip322_message: (a: number, b: number, c: number) => void;
132
152
  export const bip322namespace_verify_bip322_psbt_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
@@ -216,8 +236,8 @@ export const fixedscriptwalletnamespace_output_script_with_network_str: (a: numb
216
236
  export const fixedscriptwalletnamespace_p2sh_p2pk_output_script: (a: number, b: number, c: number) => void;
217
237
  export const fixedscriptwalletnamespace_supports_script_type: (a: number, b: number, c: number, d: number, e: number) => void;
218
238
  export const fixedscriptwalletnamespace_to_wallet_keys: (a: number, b: number, c: number, d: number, e: number) => void;
219
- export const isInspectEnabled: () => number;
220
- export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
239
+ export const messagenamespace_sign_message: (a: number, b: number, c: number, d: number) => void;
240
+ export const messagenamespace_verify_message: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
221
241
  export const wasmbip32_chain_code: (a: number) => number;
222
242
  export const wasmbip32_depth: (a: number) => number;
223
243
  export const wasmbip32_derive: (a: number, b: number, c: number) => void;
@@ -240,55 +260,46 @@ export const wasmbip32_private_key: (a: number) => number;
240
260
  export const wasmbip32_public_key: (a: number) => number;
241
261
  export const wasmbip32_to_base58: (a: number, b: number) => void;
242
262
  export const wasmbip32_to_wif: (a: number, b: number) => void;
243
- export const wasmecpair_from_private_key: (a: number, b: number, c: number) => void;
244
- export const wasmecpair_from_public_key: (a: number, b: number, c: number) => void;
245
- export const wasmecpair_from_wif: (a: number, b: number, c: number) => void;
246
- export const wasmecpair_from_wif_mainnet: (a: number, b: number, c: number) => void;
247
- export const wasmecpair_from_wif_testnet: (a: number, b: number, c: number) => void;
248
- export const wasmecpair_private_key: (a: number) => number;
249
- export const wasmecpair_public_key: (a: number) => number;
250
- export const wasmecpair_to_wif: (a: number, b: number) => void;
251
- export const wasmecpair_to_wif_mainnet: (a: number, b: number) => void;
252
- export const wasmecpair_to_wif_testnet: (a: number, b: number) => void;
253
263
  export const wasmreplayprotection_from_addresses: (a: number, b: number, c: number, d: number, e: number) => void;
254
264
  export const wasmreplayprotection_from_output_scripts: (a: number, b: number) => number;
255
265
  export const wasmreplayprotection_from_public_keys: (a: number, b: number, c: number) => void;
256
- export const zcash_branch_id_for_height: (a: number, b: number, c: number, d: number) => void;
257
- export const zcashunifiedaddress_contains: (a: number, b: number, c: number, d: number) => void;
258
- export const zcashunifiedaddress_orchardReceiver: (a: number, b: number) => void;
259
- export const zcashunifiedaddress_parse: (a: number, b: number, c: number, d: number, e: number) => void;
260
- export const zcashunifiedaddress_saplingReceiver: (a: number, b: number) => void;
261
- export const zcashunifiedaddress_transparentScript: (a: number, b: number) => void;
266
+ export const wasmrootwalletkeys_backup_key: (a: number) => number;
267
+ export const wasmrootwalletkeys_bitgo_key: (a: number) => number;
268
+ export const wasmrootwalletkeys_new: (a: number, b: number, c: number, d: number) => void;
269
+ export const wasmrootwalletkeys_user_key: (a: number) => number;
270
+ export const wasmrootwalletkeys_with_derivation_prefixes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
262
271
  export const wasmbip32_from_bip32_properties: (a: number, b: number) => void;
263
- export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
264
- export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
272
+ export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
265
273
  export const bitgopsbt_sign_wallet_input: (a: number, b: number, c: number, d: number) => void;
266
274
  export const bitgopsbt_sign_all_with_xpriv: (a: number, b: number, c: number) => void;
267
- export const bitgopsbt_sign_replay_protection_inputs: (a: number, b: number, c: number) => void;
275
+ export const __wbg_addressnamespace_free: (a: number, b: number) => void;
276
+ export const __wbg_utxolibcompatnamespace_free: (a: number, b: number) => void;
277
+ export const __wbg_wasmdimensions_free: (a: number, b: number) => void;
268
278
  export const __wbg_wasmutxonamespace_free: (a: number, b: number) => void;
269
- export const __wbg_wrapdescriptor_free: (a: number, b: number) => void;
270
- export const __wbg_wrapminiscript_free: (a: number, b: number) => void;
279
+ export const addressnamespace_from_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
280
+ export const addressnamespace_to_output_script_with_coin: (a: number, b: number, c: number, d: number, e: number) => void;
281
+ export const isInspectEnabled: () => number;
282
+ export const parsePsbtRawToJson: (a: number, b: number, c: number, d: number, e: number) => void;
283
+ export const utxolibcompatnamespace_from_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
284
+ export const utxolibcompatnamespace_to_output_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
285
+ export const wasmdimensions_empty: () => number;
286
+ export const wasmdimensions_from_input: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
287
+ export const wasmdimensions_from_input_script_type: (a: number, b: number, c: number, d: number) => void;
288
+ export const wasmdimensions_from_output_script_length: (a: number) => number;
289
+ export const wasmdimensions_from_output_script_type: (a: number, b: number, c: number) => void;
290
+ export const wasmdimensions_from_psbt: (a: number, b: number) => void;
291
+ export const wasmdimensions_get_input_vsize: (a: number, b: number, c: number) => number;
292
+ export const wasmdimensions_get_input_weight: (a: number, b: number, c: number) => number;
293
+ export const wasmdimensions_get_output_vsize: (a: number) => number;
294
+ export const wasmdimensions_get_output_weight: (a: number) => number;
295
+ export const wasmdimensions_get_vsize: (a: number, b: number, c: number) => number;
296
+ export const wasmdimensions_get_weight: (a: number, b: number, c: number) => number;
297
+ export const wasmdimensions_has_segwit: (a: number) => number;
298
+ export const wasmdimensions_plus: (a: number, b: number) => number;
299
+ export const wasmdimensions_times: (a: number, b: number) => number;
271
300
  export const wasmutxonamespace_get_wasm_utxo_version: (a: number) => void;
272
- export const wrapdescriptor_atDerivationIndex: (a: number, b: number, c: number) => void;
273
- export const wrapdescriptor_descType: (a: number, b: number) => void;
274
- export const wrapdescriptor_encode: (a: number, b: number) => void;
275
- export const wrapdescriptor_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
276
- export const wrapdescriptor_fromStringDetectType: (a: number, b: number, c: number) => void;
277
- export const wrapdescriptor_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
278
- export const wrapdescriptor_hasWildcard: (a: number) => number;
279
- export const wrapdescriptor_maxWeightToSatisfy: (a: number, b: number) => void;
280
- export const wrapdescriptor_node: (a: number, b: number) => void;
281
- export const wrapdescriptor_scriptPubkey: (a: number, b: number) => void;
282
- export const wrapdescriptor_toAsmString: (a: number, b: number) => void;
283
- export const wrapdescriptor_toString: (a: number, b: number) => void;
284
- export const wrapminiscript_encode: (a: number, b: number) => void;
285
- export const wrapminiscript_fromBitcoinScript: (a: number, b: number, c: number, d: number, e: number) => void;
286
- export const wrapminiscript_fromBitcoinScriptExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
287
- export const wrapminiscript_fromString: (a: number, b: number, c: number, d: number, e: number) => void;
288
- export const wrapminiscript_fromStringExt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
289
- export const wrapminiscript_node: (a: number, b: number) => void;
290
- export const wrapminiscript_toAsmString: (a: number, b: number) => void;
291
- export const wrapminiscript_toString: (a: number, b: number) => void;
301
+ export const parsePsbtToJson: (a: number, b: number, c: number, d: number, e: number) => void;
302
+ export const parseTxToJson: (a: number, b: number, c: number, d: number, e: number) => void;
292
303
  export const rustsecp256k1_v0_10_0_context_create: (a: number) => number;
293
304
  export const rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
294
305
  export const rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitgo/wasm-utxo",
3
3
  "description": "WebAssembly wrapper for rust-bitcoin (beta)",
4
- "version": "4.26.0",
4
+ "version": "4.27.0",
5
5
  "type": "module",
6
6
  "repository": {
7
7
  "type": "git",