@lucid-evolution/uplc 0.2.22 → 0.2.24

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.
@@ -10,6 +10,7 @@ export function eval_phase_two_raw(
10
10
  slot_config_x: bigint,
11
11
  slot_config_y: bigint,
12
12
  slot_config_z: number,
13
+ protocol_major_version?: number | null,
13
14
  ): Uint8Array[];
14
15
  export function apply_params_to_script(
15
16
  params_bytes: Uint8Array,
@@ -58,6 +58,10 @@ function passArrayJsValueToWasm0(array, malloc) {
58
58
  return ptr;
59
59
  }
60
60
 
61
+ function isLikeNone(x) {
62
+ return x === undefined || x === null;
63
+ }
64
+
61
65
  function takeFromExternrefTable0(idx) {
62
66
  const value = wasm.__wbindgen_export_0.get(idx);
63
67
  wasm.__externref_table_dealloc(idx);
@@ -84,9 +88,10 @@ function getArrayJsValueFromWasm0(ptr, len) {
84
88
  * @param {bigint} slot_config_x
85
89
  * @param {bigint} slot_config_y
86
90
  * @param {number} slot_config_z
91
+ * @param {number | null} [protocol_major_version]
87
92
  * @returns {Uint8Array[]}
88
93
  */
89
- export function eval_phase_two_raw(tx_bytes, utxos_bytes_x, utxos_bytes_y, cost_mdls_bytes, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z) {
94
+ export function eval_phase_two_raw(tx_bytes, utxos_bytes_x, utxos_bytes_y, cost_mdls_bytes, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z, protocol_major_version) {
90
95
  const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_malloc);
91
96
  const len0 = WASM_VECTOR_LEN;
92
97
  const ptr1 = passArrayJsValueToWasm0(utxos_bytes_x, wasm.__wbindgen_malloc);
@@ -95,7 +100,7 @@ export function eval_phase_two_raw(tx_bytes, utxos_bytes_x, utxos_bytes_y, cost_
95
100
  const len2 = WASM_VECTOR_LEN;
96
101
  const ptr3 = passArray8ToWasm0(cost_mdls_bytes, wasm.__wbindgen_malloc);
97
102
  const len3 = WASM_VECTOR_LEN;
98
- const ret = wasm.eval_phase_two_raw(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z);
103
+ const ret = wasm.eval_phase_two_raw(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z, !isLikeNone(protocol_major_version), isLikeNone(protocol_major_version) ? 0 : protocol_major_version);
99
104
  if (ret[3]) {
100
105
  throw takeFromExternrefTable0(ret[2]);
101
106
  }
Binary file
@@ -21,6 +21,8 @@ export const eval_phase_two_raw: (
21
21
  k: bigint,
22
22
  l: bigint,
23
23
  m: number,
24
+ n: number,
25
+ o: number,
24
26
  ) => [number, number, number, number];
25
27
  export const __wbindgen_export_0: WebAssembly.Table;
26
28
  export const __wbindgen_malloc: (a: number, b: number) => number;
@@ -10,6 +10,7 @@ export function eval_phase_two_raw(
10
10
  slot_config_x: bigint,
11
11
  slot_config_y: bigint,
12
12
  slot_config_z: number,
13
+ protocol_major_version?: number | null,
13
14
  ): Uint8Array[];
14
15
  export function apply_params_to_script(
15
16
  params_bytes: Uint8Array,
@@ -56,6 +56,10 @@ function passArrayJsValueToWasm0(array, malloc) {
56
56
  return ptr;
57
57
  }
58
58
 
59
+ function isLikeNone(x) {
60
+ return x === undefined || x === null;
61
+ }
62
+
59
63
  function takeFromExternrefTable0(idx) {
60
64
  const value = wasm.__wbindgen_export_0.get(idx);
61
65
  wasm.__externref_table_dealloc(idx);
@@ -82,9 +86,10 @@ function getArrayJsValueFromWasm0(ptr, len) {
82
86
  * @param {bigint} slot_config_x
83
87
  * @param {bigint} slot_config_y
84
88
  * @param {number} slot_config_z
89
+ * @param {number | null} [protocol_major_version]
85
90
  * @returns {Uint8Array[]}
86
91
  */
87
- module.exports.eval_phase_two_raw = function(tx_bytes, utxos_bytes_x, utxos_bytes_y, cost_mdls_bytes, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z) {
92
+ module.exports.eval_phase_two_raw = function(tx_bytes, utxos_bytes_x, utxos_bytes_y, cost_mdls_bytes, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z, protocol_major_version) {
88
93
  const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_malloc);
89
94
  const len0 = WASM_VECTOR_LEN;
90
95
  const ptr1 = passArrayJsValueToWasm0(utxos_bytes_x, wasm.__wbindgen_malloc);
@@ -93,7 +98,7 @@ module.exports.eval_phase_two_raw = function(tx_bytes, utxos_bytes_x, utxos_byte
93
98
  const len2 = WASM_VECTOR_LEN;
94
99
  const ptr3 = passArray8ToWasm0(cost_mdls_bytes, wasm.__wbindgen_malloc);
95
100
  const len3 = WASM_VECTOR_LEN;
96
- const ret = wasm.eval_phase_two_raw(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z);
101
+ const ret = wasm.eval_phase_two_raw(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, initial_budget_n, initial_budget_d, slot_config_x, slot_config_y, slot_config_z, !isLikeNone(protocol_major_version), isLikeNone(protocol_major_version) ? 0 : protocol_major_version);
97
102
  if (ret[3]) {
98
103
  throw takeFromExternrefTable0(ret[2]);
99
104
  }
Binary file
@@ -21,6 +21,8 @@ export const eval_phase_two_raw: (
21
21
  k: bigint,
22
22
  l: bigint,
23
23
  m: number,
24
+ n: number,
25
+ o: number,
24
26
  ) => [number, number, number, number];
25
27
  export const __wbindgen_export_0: WebAssembly.Table;
26
28
  export const __wbindgen_malloc: (a: number, b: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-evolution/uplc",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "main": "./dist/node/uplc_tx.js",
5
5
  "browser": "./dist/browser/uplc_tx.js",
6
6
  "types": "./dist/node/uplc_tx.d.ts",