@lucid-evolution/provider 0.1.42 → 0.1.43

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/dist/index.cjs CHANGED
@@ -52,7 +52,7 @@ var import_utils = require("@lucid-evolution/utils");
52
52
  // package.json
53
53
  var package_default = {
54
54
  name: "@lucid-evolution/provider",
55
- version: "0.1.42",
55
+ version: "0.1.43",
56
56
  description: "",
57
57
  main: "./dist/index.js",
58
58
  types: "./dist/index.d.ts",
@@ -309,17 +309,24 @@ var Blockfrost = class {
309
309
  headers: { project_id: this.projectId, lucid }
310
310
  }
311
311
  ).then((res) => res.json());
312
- if (type.toLowerCase() === "native") {
313
- throw new Error("Native script ref not implemented!");
314
- }
315
312
  const { cbor: script } = await fetch(
316
313
  `${this.url}/scripts/${r.reference_script_hash}/cbor`,
317
314
  { headers: { project_id: this.projectId, lucid } }
318
315
  ).then((res) => res.json());
319
- return {
320
- type: type === "plutusV1" ? "PlutusV1" : "PlutusV2",
321
- script: (0, import_utils.applyDoubleCborEncoding)(script)
322
- };
316
+ switch (type) {
317
+ case "timelock":
318
+ return void 0;
319
+ case "plutusV1":
320
+ return {
321
+ type: "PlutusV1",
322
+ script: (0, import_utils.applyDoubleCborEncoding)(script)
323
+ };
324
+ case "plutusV2":
325
+ return {
326
+ type: "PlutusV2",
327
+ script: (0, import_utils.applyDoubleCborEncoding)(script)
328
+ };
329
+ }
323
330
  })() : void 0
324
331
  };
325
332
  })
@@ -417,9 +424,9 @@ function datumJsonToCbor(json) {
417
424
  }
418
425
  var handleRateLimit = async (count) => {
419
426
  if (count % 100 === 0) {
420
- await (0, import_core_utils.sleep)(2e3);
427
+ await (0, import_core_utils.sleep)(1e3);
421
428
  } else if (count % 10 === 0) {
422
- await (0, import_core_utils.sleep)(200);
429
+ await (0, import_core_utils.sleep)(100);
423
430
  }
424
431
  };
425
432
  var lucid = package_default.version;
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import { applyDoubleCborEncoding } from "@lucid-evolution/utils";
14
14
  // package.json
15
15
  var package_default = {
16
16
  name: "@lucid-evolution/provider",
17
- version: "0.1.42",
17
+ version: "0.1.43",
18
18
  description: "",
19
19
  main: "./dist/index.js",
20
20
  types: "./dist/index.d.ts",
@@ -271,17 +271,24 @@ var Blockfrost = class {
271
271
  headers: { project_id: this.projectId, lucid }
272
272
  }
273
273
  ).then((res) => res.json());
274
- if (type.toLowerCase() === "native") {
275
- throw new Error("Native script ref not implemented!");
276
- }
277
274
  const { cbor: script } = await fetch(
278
275
  `${this.url}/scripts/${r.reference_script_hash}/cbor`,
279
276
  { headers: { project_id: this.projectId, lucid } }
280
277
  ).then((res) => res.json());
281
- return {
282
- type: type === "plutusV1" ? "PlutusV1" : "PlutusV2",
283
- script: applyDoubleCborEncoding(script)
284
- };
278
+ switch (type) {
279
+ case "timelock":
280
+ return void 0;
281
+ case "plutusV1":
282
+ return {
283
+ type: "PlutusV1",
284
+ script: applyDoubleCborEncoding(script)
285
+ };
286
+ case "plutusV2":
287
+ return {
288
+ type: "PlutusV2",
289
+ script: applyDoubleCborEncoding(script)
290
+ };
291
+ }
285
292
  })() : void 0
286
293
  };
287
294
  })
@@ -379,9 +386,9 @@ function datumJsonToCbor(json) {
379
386
  }
380
387
  var handleRateLimit = async (count) => {
381
388
  if (count % 100 === 0) {
382
- await sleep(2e3);
389
+ await sleep(1e3);
383
390
  } else if (count % 10 === 0) {
384
- await sleep(200);
391
+ await sleep(100);
385
392
  }
386
393
  };
387
394
  var lucid = package_default.version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-evolution/provider",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -32,8 +32,8 @@
32
32
  "effect": "^3.5.6",
33
33
  "@lucid-evolution/core-types": "0.1.13",
34
34
  "@lucid-evolution/core-utils": "0.1.13",
35
- "@lucid-evolution/utils": "0.1.33",
36
- "@lucid-evolution/wallet": "0.1.37"
35
+ "@lucid-evolution/utils": "0.1.34",
36
+ "@lucid-evolution/wallet": "0.1.38"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^20.12.8",