@bitgo/wasm-utxo 5.3.0 → 5.5.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.
@@ -7083,6 +7083,27 @@ export class ZcashV6Transaction {
7083
7083
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
7084
7084
  }
7085
7085
  }
7086
+ /**
7087
+ * The transparent inputs of this transaction, in input order — each input's
7088
+ * `previousOutput` (display-order txid + vout), sequence, scriptSig, and witness, carried
7089
+ * verbatim from the wire. Empty for a fully shielded transaction.
7090
+ * @returns {TxInputData[]}
7091
+ */
7092
+ getInputs() {
7093
+ try {
7094
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7095
+ wasm.zcashv6transaction_getInputs(retptr, this.__wbg_ptr);
7096
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7097
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7098
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7099
+ if (r2) {
7100
+ throw takeObject(r1);
7101
+ }
7102
+ return takeObject(r0);
7103
+ } finally {
7104
+ wasm.__wbindgen_add_to_stack_pointer(16);
7105
+ }
7106
+ }
7086
7107
  /**
7087
7108
  * Number of Ironwood actions (0 when the Ironwood slot is empty).
7088
7109
  * @returns {number}
@@ -7244,6 +7265,49 @@ export function ironwood_build_witness(cmx, position, auth_path, anchor) {
7244
7265
  }
7245
7266
  }
7246
7267
 
7268
+ /**
7269
+ * Build and validate an Ironwood witness from a pruned shard + cap, instead of a
7270
+ * caller-precomputed 32-entry path (see `ironwood_build_witness`).
7271
+ *
7272
+ * `shardHeight` chooses which level the shard's root sits at (it spans up to `2^shardHeight`
7273
+ * leaves); `shard` is the pruned subtree containing `position`, rooted at that level; `cap` is the
7274
+ * pruned tree above every shard, down to (and including) shard-root nodes. `leafCount` is the
7275
+ * total number of leaves committed to the tree as of `anchor` — positions beyond it are treated
7276
+ * as canonically empty. `shard`/`cap` are plain JS objects (not JSON strings) shaped like:
7277
+ * `{ type: "Nil" } | { type: "Leaf", hash: Uint8Array } | { type: "Parent", hash?: Uint8Array,
7278
+ * left: ShardTreeNode, right: ShardTreeNode }`.
7279
+ *
7280
+ * Throws under the same conditions as `ironwood_build_witness`, plus if `shard`/`cap` don't have
7281
+ * enough detail to witness `position` as of `leafCount`.
7282
+ * @param {number} position
7283
+ * @param {number} shard_height
7284
+ * @param {bigint} leaf_count
7285
+ * @param {Uint8Array} cmx
7286
+ * @param {any} shard
7287
+ * @param {any} cap
7288
+ * @param {Uint8Array} anchor
7289
+ * @returns {IronwoodWitness}
7290
+ */
7291
+ export function ironwood_build_witness_from_shard(position, shard_height, leaf_count, cmx, shard, cap, anchor) {
7292
+ try {
7293
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
7294
+ const ptr0 = passArray8ToWasm0(cmx, wasm.__wbindgen_export);
7295
+ const len0 = WASM_VECTOR_LEN;
7296
+ const ptr1 = passArray8ToWasm0(anchor, wasm.__wbindgen_export);
7297
+ const len1 = WASM_VECTOR_LEN;
7298
+ wasm.ironwood_build_witness_from_shard(retptr, position, shard_height, leaf_count, ptr0, len0, addHeapObject(shard), addHeapObject(cap), ptr1, len1);
7299
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
7300
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
7301
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
7302
+ if (r2) {
7303
+ throw takeObject(r1);
7304
+ }
7305
+ return IronwoodWitness.__wrap(r0);
7306
+ } finally {
7307
+ wasm.__wbindgen_add_to_stack_pointer(16);
7308
+ }
7309
+ }
7310
+
7247
7311
  /**
7248
7312
  * Check if the inspect feature is enabled.
7249
7313
  *
@@ -7563,6 +7627,13 @@ export function __wbg_Error_8c4e43fe74559d73(arg0, arg1) {
7563
7627
  const ret = Error(getStringFromWasm0(arg0, arg1));
7564
7628
  return addHeapObject(ret);
7565
7629
  }
7630
+ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
7631
+ const ret = String(getObject(arg1));
7632
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
7633
+ const len1 = WASM_VECTOR_LEN;
7634
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
7635
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
7636
+ }
7566
7637
  export function __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2(arg0, arg1) {
7567
7638
  const v = getObject(arg1);
7568
7639
  const ret = typeof(v) === 'bigint' ? v : undefined;
@@ -7581,6 +7652,10 @@ export function __wbg___wbindgen_debug_string_0bc8482c6e3508ae(arg0, arg1) {
7581
7652
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
7582
7653
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
7583
7654
  }
7655
+ export function __wbg___wbindgen_in_47fa6863be6f2f25(arg0, arg1) {
7656
+ const ret = getObject(arg0) in getObject(arg1);
7657
+ return ret;
7658
+ }
7584
7659
  export function __wbg___wbindgen_is_bigint_31b12575b56f32fc(arg0) {
7585
7660
  const ret = typeof(getObject(arg0)) === 'bigint';
7586
7661
  return ret;
@@ -7610,6 +7685,10 @@ export function __wbg___wbindgen_jsval_eq_11888390b0186270(arg0, arg1) {
7610
7685
  const ret = getObject(arg0) === getObject(arg1);
7611
7686
  return ret;
7612
7687
  }
7688
+ export function __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811(arg0, arg1) {
7689
+ const ret = getObject(arg0) == getObject(arg1);
7690
+ return ret;
7691
+ }
7613
7692
  export function __wbg___wbindgen_number_get_8ff4255516ccad3e(arg0, arg1) {
7614
7693
  const obj = getObject(arg1);
7615
7694
  const ret = typeof(obj) === 'number' ? obj : undefined;
@@ -7639,6 +7718,14 @@ export function __wbg_crypto_574e78ad8b13b65f(arg0) {
7639
7718
  const ret = getObject(arg0).crypto;
7640
7719
  return addHeapObject(ret);
7641
7720
  }
7721
+ export function __wbg_done_57b39ecd9addfe81(arg0) {
7722
+ const ret = getObject(arg0).done;
7723
+ return ret;
7724
+ }
7725
+ export function __wbg_entries_58c7934c745daac7(arg0) {
7726
+ const ret = Object.entries(getObject(arg0));
7727
+ return addHeapObject(ret);
7728
+ }
7642
7729
  export function __wbg_for_c3adefd268cb6f1c(arg0, arg1) {
7643
7730
  const ret = Symbol.for(getStringFromWasm0(arg0, arg1));
7644
7731
  return addHeapObject(ret);
@@ -7658,6 +7745,48 @@ export function __wbg_get_b3ed3ad4be2bc8ac() { return handleError(function (arg0
7658
7745
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
7659
7746
  return addHeapObject(ret);
7660
7747
  }, arguments); }
7748
+ export function __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04(arg0) {
7749
+ let result;
7750
+ try {
7751
+ result = getObject(arg0) instanceof ArrayBuffer;
7752
+ } catch (_) {
7753
+ result = false;
7754
+ }
7755
+ const ret = result;
7756
+ return ret;
7757
+ }
7758
+ export function __wbg_instanceof_Map_53af74335dec57f4(arg0) {
7759
+ let result;
7760
+ try {
7761
+ result = getObject(arg0) instanceof Map;
7762
+ } catch (_) {
7763
+ result = false;
7764
+ }
7765
+ const ret = result;
7766
+ return ret;
7767
+ }
7768
+ export function __wbg_instanceof_Uint8Array_9b9075935c74707c(arg0) {
7769
+ let result;
7770
+ try {
7771
+ result = getObject(arg0) instanceof Uint8Array;
7772
+ } catch (_) {
7773
+ result = false;
7774
+ }
7775
+ const ret = result;
7776
+ return ret;
7777
+ }
7778
+ export function __wbg_isArray_d314bb98fcf08331(arg0) {
7779
+ const ret = Array.isArray(getObject(arg0));
7780
+ return ret;
7781
+ }
7782
+ export function __wbg_isSafeInteger_bfbc7332a9768d2a(arg0) {
7783
+ const ret = Number.isSafeInteger(getObject(arg0));
7784
+ return ret;
7785
+ }
7786
+ export function __wbg_iterator_6ff6560ca1568e55() {
7787
+ const ret = Symbol.iterator;
7788
+ return addHeapObject(ret);
7789
+ }
7661
7790
  export function __wbg_length_32ed9a279acd054c(arg0) {
7662
7791
  const ret = getObject(arg0).length;
7663
7792
  return ret;
@@ -7698,6 +7827,14 @@ export function __wbg_new_with_length_a2c39cbe88fd8ff1(arg0) {
7698
7827
  const ret = new Uint8Array(arg0 >>> 0);
7699
7828
  return addHeapObject(ret);
7700
7829
  }
7830
+ export function __wbg_next_3482f54c49e8af19() { return handleError(function (arg0) {
7831
+ const ret = getObject(arg0).next();
7832
+ return addHeapObject(ret);
7833
+ }, arguments); }
7834
+ export function __wbg_next_418f80d8f5303233(arg0) {
7835
+ const ret = getObject(arg0).next;
7836
+ return addHeapObject(ret);
7837
+ }
7701
7838
  export function __wbg_node_905d3e251edff8a2(arg0) {
7702
7839
  const ret = getObject(arg0).node;
7703
7840
  return addHeapObject(ret);
@@ -7744,6 +7881,10 @@ export function __wbg_subarray_a96e1fef17ed23cb(arg0, arg1, arg2) {
7744
7881
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
7745
7882
  return addHeapObject(ret);
7746
7883
  }
7884
+ export function __wbg_value_0546255b415e96c1(arg0) {
7885
+ const ret = getObject(arg0).value;
7886
+ return addHeapObject(ret);
7887
+ }
7747
7888
  export function __wbg_versions_c01dfd4722a88165(arg0) {
7748
7889
  const ret = getObject(arg0).versions;
7749
7890
  return addHeapObject(ret);
@@ -7773,17 +7914,22 @@ export function __wbindgen_cast_0000000000000001(arg0) {
7773
7914
  const ret = arg0;
7774
7915
  return addHeapObject(ret);
7775
7916
  }
7776
- export function __wbindgen_cast_0000000000000002(arg0, arg1) {
7917
+ export function __wbindgen_cast_0000000000000002(arg0) {
7918
+ // Cast intrinsic for `I64 -> Externref`.
7919
+ const ret = arg0;
7920
+ return addHeapObject(ret);
7921
+ }
7922
+ export function __wbindgen_cast_0000000000000003(arg0, arg1) {
7777
7923
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
7778
7924
  const ret = getArrayU8FromWasm0(arg0, arg1);
7779
7925
  return addHeapObject(ret);
7780
7926
  }
7781
- export function __wbindgen_cast_0000000000000003(arg0, arg1) {
7927
+ export function __wbindgen_cast_0000000000000004(arg0, arg1) {
7782
7928
  // Cast intrinsic for `Ref(String) -> Externref`.
7783
7929
  const ret = getStringFromWasm0(arg0, arg1);
7784
7930
  return addHeapObject(ret);
7785
7931
  }
7786
- export function __wbindgen_cast_0000000000000004(arg0) {
7932
+ export function __wbindgen_cast_0000000000000005(arg0) {
7787
7933
  // Cast intrinsic for `U64 -> Externref`.
7788
7934
  const ret = BigInt.asUintN(64, arg0);
7789
7935
  return addHeapObject(ret);
Binary file