Skip to content

Commit ae82fb1

Browse files
dependabot[bot]Kolezhniukvmidyllic
authored
Bump @iden3/js-iden3-core from 1.0.0 to 1.0.1 (#120)
* Bump @iden3/js-iden3-core from 1.0.0 to 1.0.1 Bumps [@iden3/js-iden3-core](https://github.com/iden3/js-iden3-core) from 1.0.0 to 1.0.1. - [Release notes](https://github.com/iden3/js-iden3-core/releases) - [Commits](iden3/js-iden3-core@v1.0.0...v1.0.1) --- updated-dependencies: - dependency-name: "@iden3/js-iden3-core" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump version * add zkevm and sepolia * update jwz --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dimasik Kolezhniuk <[email protected]> Co-authored-by: vmidyllic <[email protected]>
1 parent a113e93 commit ae82fb1

File tree

4 files changed

+32
-28
lines changed

4 files changed

+32
-28
lines changed

package-lock.json

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@0xpolygonid/js-sdk",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "SDK to work with Polygon ID",
55
"main": "dist/cjs/index.js",
66
"module": "dist/esm_esbuild/index.js",
@@ -69,9 +69,9 @@
6969
},
7070
"dependencies": {
7171
"@iden3/js-crypto": "1.0.0",
72-
"@iden3/js-iden3-core": "1.0.0",
72+
"@iden3/js-iden3-core": "1.0.1",
7373
"@iden3/js-jsonld-merklization": "1.0.1",
74-
"@iden3/js-jwz": "1.0.0",
74+
"@iden3/js-jwz": "1.0.1",
7575
"@iden3/js-merkletree": "1.0.0",
7676
"@lumeweb/js-sha3-browser": "^0.8.1",
7777
"ajv": "^8.12.0",

src/storage/blockchain/chainid.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ export const CHAIN_IDS: { [key: string]: number } = {
66
eth: 1,
77
'eth:main': 1,
88
'eth:goerli': 5,
9+
'eth:sepolia': 11155111,
910
polygon: 137,
1011
'polygon:main': 137,
11-
'polygon:mumbai': 80001
12+
'polygon:mumbai': 80001,
13+
zkevm: 1101,
14+
'zkevm:main': 1101,
15+
'zkevm:test': 1442
1216
};
1317

1418
/**

tests/blockchain/chainId.test.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,34 @@ import {
66
getChainIdByDIDsParts
77
} from '../../src';
88

9-
describe('try to get already registred', () => {
10-
it('get by blokchain', async () => {
11-
registerDefaultNetworkForMethodId('eth', 1);
9+
describe('try to get already registered', () => {
10+
it('get by blockchain', async () => {
11+
expect(getChainId('eth')).to.be.equal(1);
1212
});
13-
it('get by blokchain and network', async () => {
14-
registerDefaultNetworkForMethodId('polygon:mumbai', 80001);
13+
it('get by blockchain and network', async () => {
14+
expect(getChainId('polygon','mumbai')).to.be.equal(80001);
1515
});
1616
});
1717

1818
describe('get chainId by did parts', () => {
1919
it('register default chaiId', async () => {
20-
registerDefaultNetworkForMethodId('dima', 12);
20+
registerDefaultNetworkForMethodId('testMethodId', 12);
2121
});
2222
it('register blockchain', async () => {
23-
registerChainId('kolez', 13, 'zagreb');
23+
registerChainId('testChain', 13, 'testNetwork');
2424
});
2525
it('get default chainId by method did', () => {
26-
expect(getChainIdByDIDsParts('dima')).to.be.equal(12);
26+
expect(getChainIdByDIDsParts('testMethodId')).to.be.equal(12);
2727
});
2828
it('get chaiId by chainId and network', () => {
29-
expect(getChainIdByDIDsParts('dima', 'kolez', 'zagreb')).to.be.equal(13);
29+
expect(getChainIdByDIDsParts('testMethodIds', 'testChain', 'testNetwork')).to.be.equal(13);
3030
});
3131
});
3232

33-
describe('try to get non registred chain id', () => {
34-
it('try to get non registred by methodId', async () => {
33+
describe('try to get non registered chain id', () => {
34+
it('try to get non registered by blockchain', async () => {
3535
expect(() => {
36-
getChainId('ukr');
37-
}).to.be.throw('chainId not found for ukr');
36+
getChainId('testChain2');
37+
}).to.be.throw('chainId not found for testChain2');
3838
});
3939
});

0 commit comments

Comments
 (0)