@snowbridge/registry 0.3.2 → 0.4.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/.turbo/turbo-build.log +1 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -2
- package/dist/paseo_sepolia_bridge_info.g.d.ts +330 -0
- package/dist/paseo_sepolia_bridge_info.g.d.ts.map +1 -0
- package/dist/paseo_sepolia_bridge_info.g.js +350 -0
- package/dist/polkadot_mainnet_bridge_info.g.d.ts +1983 -0
- package/dist/polkadot_mainnet_bridge_info.g.d.ts.map +1 -0
- package/dist/polkadot_mainnet_bridge_info.g.js +2264 -0
- package/dist/transfers.d.ts +3 -8
- package/dist/transfers.d.ts.map +1 -1
- package/dist/transfers.js +54 -215
- package/dist/westend_sepolia_bridge_info.g.d.ts +344 -0
- package/dist/westend_sepolia_bridge_info.g.d.ts.map +1 -0
- package/dist/westend_sepolia_bridge_info.g.js +376 -0
- package/package.json +7 -7
- package/scripts/buildRegistry.ts +466 -29
- package/src/index.ts +24 -2
- package/src/paseo_sepolia_bridge_info.g.ts +349 -0
- package/src/polkadot_mainnet_bridge_info.g.ts +2287 -0
- package/src/transfers.ts +58 -266
- package/src/westend_sepolia_bridge_info.g.ts +384 -0
- package/dist/environment.d.ts +0 -3
- package/dist/environment.d.ts.map +0 -1
- package/dist/environment.js +0 -181
- package/dist/local_e2e.registry.json +0 -391
- package/dist/paseo_sepolia.registry.json +0 -231
- package/dist/polkadot_mainnet.registry.json +0 -1805
- package/dist/registry.d.ts +0 -3
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -61
- package/dist/westend_sepolia.registry.json +0 -283
- package/src/environment.ts +0 -185
- package/src/local_e2e.registry.json +0 -391
- package/src/paseo_sepolia.registry.json +0 -231
- package/src/polkadot_mainnet.registry.json +0 -1805
- package/src/registry.ts +0 -63
- package/src/westend_sepolia.registry.json +0 -283
package/src/registry.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
import local_e2e from "./local_e2e.registry.json"
|
|
6
|
-
|
|
7
|
-
function transformBigInt(obj: any): any {
|
|
8
|
-
// Regex to match strings like "bigint:123"
|
|
9
|
-
const bigintPattern = /^bigint:(\d+)$/
|
|
10
|
-
|
|
11
|
-
// Handle null or non-object/non-array values
|
|
12
|
-
if (obj === null || typeof obj !== "object") {
|
|
13
|
-
if (typeof obj === "string") {
|
|
14
|
-
const match = obj.match(bigintPattern)
|
|
15
|
-
if (match) {
|
|
16
|
-
return Object.freeze(BigInt(match[1]))
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
return Object.freeze(obj)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Handle arrays
|
|
23
|
-
if (Array.isArray(obj)) {
|
|
24
|
-
return Object.freeze(obj.map((item) => transformBigInt(item)))
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Handle objects
|
|
28
|
-
const result: { [key: string]: any } = {}
|
|
29
|
-
for (const key in obj) {
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
31
|
-
result[key] = transformBigInt(obj[key])
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return Object.freeze(result)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const cache: { [env: string]: AssetRegistry } = {}
|
|
38
|
-
export function assetRegistryFor(
|
|
39
|
-
env: "polkadot_mainnet" | "westend_sepolia" | "paseo_sepolia" | (string & {}),
|
|
40
|
-
): AssetRegistry {
|
|
41
|
-
if (env in cache) {
|
|
42
|
-
return cache[env]
|
|
43
|
-
}
|
|
44
|
-
let json
|
|
45
|
-
switch (env) {
|
|
46
|
-
case "polkadot_mainnet":
|
|
47
|
-
json = polkadot_mainnet
|
|
48
|
-
break
|
|
49
|
-
case "westend_sepolia":
|
|
50
|
-
json = westend_sepolia
|
|
51
|
-
break
|
|
52
|
-
case "paseo_sepolia":
|
|
53
|
-
json = paseo_sepolia
|
|
54
|
-
break
|
|
55
|
-
case "local_e2e":
|
|
56
|
-
json = local_e2e
|
|
57
|
-
break
|
|
58
|
-
default:
|
|
59
|
-
throw Error(`Unknown env '${env}'`)
|
|
60
|
-
}
|
|
61
|
-
cache[env] = transformBigInt(json)
|
|
62
|
-
return cache[env]
|
|
63
|
-
}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"timestamp": "2026-01-19T12:21:13.043Z",
|
|
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": 1021001
|
|
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": 1021000
|
|
27
|
-
},
|
|
28
|
-
"ethereumChains": {
|
|
29
|
-
"84532": {
|
|
30
|
-
"chainId": 84532,
|
|
31
|
-
"assets": {
|
|
32
|
-
"0x4200000000000000000000000000000000000006": {
|
|
33
|
-
"token": "0x4200000000000000000000000000000000000006",
|
|
34
|
-
"name": "Wrapped Ether",
|
|
35
|
-
"symbol": "WETH",
|
|
36
|
-
"decimals": 18,
|
|
37
|
-
"swapTokenAddress": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
|
|
38
|
-
"swapFee": 0
|
|
39
|
-
},
|
|
40
|
-
"0x036cbd53842c5426634e7929541ec2318f3dcf7e": {
|
|
41
|
-
"token": "0x036cbd53842c5426634e7929541ec2318f3dcf7e",
|
|
42
|
-
"name": "USDC",
|
|
43
|
-
"symbol": "USDC",
|
|
44
|
-
"decimals": 6,
|
|
45
|
-
"swapTokenAddress": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
|
|
46
|
-
"swapFee": 500
|
|
47
|
-
},
|
|
48
|
-
"0x0000000000000000000000000000000000000000": {
|
|
49
|
-
"token": "0x0000000000000000000000000000000000000000",
|
|
50
|
-
"name": "Ether",
|
|
51
|
-
"symbol": "Ether",
|
|
52
|
-
"decimals": 18,
|
|
53
|
-
"swapTokenAddress": "0x0000000000000000000000000000000000000000",
|
|
54
|
-
"swapFee": 0
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"id": "base-sepolia"
|
|
58
|
-
},
|
|
59
|
-
"11155111": {
|
|
60
|
-
"chainId": 11155111,
|
|
61
|
-
"assets": {
|
|
62
|
-
"0x0000000000000000000000000000000000000000": {
|
|
63
|
-
"token": "0x0000000000000000000000000000000000000000",
|
|
64
|
-
"name": "Ether",
|
|
65
|
-
"symbol": "Ether",
|
|
66
|
-
"decimals": 18
|
|
67
|
-
},
|
|
68
|
-
"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238": {
|
|
69
|
-
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
|
|
70
|
-
"name": "USDC",
|
|
71
|
-
"symbol": "USDC",
|
|
72
|
-
"decimals": 6,
|
|
73
|
-
"deliveryGas": "bigint:80000"
|
|
74
|
-
},
|
|
75
|
-
"0x72c610e05eaafcdf1fa7a2da15374ee90edb1620": {
|
|
76
|
-
"token": "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620",
|
|
77
|
-
"name": "Frequency",
|
|
78
|
-
"symbol": "eFRQCY",
|
|
79
|
-
"decimals": 12,
|
|
80
|
-
"deliveryGas": "bigint:80000"
|
|
81
|
-
},
|
|
82
|
-
"0xfff9976782d46cc05630d1f6ebab18b2324d6b14": {
|
|
83
|
-
"token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
|
|
84
|
-
"name": "Wrapped Ether",
|
|
85
|
-
"symbol": "WETH",
|
|
86
|
-
"decimals": 18,
|
|
87
|
-
"deliveryGas": "bigint:80000"
|
|
88
|
-
},
|
|
89
|
-
"0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f": {
|
|
90
|
-
"token": "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f",
|
|
91
|
-
"name": "Frequency",
|
|
92
|
-
"symbol": "XRQCY",
|
|
93
|
-
"decimals": 8,
|
|
94
|
-
"foreignId": "0xaf13384cf9612ef1ff4b87470ab247d6f8d8110d4f5af2fe290ce6767818712c",
|
|
95
|
-
"deliveryGas": "bigint:80000"
|
|
96
|
-
},
|
|
97
|
-
"0xb8a0f2703ac6bdd352096c90c2945a097e8f4055": {
|
|
98
|
-
"token": "0xb8a0f2703ac6bdd352096c90c2945a097e8f4055",
|
|
99
|
-
"name": "WND",
|
|
100
|
-
"symbol": "WND",
|
|
101
|
-
"decimals": 12,
|
|
102
|
-
"foreignId": "0x2121cfe35065c0c33465fbada265f08e9613428a4b9eb4bb717cd7db2abf622e",
|
|
103
|
-
"deliveryGas": "bigint:80000"
|
|
104
|
-
},
|
|
105
|
-
"0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e": {
|
|
106
|
-
"token": "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e",
|
|
107
|
-
"name": "WND",
|
|
108
|
-
"symbol": "WND",
|
|
109
|
-
"decimals": 12,
|
|
110
|
-
"foreignId": "0x9441dceeeffa7e032eedaccf9b7632e60e86711551a82ffbbb0dda8afd9e4ef7",
|
|
111
|
-
"deliveryGas": "bigint:80000"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
"id": "sepolia",
|
|
115
|
-
"baseDeliveryGas": "bigint:120000"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"parachains": {
|
|
119
|
-
"1000": {
|
|
120
|
-
"parachainId": 1000,
|
|
121
|
-
"features": {
|
|
122
|
-
"hasPalletXcm": true,
|
|
123
|
-
"hasDryRunApi": true,
|
|
124
|
-
"hasTxPaymentApi": true,
|
|
125
|
-
"hasDryRunRpc": true,
|
|
126
|
-
"hasDotBalance": true,
|
|
127
|
-
"hasEthBalance": true,
|
|
128
|
-
"hasXcmPaymentApi": true,
|
|
129
|
-
"supportsAliasOrigin": true,
|
|
130
|
-
"xcmVersion": "v5",
|
|
131
|
-
"supportsV2": true
|
|
132
|
-
},
|
|
133
|
-
"info": {
|
|
134
|
-
"tokenSymbols": "WND",
|
|
135
|
-
"tokenDecimals": 12,
|
|
136
|
-
"ss58Format": 42,
|
|
137
|
-
"isEthereum": false,
|
|
138
|
-
"accountType": "AccountId32",
|
|
139
|
-
"name": "Westend Asset Hub",
|
|
140
|
-
"specName": "westmint",
|
|
141
|
-
"specVersion": 1021000
|
|
142
|
-
},
|
|
143
|
-
"assets": {
|
|
144
|
-
"0x0000000000000000000000000000000000000000": {
|
|
145
|
-
"token": "0x0000000000000000000000000000000000000000",
|
|
146
|
-
"name": "Ether",
|
|
147
|
-
"minimumBalance": "bigint:15000",
|
|
148
|
-
"symbol": "Ether",
|
|
149
|
-
"decimals": 18,
|
|
150
|
-
"isSufficient": true
|
|
151
|
-
},
|
|
152
|
-
"0x1c7d4b196cb0c7b01d743fbc6116a902379c7238": {
|
|
153
|
-
"token": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
|
|
154
|
-
"name": "",
|
|
155
|
-
"minimumBalance": "bigint:1",
|
|
156
|
-
"symbol": "",
|
|
157
|
-
"decimals": 0,
|
|
158
|
-
"isSufficient": false
|
|
159
|
-
},
|
|
160
|
-
"0x72c610e05eaafcdf1fa7a2da15374ee90edb1620": {
|
|
161
|
-
"token": "0x72c610e05eaafcdf1fa7a2da15374ee90edb1620",
|
|
162
|
-
"name": "",
|
|
163
|
-
"minimumBalance": "bigint:1",
|
|
164
|
-
"symbol": "",
|
|
165
|
-
"decimals": 0,
|
|
166
|
-
"isSufficient": false
|
|
167
|
-
},
|
|
168
|
-
"0xfff9976782d46cc05630d1f6ebab18b2324d6b14": {
|
|
169
|
-
"token": "0xfff9976782d46cc05630d1f6ebab18b2324d6b14",
|
|
170
|
-
"name": "Wrapped Ether",
|
|
171
|
-
"minimumBalance": "bigint:15000000000000",
|
|
172
|
-
"symbol": "WETH",
|
|
173
|
-
"decimals": 18,
|
|
174
|
-
"isSufficient": true
|
|
175
|
-
},
|
|
176
|
-
"0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f": {
|
|
177
|
-
"token": "0x23838b1bb57cecf4422a57dd8e7f8a087b30d54f",
|
|
178
|
-
"name": "",
|
|
179
|
-
"symbol": "",
|
|
180
|
-
"decimals": 0,
|
|
181
|
-
"locationOnEthereum": {
|
|
182
|
-
"parents": 1,
|
|
183
|
-
"interior": {
|
|
184
|
-
"x2": [
|
|
185
|
-
{
|
|
186
|
-
"globalConsensus": {
|
|
187
|
-
"byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"parachain": 2313
|
|
192
|
-
}
|
|
193
|
-
]
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"location": {
|
|
197
|
-
"parents": 1,
|
|
198
|
-
"interior": {
|
|
199
|
-
"x1": [
|
|
200
|
-
{
|
|
201
|
-
"parachain": 2313
|
|
202
|
-
}
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
"locationOnAH": {
|
|
207
|
-
"parents": 1,
|
|
208
|
-
"interior": {
|
|
209
|
-
"x1": [
|
|
210
|
-
{
|
|
211
|
-
"parachain": 2313
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
"foreignId": "0xaf13384cf9612ef1ff4b87470ab247d6f8d8110d4f5af2fe290ce6767818712c",
|
|
217
|
-
"minimumBalance": "bigint:1",
|
|
218
|
-
"isSufficient": false
|
|
219
|
-
},
|
|
220
|
-
"0xb8a0f2703ac6bdd352096c90c2945a097e8f4055": {
|
|
221
|
-
"token": "0xb8a0f2703ac6bdd352096c90c2945a097e8f4055",
|
|
222
|
-
"name": "",
|
|
223
|
-
"symbol": "WND",
|
|
224
|
-
"decimals": 12,
|
|
225
|
-
"locationOnEthereum": {
|
|
226
|
-
"parents": 1,
|
|
227
|
-
"interior": {
|
|
228
|
-
"x1": [
|
|
229
|
-
{
|
|
230
|
-
"globalConsensus": {
|
|
231
|
-
"byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
]
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
"location": {
|
|
238
|
-
"parents": 1,
|
|
239
|
-
"interior": "Here"
|
|
240
|
-
},
|
|
241
|
-
"locationOnAH": {
|
|
242
|
-
"parents": 1,
|
|
243
|
-
"interior": "Here"
|
|
244
|
-
},
|
|
245
|
-
"foreignId": "0x2121cfe35065c0c33465fbada265f08e9613428a4b9eb4bb717cd7db2abf622e",
|
|
246
|
-
"minimumBalance": "bigint:1000000000",
|
|
247
|
-
"isSufficient": true
|
|
248
|
-
},
|
|
249
|
-
"0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e": {
|
|
250
|
-
"token": "0xf50fb50d65c8c1f6c72e4d8397c984933afc8f7e",
|
|
251
|
-
"name": "",
|
|
252
|
-
"symbol": "WND",
|
|
253
|
-
"decimals": 12,
|
|
254
|
-
"locationOnEthereum": {
|
|
255
|
-
"parents": 1,
|
|
256
|
-
"interior": {
|
|
257
|
-
"x1": [
|
|
258
|
-
{
|
|
259
|
-
"globalConsensus": {
|
|
260
|
-
"byGenesis": "0xe143f23803ac50e8f6f8e62695d1ce9e4e1d68aa36c1cd2cfd15340213f3423e"
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
"location": {
|
|
267
|
-
"parents": 1,
|
|
268
|
-
"interior": "Here"
|
|
269
|
-
},
|
|
270
|
-
"locationOnAH": {
|
|
271
|
-
"parents": 1,
|
|
272
|
-
"interior": "Here"
|
|
273
|
-
},
|
|
274
|
-
"foreignId": "0x9441dceeeffa7e032eedaccf9b7632e60e86711551a82ffbbb0dda8afd9e4ef7",
|
|
275
|
-
"minimumBalance": "bigint:1000000000",
|
|
276
|
-
"isSufficient": true
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
"estimatedExecutionFeeDOT": "bigint:0",
|
|
280
|
-
"estimatedDeliveryFeeDOT": "bigint:0"
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|