@lucid-evolution/uplc 0.2.24 → 0.3.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.
package/README.md CHANGED
@@ -23,3 +23,12 @@ Once you've completed the previous step, you can build the UPLC package by runni
23
23
  ```
24
24
  pnpm build
25
25
  ```
26
+
27
+ ## Speed and size builds
28
+
29
+ The package ships two builds of the evaluator:
30
+
31
+ - **speed** (`-O3`, ~1.77 MB wasm): faster script evaluation.
32
+ - **size** (`-Oz`, ~0.94 MB wasm): smaller download.
33
+
34
+ `@lucid-evolution/uplc` resolves to the speed build on Node, Bun and Deno, and to the size build in browser bundles and edge runtimes (`browser`, `worker`, `workerd` and `edge-light` export conditions). To pick a variant explicitly, import `@lucid-evolution/uplc/speed` or `@lucid-evolution/uplc/size`.
Binary file
@@ -0,0 +1,18 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export function eval_phase_two_raw(
4
+ tx_bytes: Uint8Array,
5
+ utxos_bytes_x: Uint8Array[],
6
+ utxos_bytes_y: Uint8Array[],
7
+ cost_mdls_bytes: Uint8Array,
8
+ initial_budget_n: bigint,
9
+ initial_budget_d: bigint,
10
+ slot_config_x: bigint,
11
+ slot_config_y: bigint,
12
+ slot_config_z: number,
13
+ protocol_major_version?: number | null,
14
+ ): Uint8Array[];
15
+ export function apply_params_to_script(
16
+ params_bytes: Uint8Array,
17
+ plutus_script_bytes: Uint8Array,
18
+ ): Uint8Array;
@@ -0,0 +1,5 @@
1
+ import * as wasm from "./uplc_tx_bg.wasm";
2
+ export * from "./uplc_tx_bg.js";
3
+ import { __wbg_set_wasm } from "./uplc_tx_bg.js";
4
+ __wbg_set_wasm(wasm);
5
+ wasm.__wbindgen_start();
@@ -0,0 +1,183 @@
1
+ let wasm;
2
+ export function __wbg_set_wasm(val) {
3
+ wasm = val;
4
+ }
5
+
6
+
7
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
8
+
9
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
10
+
11
+ cachedTextDecoder.decode();
12
+
13
+ let cachedUint8ArrayMemory0 = null;
14
+
15
+ function getUint8ArrayMemory0() {
16
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
17
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
18
+ }
19
+ return cachedUint8ArrayMemory0;
20
+ }
21
+
22
+ function getStringFromWasm0(ptr, len) {
23
+ ptr = ptr >>> 0;
24
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
25
+ }
26
+
27
+ let WASM_VECTOR_LEN = 0;
28
+
29
+ function passArray8ToWasm0(arg, malloc) {
30
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
31
+ getUint8ArrayMemory0().set(arg, ptr / 1);
32
+ WASM_VECTOR_LEN = arg.length;
33
+ return ptr;
34
+ }
35
+
36
+ let cachedDataViewMemory0 = null;
37
+
38
+ function getDataViewMemory0() {
39
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
40
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
41
+ }
42
+ return cachedDataViewMemory0;
43
+ }
44
+
45
+ function addToExternrefTable0(obj) {
46
+ const idx = wasm.__externref_table_alloc();
47
+ wasm.__wbindgen_export_0.set(idx, obj);
48
+ return idx;
49
+ }
50
+
51
+ function passArrayJsValueToWasm0(array, malloc) {
52
+ const ptr = malloc(array.length * 4, 4) >>> 0;
53
+ for (let i = 0; i < array.length; i++) {
54
+ const add = addToExternrefTable0(array[i]);
55
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
56
+ }
57
+ WASM_VECTOR_LEN = array.length;
58
+ return ptr;
59
+ }
60
+
61
+ function isLikeNone(x) {
62
+ return x === undefined || x === null;
63
+ }
64
+
65
+ function takeFromExternrefTable0(idx) {
66
+ const value = wasm.__wbindgen_export_0.get(idx);
67
+ wasm.__externref_table_dealloc(idx);
68
+ return value;
69
+ }
70
+
71
+ function getArrayJsValueFromWasm0(ptr, len) {
72
+ ptr = ptr >>> 0;
73
+ const mem = getDataViewMemory0();
74
+ const result = [];
75
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
76
+ result.push(wasm.__wbindgen_export_0.get(mem.getUint32(i, true)));
77
+ }
78
+ wasm.__externref_drop_slice(ptr, len);
79
+ return result;
80
+ }
81
+ /**
82
+ * @param {Uint8Array} tx_bytes
83
+ * @param {Uint8Array[]} utxos_bytes_x
84
+ * @param {Uint8Array[]} utxos_bytes_y
85
+ * @param {Uint8Array} cost_mdls_bytes
86
+ * @param {bigint} initial_budget_n
87
+ * @param {bigint} initial_budget_d
88
+ * @param {bigint} slot_config_x
89
+ * @param {bigint} slot_config_y
90
+ * @param {number} slot_config_z
91
+ * @param {number | null} [protocol_major_version]
92
+ * @returns {Uint8Array[]}
93
+ */
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) {
95
+ const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_malloc);
96
+ const len0 = WASM_VECTOR_LEN;
97
+ const ptr1 = passArrayJsValueToWasm0(utxos_bytes_x, wasm.__wbindgen_malloc);
98
+ const len1 = WASM_VECTOR_LEN;
99
+ const ptr2 = passArrayJsValueToWasm0(utxos_bytes_y, wasm.__wbindgen_malloc);
100
+ const len2 = WASM_VECTOR_LEN;
101
+ const ptr3 = passArray8ToWasm0(cost_mdls_bytes, wasm.__wbindgen_malloc);
102
+ const len3 = WASM_VECTOR_LEN;
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);
104
+ if (ret[3]) {
105
+ throw takeFromExternrefTable0(ret[2]);
106
+ }
107
+ var v5 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
108
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
109
+ return v5;
110
+ }
111
+
112
+ function getArrayU8FromWasm0(ptr, len) {
113
+ ptr = ptr >>> 0;
114
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
115
+ }
116
+ /**
117
+ * @param {Uint8Array} params_bytes
118
+ * @param {Uint8Array} plutus_script_bytes
119
+ * @returns {Uint8Array}
120
+ */
121
+ export function apply_params_to_script(params_bytes, plutus_script_bytes) {
122
+ const ptr0 = passArray8ToWasm0(params_bytes, wasm.__wbindgen_malloc);
123
+ const len0 = WASM_VECTOR_LEN;
124
+ const ptr1 = passArray8ToWasm0(plutus_script_bytes, wasm.__wbindgen_malloc);
125
+ const len1 = WASM_VECTOR_LEN;
126
+ const ret = wasm.apply_params_to_script(ptr0, len0, ptr1, len1);
127
+ if (ret[3]) {
128
+ throw takeFromExternrefTable0(ret[2]);
129
+ }
130
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
131
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
132
+ return v3;
133
+ }
134
+
135
+ export function __wbg_buffer_609cc3eee51ed158(arg0) {
136
+ const ret = arg0.buffer;
137
+ return ret;
138
+ };
139
+
140
+ export function __wbg_length_a446193dc22c12f8(arg0) {
141
+ const ret = arg0.length;
142
+ return ret;
143
+ };
144
+
145
+ export function __wbg_new_a12002a7f91c75be(arg0) {
146
+ const ret = new Uint8Array(arg0);
147
+ return ret;
148
+ };
149
+
150
+ export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) {
151
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
152
+ return ret;
153
+ };
154
+
155
+ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
156
+ arg0.set(arg1, arg2 >>> 0);
157
+ };
158
+
159
+ export function __wbindgen_init_externref_table() {
160
+ const table = wasm.__wbindgen_export_0;
161
+ const offset = table.grow(4);
162
+ table.set(0, undefined);
163
+ table.set(offset + 0, undefined);
164
+ table.set(offset + 1, null);
165
+ table.set(offset + 2, true);
166
+ table.set(offset + 3, false);
167
+ ;
168
+ };
169
+
170
+ export function __wbindgen_memory() {
171
+ const ret = wasm.memory;
172
+ return ret;
173
+ };
174
+
175
+ export function __wbindgen_string_new(arg0, arg1) {
176
+ const ret = getStringFromWasm0(arg0, arg1);
177
+ return ret;
178
+ };
179
+
180
+ export function __wbindgen_throw(arg0, arg1) {
181
+ throw new Error(getStringFromWasm0(arg0, arg1));
182
+ };
183
+
@@ -0,0 +1,33 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const apply_params_to_script: (
5
+ a: number,
6
+ b: number,
7
+ c: number,
8
+ d: number,
9
+ ) => [number, number, number, number];
10
+ export const eval_phase_two_raw: (
11
+ a: number,
12
+ b: number,
13
+ c: number,
14
+ d: number,
15
+ e: number,
16
+ f: number,
17
+ g: number,
18
+ h: number,
19
+ i: bigint,
20
+ j: bigint,
21
+ k: bigint,
22
+ l: bigint,
23
+ m: number,
24
+ n: number,
25
+ o: number,
26
+ ) => [number, number, number, number];
27
+ export const __wbindgen_export_0: WebAssembly.Table;
28
+ export const __wbindgen_malloc: (a: number, b: number) => number;
29
+ export const __externref_table_alloc: () => number;
30
+ export const __externref_table_dealloc: (a: number) => void;
31
+ export const __externref_drop_slice: (a: number, b: number) => void;
32
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
33
+ export const __wbindgen_start: () => void;
@@ -0,0 +1,18 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export function eval_phase_two_raw(
4
+ tx_bytes: Uint8Array,
5
+ utxos_bytes_x: Uint8Array[],
6
+ utxos_bytes_y: Uint8Array[],
7
+ cost_mdls_bytes: Uint8Array,
8
+ initial_budget_n: bigint,
9
+ initial_budget_d: bigint,
10
+ slot_config_x: bigint,
11
+ slot_config_y: bigint,
12
+ slot_config_z: number,
13
+ protocol_major_version?: number | null,
14
+ ): Uint8Array[];
15
+ export function apply_params_to_script(
16
+ params_bytes: Uint8Array,
17
+ plutus_script_bytes: Uint8Array,
18
+ ): Uint8Array;
@@ -0,0 +1,191 @@
1
+
2
+ let imports = {};
3
+ imports['__wbindgen_placeholder__'] = module.exports;
4
+ let wasm;
5
+ const { TextDecoder } = require(`util`);
6
+
7
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
8
+
9
+ cachedTextDecoder.decode();
10
+
11
+ let cachedUint8ArrayMemory0 = null;
12
+
13
+ function getUint8ArrayMemory0() {
14
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
15
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
16
+ }
17
+ return cachedUint8ArrayMemory0;
18
+ }
19
+
20
+ function getStringFromWasm0(ptr, len) {
21
+ ptr = ptr >>> 0;
22
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
23
+ }
24
+
25
+ let WASM_VECTOR_LEN = 0;
26
+
27
+ function passArray8ToWasm0(arg, malloc) {
28
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
29
+ getUint8ArrayMemory0().set(arg, ptr / 1);
30
+ WASM_VECTOR_LEN = arg.length;
31
+ return ptr;
32
+ }
33
+
34
+ let cachedDataViewMemory0 = null;
35
+
36
+ function getDataViewMemory0() {
37
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
38
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
39
+ }
40
+ return cachedDataViewMemory0;
41
+ }
42
+
43
+ function addToExternrefTable0(obj) {
44
+ const idx = wasm.__externref_table_alloc();
45
+ wasm.__wbindgen_export_0.set(idx, obj);
46
+ return idx;
47
+ }
48
+
49
+ function passArrayJsValueToWasm0(array, malloc) {
50
+ const ptr = malloc(array.length * 4, 4) >>> 0;
51
+ for (let i = 0; i < array.length; i++) {
52
+ const add = addToExternrefTable0(array[i]);
53
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
54
+ }
55
+ WASM_VECTOR_LEN = array.length;
56
+ return ptr;
57
+ }
58
+
59
+ function isLikeNone(x) {
60
+ return x === undefined || x === null;
61
+ }
62
+
63
+ function takeFromExternrefTable0(idx) {
64
+ const value = wasm.__wbindgen_export_0.get(idx);
65
+ wasm.__externref_table_dealloc(idx);
66
+ return value;
67
+ }
68
+
69
+ function getArrayJsValueFromWasm0(ptr, len) {
70
+ ptr = ptr >>> 0;
71
+ const mem = getDataViewMemory0();
72
+ const result = [];
73
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
74
+ result.push(wasm.__wbindgen_export_0.get(mem.getUint32(i, true)));
75
+ }
76
+ wasm.__externref_drop_slice(ptr, len);
77
+ return result;
78
+ }
79
+ /**
80
+ * @param {Uint8Array} tx_bytes
81
+ * @param {Uint8Array[]} utxos_bytes_x
82
+ * @param {Uint8Array[]} utxos_bytes_y
83
+ * @param {Uint8Array} cost_mdls_bytes
84
+ * @param {bigint} initial_budget_n
85
+ * @param {bigint} initial_budget_d
86
+ * @param {bigint} slot_config_x
87
+ * @param {bigint} slot_config_y
88
+ * @param {number} slot_config_z
89
+ * @param {number | null} [protocol_major_version]
90
+ * @returns {Uint8Array[]}
91
+ */
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) {
93
+ const ptr0 = passArray8ToWasm0(tx_bytes, wasm.__wbindgen_malloc);
94
+ const len0 = WASM_VECTOR_LEN;
95
+ const ptr1 = passArrayJsValueToWasm0(utxos_bytes_x, wasm.__wbindgen_malloc);
96
+ const len1 = WASM_VECTOR_LEN;
97
+ const ptr2 = passArrayJsValueToWasm0(utxos_bytes_y, wasm.__wbindgen_malloc);
98
+ const len2 = WASM_VECTOR_LEN;
99
+ const ptr3 = passArray8ToWasm0(cost_mdls_bytes, wasm.__wbindgen_malloc);
100
+ const len3 = WASM_VECTOR_LEN;
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);
102
+ if (ret[3]) {
103
+ throw takeFromExternrefTable0(ret[2]);
104
+ }
105
+ var v5 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
106
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
107
+ return v5;
108
+ };
109
+
110
+ function getArrayU8FromWasm0(ptr, len) {
111
+ ptr = ptr >>> 0;
112
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
113
+ }
114
+ /**
115
+ * @param {Uint8Array} params_bytes
116
+ * @param {Uint8Array} plutus_script_bytes
117
+ * @returns {Uint8Array}
118
+ */
119
+ module.exports.apply_params_to_script = function(params_bytes, plutus_script_bytes) {
120
+ const ptr0 = passArray8ToWasm0(params_bytes, wasm.__wbindgen_malloc);
121
+ const len0 = WASM_VECTOR_LEN;
122
+ const ptr1 = passArray8ToWasm0(plutus_script_bytes, wasm.__wbindgen_malloc);
123
+ const len1 = WASM_VECTOR_LEN;
124
+ const ret = wasm.apply_params_to_script(ptr0, len0, ptr1, len1);
125
+ if (ret[3]) {
126
+ throw takeFromExternrefTable0(ret[2]);
127
+ }
128
+ var v3 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
129
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
130
+ return v3;
131
+ };
132
+
133
+ module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
134
+ const ret = arg0.buffer;
135
+ return ret;
136
+ };
137
+
138
+ module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
139
+ const ret = arg0.length;
140
+ return ret;
141
+ };
142
+
143
+ module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
144
+ const ret = new Uint8Array(arg0);
145
+ return ret;
146
+ };
147
+
148
+ module.exports.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
149
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
150
+ return ret;
151
+ };
152
+
153
+ module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
154
+ arg0.set(arg1, arg2 >>> 0);
155
+ };
156
+
157
+ module.exports.__wbindgen_init_externref_table = function() {
158
+ const table = wasm.__wbindgen_export_0;
159
+ const offset = table.grow(4);
160
+ table.set(0, undefined);
161
+ table.set(offset + 0, undefined);
162
+ table.set(offset + 1, null);
163
+ table.set(offset + 2, true);
164
+ table.set(offset + 3, false);
165
+ ;
166
+ };
167
+
168
+ module.exports.__wbindgen_memory = function() {
169
+ const ret = wasm.memory;
170
+ return ret;
171
+ };
172
+
173
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
174
+ const ret = getStringFromWasm0(arg0, arg1);
175
+ return ret;
176
+ };
177
+
178
+ module.exports.__wbindgen_throw = function(arg0, arg1) {
179
+ throw new Error(getStringFromWasm0(arg0, arg1));
180
+ };
181
+
182
+ const path = require('path').join(__dirname, 'uplc_tx_bg.wasm');
183
+ const bytes = require('fs').readFileSync(path);
184
+
185
+ const wasmModule = new WebAssembly.Module(bytes);
186
+ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
187
+ wasm = wasmInstance.exports;
188
+ module.exports.__wasm = wasm;
189
+
190
+ wasm.__wbindgen_start();
191
+
Binary file
@@ -0,0 +1,33 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const apply_params_to_script: (
5
+ a: number,
6
+ b: number,
7
+ c: number,
8
+ d: number,
9
+ ) => [number, number, number, number];
10
+ export const eval_phase_two_raw: (
11
+ a: number,
12
+ b: number,
13
+ c: number,
14
+ d: number,
15
+ e: number,
16
+ f: number,
17
+ g: number,
18
+ h: number,
19
+ i: bigint,
20
+ j: bigint,
21
+ k: bigint,
22
+ l: bigint,
23
+ m: number,
24
+ n: number,
25
+ o: number,
26
+ ) => [number, number, number, number];
27
+ export const __wbindgen_export_0: WebAssembly.Table;
28
+ export const __wbindgen_malloc: (a: number, b: number) => number;
29
+ export const __externref_table_alloc: () => number;
30
+ export const __externref_table_dealloc: (a: number) => void;
31
+ export const __externref_drop_slice: (a: number, b: number) => void;
32
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
33
+ export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,9 +1,47 @@
1
1
  {
2
2
  "name": "@lucid-evolution/uplc",
3
- "version": "0.2.24",
4
- "main": "./dist/node/uplc_tx.js",
5
- "browser": "./dist/browser/uplc_tx.js",
6
- "types": "./dist/node/uplc_tx.d.ts",
3
+ "version": "0.3.0",
4
+ "main": "./dist/speed/node/uplc_tx.js",
5
+ "browser": "./dist/size/browser/uplc_tx.js",
6
+ "types": "./dist/speed/node/uplc_tx.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/speed/node/uplc_tx.d.ts",
10
+ "workerd": "./dist/size/browser/uplc_tx.js",
11
+ "edge-light": "./dist/size/browser/uplc_tx.js",
12
+ "worker": "./dist/size/browser/uplc_tx.js",
13
+ "browser": "./dist/size/browser/uplc_tx.js",
14
+ "default": "./dist/speed/node/uplc_tx.js"
15
+ },
16
+ "./speed": {
17
+ "types": "./dist/speed/node/uplc_tx.d.ts",
18
+ "workerd": "./dist/speed/browser/uplc_tx.js",
19
+ "edge-light": "./dist/speed/browser/uplc_tx.js",
20
+ "worker": "./dist/speed/browser/uplc_tx.js",
21
+ "browser": "./dist/speed/browser/uplc_tx.js",
22
+ "default": "./dist/speed/node/uplc_tx.js"
23
+ },
24
+ "./size": {
25
+ "types": "./dist/size/node/uplc_tx.d.ts",
26
+ "workerd": "./dist/size/browser/uplc_tx.js",
27
+ "edge-light": "./dist/size/browser/uplc_tx.js",
28
+ "worker": "./dist/size/browser/uplc_tx.js",
29
+ "browser": "./dist/size/browser/uplc_tx.js",
30
+ "default": "./dist/size/node/uplc_tx.js"
31
+ },
32
+ "./dist/*": "./dist/*",
33
+ "./package.json": "./package.json"
34
+ },
35
+ "typesVersions": {
36
+ "*": {
37
+ "speed": [
38
+ "./dist/speed/node/uplc_tx.d.ts"
39
+ ],
40
+ "size": [
41
+ "./dist/size/node/uplc_tx.d.ts"
42
+ ]
43
+ }
44
+ },
7
45
  "files": [
8
46
  "dist"
9
47
  ],
@@ -11,9 +49,9 @@
11
49
  "access": "public"
12
50
  },
13
51
  "scripts": {
14
- "build-local": "rm -rf dist && cd rust ; wasm-pack build --target bundler --out-dir ../src/browser && wasm-pack build --target nodejs --out-dir ../src/node && pnpm clean-garbage",
52
+ "build-local": "rm -rf dist && cd rust && wasm-pack build --target bundler --out-dir ../src/speed/browser && wasm-pack build --target nodejs --out-dir ../src/speed/node && wasm-pack build --profile release-size --target bundler --out-dir ../src/size/browser && wasm-pack build --profile release-size --target nodejs --out-dir ../src/size/node && cd .. && pnpm clean-garbage",
15
53
  "build": "cp -r src dist",
16
- "clean-garbage": "rm src/browser/.gitignore src/browser/package.json src/node/.gitignore src/node/package.json",
54
+ "clean-garbage": "for d in speed/browser speed/node size/browser size/node; do rm -f src/$d/.gitignore src/$d/package.json; done",
17
55
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
18
56
  }
19
57
  }
Binary file
Binary file
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes