@galacticcouncil/xc-cfg 0.1.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.
Files changed (165) hide show
  1. package/README.md +17 -0
  2. package/build/index.cjs +1 -0
  3. package/build/index.mjs +1 -0
  4. package/build/types/assets.d.ts +72 -0
  5. package/build/types/builders/AssetMinBuilder.d.ts +13 -0
  6. package/build/types/builders/BalanceBuilder.d.ts +10 -0
  7. package/build/types/builders/ContractBuilder.d.ts +14 -0
  8. package/build/types/builders/ExtrinsicBuilder.d.ts +64 -0
  9. package/build/types/builders/FeeAmountBuilder.d.ts +19 -0
  10. package/build/types/builders/FeeAssetBuilder.d.ts +8 -0
  11. package/build/types/builders/MoveBuilder.d.ts +4 -0
  12. package/build/types/builders/ProgramBuilder.d.ts +4 -0
  13. package/build/types/builders/balance/evm.d.ts +8 -0
  14. package/build/types/builders/balance/solana.d.ts +8 -0
  15. package/build/types/builders/balance/substrate.d.ts +24 -0
  16. package/build/types/builders/balance/sui.d.ts +6 -0
  17. package/build/types/builders/contracts/Batch.d.ts +4 -0
  18. package/build/types/builders/contracts/Erc20.d.ts +4 -0
  19. package/build/types/builders/contracts/Snowbridge.d.ts +4 -0
  20. package/build/types/builders/contracts/Wormhole/TokenBridge.d.ts +15 -0
  21. package/build/types/builders/contracts/Wormhole/TokenBridge.spec.d.ts +1 -0
  22. package/build/types/builders/contracts/Wormhole/TokenRelayer.d.ts +4 -0
  23. package/build/types/builders/contracts/Wormhole/index.d.ts +19 -0
  24. package/build/types/builders/contracts/Xtokens.d.ts +5 -0
  25. package/build/types/builders/contracts/Xtokens.utils.d.ts +45 -0
  26. package/build/types/builders/extrinsics/assetConversion.d.ts +8 -0
  27. package/build/types/builders/extrinsics/assets.d.ts +4 -0
  28. package/build/types/builders/extrinsics/balances.d.ts +4 -0
  29. package/build/types/builders/extrinsics/router.d.ts +8 -0
  30. package/build/types/builders/extrinsics/utility.d.ts +6 -0
  31. package/build/types/builders/extrinsics/xcm/builder/buildERC20TransferFromPara.d.ts +132 -0
  32. package/build/types/builders/extrinsics/xcm/builder/buildParaERC20Received.d.ts +77 -0
  33. package/build/types/builders/extrinsics/xcm/builder/const.d.ts +13 -0
  34. package/build/types/builders/extrinsics/xcm/builder/index.d.ts +3 -0
  35. package/build/types/builders/extrinsics/xcm/ethereumXcm.d.ts +4 -0
  36. package/build/types/builders/extrinsics/xcm/index.d.ts +7 -0
  37. package/build/types/builders/extrinsics/xcm/polkadotXcm.d.ts +20 -0
  38. package/build/types/builders/extrinsics/xcm/polkadotXcm.utils.d.ts +322 -0
  39. package/build/types/builders/extrinsics/xcm/types.d.ts +18 -0
  40. package/build/types/builders/extrinsics/xcm/utils/account.d.ts +14 -0
  41. package/build/types/builders/extrinsics/xcm/utils/fee.d.ts +1 -0
  42. package/build/types/builders/extrinsics/xcm/utils/guard.d.ts +4 -0
  43. package/build/types/builders/extrinsics/xcm/utils/index.d.ts +5 -0
  44. package/build/types/builders/extrinsics/xcm/utils/instructions.d.ts +65 -0
  45. package/build/types/builders/extrinsics/xcm/utils/location.d.ts +12 -0
  46. package/build/types/builders/extrinsics/xcm/xTokens.d.ts +7 -0
  47. package/build/types/builders/extrinsics/xcm/xTokens.utils.d.ts +23 -0
  48. package/build/types/builders/extrinsics/xcm/xTransfer.d.ts +4 -0
  49. package/build/types/builders/extrinsics/xcm/xTransfer.utils.d.ts +13 -0
  50. package/build/types/builders/extrinsics/xcm/xcmPallet.d.ts +11 -0
  51. package/build/types/builders/extrinsics/xcm/xcmPallet.utils.d.ts +24 -0
  52. package/build/types/builders/index.d.ts +9 -0
  53. package/build/types/builders/moves/Wormhole/TokenBridge.d.ts +10 -0
  54. package/build/types/builders/moves/Wormhole/index.d.ts +9 -0
  55. package/build/types/builders/programs/Wormhole/TokenBridge.d.ts +13 -0
  56. package/build/types/builders/programs/Wormhole/index.d.ts +14 -0
  57. package/build/types/builders/utils/amount.d.ts +1 -0
  58. package/build/types/builders/utils/asset.d.ts +2 -0
  59. package/build/types/builders/utils/index.d.ts +2 -0
  60. package/build/types/chains/chains.spec.d.ts +1 -0
  61. package/build/types/chains/evm/index.d.ts +4 -0
  62. package/build/types/chains/evm/mainnet.d.ts +2 -0
  63. package/build/types/chains/index.d.ts +8 -0
  64. package/build/types/chains/kusama/assethub.d.ts +2 -0
  65. package/build/types/chains/kusama/basilisk.d.ts +2 -0
  66. package/build/types/chains/kusama/index.d.ts +10 -0
  67. package/build/types/chains/kusama/integritee.d.ts +2 -0
  68. package/build/types/chains/kusama/karura.d.ts +2 -0
  69. package/build/types/chains/kusama/kusama.d.ts +2 -0
  70. package/build/types/chains/kusama/robonomics.d.ts +2 -0
  71. package/build/types/chains/kusama/tinkernet.d.ts +2 -0
  72. package/build/types/chains/polkadot/acala.d.ts +2 -0
  73. package/build/types/chains/polkadot/ajuna.d.ts +2 -0
  74. package/build/types/chains/polkadot/assethub.d.ts +3 -0
  75. package/build/types/chains/polkadot/astar.d.ts +2 -0
  76. package/build/types/chains/polkadot/bifrost.d.ts +2 -0
  77. package/build/types/chains/polkadot/centrifuge.d.ts +2 -0
  78. package/build/types/chains/polkadot/crust.d.ts +2 -0
  79. package/build/types/chains/polkadot/darwinia.d.ts +2 -0
  80. package/build/types/chains/polkadot/energywebx.d.ts +2 -0
  81. package/build/types/chains/polkadot/hydration.d.ts +2 -0
  82. package/build/types/chains/polkadot/index.d.ts +25 -0
  83. package/build/types/chains/polkadot/interlay.d.ts +2 -0
  84. package/build/types/chains/polkadot/kilt.d.ts +2 -0
  85. package/build/types/chains/polkadot/laos.d.ts +2 -0
  86. package/build/types/chains/polkadot/moonbeam.d.ts +2 -0
  87. package/build/types/chains/polkadot/mythos.d.ts +2 -0
  88. package/build/types/chains/polkadot/neuroweb.d.ts +2 -0
  89. package/build/types/chains/polkadot/nodle.d.ts +2 -0
  90. package/build/types/chains/polkadot/pendulum.d.ts +2 -0
  91. package/build/types/chains/polkadot/phala.d.ts +2 -0
  92. package/build/types/chains/polkadot/polkadot.d.ts +3 -0
  93. package/build/types/chains/polkadot/unique.d.ts +2 -0
  94. package/build/types/chains/polkadot/zeitgeist.d.ts +2 -0
  95. package/build/types/chains/solana/index.d.ts +4 -0
  96. package/build/types/chains/solana/mainnet.d.ts +2 -0
  97. package/build/types/chains/sui/index.d.ts +4 -0
  98. package/build/types/chains/sui/mainnet.d.ts +2 -0
  99. package/build/types/clients/base.d.ts +8 -0
  100. package/build/types/clients/chain/assethub.d.ts +13 -0
  101. package/build/types/clients/chain/hydration.d.ts +8 -0
  102. package/build/types/clients/chain/index.d.ts +2 -0
  103. package/build/types/clients/index.d.ts +2 -0
  104. package/build/types/configs/HydrationConfigService.d.ts +5 -0
  105. package/build/types/configs/HydrationConfigService.utils.d.ts +5 -0
  106. package/build/types/configs/evm/ethereum/index.d.ts +2 -0
  107. package/build/types/configs/evm/ethereum/templates.d.ts +3 -0
  108. package/build/types/configs/evm/index.d.ts +2 -0
  109. package/build/types/configs/index.d.ts +3 -0
  110. package/build/types/configs/kusama/assethub/index.d.ts +2 -0
  111. package/build/types/configs/kusama/assethub/templates.d.ts +3 -0
  112. package/build/types/configs/kusama/basilisk/configs.d.ts +3 -0
  113. package/build/types/configs/kusama/basilisk/index.d.ts +2 -0
  114. package/build/types/configs/kusama/basilisk/templates.d.ts +2 -0
  115. package/build/types/configs/kusama/index.d.ts +2 -0
  116. package/build/types/configs/kusama/integritee.d.ts +2 -0
  117. package/build/types/configs/kusama/karura.d.ts +2 -0
  118. package/build/types/configs/kusama/robonomics.d.ts +2 -0
  119. package/build/types/configs/kusama/tinkernet.d.ts +2 -0
  120. package/build/types/configs/polkadot/acala.d.ts +2 -0
  121. package/build/types/configs/polkadot/ajuna.d.ts +2 -0
  122. package/build/types/configs/polkadot/assethub/index.d.ts +3 -0
  123. package/build/types/configs/polkadot/assethub/templates.d.ts +6 -0
  124. package/build/types/configs/polkadot/astar.d.ts +2 -0
  125. package/build/types/configs/polkadot/bifrost.d.ts +2 -0
  126. package/build/types/configs/polkadot/centrifuge.d.ts +2 -0
  127. package/build/types/configs/polkadot/crust.d.ts +2 -0
  128. package/build/types/configs/polkadot/darwinia.d.ts +2 -0
  129. package/build/types/configs/polkadot/energywebx.d.ts +2 -0
  130. package/build/types/configs/polkadot/hydration/configs.d.ts +3 -0
  131. package/build/types/configs/polkadot/hydration/index.d.ts +2 -0
  132. package/build/types/configs/polkadot/hydration/templates.d.ts +13 -0
  133. package/build/types/configs/polkadot/index.d.ts +2 -0
  134. package/build/types/configs/polkadot/interlay.d.ts +2 -0
  135. package/build/types/configs/polkadot/kilt.d.ts +2 -0
  136. package/build/types/configs/polkadot/laos.d.ts +2 -0
  137. package/build/types/configs/polkadot/moonbeam/index.d.ts +2 -0
  138. package/build/types/configs/polkadot/moonbeam/templates.d.ts +3 -0
  139. package/build/types/configs/polkadot/mythos.d.ts +2 -0
  140. package/build/types/configs/polkadot/neuroweb.d.ts +2 -0
  141. package/build/types/configs/polkadot/nodle.d.ts +2 -0
  142. package/build/types/configs/polkadot/pendulum.d.ts +2 -0
  143. package/build/types/configs/polkadot/phala.d.ts +2 -0
  144. package/build/types/configs/polkadot/unique.d.ts +2 -0
  145. package/build/types/configs/polkadot/zeitgeist.d.ts +2 -0
  146. package/build/types/configs/solana/index.d.ts +2 -0
  147. package/build/types/configs/solana/solana.d.ts +2 -0
  148. package/build/types/configs/sui/index.d.ts +2 -0
  149. package/build/types/configs/sui/sui.d.ts +2 -0
  150. package/build/types/dex/assethub.d.ts +9 -0
  151. package/build/types/dex/hydration.d.ts +16 -0
  152. package/build/types/dex/index.d.ts +2 -0
  153. package/build/types/index.d.ts +9 -0
  154. package/build/types/resolvers/acala.d.ts +6 -0
  155. package/build/types/resolvers/hydration.d.ts +4 -0
  156. package/build/types/resolvers/index.d.ts +2 -0
  157. package/build/types/tags.d.ts +6 -0
  158. package/build/types/utils/papi.d.ts +17 -0
  159. package/build/types/utils/xcm-encoder.d.ts +86 -0
  160. package/build/types/validations/base.d.ts +9 -0
  161. package/build/types/validations/chain/assethub.d.ts +8 -0
  162. package/build/types/validations/chain/hydration.d.ts +9 -0
  163. package/build/types/validations/chain/index.d.ts +2 -0
  164. package/build/types/validations/index.d.ts +2 -0
  165. package/package.json +39 -0
