Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit b054204

Browse files
authored
config: updates sdk-core version to 0.1.16 (#38)
* config: updates sdk-core version to 0.1.16 * config: updates sdk-core version to 0.1.16 (2)
1 parent 2a2ddb3 commit b054204

9 files changed

Lines changed: 28 additions & 77 deletions

File tree

‎.123trigger‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
0.1.4
22
0.1.50.1.80.1.80.1.90.1.90.1.90.1.100.1.110.1.110.1.110.1.12
3-
0.1.120.1.130.1.130.1.130.1.130.1.140.1.140.1.150.1.15
3+
0.1.120.1.130.1.130.1.130.1.130.1.140.1.140.1.150.1.150.1.16

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"url": "https://github.com/AstarNetwork/astar.js.git"
1313
},
1414
"sideEffects": false,
15-
"version": "0.1.15",
15+
"version": "0.1.16",
1616
"workspaces": [
1717
"packages/*",
1818
"examples/*"

‎packages/api-derive/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-api-derive",
3-
"version": "0.1.15",
3+
"version": "0.1.16",
44
"description": "Astar JS API",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",
@@ -19,7 +19,7 @@
1919
},
2020
"homepage": "https://github.com/AstarNetwork/astar.js",
2121
"dependencies": {
22-
"@astar-network/astar-types": "0.1.14",
22+
"@astar-network/astar-types": "0.1.16",
2323
"@babel/runtime": "^7.10.2",
2424
"@open-web3/orml-types": "^1.0.2-0",
2525
"@polkadot/api-derive": "^9.13.6"

‎packages/api/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-api",
3-
"version": "0.1.15",
3+
"version": "0.1.16",
44
"description": "Astar JS API",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",
@@ -19,8 +19,8 @@
1919
},
2020
"homepage": "https://github.com/AstarNetwork/astar.js",
2121
"dependencies": {
22-
"@astar-network/astar-api-derive": "0.1.15",
23-
"@astar-network/astar-types": "0.1.15",
22+
"@astar-network/astar-api-derive": "0.1.16",
23+
"@astar-network/astar-types": "0.1.16",
2424
"@babel/runtime": "^7.10.2",
2525
"@open-web3/orml-api-derive": "^1.0.2-0",
2626
"@polkadot/api": "^9.13.6"

‎packages/sdk-core/package.json‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-sdk-core",
3-
"version": "0.1.15",
3+
"version": "0.1.16",
44
"description": "the core for astar SDK",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",
@@ -23,9 +23,8 @@
2323
},
2424
"dependencies": {
2525
"@ethersproject/bignumber": "^5.6.2",
26-
"@polkadot/keyring": "^10.2.6",
27-
"@polkadot/util": "^10.2.6",
28-
"@polkadot/util-crypto": "^10.2.6",
26+
"@polkadot/util": "^10.3.1",
27+
"@polkadot/util-crypto": "^10.3.1",
2928
"axios": "^0.24.0",
3029
"bn.js": "^5.2.1",
3130
"ethers": "^5.6.9",

‎packages/sdk-core/src/modules/address/index.ts‎

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import { hexToU8a, isHex, stringToU8a, u8aConcat, u8aToHex } from '@polkadot/util';
2-
import { decodeAddress, encodeAddress, checkAddress, addressToEvm, evmToAddress } from '@polkadot/util-crypto';
3-
import { blake2AsU8a } from '@polkadot/util-crypto/blake2';
4-
import Keyring, { createPair } from '@polkadot/keyring';
5-
import { ethers } from 'ethers';
61
import { ASTAR_SS58_FORMAT } from '@astar-network/astar-sdk-core/modules/config';
2+
import { hexToU8a, isHex, u8aToHex } from '@polkadot/util';
3+
import { addressToEvm, checkAddress, decodeAddress, encodeAddress, evmToAddress } from '@polkadot/util-crypto';
4+
import { ethers } from 'ethers';
75

86
export const isValidAddressPolkadotAddress = (address: string, prefix?: number): boolean => {
97
try {
@@ -18,22 +16,6 @@ export const isValidAddressPolkadotAddress = (address: string, prefix?: number):
1816
}
1917
};
2018

21-
export function evmConverter(evmAddress = ''): string {
22-
try {
23-
const addr = hexToU8a(evmAddress);
24-
const data = stringToU8a('evm:');
25-
const res = blake2AsU8a(u8aConcat(data, addr));
26-
27-
const mainnetKeyring = new Keyring({ type: 'sr25519', ss58Format: 7 });
28-
const mainnetPair = createPair({ toSS58: mainnetKeyring.encodeAddress, type: 'sr25519' }, { publicKey: res });
29-
30-
const convertedMainnetAddress = mainnetPair.address;
31-
return convertedMainnetAddress;
32-
} catch (err) {
33-
return 'error';
34-
}
35-
}
36-
3719
export const checkSumEvmAddress = (evmAddress: string): string => {
3820
return ethers.utils.getAddress(evmAddress);
3921
};

‎packages/type-definitions/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-type-definitions",
3-
"version": "0.1.15",
3+
"version": "0.1.16",
44
"description": "Polkadot.js type definations for astar Network",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",

‎packages/types/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@astar-network/astar-types",
3-
"version": "0.1.15",
3+
"version": "0.1.16",
44
"description": "Polkadot.js type definations for Astar Network",
55
"main": "index.js",
66
"author": "Astar Network <info@astar.network>",
@@ -19,7 +19,7 @@
1919
},
2020
"homepage": "https://github.com/AstarNetwork/astar.js",
2121
"dependencies": {
22-
"@astar-network/astar-type-definitions": "0.1.15",
22+
"@astar-network/astar-type-definitions": "0.1.16",
2323
"@babel/runtime": "^7.10.2",
2424
"@open-web3/api-mobx": "^1.0.2-0",
2525
"@open-web3/orml-types": "^1.0.2-0",

‎yarn.lock‎

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ __metadata:
1515
languageName: node
1616
linkType: hard
1717

18-
"@astar-network/astar-api-derive@0.1.15, @astar-network/astar-api-derive@workspace:packages/api-derive":
18+
"@astar-network/astar-api-derive@0.1.16, @astar-network/astar-api-derive@workspace:packages/api-derive":
1919
version: 0.0.0-use.local
2020
resolution: "@astar-network/astar-api-derive@workspace:packages/api-derive"
2121
dependencies:
22-
"@astar-network/astar-types": 0.1.14
22+
"@astar-network/astar-types": 0.1.16
2323
"@babel/runtime": ^7.10.2
2424
"@open-web3/orml-types": ^1.0.2-0
2525
"@polkadot/api-derive": ^9.13.6
@@ -30,8 +30,8 @@ __metadata:
3030
version: 0.0.0-use.local
3131
resolution: "@astar-network/astar-api@workspace:packages/api"
3232
dependencies:
33-
"@astar-network/astar-api-derive": 0.1.15
34-
"@astar-network/astar-types": 0.1.15
33+
"@astar-network/astar-api-derive": 0.1.16
34+
"@astar-network/astar-types": 0.1.16
3535
"@babel/runtime": ^7.10.2
3636
"@open-web3/orml-api-derive": ^1.0.2-0
3737
"@polkadot/api": ^9.13.6
@@ -46,9 +46,8 @@ __metadata:
4646
resolution: "@astar-network/astar-sdk-core@workspace:packages/sdk-core"
4747
dependencies:
4848
"@ethersproject/bignumber": ^5.6.2
49-
"@polkadot/keyring": ^10.2.6
50-
"@polkadot/util": ^10.2.6
51-
"@polkadot/util-crypto": ^10.2.6
49+
"@polkadot/util": ^10.3.1
50+
"@polkadot/util-crypto": ^10.3.1
5251
"@types/jest": ^28.1.1
5352
axios: ^0.24.0
5453
bn.js: ^5.2.1
@@ -60,7 +59,7 @@ __metadata:
6059
languageName: unknown
6160
linkType: soft
6261

63-
"@astar-network/astar-type-definitions@0.1.15, @astar-network/astar-type-definitions@workspace:packages/type-definitions":
62+
"@astar-network/astar-type-definitions@0.1.16, @astar-network/astar-type-definitions@workspace:packages/type-definitions":
6463
version: 0.0.0-use.local
6564
resolution: "@astar-network/astar-type-definitions@workspace:packages/type-definitions"
6665
dependencies:
@@ -69,21 +68,11 @@ __metadata:
6968
languageName: unknown
7069
linkType: soft
7170

72-
"@astar-network/astar-type-definitions@npm:0.1.14":
73-
version: 0.1.14
74-
resolution: "@astar-network/astar-type-definitions@npm:0.1.14"
75-
dependencies:
76-
"@babel/runtime": ^7.10.2
77-
"@open-web3/orml-type-definitions": ^1.0.2-0
78-
checksum: ba1902929e3884327f183cea817bbe335c9679c0c3def95954db87cd39e0f62123659382f7ff5197e1cc379fa905dfd243d0f031543361a011dc47a9af03979a
79-
languageName: node
80-
linkType: hard
81-
82-
"@astar-network/astar-types@0.1.15, @astar-network/astar-types@workspace:packages/types":
71+
"@astar-network/astar-types@0.1.16, @astar-network/astar-types@workspace:packages/types":
8372
version: 0.0.0-use.local
8473
resolution: "@astar-network/astar-types@workspace:packages/types"
8574
dependencies:
86-
"@astar-network/astar-type-definitions": 0.1.15
75+
"@astar-network/astar-type-definitions": 0.1.16
8776
"@babel/runtime": ^7.10.2
8877
"@open-web3/api-mobx": ^1.0.2-0
8978
"@open-web3/orml-types": ^1.0.2-0
@@ -99,25 +88,6 @@ __metadata:
9988
languageName: unknown
10089
linkType: soft
10190

102-
"@astar-network/astar-types@npm:0.1.14":
103-
version: 0.1.14
104-
resolution: "@astar-network/astar-types@npm:0.1.14"
105-
dependencies:
106-
"@astar-network/astar-type-definitions": 0.1.14
107-
"@babel/runtime": ^7.10.2
108-
"@open-web3/api-mobx": ^1.0.2-0
109-
"@open-web3/orml-types": ^1.0.2-0
110-
"@polkadot/api": ^9.13.6
111-
"@polkadot/typegen": ^9.13.6
112-
"@polkadot/types": ^9.13.6
113-
peerDependencies:
114-
"@polkadot/api": ^9.13.6
115-
"@polkadot/typegen": ^9.13.6
116-
"@polkadot/types": ^9.13.6
117-
checksum: 0f8f4f885c2dffd9c86566bd9975d1ad02e75f8e1ef0bf67eb9496a1dd6da6ddb9e992e7ca788bbb10152ebd64ff0e41bcfcbbad82534169290e79da86d6dcd4
118-
languageName: node
119-
linkType: hard
120-
12191
"@babel/cli@npm:^7.12.1, @babel/cli@npm:^7.20.7":
12292
version: 7.20.7
12393
resolution: "@babel/cli@npm:7.20.7"
@@ -3606,7 +3576,7 @@ __metadata:
36063576
languageName: node
36073577
linkType: hard
36083578

3609-
"@polkadot/keyring@npm:^10.2.6, @polkadot/keyring@npm:^10.3.1":
3579+
"@polkadot/keyring@npm:^10.3.1":
36103580
version: 10.3.1
36113581
resolution: "@polkadot/keyring@npm:10.3.1"
36123582
dependencies:
@@ -3788,7 +3758,7 @@ __metadata:
37883758
languageName: node
37893759
linkType: hard
37903760

3791-
"@polkadot/util-crypto@npm:10.3.1, @polkadot/util-crypto@npm:^10.2.6, @polkadot/util-crypto@npm:^10.3.1":
3761+
"@polkadot/util-crypto@npm:10.3.1, @polkadot/util-crypto@npm:^10.3.1":
37923762
version: 10.3.1
37933763
resolution: "@polkadot/util-crypto@npm:10.3.1"
37943764
dependencies:
@@ -3809,7 +3779,7 @@ __metadata:
38093779
languageName: node
38103780
linkType: hard
38113781

3812-
"@polkadot/util@npm:10.3.1, @polkadot/util@npm:^10.2.6, @polkadot/util@npm:^10.3.1":
3782+
"@polkadot/util@npm:10.3.1, @polkadot/util@npm:^10.3.1":
38133783
version: 10.3.1
38143784
resolution: "@polkadot/util@npm:10.3.1"
38153785
dependencies:

0 commit comments

Comments
 (0)