@galacticcouncil/xc-cfg 2.3.0-pr349-45f8efb → 2.3.0-pr350-baf950c
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/build/builders/ContractBuilder.d.ts +4 -18
- package/build/builders/FeeAmountBuilder.d.ts +0 -15
- package/build/builders/contracts/Wormhole/Ntt.d.ts +0 -2
- package/build/builders/contracts/Wormhole/index.d.ts +0 -2
- package/build/clients/bridge/index.d.ts +1 -0
- package/build/clients/bridge/ntt.d.ts +10 -0
- package/build/clients/index.d.ts +1 -1
- package/build/configs/evm/base/templates.d.ts +0 -6
- package/build/configs/evm/ethereum/templates.d.ts +0 -18
- package/build/configs/polkadot/hydration/templates.d.ts +0 -19
- package/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/tags.d.ts +0 -1
- package/build/validations/bridge/index.d.ts +1 -0
- package/build/validations/bridge/ntt.d.ts +5 -0
- package/package.json +2 -2
- package/build/bridges/wormhole/constants.d.ts +0 -12
- package/build/bridges/wormhole/constants.spec.d.ts +0 -1
- package/build/bridges/wormhole/executor/evm.d.ts +0 -3
- package/build/bridges/wormhole/executor/index.d.ts +0 -18
- package/build/bridges/wormhole/executor/index.spec.d.ts +0 -1
- package/build/bridges/wormhole/executor/solana.d.ts +0 -11
- package/build/bridges/wormhole/executor/sui.d.ts +0 -3
- package/build/bridges/wormhole/executor/types.d.ts +0 -22
- package/build/bridges/wormhole/index.d.ts +0 -2
- package/build/builders/ContractBuilder.spec.d.ts +0 -1
- package/build/clients/executor.d.ts +0 -27
- package/build/clients/executor.spec.d.ts +0 -1
- package/build/configs/ntt.spec.d.ts +0 -1
|
@@ -1,32 +1,18 @@
|
|
|
1
|
-
import { ContractConfigBuilder, ContractConfigBuilderParams, ExtrinsicConfigBuilder } from '@galacticcouncil/xc-core';
|
|
2
1
|
import { Erc20 } from './contracts/Erc20';
|
|
3
2
|
import { PolkadotXcm } from './contracts/PolkadotXcm';
|
|
4
3
|
import { Wormhole } from './contracts/Wormhole';
|
|
5
4
|
export declare function ContractBuilder(): {
|
|
6
5
|
Batch: () => {
|
|
7
|
-
batchAll: (configs: ContractConfigBuilder[]) => ContractConfigBuilder;
|
|
6
|
+
batchAll: (configs: import("@galacticcouncil/xc-core").ContractConfigBuilder[]) => import("@galacticcouncil/xc-core").ContractConfigBuilder;
|
|
8
7
|
};
|
|
9
8
|
Erc20: typeof Erc20;
|
|
10
9
|
Basejump: () => {
|
|
11
|
-
bridgeViaWormhole: () => ContractConfigBuilder;
|
|
10
|
+
bridgeViaWormhole: () => import("@galacticcouncil/xc-core").ContractConfigBuilder;
|
|
12
11
|
};
|
|
13
12
|
PolkadotXcm: typeof PolkadotXcm;
|
|
14
13
|
Snowbridge: () => {
|
|
15
|
-
v2SendMessage: () => ContractConfigBuilder;
|
|
16
|
-
sendToken: () => ContractConfigBuilder;
|
|
14
|
+
v2SendMessage: () => import("@galacticcouncil/xc-core").ContractConfigBuilder;
|
|
15
|
+
sendToken: () => import("@galacticcouncil/xc-core").ContractConfigBuilder;
|
|
17
16
|
};
|
|
18
17
|
Wormhole: typeof Wormhole;
|
|
19
18
|
};
|
|
20
|
-
/**
|
|
21
|
-
* Contract counterpart of {@link ExtrinsicDecorator} - attaches an extrinsic
|
|
22
|
-
* to run ahead of the call.
|
|
23
|
-
*
|
|
24
|
-
* Where the extrinsic decorator can wrap both sides in `Utility.batch_all`
|
|
25
|
-
* itself, a contract call is not a substrate call: the batching happens later,
|
|
26
|
-
* once the platform knows the origin is ss58 and has wrapped the call in
|
|
27
|
-
* `EVM.call`. So this only carries the extrinsic on the config and leaves the
|
|
28
|
-
* assembly to {@link SubstrateEvm}.
|
|
29
|
-
*/
|
|
30
|
-
export declare function ContractDecorator(predicate: (params: ContractConfigBuilderParams) => boolean, extrinsic: ExtrinsicConfigBuilder): {
|
|
31
|
-
prior: (config: ContractConfigBuilder) => ContractConfigBuilder;
|
|
32
|
-
};
|
|
@@ -13,20 +13,6 @@ declare function XcmPaymentApi(): {
|
|
|
13
13
|
reserve?: AnyParachain;
|
|
14
14
|
}) => FeeAmountConfigBuilder;
|
|
15
15
|
};
|
|
16
|
-
declare function Wormhole(): {
|
|
17
|
-
/**
|
|
18
|
-
* Native gas an executor-delivered NTT transfer pays on top of itself -
|
|
19
|
-
* the wormhole delivery price plus what the Executor charges to redeem
|
|
20
|
-
* on the far side.
|
|
21
|
-
*
|
|
22
|
-
* Declared as the route's destination fee because an erc20 source pays it
|
|
23
|
-
* out of a balance the amount never competes for, so
|
|
24
|
-
* {@link EvmPlatform.estimateFee} deliberately leaves the call value out.
|
|
25
|
-
* A native gas source must NOT use this - there the value is already part
|
|
26
|
-
* of the source fee, and charging it twice inflates the route minimum.
|
|
27
|
-
*/
|
|
28
|
-
quoteExecutorCost: () => FeeAmountConfigBuilder;
|
|
29
|
-
};
|
|
30
16
|
declare function Basejump(): {
|
|
31
17
|
quoteFee: () => FeeAmountConfigBuilder;
|
|
32
18
|
};
|
|
@@ -34,6 +20,5 @@ export declare function FeeAmountBuilder(): {
|
|
|
34
20
|
Basejump: typeof Basejump;
|
|
35
21
|
XcmPaymentApi: typeof XcmPaymentApi;
|
|
36
22
|
Snowbridge: typeof Snowbridge;
|
|
37
|
-
Wormhole: typeof Wormhole;
|
|
38
23
|
};
|
|
39
24
|
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare function Wormhole(): {
|
|
2
2
|
Ntt: () => {
|
|
3
3
|
transfer: () => import("@galacticcouncil/xc-core").ContractConfigBuilder;
|
|
4
|
-
transferWithExecutor: () => import("@galacticcouncil/xc-core").ContractConfigBuilder;
|
|
5
|
-
transferViaExecutor: () => import("@galacticcouncil/xc-core").ContractConfigBuilder;
|
|
6
4
|
};
|
|
7
5
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ntt';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyChain, Asset } from '@galacticcouncil/xc-core';
|
|
2
|
+
export interface NttRateLimit {
|
|
3
|
+
capacity: bigint;
|
|
4
|
+
limit: bigint;
|
|
5
|
+
windowMs: number;
|
|
6
|
+
capacityAtLastTx: bigint;
|
|
7
|
+
lastTxMs: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function getNttOutboundLimit(chain: AnyChain, asset: Asset): Promise<NttRateLimit>;
|
|
10
|
+
export declare function getNttInboundLimit(chain: AnyChain, asset: Asset, from: AnyChain): Promise<NttRateLimit>;
|
package/build/clients/index.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import { Asset, AssetRoute } from '@galacticcouncil/xc-core';
|
|
2
2
|
export declare function toHydrationViaNttTemplate(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
3
|
-
/**
|
|
4
|
-
* Executor-delivered variant, offered alongside the self-redeem route above
|
|
5
|
-
* for the same pair - the sender pays for delivery instead of signing a
|
|
6
|
-
* redeem on the destination. Cost is native gas on the source chain.
|
|
7
|
-
*/
|
|
8
|
-
export declare function toHydrationViaNttExecutorTemplate(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
9
3
|
export declare function toHydrationViaBasejumpTemplate(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
import { Asset, AssetRoute } from '@galacticcouncil/xc-core';
|
|
2
2
|
export declare function toHydrationViaNttTemplate(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
3
|
-
/**
|
|
4
|
-
* Executor-delivered variant, offered alongside the self-redeem route above
|
|
5
|
-
* for the same pair - the sender pays for delivery instead of signing a
|
|
6
|
-
* redeem on the destination.
|
|
7
|
-
*
|
|
8
|
-
* The cost is native gas on the source chain, declared as the destination fee
|
|
9
|
-
* because an erc20 source pays it from a balance the amount never competes
|
|
10
|
-
* for (which is why EvmPlatform.estimateFee leaves the call value out there).
|
|
11
|
-
*/
|
|
12
|
-
export declare function toHydrationViaNttExecutorTemplate(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
13
|
-
/**
|
|
14
|
-
* Executor-delivered ntt out of a native gas source.
|
|
15
|
-
*
|
|
16
|
-
* The delivery price & executor cost come out of the very balance being
|
|
17
|
-
* bridged, so they are already folded into the source fee - declaring them
|
|
18
|
-
* as a destination fee too would charge the user twice.
|
|
19
|
-
*/
|
|
20
|
-
export declare function toHydrationViaNttExecutorNativeTemplate(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
21
3
|
export declare function toHydrationViaSnowbridgeTemplate(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
22
4
|
export declare function toHydrationViaSnowbridgeV1Template(assetIn: Asset, assetOut: Asset): AssetRoute;
|
|
@@ -9,24 +9,5 @@ export declare function toHubExtTemplate(asset: Asset): AssetRoute;
|
|
|
9
9
|
export declare function toKusamaHubTemplate(asset: Asset, destFee: number, executionFee: number): AssetRoute;
|
|
10
10
|
export declare function toParaErc20Template(asset: Asset, destination: AnyParachain, transferType?: XcmTransferType): AssetRoute;
|
|
11
11
|
export declare function viaNttTemplate(assetIn: Asset, assetOut: Asset, to: AnyChain): AssetRoute;
|
|
12
|
-
/**
|
|
13
|
-
* Executor-delivered variant, offered alongside the self-redeem route above
|
|
14
|
-
* for the same pair - the sender pays for delivery instead of signing a
|
|
15
|
-
* redeem on the destination.
|
|
16
|
-
*
|
|
17
|
-
* Cost is charged in weth, hydration's evm native gas - `EVM.call { value }`
|
|
18
|
-
* debits the weth balance (asset 20), not hdx - whether the transfer is signed
|
|
19
|
-
* as h160 or wrapped in EVM.call. Ntt still delivers the full amount.
|
|
20
|
-
*
|
|
21
|
-
* Must stay an 18 decimal asset: the builder returns a raw evm value, and hdx
|
|
22
|
-
* would both name the wrong balance and resolve to 12 decimals.
|
|
23
|
-
*
|
|
24
|
-
* A sender holding no weth buys it first: the same destination fee swap the
|
|
25
|
-
* xcm routes use, batched ahead of the call. Only an ss58 origin needs it -
|
|
26
|
-
* that one pays its extrinsic fee in hdx and can hold zero weth. An h160 has
|
|
27
|
-
* nothing to batch into, but pays its own gas in weth, so it already holds
|
|
28
|
-
* some.
|
|
29
|
-
*/
|
|
30
|
-
export declare function viaNttExecutorTemplate(assetIn: Asset, assetOut: Asset, to: AnyChain): AssetRoute;
|
|
31
12
|
export declare function viaSnowbridgeTemplate(assetIn: Asset, assetOut: Asset, to: AnyChain): AssetRoute;
|
|
32
13
|
export declare function viaSnowbridgeV1Template(assetIn: Asset, assetOut: Asset, to: AnyChain): AssetRoute;
|