@@ -0,0 +1,322 @@
1
+ import { ChainEcosystem, Parachain, TxWeight } from '@galacticcouncil/xc-core';
2
+ import { XcmTransferType, XcmVersion } from './types';
3
+ export declare const toDest: (version: XcmVersion, source: Parachain, destination: Parachain) => {
4
+ [x: string]: {
5
+ parents: number;
6
+ interior: {
7
+ X2: ({
8
+ GlobalConsensus: ChainEcosystem | undefined;
9
+ Parachain?: undefined;
10
+ } | {
11
+ Parachain: number;
12
+ GlobalConsensus?: undefined;
13
+ })[];
14
+ };
15
+ };
16
+ } | {
17
+ [x: string]: {
18
+ parents: number;
19
+ interior: string;
20
+ };
21
+ } | {
22
+ [x: string]: {
23
+ parents: number;
24
+ interior: {
25
+ X1: any;
26
+ };
27
+ };
28
+ };
29
+ export declare const toBeneficiary: (version: XcmVersion, account: any) => {
30
+ [x: string]: {
31
+ parents: number;
32
+ interior: {
33
+ X1: any;
34
+ };
35
+ };
36
+ };
37
+ export declare const toTransferType: (version: XcmVersion, type: XcmTransferType, assetLocation: any) => XcmTransferType.Teleport | XcmTransferType.LocalReserve | XcmTransferType.DestinationReserve | {
38
+ RemoteReserve: {
39
+ [x: string]: any;
40
+ };
41
+ };
42
+ export declare const toAsset: (assetLocation: object, amount: any) => {
43
+ id: object;
44
+ fun: {
45
+ Fungible: any;
46
+ };
47
+ };
48
+ export declare const toDepositXcmOnDest: (version: XcmVersion, account: any) => {
49
+ [x: string]: {
50
+ DepositAsset: {
51
+ assets: {
52
+ Wild: {
53
+ AllCounted: number;
54
+ };
55
+ };
56
+ beneficiary: {
57
+ parents: number;
58
+ interior: {
59
+ X1: any;
60
+ };
61
+ };
62
+ };
63
+ }[];
64
+ };
65
+ /**
66
+ * Instructions are executed in 2 steps:
67
+ *
68
+ * 1) SetAppendix - Error Handling, return everything to sender on Asset hub
69
+ * 2) InitiateReserveWithdraw - Initiate the bridged transfer
70
+ *
71
+ * @param version - XCM Version
72
+ * @param account - destination account (receiver)
73
+ * @param sender - sender account
74
+ * @param transferAssetLocation - transfer asset xcm location
75
+ * @returns xcm ethereum bridge instructions
76
+ */
77
+ export declare const toBridgeXcmOnDest: (version: XcmVersion, account: any, sender: any, transferAssetLocation: object, messageId: string | undefined) => {
78
+ [x: string]: ({
79
+ SetAppendix: {
80
+ DepositAsset: {
81
+ assets: {
82
+ Wild: string;
83
+ };
84
+ beneficiary: {
85
+ parents: number;
86
+ interior: {
87
+ X1: any;
88
+ };
89
+ };
90
+ };
91
+ }[];
92
+ InitiateReserveWithdraw?: undefined;
93
+ SetTopic?: undefined;
94
+ } | {
95
+ InitiateReserveWithdraw: {
96
+ assets: {
97
+ Wild: {
98
+ AllOf: {
99
+ id: object;
100
+ fun: string;
101
+ };
102
+ };
103
+ };
104
+ reserve: {
105
+ parents: number;
106
+ interior: {
107
+ X1: {
108
+ GlobalConsensus: {
109
+ Ethereum: {
110
+ chain_id: number;
111
+ };
112
+ };
113
+ }[];
114
+ };
115
+ };
116
+ xcm: ({
117
+ BuyExecution: {
118
+ fees: {
119
+ id: {
120
+ parents: number;
121
+ interior: {
122
+ X1: any;
123
+ Here?: undefined;
124
+ };
125
+ } | {
126
+ parents: number;
127
+ interior: {
128
+ Here: null;
129
+ X1?: undefined;
130
+ };
131
+ };
132
+ fun: {
133
+ Fungible: number;
134
+ };
135
+ };
136
+ weightLimit: string;
137
+ };
138
+ DepositAsset?: undefined;
139
+ SetTopic?: undefined;
140
+ } | {
141
+ DepositAsset: {
142
+ assets: {
143
+ Wild: {
144
+ AllCounted: number;
145
+ };
146
+ };
147
+ beneficiary: {
148
+ parents: number;
149
+ interior: {
150
+ X1: any;
151
+ };
152
+ };
153
+ };
154
+ BuyExecution?: undefined;
155
+ SetTopic?: undefined;
156
+ } | {
157
+ SetTopic: string | undefined;
158
+ BuyExecution?: undefined;
159
+ DepositAsset?: undefined;
160
+ })[];
161
+ };
162
+ SetAppendix?: undefined;
163
+ SetTopic?: undefined;
164
+ } | {
165
+ SetTopic: string | undefined;
166
+ SetAppendix?: undefined;
167
+ InitiateReserveWithdraw?: undefined;
168
+ })[];
169
+ };
170
+ /**
171
+ * Instructions are executed in 3 steps:
172
+ *
173
+ * 1) WithdrawAsset - Withdraw fee asset from the target account
174
+ * 2) BuyExecution - Buy execution with the fee asset
175
+ * 3) Transact - Destination (Transact) chain call execution
176
+ *
177
+ * Note that DepositAsset using AllCounted and not All, since All
178
+ * has too high of a gas requirement.
179
+ *
180
+ * @param version - XCM Version
181
+ * @param account - destination account (receiver)
182
+ * @param transactFeeLocation - transact fee xcm location
183
+ * @param transactFeeAmount - transact fee amount
184
+ * @param transactCall - transact calldata
185
+ * @param transactWeight - transact weight
186
+ * @returns xcm transact message instructions
187
+ */
188
+ export declare const toTransactMessage: (version: XcmVersion, account: any, transactFeeLocation: object, transactFeeAmount: any, transactCall: `0x${string}`, transactWeight: TxWeight) => {
189
+ [x: string]: ({
190
+ WithdrawAsset: {
191
+ id: object;
192
+ fun: {
193
+ Fungible: any;
194
+ };
195
+ }[];
196
+ BuyExecution?: undefined;
197
+ Transact?: undefined;
198
+ RefundSurplus?: undefined;
199
+ DepositAsset?: undefined;
200
+ } | {
201
+ BuyExecution: {
202
+ fees: {
203
+ id: object;
204
+ fun: {
205
+ Fungible: any;
206
+ };
207
+ };
208
+ weightLimit: string;
209
+ };
210
+ WithdrawAsset?: undefined;
211
+ Transact?: undefined;
212
+ RefundSurplus?: undefined;
213
+ DepositAsset?: undefined;
214
+ } | {
215
+ Transact: {
216
+ originKind: string;
217
+ requireWeightAtMost: TxWeight;
218
+ call: {
219
+ encoded: `0x${string}`;
220
+ };
221
+ };
222
+ WithdrawAsset?: undefined;
223
+ BuyExecution?: undefined;
224
+ RefundSurplus?: undefined;
225
+ DepositAsset?: undefined;
226
+ } | {
227
+ RefundSurplus: {};
228
+ WithdrawAsset?: undefined;
229
+ BuyExecution?: undefined;
230
+ Transact?: undefined;
231
+ DepositAsset?: undefined;
232
+ } | {
233
+ DepositAsset: {
234
+ assets: {
235
+ Wild: {
236
+ AllCounted: number;
237
+ };
238
+ };
239
+ beneficiary: {
240
+ parents: number;
241
+ interior: {
242
+ X1: any;
243
+ };
244
+ };
245
+ };
246
+ WithdrawAsset?: undefined;
247
+ BuyExecution?: undefined;
248
+ Transact?: undefined;
249
+ RefundSurplus?: undefined;
250
+ })[];
251
+ };
252
+ export declare const toTransferMessage: (version: XcmVersion, account: any, transferAssetLocation: object, transferAssetAmount: any, transferFeeAmount: any, receiver: any) => {
253
+ [x: string]: ({
254
+ WithdrawAsset: {
255
+ id: object;
256
+ fun: {
257
+ Fungible: any;
258
+ };
259
+ }[];
260
+ BuyExecution?: undefined;
261
+ TransferAsset?: undefined;
262
+ RefundSurplus?: undefined;
263
+ DepositAsset?: undefined;
264
+ } | {
265
+ BuyExecution: {
266
+ fees: {
267
+ id: object;
268
+ fun: {
269
+ Fungible: any;
270
+ };
271
+ };
272
+ weightLimit: string;
273
+ };
274
+ WithdrawAsset?: undefined;
275
+ TransferAsset?: undefined;
276
+ RefundSurplus?: undefined;
277
+ DepositAsset?: undefined;
278
+ } | {
279
+ TransferAsset: {
280
+ assets: {
281
+ id: object;
282
+ fun: {
283
+ Fungible: any;
284
+ };
285
+ }[];
286
+ beneficiary: {
287
+ parents: number;
288
+ interior: {
289
+ X1: any;
290
+ };
291
+ };
292
+ };
293
+ WithdrawAsset?: undefined;
294
+ BuyExecution?: undefined;
295
+ RefundSurplus?: undefined;
296
+ DepositAsset?: undefined;
297
+ } | {
298
+ RefundSurplus: {};
299
+ WithdrawAsset?: undefined;
300
+ BuyExecution?: undefined;
301
+ TransferAsset?: undefined;
302
+ DepositAsset?: undefined;
303
+ } | {
304
+ DepositAsset: {
305
+ assets: {
306
+ Wild: {
307
+ AllCounted: number;
308
+ };
309
+ };
310
+ beneficiary: {
311
+ parents: number;
312
+ interior: {
313
+ X1: any;
314
+ };
315
+ };
316
+ };
317
+ WithdrawAsset?: undefined;
318
+ BuyExecution?: undefined;
319
+ TransferAsset?: undefined;
320
+ RefundSurplus?: undefined;
321
+ })[];
322
+ };
@@ -0,0 +1,18 @@
1
+ export declare enum XcmVersion {
2
+ v1 = "V1",
3
+ v2 = "V2",
4
+ v3 = "V3",
5
+ v4 = "V4",
6
+ v5 = "V5"
7
+ }
8
+ export declare enum XcmTransferType {
9
+ Teleport = "Teleport",
10
+ LocalReserve = "LocalReserve",
11
+ DestinationReserve = "DestinationReserve",
12
+ RemoteReserve = "RemoteReserve"
13
+ }
14
+ export type Parents = 0 | 1 | 2;
15
+ /**
16
+ * Encoding mode for the XcmEncoder (typed API vs unsafe API)
17
+ */
18
+ export type EncodingMode = 'typed' | 'unsafe';
@@ -0,0 +1,14 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare function getExtrinsicAccount(address: string): {
3
+ AccountKey20: {
4
+ key: string;
5
+ };
6
+ AccountId32?: undefined;
7
+ } | {
8
+ AccountId32: {
9
+ id: string;
10
+ network: null;
11
+ };
12
+ AccountKey20?: undefined;
13
+ };
14
+ export declare function getDerivativeAccount(from: Parachain, fromAddress: string, to: Parachain): string;
@@ -0,0 +1 @@
1
+ export declare function shouldFeeAssetPrecede(transferAssetLocation: any, transferFeeLocation: any): boolean;
@@ -0,0 +1,4 @@
1
+ import { Asset, Parachain } from '@galacticcouncil/xc-core';
2
+ export declare function locationOrError(chain: Parachain, asset: Asset): {
3
+ [x: string]: any;
4
+ };
@@ -0,0 +1,5 @@
1
+ export * from './account';
2
+ export * from './fee';
3
+ export * from './guard';
4
+ export * as instr from './instructions';
5
+ export * from './location';
@@ -0,0 +1,65 @@
1
+ export declare const ETHER_TOKEN_ADDRESS = "0x0000000000000000000000000000000000000000";
2
+ export declare function bridgeLocation(ethChainId: number): {
3
+ parents: number;
4
+ interior: {
5
+ X1: {
6
+ GlobalConsensus: {
7
+ Ethereum: {
8
+ chain_id: number;
9
+ };
10
+ };
11
+ }[];
12
+ };
13
+ };
14
+ export declare function parachainLocation(paraId: number): {
15
+ parents: number;
16
+ interior: {
17
+ X1: {
18
+ Parachain: number;
19
+ }[];
20
+ };
21
+ };
22
+ export declare function erc20Location(ethChainId: number, tokenAddress: string): {
23
+ parents: number;
24
+ interior: {
25
+ X1: {
26
+ GlobalConsensus: {
27
+ Ethereum: {
28
+ chain_id: number;
29
+ };
30
+ };
31
+ }[];
32
+ };
33
+ } | {
34
+ parents: number;
35
+ interior: {
36
+ X2: ({
37
+ GlobalConsensus: {
38
+ Ethereum: {
39
+ chain_id: number;
40
+ };
41
+ };
42
+ } | {
43
+ AccountKey20: {
44
+ key: string;
45
+ };
46
+ })[];
47
+ };
48
+ };
49
+ export declare function erc20LocationReanchored(tokenAddress: string): {
50
+ parents: number;
51
+ interior: {
52
+ here: null;
53
+ X1?: undefined;
54
+ };
55
+ } | {
56
+ parents: number;
57
+ interior: {
58
+ X1: {
59
+ AccountKey20: {
60
+ key: string;
61
+ };
62
+ }[];
63
+ here?: undefined;
64
+ };
65
+ };
@@ -0,0 +1,12 @@
1
+ import { XcmVersion } from '../types';
2
+ /**
3
+ * Get extrinsic X1 interior
4
+ *
5
+ * @param assetLocation - asset xcm location
6
+ * @param version - xcm version
7
+ * @returns normalized x1 interior if version prior to V4
8
+ */
9
+ export declare function getExtrinsicAssetLocation(assetLocation: Record<string, any>, version: XcmVersion): Record<string, any> | {
10
+ Concrete: {};
11
+ };
12
+ export declare function getX1Junction(version: XcmVersion, junction: any): any;
@@ -0,0 +1,7 @@
1
+ import { ExtrinsicConfigBuilder } from '@galacticcouncil/xc-core';
2
+ export declare const xTokens: () => {
3
+ transfer: () => ExtrinsicConfigBuilder;
4
+ transferMultiasset: () => ExtrinsicConfigBuilder;
5
+ transferMultiassets: () => ExtrinsicConfigBuilder;
6
+ transferMultiCurrencies: () => ExtrinsicConfigBuilder;
7
+ };
@@ -0,0 +1,23 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ import { XcmVersion } from './types';
3
+ export declare const toDest: (version: XcmVersion, destination: Parachain, account: any) => {
4
+ [x: string]: {
5
+ parents: number;
6
+ interior: {
7
+ X1: any;
8
+ };
9
+ };
10
+ } | {
11
+ [x: string]: {
12
+ parents: number;
13
+ interior: {
14
+ X2: any[];
15
+ };
16
+ };
17
+ };
18
+ export declare const toAsset: (assetLocation: object, amount: any) => {
19
+ id: object;
20
+ fun: {
21
+ Fungible: any;
22
+ };
23
+ };
@@ -0,0 +1,4 @@
1
+ import { ExtrinsicConfigBuilder } from '@galacticcouncil/xc-core';
2
+ export declare const xTransfer: () => {
3
+ transfer: () => ExtrinsicConfigBuilder;
4
+ };
@@ -0,0 +1,13 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare const toDest: (destination: Parachain, account: any) => {
3
+ parents: number;
4
+ interior: {
5
+ X2: any[];
6
+ };
7
+ };
8
+ export declare const toAsset: (assetLocation: object, amount: any) => {
9
+ id: object;
10
+ fun: {
11
+ Fungible: any;
12
+ };
13
+ };
@@ -0,0 +1,11 @@
1
+ import { ExtrinsicConfigBuilder } from '@galacticcouncil/xc-core';
2
+ import { XcmTransferType } from './types';
3
+ type TransferOpts = {
4
+ transferType: XcmTransferType;
5
+ };
6
+ export declare const xcmPallet: () => {
7
+ limitedReserveTransferAssets: () => ExtrinsicConfigBuilder;
8
+ limitedTeleportAssets: () => ExtrinsicConfigBuilder;
9
+ transferAssetsUsingTypeAndThen: (opts: TransferOpts) => ExtrinsicConfigBuilder;
10
+ };
11
+ export {};
@@ -0,0 +1,24 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ import { XcmVersion } from './types';
3
+ export declare const toDest: (version: XcmVersion, destination: Parachain) => {
4
+ [x: string]: {
5
+ parents: number;
6
+ interior: {
7
+ X1: any;
8
+ };
9
+ };
10
+ };
11
+ export declare const toAsset: (assetLocation: object, amount: any) => {
12
+ id: object;
13
+ fun: {
14
+ Fungible: any;
15
+ };
16
+ };
17
+ export declare const toBeneficiary: (version: XcmVersion, account: any) => {
18
+ [x: string]: {
19
+ parents: number;
20
+ interior: {
21
+ X1: any;
22
+ };
23
+ };
24
+ };
@@ -0,0 +1,9 @@
1
+ export * from './AssetMinBuilder';
2
+ export * from './BalanceBuilder';
3
+ export * from './ContractBuilder';
4
+ export * from './ExtrinsicBuilder';
5
+ export * from './FeeAmountBuilder';
6
+ export * from './FeeAssetBuilder';
7
+ export * from './ProgramBuilder';
8
+ export * from './MoveBuilder';
9
+ export { XcmVersion, XcmTransferType } from './extrinsics/xcm';
@@ -0,0 +1,10 @@
1
+ import { EvmParachain, MoveConfigBuilder } from '@galacticcouncil/xc-core';
2
+ type TransferMrlOpts = {
3
+ moonchain: EvmParachain;
4
+ };
5
+ export declare const TokenBridge: () => {
6
+ transferNativeWithPayload: () => {
7
+ viaMrl: (opts: TransferMrlOpts) => MoveConfigBuilder;
8
+ };
9
+ };
10
+ export {};
@@ -0,0 +1,9 @@
1
+ export declare function Wormhole(): {
2
+ TokenBridge: () => {
3
+ transferNativeWithPayload: () => {
4
+ viaMrl: (opts: {
5
+ moonchain: import("@galacticcouncil/xc-core").EvmParachain;
6
+ }) => import("@galacticcouncil/xc-core").MoveConfigBuilder;
7
+ };
8
+ };
9
+ };
@@ -0,0 +1,13 @@
1
+ import { EvmParachain, ProgramConfigBuilder } from '@galacticcouncil/xc-core';
2
+ type TransferMrlOpts = {
3
+ moonchain: EvmParachain;
4
+ };
5
+ export declare const TokenBridge: () => {
6
+ transferNativeWithPayload: () => {
7
+ viaMrl: (opts: TransferMrlOpts) => ProgramConfigBuilder;
8
+ };
9
+ transferTokenWithPayload: () => {
10
+ viaMrl: (opts: TransferMrlOpts) => ProgramConfigBuilder;
11
+ };
12
+ };
13
+ export {};
@@ -0,0 +1,14 @@
1
+ export declare function Wormhole(): {
2
+ TokenBridge: () => {
3
+ transferNativeWithPayload: () => {
4
+ viaMrl: (opts: {
5
+ moonchain: import("@galacticcouncil/xc-core").EvmParachain;
6
+ }) => import("@galacticcouncil/xc-core").ProgramConfigBuilder;
7
+ };
8
+ transferTokenWithPayload: () => {
9
+ viaMrl: (opts: {
10
+ moonchain: import("@galacticcouncil/xc-core").EvmParachain;
11
+ }) => import("@galacticcouncil/xc-core").ProgramConfigBuilder;
12
+ };
13
+ };
14
+ };
@@ -0,0 +1 @@
1
+ export declare function padFeeByPercentage(fee: bigint, padPercent: bigint): bigint;
@@ -0,0 +1,2 @@
1
+ import { ChainAssetId } from '@galacticcouncil/xc-core';
2
+ export declare function parseAssetId(assetId: ChainAssetId): ChainAssetId;
@@ -0,0 +1,2 @@
1
+ export * from './amount';
2
+ export * from './asset';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { AnyChain } from '@galacticcouncil/xc-core';
2
+ import { ethereum } from './mainnet';
3
+ export declare const evmChains: AnyChain[];
4
+ export { ethereum };
@@ -0,0 +1,2 @@
1
+ import { EvmChain } from '@galacticcouncil/xc-core';
2
+ export declare const ethereum: EvmChain;
@@ -0,0 +1,8 @@
1
+ import { AnyChain } from '@galacticcouncil/xc-core';
2
+ export declare const chains: AnyChain[];
3
+ export declare const chainsMap: Map<string, AnyChain>;
4
+ export * from './evm';
5
+ export * from './polkadot';
6
+ export * from './solana';
7
+ export * from './sui';
8
+ export * from './kusama';
@@ -0,0 +1,2 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare const kusamaAssetHub: Parachain;
@@ -0,0 +1,2 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare const basilisk: Parachain;
@@ -0,0 +1,10 @@
1
+ import { AnyChain } from '@galacticcouncil/xc-core';
2
+ import { kusamaAssetHub } from './assethub';
3
+ import { basilisk } from './basilisk';
4
+ import { integritee } from './integritee';
5
+ import { karura } from './karura';
6
+ import { kusama } from './kusama';
7
+ import { robonomics } from './robonomics';
8
+ import { tinkernet } from './tinkernet';
9
+ export declare const kusamaChains: AnyChain[];
10
+ export { kusama, kusamaAssetHub, basilisk, integritee, karura, robonomics, tinkernet, };
@@ -0,0 +1,2 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare const integritee: Parachain;
@@ -0,0 +1,2 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare const karura: Parachain;
@@ -0,0 +1,2 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare const kusama: Parachain;
@@ -0,0 +1,2 @@
1
+ import { Parachain } from '@galacticcouncil/xc-core';
2
+ export declare const robonomics: Parachain;