@taquito/timelock 23.0.3 → 23.1.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/dist/lib/chest.js CHANGED
@@ -5,8 +5,8 @@ exports.encrypt = encrypt;
5
5
  exports.decrypt = decrypt;
6
6
  const nacl_1 = require("@stablelib/nacl");
7
7
  const timelock_util_1 = require("./timelock-util");
8
- const crypto = require("crypto");
9
- const defaultRNG = crypto;
8
+ // globalThis.crypto is available in browsers and Node.js 20+
9
+ const defaultRNG = globalThis.crypto;
10
10
  class ChestKey extends timelock_util_1.TimelockProof {
11
11
  }
12
12
  exports.ChestKey = ChestKey;
@@ -8,8 +8,8 @@ exports.encodeBigInt = encodeBigInt;
8
8
  exports.decodeBigInt = decodeBigInt;
9
9
  const big_integer_1 = require("big-integer");
10
10
  const blake2b_1 = require("@stablelib/blake2b");
11
- const crypto = require("crypto");
12
- const defaultRNG = crypto;
11
+ // globalThis.crypto is available in browsers and Node.js 20+
12
+ const defaultRNG = globalThis.crypto;
13
13
  exports.RSA_MODULUS = (0, big_integer_1.default)('25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784406918290641249515082189298559149176184502808489120072844992687392807287776735971418347270261896375014971824691165077613379859095700097330459748808428401797429100642458691817195118746121515172654632282216869987549182422433637259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133844143603833904414952634432190114657544454178424020924616515723350778707749817125772467962926386356373289912154831438167899885040445364023527381951378636564391212010397122822120720357');
