@galacticcouncil/xc-cfg 0.6.1 → 0.7.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.
@@ -2,6 +2,7 @@ import { Parachain, TxWeight } from '@galacticcouncil/xc-core';
2
2
  import { Binary } from 'polkadot-api';
3
3
  import { XcmV3Junctions, XcmV3Junction, XcmV3MultiassetFungibility, XcmV4Instruction, XcmV4AssetAssetFilter, XcmV3WeightLimit, XcmV2OriginKind } from '@galacticcouncil/descriptors';
4
4
  import { XcmTransferType, XcmVersion } from './types';
5
+ export declare const isSnowbridgeTransfer: (assetLocation: any) => boolean;
5
6
  export declare const toDest: (version: XcmVersion, source: Parachain, destination: Parachain) => {
6
7
  type: XcmVersion;
7
8
  value: {
@@ -1,6 +1,6 @@
1
1
  import { XcmV3Junction } from '@galacticcouncil/descriptors';
2
2
  export declare const ETHER_TOKEN_ADDRESS = "0x0000000000000000000000000000000000000000";
3
- export declare function bridgeLocation(ethChainId: number): {
3
+ export declare function ethereumLocation(ethChainId: number): {
4
4
  parents: number;
5
5
  interior: {
6
6
  type: "X1";
@@ -1,11 +1,12 @@
1
1
  import { AnyChain, Asset, AssetRoute, ExtrinsicConfigBuilder, Parachain } from '@galacticcouncil/xc-core';
2
+ import { XcmTransferType } from '../../../builders';
2
3
  export declare const MRL_EXECUTION_FEE = 0.9;
3
4
  export declare const MRL_XCM_FEE = 1;
4
5
  export declare const CEX_EXECUTION_FEE = 0.03;
5
6
  export declare function toTransferTemplate(asset: Asset, destination: AnyChain, reserve?: Parachain): AssetRoute;
6
7
  export declare function toHubExtTemplate(asset: Asset): AssetRoute;
7
8
  export declare function toHubWithCexFwdTemplate(asset: Asset, hubFee: number, hubTransfer: ExtrinsicConfigBuilder): AssetRoute;
8
- export declare function toParaErc20Template(asset: Asset, destination: AnyChain, destinationFee: number): AssetRoute;
9
+ export declare function toParaErc20Template(asset: Asset, destination: Parachain, transferType?: XcmTransferType): AssetRoute;
9
10
  export declare function toMoonbeamErc20Template(asset: Asset): AssetRoute;
10
11
  export declare function toZeitgeistErc20Template(asset: Asset): AssetRoute;
11
12
  export declare function viaWormholeBridgeTemplate(assetIn: Asset, assetOut: Asset, to: AnyChain): AssetRoute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacticcouncil/xc-cfg",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Cross-chain hydradx & basilisk dapp configuration",
5
5
  "author": "GalacticCouncil",
6
6
  "repository": {
@@ -1,5 +0,0 @@
1
- import { ContractConfigBuilder } from '@galacticcouncil/xc-core';
2
- export declare function Xtokens(): {
3
- transfer: (weight?: bigint) => ContractConfigBuilder;
4
- transferMultiCurrencies: (weight?: bigint) => ContractConfigBuilder;
5
- };
@@ -1,45 +0,0 @@
1
- import { Parachain } from '@galacticcouncil/xc-core';
2
- type DestinationMultilocation = [
3
- /**
4
- * 1 - if transaction is going through a relay chain
5
- */
6
- 1,
7
- ([
8
- /**
9
- * example '0x00000007DC'
10
- * 7DC - parachain id in hex
11
- * can be found here:
12
- * - https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains
13
- * - https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/parachains
14
- */
15
- string,
16
- /**
17
- * example '0x01%account%00',
18
- * enum = 01 (AccountId32)
19
- * networkId = 00 (any)
20
- */
21
- string
22
- ] | [
23
- /**
24
- * example '0x01%account%00',
25
- * enum = 01 (AccountId32)
26
- * networkId = 00 (any)
27
- */
28
- string
29
- ])
30
- ];
31
- /**
32
- * Build destination multilocation
33
- *
34
- * 01: AccountId32
35
- * 03: AccountKey20
36
- *
37
- * @see https://docs.moonbeam.network/builders/interoperability/xcm/xc20/xtokens/#building-the-precompile-multilocation
38
- *
39
- * @param address - destination address
40
- * @param destination - destination chain
41
- * @returns multilocation
42
- */
43
- export declare function getDestinationMultilocation(address: string, destination: Parachain): DestinationMultilocation;
44
- export declare function formatAssetIdToERC20(id: string): string;
45
- export {};