@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
package/src/rln.ts
CHANGED
@@ -16,7 +16,7 @@ import {
|
|
16
16
|
type RLNEncoder
|
17
17
|
} from "./codec.js";
|
18
18
|
import { DEFAULT_RATE_LIMIT } from "./contract/constants.js";
|
19
|
-
import {
|
19
|
+
import { LINEA_CONTRACT, RLNContract } from "./contract/index.js";
|
20
20
|
import { IdentityCredential } from "./identity.js";
|
21
21
|
import { Keystore } from "./keystore/index.js";
|
22
22
|
import type {
|
@@ -108,7 +108,7 @@ type StartRLNOptions = {
|
|
108
108
|
*/
|
109
109
|
signer?: ethers.Signer;
|
110
110
|
/**
|
111
|
-
* If not set - will use default
|
111
|
+
* If not set - will use default LINEA_CONTRACT address.
|
112
112
|
*/
|
113
113
|
address?: string;
|
114
114
|
/**
|
@@ -190,10 +190,10 @@ export class RLNInstance {
|
|
190
190
|
const address =
|
191
191
|
credentials?.membership.address ||
|
192
192
|
options.address ||
|
193
|
-
|
193
|
+
LINEA_CONTRACT.address;
|
194
194
|
|
195
|
-
if (address ===
|
196
|
-
chainId =
|
195
|
+
if (address === LINEA_CONTRACT.address) {
|
196
|
+
chainId = LINEA_CONTRACT.chainId;
|
197
197
|
}
|
198
198
|
|
199
199
|
const signer = options.signer || (await extractMetaMaskSigner());
|