14
14
  function rand(rng = defaultRNG) {
15
15
  const bytes = new Uint8Array(4);
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
5
5
  exports.VERSION = {
6
- "commitHash": "42048d039f6d4345fc59d04b03650bcb8e27bb62",
7
- "version": "23.0.3"
6
+ "commitHash": "c77fe4b0989665d8b5cfd15a7cc977499021f6fd",
7
+ "version": "23.1.0"
8
8
  };
@@ -1,9 +1,9 @@
1
1
  import { secretBox, openSecretBox } from '@stablelib/nacl';
2
2
  import bigInt from 'big-integer';
3
3
  import { hash } from '@stablelib/blake2b';
4
- import * as crypto from 'crypto';
5
4
 
6
- const defaultRNG$1 = crypto;
5
+ // globalThis.crypto is available in browsers and Node.js 20+
6
+ const defaultRNG$1 = globalThis.crypto;
7
7
  const RSA_MODULUS = bigInt('25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784406918290641249515082189298559149176184502808489120072844992687392807287776735971418347270261896375014971824691165077613379859095700097330459748808428401797429100642458691817195118746121515172654632282216869987549182422433637259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133844143603833904414952634432190114657544454178424020924616515723350778707749817125772467962926386356373289912154831438167899885040445364023527381951378636564391212010397122822120720357');
8
8
  function rand(rng = defaultRNG$1) {
9
9
  const bytes = new Uint8Array(4);
@@ -228,7 +228,8 @@ function decodeBigInt(buf) {
228
228
  return [res, i];
229
229
  }
230
230
 
231
- const defaultRNG = crypto;
231
+ // globalThis.crypto is available in browsers and Node.js 20+
232
+ const defaultRNG = globalThis.crypto;
232
233
  class ChestKey extends TimelockProof {
233
234
  }
234
235
  function encrypt(key, text, rng = defaultRNG) {
@@ -1 +1 @@
1
- {"version":3,"file":"taquito-timelock.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"taquito-timelock.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,29 +1,11 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@stablelib/nacl'), require('big-integer'), require('@stablelib/blake2b'), require('crypto')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@stablelib/nacl', 'big-integer', '@stablelib/blake2b', 'crypto'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.taquitoTimelock = {}, global.nacl, global.bigInt, global.blake2b, global.crypto));
5
- })(this, (function (exports, nacl, bigInt, blake2b, crypto) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@stablelib/nacl'), require('big-integer'), require('@stablelib/blake2b')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', '@stablelib/nacl', 'big-integer', '@stablelib/blake2b'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.taquitoTimelock = {}, global.nacl, global.bigInt, global.blake2b));
5
+ })(this, (function (exports, nacl, bigInt, blake2b) { 'use strict';
6
6
 
7
- function _interopNamespaceDefault(e) {
8
- var n = Object.create(null);
9
- if (e) {
10
- Object.keys(e).forEach(function (k) {
11
- if (k !== 'default') {
12
- var d = Object.getOwnPropertyDescriptor(e, k);
13
- Object.defineProperty(n, k, d.get ? d : {
14
- enumerable: true,
15
- get: function () { return e[k]; }
16
- });
17
- }
18
- });
19
- }
20
- n.default = e;
21
- return Object.freeze(n);
22
- }
23
-
24
- var crypto__namespace = /*#__PURE__*/_interopNamespaceDefault(crypto);
25
-
26
- const defaultRNG$1 = crypto__namespace;
7
+ // globalThis.crypto is available in browsers and Node.js 20+
8
+ const defaultRNG$1 = globalThis.crypto;
27
9
  const RSA_MODULUS = bigInt('25195908475657893494027183240048398571429282126204032027777137836043662020707595556264018525880784406918290641249515082189298559149176184502808489120072844992687392807287776735971418347270261896375014971824691165077613379859095700097330459748808428401797429100642458691817195118746121515172654632282216869987549182422433637259085141865462043576798423387184774447920739934236584823824281198163815010674810451660377306056201619676256133844143603833904414952634432190114657544454178424020924616515723350778707749817125772467962926386356373289912154831438167899885040445364023527381951378636564391212010397122822120720357');
28
10
  function rand(rng = defaultRNG$1) {
29
11
  const bytes = new Uint8Array(4);
@@ -248,7 +230,8 @@
248
230
  return [res, i];
249
231
  }
250
232
 
251
- const defaultRNG = crypto__namespace;
233
+ // globalThis.crypto is available in browsers and Node.js 20+
234
+ const defaultRNG = globalThis.crypto;
252
235
  class ChestKey extends TimelockProof {
253
236
  }
254
237
  function encrypt(key, text, rng = defaultRNG) {
@@ -1 +1 @@
1
- {"version":3,"file":"taquito-timelock.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"taquito-timelock.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/timelock",
3
- "version": "23.0.3",
3
+ "version": "23.1.0",
4
4
  "description": "TypeScript implementation of the Timelock feature in Tezos",
5
5
  "main": "./dist/taquito-timelock.umd.js",
6
6
  "module": "./dist/taquito-timelock.es6.js",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "license": "Apache-2.0",
21
21
  "engines": {
22
- "node": ">=18"
22
+ "node": ">=20"
23
23
  },
24
24
  "scripts": {
25
25
  "test": "jest --coverage",
@@ -68,10 +68,10 @@
68
68
  "big-integer": "^1.6.52"
69
69
  },
70
70
  "devDependencies": {
71
- "@taquito/signer": "^23.0.3",
72
- "@taquito/taquito": "^23.0.3",
73
- "@taquito/utils": "^23.0.3",
74
- "@types/node": "^18",
71
+ "@taquito/signer": "^23.1.0",
72
+ "@taquito/taquito": "^23.1.0",
73
+ "@taquito/utils": "^23.1.0",
74
+ "@types/node": "^20",
75
75
  "@typescript-eslint/eslint-plugin": "^6.21.0",
76
76
  "@typescript-eslint/parser": "^6.21.0",
77
77
  "eslint": "^8.57.0",
@@ -95,5 +95,5 @@
95
95
  "ts-toolbelt": "^9.6.0",
96
96
  "typescript": "^5.5.4"
97
97
  },
98
- "gitHead": "2abf349e97af45f11210b3121078b9d96699d5da"
98
+ "gitHead": "bcf60513cade1e3272cd50c47a786d4bd45f70c8"
99
99
  }