@galacticcouncil/xc-core 1.0.0 → 1.1.0-pr297-8b9bc60
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/bridge/snowbridge.d.ts +30 -0
- package/build/evm/abi/Snowbridge.d.ts +212 -629
- package/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/utils/codec.d.ts +5 -0
- package/build/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -12,3 +12,33 @@ export declare class Snowbridge {
|
|
|
12
12
|
getConsensusId(): number;
|
|
13
13
|
getGateway(): string;
|
|
14
14
|
}
|
|
15
|
+
export declare const SNOWBRIDGE_BASE_DISPATCH_GAS = 80000n;
|
|
16
|
+
export declare const SNOWBRIDGE_BASE_VERIFICATION_GAS = 120000n;
|
|
17
|
+
export declare const SNOWBRIDGE_SUBMIT_GAS = 1000000n;
|
|
18
|
+
export declare const SNOWBRIDGE_FIAT_SHAMIR_GAS = 2000000n;
|
|
19
|
+
export declare const ASSETHUB_ETHER_ED = 15000000000000n;
|
|
20
|
+
/**
|
|
21
|
+
* Snowbridge V2 volume-based relayer fee schedule.
|
|
22
|
+
* Direction:
|
|
23
|
+
* - Ethereum → Polkadot: add the result to `relayerFee` (5th arg of
|
|
24
|
+
* `v2_sendMessage`).
|
|
25
|
+
* - Polkadot → Ethereum: add the result to `etherFeeAmount`, which flows
|
|
26
|
+
* into the AH→Ethereum InitiateTransfer `remote_fees`.
|
|
27
|
+
*/
|
|
28
|
+
export type FeeBand = {
|
|
29
|
+
lowerUsd: bigint;
|
|
30
|
+
upperUsd: bigint;
|
|
31
|
+
numerator: bigint;
|
|
32
|
+
denominator: bigint;
|
|
33
|
+
};
|
|
34
|
+
export type VolumeFeeParams = {
|
|
35
|
+
txValueUsd: bigint;
|
|
36
|
+
ethToUsdNumerator: bigint;
|
|
37
|
+
ethToUsdDenominator: bigint;
|
|
38
|
+
};
|
|
39
|
+
export declare const FEE_SCHEDULE: FeeBand[];
|
|
40
|
+
export declare function lookupFeeRatio(txValueUsd: bigint): {
|
|
41
|
+
numerator: bigint;
|
|
42
|
+
denominator: bigint;
|
|
43
|
+
};
|
|
44
|
+
export declare function calculateVolumeTipInWei(params: VolumeFeeParams): bigint;
|