@snowbridge/registry 0.1.65

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.
@@ -0,0 +1,227 @@
1
+ {
2
+ "timestamp": "2025-06-25T21:17:17.386Z",
3
+ "environment": "westend_sepolia",
4
+ "ethChainId": 11155111,
5
+ "gatewayAddress": "0x9ed8b47bc3417e3bd0507adc06e56e2fa360a4e9",
6
+ "assetHubParaId": 1000,
7
+ "bridgeHubParaId": 1002,
8
+ "relaychain": {
9
+ "tokenSymbols": "WND",
10
+ "tokenDecimals": 12,
11
+ "ss58Format": 42,
12
+ "isEthereum": false,
13
+ "accountType": "AccountId32",
14
+ "name": "Westend",
15
+ "specName": "westend",
16
+ "specVersion": 1018011
17
+ },
18
+ "bridgeHub": {
19
+ "tokenSymbols": "WND",
20
+ "tokenDecimals": 12,
21
+ "ss58Format": 42,
22
+ "isEthereum": false,
23
+ "accountType": "AccountId32",
24
+ "name": "Westend BridgeHub",
25
+ "specName": "bridge-hub-westend",
26
+ "specVersion": 1018000
27
+ },
28
+ "ethereumChains": {
29
+ "11155111": {
30
+ "chainId": 11155111,
31
+ "assets": {
32
+ "0x0000000000000000000000000000000000000000": {
33
+ "token": "0x0000000000000000000000000000000000000000",
34
+ "name": "Ether",
35
+ "symbol": "Ether",
36
+ "decimals": 18
37
+ },
38
+ "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620": {
39
+ "token": "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620",
40
+ "name": "Frequency",
41
+ "symbol": "eFRQCY",
42
+ "decimals": 12
43
+ },
44
+ "0xfff9976782d46cc05630d1f6ebab18b2324d6b14": {
45
+ "token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
46
+ "name": "Wrapped Ether",
47
+ "symbol": "WETH",
48
+ "decimals": 18
49
+ },
50
+ "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f": {
51
+ "token": "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f",
52
+ "name": "Frequency",
53
+ "symbol": "XRQCY",
54
+ "decimals": 8,
55
+ "foreignId": "0xaf13384cf9612ef1ff4b87470ab247d6f8d8110d4f5af2fe290ce6767818712c"
56
+ },
57
+ "0xb8a0f2703ac6bdd352096c90c2945a097e8f4055": {
58
+ "token": "0xb8a0f2703ac6bdd352096c90c2945a097e8f4055",
59
+ "name": "WND",
60
+ "symbol": "WND",
61
+ "decimals": 12,
62
+ "foreignId": "0x2121cfe35065c0c33465fbada265f08e9613428a4b9eb4bb717cd7db2abf622e"
63
+ },
64
+ "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e": {
65
+ "token": "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e",
66
+ "name": "WND",
67
+ "symbol": "WND",
68
+ "decimals": 12,
69
+ "foreignId": "0x9441dceeeffa7e032eedaccf9b7632e60e86711551a82ffbbb0dda8afd9e4ef7"
70
+ }
71
+ },
72
+ "id": "sepolia"
73
+ }
74
+ },
75
+ "parachains": {
76
+ "1000": {
77
+ "parachainId": 1000,
78
+ "features": {
79
+ "hasPalletXcm": true,
80
+ "hasDryRunApi": true,
81
+ "hasTxPaymentApi": true,
82
+ "hasDryRunRpc": true,
83
+ "hasDotBalance": true
84
+ },
85
+ "info": {
86
+ "tokenSymbols": "WND",
87
+ "tokenDecimals": 12,
88
+ "ss58Format": 42,
89
+ "isEthereum": false,
90
+ "accountType": "AccountId32",
91
+ "name": "Westend Asset Hub",
92
+ "specName": "westmint",
93
+ "specVersion": 1018012
94
+ },
95
+ "assets": {
96
+ "0x0000000000000000000000000000000000000000": {
97
+ "token": "0x0000000000000000000000000000000000000000",
98
+ "name": "Ether",
99
+ "minimumBalance": "bigint:15000",
100
+ "symbol": "Ether",
101
+ "decimals": 18,
102
+ "isSufficient": true
103
+ },
104
+ "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620": {
105
+ "token": "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620",
106
+ "name": "",
107
+ "minimumBalance": "bigint:1",
108
+ "symbol": "",
109
+ "decimals": 0,
110
+ "isSufficient": false
111
+ },
112
+ "0xfff9976782d46cc05630d1f6ebab18b2324d6b14": {
113
+ "token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
114
+ "name": "Wrapped Ether",
115
+ "minimumBalance": "bigint:15000000000000",
116
+ "symbol": "WETH",
117
+ "decimals": 18,
118
+ "isSufficient": true
119
+ },
120
+ "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f": {
121
+ "token": "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f",
122
+ "name": "",
123
+ "symbol": "",
124
+ "decimals": 0,
125
+ "locationOnEthereum": {
126
+ "parents": 1,
127
+ "interior": {
128
+ "x2": [
129
+ {
130
+ "globalConsensus": {
131
+ "byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
132
+ }
133
+ },
134
+ {
135
+ "parachain": 2313
136
+ }
137
+ ]
138
+ }
139
+ },
140
+ "location": {
141
+ "parents": 1,
142
+ "interior": {
143
+ "x1": [
144
+ {
145
+ "parachain": 2313
146
+ }
147
+ ]
148
+ }
149
+ },
150
+ "locationOnAH": {
151
+ "parents": 1,
152
+ "interior": {
153
+ "x1": [
154
+ {
155
+ "parachain": 2313
156
+ }
157
+ ]
158
+ }
159
+ },
160
+ "foreignId": "0xaf13384cf9612ef1ff4b87470ab247d6f8d8110d4f5af2fe290ce6767818712c",
161
+ "minimumBalance": "bigint:1",
162
+ "isSufficient": false
163
+ },
164
+ "0xb8a0f2703ac6bdd352096c90c2945a097e8f4055": {
165
+ "token": "0xb8a0f2703ac6bdd352096c90c2945a097e8f4055",
166
+ "name": "",
167
+ "symbol": "WND",
168
+ "decimals": 12,
169
+ "locationOnEthereum": {
170
+ "parents": 1,
171
+ "interior": {
172
+ "x1": [
173
+ {
174
+ "globalConsensus": {
175
+ "byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
176
+ }
177
+ }
178
+ ]
179
+ }
180
+ },
181
+ "location": {
182
+ "parents": 1,
183
+ "interior": "Here"
184
+ },
185
+ "locationOnAH": {
186
+ "parents": 1,
187
+ "interior": "Here"
188
+ },
189
+ "foreignId": "0x2121cfe35065c0c33465fbada265f08e9613428a4b9eb4bb717cd7db2abf622e",
190
+ "minimumBalance": "bigint:1000000000",
191
+ "isSufficient": true
192
+ },
193
+ "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e": {
194
+ "token": "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e",
195
+ "name": "",
196
+ "symbol": "WND",
197
+ "decimals": 12,
198
+ "locationOnEthereum": {
199
+ "parents": 1,
200
+ "interior": {
201
+ "x1": [
202
+ {
203
+ "globalConsensus": {
204
+ "byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
205
+ }
206
+ }
207
+ ]
208
+ }
209
+ },
210
+ "location": {
211
+ "parents": 1,
212
+ "interior": "Here"
213
+ },
214
+ "locationOnAH": {
215
+ "parents": 1,
216
+ "interior": "Here"
217
+ },
218
+ "foreignId": "0x9441dceeeffa7e032eedaccf9b7632e60e86711551a82ffbbb0dda8afd9e4ef7",
219
+ "minimumBalance": "bigint:1000000000",
220
+ "isSufficient": true
221
+ }
222
+ },
223
+ "estimatedExecutionFeeDOT": "bigint:0",
224
+ "estimatedDeliveryFeeDOT": "bigint:0"
225
+ }
226
+ }
227
+ }
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@snowbridge/registry",
3
+ "version": "0.1.65",
4
+ "description": "Snowbridge Asset Registry",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Snowfork/snowbridge.git",
9
+ "directory": "web/packages/registry"
10
+ },
11
+ "main": "dist/index.js",
12
+ "types": "dist/index.d.ts",
13
+ "devDependencies": {
14
+ "@types/node": "^18.19.31",
15
+ "@typescript-eslint/eslint-plugin": "^5.62.0",
16
+ "@typescript-eslint/parser": "^5.62.0",
17
+ "eslint": "^8.57.0",
18
+ "eslint-config-prettier": "^8.10.0",
19
+ "prettier": "^2.8.8",
20
+ "ts-node": "^10.9.2",
21
+ "tsconfig-paths": "^4.2.0",
22
+ "typescript": "^5.4.5"
23
+ },
24
+ "dependencies": {
25
+ "@snowbridge/base-types": "0.1.65"
26
+ },
27
+ "scripts": {
28
+ "build": "tsc --build --force",
29
+ "lint": "eslint .",
30
+ "format": "prettier src --write"
31
+ }
32
+ }
package/src/index.ts ADDED
@@ -0,0 +1,59 @@
1
+ import { AssetRegistry } from "@snowbridge/base-types";
2
+ import polkadot_mainnet from "./polkadot_mainnet.registry.json";
3
+ import westend_sepolia from "./westend_sepolia.registry.json";
4
+ import paseo_sepolia from "./paseo_sepolia.registry.json";
5
+
6
+ function transformBigInt(obj: any): any {
7
+ // Regex to match strings like "bigint:123"
8
+ const bigintPattern = /^bigint:(\d+)$/;
9
+
10
+ // Handle null or non-object/non-array values
11
+ if (obj === null || typeof obj !== "object") {
12
+ if (typeof obj === "string") {
13
+ const match = obj.match(bigintPattern);
14
+ if (match) {
15
+ return Object.freeze(BigInt(match[1]));
16
+ }
17
+ }
18
+ return Object.freeze(obj);
19
+ }
20
+
21
+ // Handle arrays
22
+ if (Array.isArray(obj)) {
23
+ return Object.freeze(obj.map((item) => transformBigInt(item)));
24
+ }
25
+
26
+ // Handle objects
27
+ const result: { [key: string]: any } = {};
28
+ for (const key in obj) {
29
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
30
+ result[key] = transformBigInt(obj[key]);
31
+ }
32
+ }
33
+ return Object.freeze(result);
34
+ }
35
+
36
+ const cache: { [env: string]: AssetRegistry } = {};
37
+ export function assetRegistryFor(
38
+ env: "polkadot_mainnet" | "westend_sepolia" | "paseo_sepolia" | (string & {})
39
+ ): AssetRegistry {
40
+ if (env in cache) {
41
+ return cache[env];
42
+ }
43
+ let json;
44
+ switch (env) {
45
+ case "polkadot_mainnet":
46
+ json = polkadot_mainnet;
47
+ break;
48
+ case "westend_sepolia":
49
+ json = westend_sepolia;
50
+ break;
51
+ case "paseo_sepolia":
52
+ json = paseo_sepolia;
53
+ break;
54
+ default:
55
+ throw Error(`Unkown env '${env}'`);
56
+ }
57
+ cache[env] = transformBigInt(json);
58
+ return cache[env];
59
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "timestamp": "2025-06-25T21:17:34.839Z",
3
+ "environment": "paseo_sepolia",
4
+ "ethChainId": 11155111,
5
+ "gatewayAddress": "0x1607C1368bc943130258318c91bBd8cFf3D063E6",
6
+ "assetHubParaId": 1000,
7
+ "bridgeHubParaId": 1002,
8
+ "relaychain": {
9
+ "tokenSymbols": "PAS",
10
+ "tokenDecimals": 10,
11
+ "ss58Format": 0,
12
+ "isEthereum": false,
13
+ "accountType": "AccountId32",
14
+ "name": "Paseo Testnet",
15
+ "specName": "paseo",
16
+ "specVersion": 1005001
17
+ },
18
+ "bridgeHub": {
19
+ "tokenSymbols": "PAS",
20
+ "tokenDecimals": 10,
21
+ "ss58Format": 0,
22
+ "isEthereum": false,
23
+ "accountType": "AccountId32",
24
+ "name": "Paseo Bridge Hub",
25
+ "specName": "bridge-hub-paseo",
26
+ "specVersion": 1005001
27
+ },
28
+ "ethereumChains": {
29
+ "11155111": {
30
+ "chainId": 11155111,
31
+ "assets": {
32
+ "0x0000000000000000000000000000000000000000": {
33
+ "token": "0x0000000000000000000000000000000000000000",
34
+ "name": "Ether",
35
+ "symbol": "ETH",
36
+ "decimals": 18
37
+ },
38
+ "0x22e12ed4e6bcde652a73552dde340fcb972eef89": {
39
+ "token": "0x22e12ed4e6bcde652a73552dde340fcb972eef89",
40
+ "name": "Wrapped PILT",
41
+ "symbol": "wPILT",
42
+ "decimals": 15
43
+ },
44
+ "0x99e743964c036bc28931fb564817db428aa7f752": {
45
+ "token": "0x99e743964c036bc28931fb564817db428aa7f752",
46
+ "name": "KILT",
47
+ "symbol": "KILT",
48
+ "decimals": 15
49
+ },
50
+ "0xfff9976782d46cc05630d1f6ebab18b2324d6b14": {
51
+ "token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
52
+ "name": "Wrapped Ether",
53
+ "symbol": "WETH",
54
+ "decimals": 18
55
+ }
56
+ },
57
+ "id": "sepolia"
58
+ }
59
+ },
60
+ "parachains": {
61
+ "1000": {
62
+ "parachainId": 1000,
63
+ "features": {
64
+ "hasPalletXcm": true,
65
+ "hasDryRunApi": true,
66
+ "hasTxPaymentApi": true,
67
+ "hasDryRunRpc": true,
68
+ "hasDotBalance": true
69
+ },
70
+ "info": {
71
+ "tokenSymbols": "PAS",
72
+ "tokenDecimals": 10,
73
+ "ss58Format": 0,
74
+ "isEthereum": false,
75
+ "accountType": "AccountId32",
76
+ "name": "Paseo Asset Hub",
77
+ "specName": "asset-hub-paseo",
78
+ "specVersion": 1005001
79
+ },
80
+ "assets": {
81
+ "0x0000000000000000000000000000000000000000": {
82
+ "token": "0x0000000000000000000000000000000000000000",
83
+ "name": "Ether",
84
+ "minimumBalance": "bigint:15000000000000",
85
+ "symbol": "ETH",
86
+ "decimals": 18,
87
+ "isSufficient": true
88
+ },
89
+ "0x22e12ed4e6bcde652a73552dde340fcb972eef89": {
90
+ "token": "0x22e12ed4e6bcde652a73552dde340fcb972eef89",
91
+ "name": "",
92
+ "minimumBalance": "bigint:1",
93
+ "symbol": "",
94
+ "decimals": 0,
95
+ "isSufficient": false
96
+ },
97
+ "0x99e743964c036bc28931fb564817db428aa7f752": {
98
+ "token": "0x99e743964c036bc28931fb564817db428aa7f752",
99
+ "name": "",
100
+ "minimumBalance": "bigint:1",
101
+ "symbol": "",
102
+ "decimals": 0,
103
+ "isSufficient": false
104
+ },
105
+ "0xfff9976782d46cc05630d1f6ebab18b2324d6b14": {
106
+ "token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
107
+ "name": "Wrapped Ether",
108
+ "minimumBalance": "bigint:15000000000000",
109
+ "symbol": "WETH",
110
+ "decimals": 18,
111
+ "isSufficient": true
112
+ }
113
+ },
114
+ "estimatedExecutionFeeDOT": "bigint:0",
115
+ "estimatedDeliveryFeeDOT": "bigint:0"
116
+ },
117
+ "3369": {
118
+ "parachainId": 3369,
119
+ "features": {
120
+ "hasPalletXcm": true,
121
+ "hasDryRunApi": true,
122
+ "hasTxPaymentApi": true,
123
+ "hasDryRunRpc": true,
124
+ "hasDotBalance": false
125
+ },
126
+ "info": {
127
+ "tokenSymbols": "MUSE",
128
+ "tokenDecimals": 18,
129
+ "ss58Format": 29972,
130
+ "isEthereum": true,
131
+ "accountType": "AccountId20",
132
+ "name": "Muse Testnet",
133
+ "specName": "muse",
134
+ "specVersion": 1027
135
+ },
136
+ "assets": {
137
+ "0xb34a6924a02100ba6ef12af1c798285e8f7a16ee": {
138
+ "token": "0xb34a6924a02100ba6ef12af1c798285e8f7a16ee",
139
+ "name": "Muse",
140
+ "minimumBalance": "bigint:10000000000000000",
141
+ "symbol": "MUSE",
142
+ "decimals": 18,
143
+ "isSufficient": true
144
+ }
145
+ },
146
+ "estimatedExecutionFeeDOT": "bigint:200000000000",
147
+ "estimatedDeliveryFeeDOT": "bigint:306650000"
148
+ }
149
+ }
150
+ }