@waku/rln 0.1.4-d27db21.0 → 0.1.5-76f86de.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/CHANGELOG.md +19 -0
- package/README.md +5 -0
- package/bundle/index.js +1 -1
- package/bundle/node_modules/@ethersproject/abi/lib.esm/coders/abstract-coder.js +1 -1
- package/bundle/node_modules/@ethersproject/abi/lib.esm/interface.js +1 -1
- package/bundle/node_modules/@ethersproject/abstract-provider/lib.esm/index.js +1 -1
- package/bundle/node_modules/@ethersproject/abstract-signer/lib.esm/index.js +11 -11
- package/bundle/node_modules/@ethersproject/bytes/lib.esm/_version.js +1 -1
- package/bundle/node_modules/@ethersproject/contracts/lib.esm/index.js +7 -7
- package/bundle/node_modules/@ethersproject/hash/lib.esm/ens-normalize/lib.js +2 -2
- package/bundle/node_modules/@ethersproject/hash/lib.esm/typed-data.js +2 -2
- package/bundle/node_modules/@ethersproject/keccak256/node_modules/js-sha3/src/sha3.js +1 -1
- package/bundle/node_modules/@ethersproject/logger/lib.esm/_version.js +1 -1
- package/bundle/node_modules/@ethersproject/properties/lib.esm/index.js +1 -1
- package/bundle/node_modules/@ethersproject/providers/lib.esm/base-provider.js +44 -44
- package/bundle/node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js +8 -8
- package/bundle/node_modules/@ethersproject/rlp/lib.esm/_version.js +1 -1
- package/bundle/node_modules/@ethersproject/transactions/lib.esm/index.js +1 -1
- package/bundle/node_modules/@ethersproject/web/lib.esm/geturl.js +1 -1
- package/bundle/node_modules/@ethersproject/web/lib.esm/index.js +2 -2
- package/bundle/node_modules/@multiformats/multiaddr/dist/src/multiaddr.js +1 -0
- package/bundle/node_modules/@noble/hashes/esm/sha3.js +1 -1
- package/bundle/node_modules/bn.js/lib/bn.js +1 -1
- package/bundle/packages/core/dist/lib/connection_manager/connection_manager.js +6 -6
- package/bundle/packages/rln/dist/contract/abi.js +502 -248
- package/bundle/packages/rln/dist/contract/constants.js +4 -5
- package/bundle/packages/rln/dist/contract/rln_contract.js +121 -37
- package/bundle/packages/rln/dist/keystore/keystore.js +2 -1
- package/bundle/packages/rln/dist/rln.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/checksum.js +2 -2
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/cipher.js +3 -3
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/class.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/functional.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/kdf.js +4 -4
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/password.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/schema-validation-generated.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/schema-validation.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/aes.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/pbkdf2.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/scrypt.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/sha256.js +1 -1
- package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/_assert.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/_sha2.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/_u64.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/cryptoBrowser.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/hmac.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/pbkdf2.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/scrypt.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/sha256.js +1 -1
- package/bundle/packages/rln/node_modules/@noble/hashes/sha512.js +2 -2
- package/bundle/packages/rln/node_modules/@noble/hashes/utils.js +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/codec.test-utils.d.ts +36 -0
- package/dist/codec.test-utils.js +56 -0
- package/dist/codec.test-utils.js.map +1 -0
- package/dist/contract/abi.d.ts +21 -17
- package/dist/contract/abi.js +502 -248
- package/dist/contract/abi.js.map +1 -1
- package/dist/contract/constants.d.ts +22 -18
- package/dist/contract/constants.js +3 -3
- package/dist/contract/constants.js.map +1 -1
- package/dist/contract/rln_contract.d.ts +10 -3
- package/dist/contract/rln_contract.js +120 -36
- package/dist/contract/rln_contract.js.map +1 -1
- package/dist/contract/test-setup.d.ts +26 -0
- package/dist/contract/test-setup.js +56 -0
- package/dist/contract/test-setup.js.map +1 -0
- package/dist/contract/test-utils.d.ts +39 -0
- package/dist/contract/test-utils.js +118 -0
- package/dist/contract/test-utils.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/keystore/keystore.js +2 -1
- package/dist/keystore/keystore.js.map +1 -1
- package/dist/keystore/types.d.ts +1 -0
- package/dist/rln.d.ts +1 -1
- package/dist/rln.js +4 -4
- package/dist/rln.js.map +1 -1
- package/package.json +1 -1
- package/src/codec.test-utils.ts +80 -0
- package/src/contract/abi.ts +502 -248
- package/src/contract/constants.ts +3 -3
- package/src/contract/rln_contract.ts +158 -46
- package/src/contract/test-setup.ts +86 -0
- package/src/contract/test-utils.ts +179 -0
- package/src/index.ts +13 -2
- package/src/keystore/keystore.ts +2 -1
- package/src/keystore/types.ts +1 -0
- package/src/rln.ts +5 -5
@@ -203,7 +203,7 @@ class JsonRpcSigner extends Signer {
|
|
203
203
|
transaction.gasLimit = this.provider.estimateGas(estimate);
|
204
204
|
}
|
205
205
|
if (transaction.to != null) {
|
206
|
-
transaction.to = Promise.resolve(transaction.to).then((to) => __awaiter(this,
|
206
|
+
transaction.to = Promise.resolve(transaction.to).then((to) => __awaiter(this, void 0, void 0, function* () {
|
207
207
|
if (to == null) {
|
208
208
|
return null;
|
209
209
|
}
|
@@ -246,7 +246,7 @@ class JsonRpcSigner extends Signer {
|
|
246
246
|
});
|
247
247
|
}
|
248
248
|
sendTransaction(transaction) {
|
249
|
-
return __awaiter(this,
|
249
|
+
return __awaiter(this, void 0, void 0, function* () {
|
250
250
|
// This cannot be mined any earlier than any recent block
|
251
251
|
const blockNumber = yield this.provider._getInternalBlockNumber(100 + 2 * this.provider.pollingInterval);
|
252
252
|
// Send the transaction
|
@@ -270,7 +270,7 @@ class JsonRpcSigner extends Signer {
|
|
270
270
|
});
|
271
271
|
}
|
272
272
|
signMessage(message) {
|
273
|
-
return __awaiter(this,
|
273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
274
274
|
const data = ((typeof (message) === "string") ? toUtf8Bytes(message) : message);
|
275
275
|
const address = yield this.getAddress();
|
276
276
|
try {
|
@@ -289,7 +289,7 @@ class JsonRpcSigner extends Signer {
|
|
289
289
|
});
|
290
290
|
}
|
291
291
|
_legacySignMessage(message) {
|
292
|
-
return __awaiter(this,
|
292
|
+
return __awaiter(this, void 0, void 0, function* () {
|
293
293
|
const data = ((typeof (message) === "string") ? toUtf8Bytes(message) : message);
|
294
294
|
const address = yield this.getAddress();
|
295
295
|
try {
|
@@ -309,7 +309,7 @@ class JsonRpcSigner extends Signer {
|
|
309
309
|
});
|
310
310
|
}
|
311
311
|
_signTypedData(domain, types, value) {
|
312
|
-
return __awaiter(this,
|
312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
313
313
|
// Populate any ENS names (in-place)
|
314
314
|
const populated = yield TypedDataEncoder.resolveNames(domain, types, value, (name) => {
|
315
315
|
return this.provider.resolveName(name);
|
@@ -334,7 +334,7 @@ class JsonRpcSigner extends Signer {
|
|
334
334
|
});
|
335
335
|
}
|
336
336
|
unlock(password) {
|
337
|
-
return __awaiter(this,
|
337
|
+
return __awaiter(this, void 0, void 0, function* () {
|
338
338
|
const provider = this.provider;
|
339
339
|
const address = yield this.getAddress();
|
340
340
|
return provider.send("personal_unlockAccount", [address.toLowerCase(), password, null]);
|
@@ -414,7 +414,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
414
414
|
return this._cache["detectNetwork"];
|
415
415
|
}
|
416
416
|
_uncachedDetectNetwork() {
|
417
|
-
return __awaiter(this,
|
417
|
+
return __awaiter(this, void 0, void 0, function* () {
|
418
418
|
yield timer(0);
|
419
419
|
let chainId = null;
|
420
420
|
try {
|
@@ -544,7 +544,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
544
544
|
return null;
|
545
545
|
}
|
546
546
|
perform(method, params) {
|
547
|
-
return __awaiter(this,
|
547
|
+
return __awaiter(this, void 0, void 0, function* () {
|
548
548
|
// Legacy networks do not like the type field being passed along (which
|
549
549
|
// is fair), so we delete type if it is 0 and a non-EIP-1559 network
|
550
550
|
if (method === "call" || method === "estimateGas") {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { getAddress } from '../../address/lib.esm/index.js';
|
2
|
-
import { hexDataLength, arrayify,
|
2
|
+
import { hexDataLength, arrayify, hexZeroPad, hexlify, hexDataSlice, splitSignature, stripZeros, hexConcat } from '../../bytes/lib.esm/index.js';
|
3
3
|
import { keccak256 } from '../../keccak256/lib.esm/index.js';
|
4
4
|
import { decode, encode } from '../../rlp/lib.esm/index.js';
|
5
5
|
import { recoverPublicKey, computePublicKey } from '../../signing-key/lib.esm/index.js';
|
@@ -10,7 +10,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|
10
10
|
});
|
11
11
|
};
|
12
12
|
function getUrl(href, options) {
|
13
|
-
return __awaiter(this,
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
14
14
|
if (options == null) {
|
15
15
|
options = {};
|
16
16
|
}
|
@@ -173,7 +173,7 @@ function _fetchData(connection, body, processFunc) {
|
|
173
173
|
return { promise, cancel };
|
174
174
|
})();
|
175
175
|
const runningFetch = (function () {
|
176
|
-
return __awaiter(this,
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
177
177
|
for (let attempt = 0; attempt < attemptLimit; attempt++) {
|
178
178
|
let response = null;
|
179
179
|
try {
|
@@ -236,7 +236,7 @@ function _fetchData(connection, body, processFunc) {
|
|
236
236
|
url: url
|
237
237
|
});
|
238
238
|
}
|
239
|
-
{
|
239
|
+
if (processFunc) {
|
240
240
|
try {
|
241
241
|
const result = yield processFunc(body, response);
|
242
242
|
runningTimeout.cancel();
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { anumber, aexists, abytes, aoutput } from './_assert.js';
|
2
|
-
import {
|
2
|
+
import { rotlSH, rotlSL, rotlBH, rotlBL, split } from './_u64.js';
|
3
3
|
import { wrapConstructor, Hash, u32, isLE, byteSwap32, toBytes } from './utils.js';
|
4
4
|
|
5
5
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { getDefaultExportFromCjs, commonjsGlobal } from '../../../_virtual/_commonjsHelpers.js';
|
2
2
|
import { __module as bn } from '../../../_virtual/bn.js';
|
3
3
|
import require$$0 from '../../../_virtual/__node-resolve_empty.js';
|
4
4
|
|
@@ -1,9 +1,3 @@
|
|
1
|
-
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/multiaddr.js';
|
2
|
-
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/protocols-table.js';
|
3
|
-
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/convert.js';
|
4
|
-
import '../../../../interfaces/dist/protocols.js';
|
5
|
-
import '../../../../interfaces/dist/connection_manager.js';
|
6
|
-
import '../../../../interfaces/dist/health_indicator.js';
|
7
1
|
import '../../../../../node_modules/multiformats/dist/src/bases/base10.js';
|
8
2
|
import '../../../../../node_modules/multiformats/dist/src/bases/base16.js';
|
9
3
|
import '../../../../../node_modules/multiformats/dist/src/bases/base2.js';
|
@@ -15,6 +9,12 @@ import '../../../../../node_modules/multiformats/dist/src/bases/base64.js';
|
|
15
9
|
import '../../../../../node_modules/multiformats/dist/src/bases/base8.js';
|
16
10
|
import '../../../../../node_modules/multiformats/dist/src/bases/identity.js';
|
17
11
|
import '../../../../../node_modules/multiformats/dist/src/codecs/json.js';
|
12
|
+
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/convert.js';
|
13
|
+
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/protocols-table.js';
|
14
|
+
import '../../../../../node_modules/@multiformats/multiaddr/dist/src/multiaddr.js';
|
15
|
+
import '../../../../interfaces/dist/protocols.js';
|
16
|
+
import '../../../../interfaces/dist/connection_manager.js';
|
17
|
+
import '../../../../interfaces/dist/health_indicator.js';
|
18
18
|
import { Logger } from '../../../../utils/dist/logger/index.js';
|
19
19
|
import './keep_alive_manager.js';
|
20
20
|
|