@snowbridge/registry 1.0.5 → 1.0.11

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.
Files changed (41) hide show
  1. package/.prettierrc +23 -0
  2. package/.turbo/turbo-build.log +4 -0
  3. package/README.md +1 -3
  4. package/dist/index.d.ts +7 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +30 -47
  7. package/dist/local_e2e_bridge_info.g.d.ts +158 -0
  8. package/dist/local_e2e_bridge_info.g.d.ts.map +1 -0
  9. package/dist/local_e2e_bridge_info.g.js +159 -0
  10. package/dist/paseo_sepolia_bridge_info.g.d.ts +353 -0
  11. package/dist/paseo_sepolia_bridge_info.g.d.ts.map +1 -0
  12. package/dist/paseo_sepolia_bridge_info.g.js +373 -0
  13. package/dist/polkadot_mainnet_bridge_info.g.d.ts +2249 -0
  14. package/dist/polkadot_mainnet_bridge_info.g.d.ts.map +1 -0
  15. package/dist/polkadot_mainnet_bridge_info.g.js +2573 -0
  16. package/dist/transfers.d.ts +4 -0
  17. package/dist/transfers.d.ts.map +1 -0
  18. package/dist/transfers.js +96 -0
  19. package/dist/westend_sepolia_bridge_info.g.d.ts +469 -0
  20. package/dist/westend_sepolia_bridge_info.g.d.ts.map +1 -0
  21. package/dist/westend_sepolia_bridge_info.g.js +526 -0
  22. package/package.json +21 -15
  23. package/scripts/buildRegistry.ts +1258 -0
  24. package/scripts/friendlyChains.ts +74 -0
  25. package/src/index.ts +22 -57
  26. package/src/local_e2e_bridge_info.g.ts +157 -0
  27. package/src/paseo_sepolia_bridge_info.g.ts +372 -0
  28. package/src/polkadot_mainnet_bridge_info.g.ts +2597 -0
  29. package/src/transfers.ts +97 -0
  30. package/src/westend_sepolia_bridge_info.g.ts +534 -0
  31. package/tsconfig.json +1 -1
  32. package/tsconfig.scripts.json +23 -0
  33. package/build.ts +0 -35
  34. package/dist/local_e2e.registry.json +0 -347
  35. package/dist/paseo_sepolia.registry.json +0 -150
  36. package/dist/polkadot_mainnet.registry.json +0 -1484
  37. package/dist/westend_sepolia.registry.json +0 -227
  38. package/src/local_e2e.registry.json +0 -347
  39. package/src/paseo_sepolia.registry.json +0 -150
  40. package/src/polkadot_mainnet.registry.json +0 -1484
  41. package/src/westend_sepolia.registry.json +0 -227
package/build.ts DELETED
@@ -1,35 +0,0 @@
1
- import { assetsV2, environment } from "@snowbridge/api"
2
- import { writeFile } from "fs/promises"
3
-
4
- async function buildRegistry(env: string, options: assetsV2.RegistryOptions) {
5
- const registry = await assetsV2.buildRegistry(options)
6
- const json = JSON.stringify(
7
- registry,
8
- (key, value) => {
9
- if (typeof value === "bigint") {
10
- return `bigint:${value.toString()}`
11
- }
12
- return value
13
- },
14
- 2
15
- )
16
-
17
- const filepath = `src/${env}.registry.json`
18
- await writeFile(filepath, json)
19
- }
20
-
21
- (async () => {
22
- const envs = [
23
- "polkadot_mainnet",
24
- "westend_sepolia",
25
- "paseo_sepolia",
26
- ]
27
- const apiKey = process.env.ETHEREUM_API_KEY
28
- if(!apiKey || apiKey.trim().length === 0) {
29
- throw Error(`ETHEREUM_API_KEY env variable not set.`)
30
- }
31
- await Promise.all(envs.map(async env => {
32
- const options = assetsV2.fromEnvironment(environment.SNOWBRIDGE_ENV[env])
33
- await buildRegistry(env, options)
34
- }))
35
- })()
@@ -1,347 +0,0 @@
1
- {
2
- "timestamp": "2025-07-16T02:46:56.078Z",
3
- "environment": "local_e2e",
4
- "ethChainId": 11155111,
5
- "gatewayAddress": "0xb1185ede04202fe62d38f5db72f71e38ff3e8305",
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 Local Testnet",
15
- "specName": "westend",
16
- "specVersion": 1018012
17
- },
18
- "bridgeHub": {
19
- "tokenSymbols": "WND",
20
- "tokenDecimals": 12,
21
- "ss58Format": 42,
22
- "isEthereum": false,
23
- "accountType": "AccountId32",
24
- "name": "Westend BridgeHub Local",
25
- "specName": "bridge-hub-westend",
26
- "specVersion": 1018002
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
- "0xb8ea8cb425d85536b158d661da1ef0895bb92f1d": {
39
- "token": "0xb8ea8cb425d85536b158d661da1ef0895bb92f1d",
40
- "name": "Wrapped Ether",
41
- "symbol": "WETH",
42
- "decimals": 18
43
- },
44
- "0xd8597eb7ef761e3315623edfee9defcbacd72e8b": {
45
- "token": "0xd8597eb7ef761e3315623edfee9defcbacd72e8b",
46
- "name": "roc",
47
- "symbol": "roc",
48
- "decimals": 12,
49
- "foreignId": "0xbcd4282ca0c30cbd9c578b5c790e88c803d80cd9cc91f28686f24ac25a61e06e"
50
- },
51
- "0xde45448ca2d57797c0bec0ee15a1e42334744219": {
52
- "token": "0xde45448ca2d57797c0bec0ee15a1e42334744219",
53
- "name": "wnd",
54
- "symbol": "wnd",
55
- "decimals": 12,
56
- "foreignId": "0x9441dceeeffa7e032eedaccf9b7632e60e86711551a82ffbbb0dda8afd9e4ef7"
57
- },
58
- "0x805c5a7d4e97908a8ec726dccc94a047d073eb7e": {
59
- "token": "0x805c5a7d4e97908a8ec726dccc94a047d073eb7e",
60
- "name": "pal-2",
61
- "symbol": "pal-2",
62
- "decimals": 12,
63
- "foreignId": "0x17444ededa61bdbfcb1e5c39b2aed47f73b8970b65bbb0574c0a0ab1b0c99279"
64
- }
65
- },
66
- "id": "sepolia"
67
- }
68
- },
69
- "parachains": {
70
- "1000": {
71
- "parachainId": 1000,
72
- "features": {
73
- "hasPalletXcm": true,
74
- "hasDryRunApi": true,
75
- "hasTxPaymentApi": true,
76
- "hasDryRunRpc": true,
77
- "hasDotBalance": true
78
- },
79
- "info": {
80
- "tokenSymbols": "WND",
81
- "tokenDecimals": 12,
82
- "ss58Format": 42,
83
- "isEthereum": false,
84
- "accountType": "AccountId32",
85
- "name": "Westend Asset Hub Local",
86
- "specName": "westmint",
87
- "specVersion": 1018012
88
- },
89
- "assets": {
90
- "0x0000000000000000000000000000000000000000": {
91
- "token": "0x0000000000000000000000000000000000000000",
92
- "name": "Ether",
93
- "minimumBalance": "bigint:1",
94
- "symbol": "Ether",
95
- "decimals": 18,
96
- "isSufficient": true
97
- },
98
- "0xb8ea8cb425d85536b158d661da1ef0895bb92f1d": {
99
- "token": "0xb8ea8cb425d85536b158d661da1ef0895bb92f1d",
100
- "name": "WETH",
101
- "minimumBalance": "bigint:1",
102
- "symbol": "WETH",
103
- "decimals": 18,
104
- "isSufficient": true
105
- },
106
- "0xd8597eb7ef761e3315623edfee9defcbacd72e8b": {
107
- "token": "0xd8597eb7ef761e3315623edfee9defcbacd72e8b",
108
- "name": "Roc",
109
- "symbol": "Roc",
110
- "decimals": 12,
111
- "locationOnEthereum": {
112
- "parents": 1,
113
- "interior": {
114
- "x1": [
115
- {
116
- "globalConsensus": {
117
- "byGenesis": "0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e"
118
- }
119
- }
120
- ]
121
- }
122
- },
123
- "location": {
124
- "parents": 2,
125
- "interior": {
126
- "x1": [
127
- {
128
- "globalConsensus": {
129
- "byGenesis": "0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e"
130
- }
131
- }
132
- ]
133
- }
134
- },
135
- "locationOnAH": {
136
- "parents": 2,
137
- "interior": {
138
- "x1": [
139
- {
140
- "globalConsensus": {
141
- "byGenesis": "0x6408de7737c59c238890533af25896a2c20608d8b380bb01029acb392781063e"
142
- }
143
- }
144
- ]
145
- }
146
- },
147
- "foreignId": "0xbcd4282ca0c30cbd9c578b5c790e88c803d80cd9cc91f28686f24ac25a61e06e",
148
- "minimumBalance": "bigint:1",
149
- "isSufficient": true
150
- },
151
- "0xde45448ca2d57797c0bec0ee15a1e42334744219": {
152
- "token": "0xde45448ca2d57797c0bec0ee15a1e42334744219",
153
- "name": "",
154
- "symbol": "WND",
155
- "decimals": 12,
156
- "locationOnEthereum": {
157
- "parents": 1,
158
- "interior": {
159
- "x1": [
160
- {
161
- "globalConsensus": {
162
- "byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
163
- }
164
- }
165
- ]
166
- }
167
- },
168
- "location": {
169
- "parents": 1,
170
- "interior": "Here"
171
- },
172
- "locationOnAH": {
173
- "parents": 1,
174
- "interior": "Here"
175
- },
176
- "foreignId": "0x9441dceeeffa7e032eedaccf9b7632e60e86711551a82ffbbb0dda8afd9e4ef7",
177
- "minimumBalance": "bigint:1000000000",
178
- "isSufficient": true
179
- },
180
- "0x805c5a7d4e97908a8ec726dccc94a047d073eb7e": {
181
- "token": "0x805c5a7d4e97908a8ec726dccc94a047d073eb7e",
182
- "name": "pal-2",
183
- "symbol": "pal-2",
184
- "decimals": 12,
185
- "locationOnEthereum": {
186
- "parents": 1,
187
- "interior": {
188
- "x4": [
189
- {
190
- "globalConsensus": {
191
- "byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
192
- }
193
- },
194
- {
195
- "parachain": 2000
196
- },
197
- {
198
- "palletInstance": 50
199
- },
200
- {
201
- "generalIndex": 2
202
- }
203
- ]
204
- }
205
- },
206
- "location": {
207
- "parents": 1,
208
- "interior": {
209
- "x3": [
210
- {
211
- "parachain": 2000
212
- },
213
- {
214
- "palletInstance": 50
215
- },
216
- {
217
- "generalIndex": 2
218
- }
219
- ]
220
- }
221
- },
222
- "locationOnAH": {
223
- "parents": 1,
224
- "interior": {
225
- "x3": [
226
- {
227
- "parachain": 2000
228
- },
229
- {
230
- "palletInstance": 50
231
- },
232
- {
233
- "generalIndex": 2
234
- }
235
- ]
236
- }
237
- },
238
- "foreignId": "0x17444ededa61bdbfcb1e5c39b2aed47f73b8970b65bbb0574c0a0ab1b0c99279",
239
- "minimumBalance": "bigint:1",
240
- "isSufficient": true
241
- }
242
- },
243
- "estimatedExecutionFeeDOT": "bigint:0",
244
- "estimatedDeliveryFeeDOT": "bigint:0"
245
- },
246
- "2000": {
247
- "parachainId": 2000,
248
- "features": {
249
- "hasPalletXcm": true,
250
- "hasDryRunApi": true,
251
- "hasTxPaymentApi": true,
252
- "hasDryRunRpc": true,
253
- "hasDotBalance": true
254
- },
255
- "info": {
256
- "tokenSymbols": "undefined",
257
- "tokenDecimals": null,
258
- "ss58Format": 42,
259
- "isEthereum": false,
260
- "accountType": "AccountId32",
261
- "name": "Penpal Parachain",
262
- "specName": "penpal-parachain",
263
- "specVersion": 1
264
- },
265
- "assets": {
266
- "0x0000000000000000000000000000000000000000": {
267
- "token": "0x0000000000000000000000000000000000000000",
268
- "name": "Ether",
269
- "minimumBalance": "bigint:1",
270
- "symbol": "Ether",
271
- "decimals": 18,
272
- "isSufficient": true
273
- },
274
- "0xb8ea8cb425d85536b158d661da1ef0895bb92f1d": {
275
- "token": "0xb8ea8cb425d85536b158d661da1ef0895bb92f1d",
276
- "name": "WETH",
277
- "minimumBalance": "bigint:1",
278
- "symbol": "WETH",
279
- "decimals": 18,
280
- "isSufficient": true
281
- },
282
- "0x805c5a7d4e97908a8ec726dccc94a047d073eb7e": {
283
- "token": "0x805c5a7d4e97908a8ec726dccc94a047d073eb7e",
284
- "name": "pal-2",
285
- "symbol": "pal-2",
286
- "decimals": 12,
287
- "locationOnEthereum": {
288
- "parents": 1,
289
- "interior": {
290
- "x4": [
291
- {
292
- "globalConsensus": {
293
- "byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
294
- }
295
- },
296
- {
297
- "parachain": 2000
298
- },
299
- {
300
- "palletInstance": 50
301
- },
302
- {
303
- "generalIndex": 2
304
- }
305
- ]
306
- }
307
- },
308
- "location": {
309
- "parents": 0,
310
- "interior": {
311
- "x2": [
312
- {
313
- "palletInstance": 50
314
- },
315
- {
316
- "generalIndex": 2
317
- }
318
- ]
319
- }
320
- },
321
- "locationOnAH": {
322
- "parents": 1,
323
- "interior": {
324
- "x3": [
325
- {
326
- "parachain": 2000
327
- },
328
- {
329
- "palletInstance": 50
330
- },
331
- {
332
- "generalIndex": 2
333
- }
334
- ]
335
- }
336
- },
337
- "foreignId": "0x17444ededa61bdbfcb1e5c39b2aed47f73b8970b65bbb0574c0a0ab1b0c99279",
338
- "minimumBalance": "bigint:1000000000",
339
- "isSufficient": false,
340
- "assetId": "2"
341
- }
342
- },
343
- "estimatedExecutionFeeDOT": "bigint:3276800000",
344
- "estimatedDeliveryFeeDOT": "bigint:31450000000"
345
- }
346
- }
347
- }
@@ -1,150 +0,0 @@
1
- {
2
- "timestamp": "2025-07-08T00:20:45.186Z",
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
- }