@chainflip/sdk 1.1.1-rc.0 → 1.1.1-rc.1

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.
@@ -63,7 +63,9 @@ var swappingEnvironment = z.object({
63
63
  });
64
64
  createRequest("cf_swapping_environment", swappingEnvironment);
65
65
  var ingressEgressEnvironment = z.object({
66
- minimum_deposit_amounts: chainAssetNumberMap
66
+ minimum_deposit_amounts: chainAssetNumberMap,
67
+ ingress_fees: chainAssetNumberMap,
68
+ egress_fees: chainAssetNumberMap
67
69
  });
68
70
  createRequest("cf_ingress_egress_environment", ingressEgressEnvironment);
69
71
  var rpcAsset = z.union([
package/dist/funding.js CHANGED
@@ -4792,7 +4792,9 @@ var swappingEnvironment = z.object({
4792
4792
  });
4793
4793
  createRequest("cf_swapping_environment", swappingEnvironment);
4794
4794
  var ingressEgressEnvironment = z.object({
4795
- minimum_deposit_amounts: chainAssetNumberMap
4795
+ minimum_deposit_amounts: chainAssetNumberMap,
4796
+ ingress_fees: chainAssetNumberMap,
4797
+ egress_fees: chainAssetNumberMap
4796
4798
  });
4797
4799
  createRequest("cf_ingress_egress_environment", ingressEgressEnvironment);
4798
4800
  var rpcAsset = z.union([
package/dist/funding.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-VJRFC6HO.mjs';
1
+ import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-UEUNQEDO.mjs';
2
2
  import { __name, __publicField, ChainflipNetworks, Assets, assert } from './chunk-O4RYZWBW.mjs';
3
3
 
4
4
  // ../shared/src/stateChainGateway/utils.ts
package/dist/swap.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { C as ChainflipNetwork, A as Asset, a as Chain, c as chainAssets, T as TransactionOptions } from './contracts-ss509umD.mjs';
2
+ import { C as ChainflipNetwork, a as Chain, A as Asset, c as chainAssets, T as TransactionOptions } from './contracts-ss509umD.mjs';
3
3
  export { d as Assets, e as ChainflipNetworks, b as Chains, f as assetChains, h as assetContractIds, g as assetDecimals, i as chainContractIds } from './contracts-ss509umD.mjs';
4
4
  import { z } from 'zod';
5
5
 
@@ -23,6 +23,32 @@ declare const getEnvironment: (urlOrNetwork: RpcConfig, params: void) => Promise
23
23
  DOT: bigint;
24
24
  };
25
25
  };
26
+ ingressFees: {
27
+ Bitcoin: {
28
+ BTC: bigint;
29
+ };
30
+ Ethereum: {
31
+ FLIP: bigint;
32
+ USDC: bigint;
33
+ ETH: bigint;
34
+ };
35
+ Polkadot: {
36
+ DOT: bigint;
37
+ };
38
+ };
39
+ egressFees: {
40
+ Bitcoin: {
41
+ BTC: bigint;
42
+ };
43
+ Ethereum: {
44
+ FLIP: bigint;
45
+ USDC: bigint;
46
+ ETH: bigint;
47
+ };
48
+ Polkadot: {
49
+ DOT: bigint;
50
+ };
51
+ };
26
52
  };
27
53
  swapping: {
28
54
  minimumSwapAmounts: {
@@ -3142,7 +3168,8 @@ declare const ccmMetadataSchema: z.ZodObject<{
3142
3168
  }>;
3143
3169
  type CcmMetadata = z.infer<typeof ccmMetadataSchema>;
3144
3170
  type SwapFee = {
3145
- type: 'LIQUIDITY' | 'NETWORK';
3171
+ type: 'LIQUIDITY' | 'NETWORK' | 'INGRESS' | 'EGRESS';
3172
+ chain: Chain;
3146
3173
  asset: Asset;
3147
3174
  amount: string;
3148
3175
  };
package/dist/swap.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { C as ChainflipNetwork, A as Asset, a as Chain, c as chainAssets, T as TransactionOptions } from './contracts-ss509umD.js';
2
+ import { C as ChainflipNetwork, a as Chain, A as Asset, c as chainAssets, T as TransactionOptions } from './contracts-ss509umD.js';
3
3
  export { d as Assets, e as ChainflipNetworks, b as Chains, f as assetChains, h as assetContractIds, g as assetDecimals, i as chainContractIds } from './contracts-ss509umD.js';
4
4
  import { z } from 'zod';
5
5
 
@@ -23,6 +23,32 @@ declare const getEnvironment: (urlOrNetwork: RpcConfig, params: void) => Promise
23
23
  DOT: bigint;
24
24
  };
25
25
  };
26
+ ingressFees: {
27
+ Bitcoin: {
28
+ BTC: bigint;
29
+ };
30
+ Ethereum: {
31
+ FLIP: bigint;
32
+ USDC: bigint;
33
+ ETH: bigint;
34
+ };
35
+ Polkadot: {
36
+ DOT: bigint;
37
+ };
38
+ };
39
+ egressFees: {
40
+ Bitcoin: {
41
+ BTC: bigint;
42
+ };
43
+ Ethereum: {
44
+ FLIP: bigint;
45
+ USDC: bigint;
46
+ ETH: bigint;
47
+ };
48
+ Polkadot: {
49
+ DOT: bigint;
50
+ };
51
+ };
26
52
  };
27
53
  swapping: {
28
54
  minimumSwapAmounts: {
@@ -3142,7 +3168,8 @@ declare const ccmMetadataSchema: z.ZodObject<{
3142
3168
  }>;
3143
3169
  type CcmMetadata = z.infer<typeof ccmMetadataSchema>;
3144
3170
  type SwapFee = {
3145
- type: 'LIQUIDITY' | 'NETWORK';
3171
+ type: 'LIQUIDITY' | 'NETWORK' | 'INGRESS' | 'EGRESS';
3172
+ chain: Chain;
3146
3173
  asset: Asset;
3147
3174
  amount: string;
3148
3175
  };
package/dist/swap.js CHANGED
@@ -6728,7 +6728,9 @@ var swappingEnvironment = z.object({
6728
6728
  });
6729
6729
  createRequest("cf_swapping_environment", swappingEnvironment);
6730
6730
  var ingressEgressEnvironment = z.object({
6731
- minimum_deposit_amounts: chainAssetNumberMap
6731
+ minimum_deposit_amounts: chainAssetNumberMap,
6732
+ ingress_fees: chainAssetNumberMap,
6733
+ egress_fees: chainAssetNumberMap
6732
6734
  });
6733
6735
  createRequest("cf_ingress_egress_environment", ingressEgressEnvironment);
6734
6736
  var rpcAsset = z.union([
@@ -6796,12 +6798,12 @@ var getEnvironment = createRequest("cf_environment", z.object({
6796
6798
 
6797
6799
  // ../shared/src/rpc/utils.ts
6798
6800
  init_enums();
6799
- var readAssetValue = /* @__PURE__ */ __name((minimums, asset) => {
6800
- const chainMinimums = minimums[asset.chain];
6801
+ var readAssetValue = /* @__PURE__ */ __name((value, asset) => {
6802
+ assertIsValidAssetAndChain(asset);
6803
+ const chainMinimums = value[asset.chain];
6801
6804
  return chainMinimums[asset.asset];
6802
6805
  }, "readAssetValue");
6803
6806
  var validateSwapAmount = /* @__PURE__ */ __name((swapEnv, asset, amount) => {
6804
- assertIsValidAssetAndChain(asset);
6805
6807
  const minAmount = readAssetValue(swapEnv.minimumSwapAmounts, asset);
6806
6808
  if (amount < minAmount) {
6807
6809
  return {
package/dist/swap.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getEnvironment, getVaultManagerContractAddress, approve, getTokenContractAddress, checkAllowance, Vault__factory, extractOverrides } from './chunk-VJRFC6HO.mjs';
1
+ import { getEnvironment, getVaultManagerContractAddress, approve, getTokenContractAddress, checkAllowance, Vault__factory, extractOverrides } from './chunk-UEUNQEDO.mjs';
2
2
  import { numericString, ethereumAddress, dotAddress, btcAddress, ccmMetadataSchema } from './chunk-LEMOY2A2.mjs';
3
3
  import { __name, z, Chains, Assets, ChainflipNetworks, __publicField, assert, assertIsValidAssetAndChain, isTokenCall, isTokenSwap, chainContractIds, assetContractIds, assetDecimals, isTestnet } from './chunk-O4RYZWBW.mjs';
4
4
  export { Assets, ChainflipNetworks, Chains, assetChains, assetContractIds, assetDecimals, chainAssets, chainContractIds } from './chunk-O4RYZWBW.mjs';
@@ -2175,12 +2175,12 @@ SuperJSON.registerSymbol;
2175
2175
  SuperJSON.allowErrorProps;
2176
2176
 
2177
2177
  // ../shared/src/rpc/utils.ts
2178
- var readAssetValue = /* @__PURE__ */ __name((minimums, asset) => {
2179
- const chainMinimums = minimums[asset.chain];
2178
+ var readAssetValue = /* @__PURE__ */ __name((value, asset) => {
2179
+ assertIsValidAssetAndChain(asset);
2180
+ const chainMinimums = value[asset.chain];
2180
2181
  return chainMinimums[asset.asset];
2181
2182
  }, "readAssetValue");
2182
2183
  var validateSwapAmount = /* @__PURE__ */ __name((swapEnv, asset, amount) => {
2183
- assertIsValidAssetAndChain(asset);
2184
2184
  const minAmount = readAssetValue(swapEnv.minimumSwapAmounts, asset);
2185
2185
  if (amount < minAmount) {
2186
2186
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/sdk",
3
- "version": "1.1.1-rc.0",
3
+ "version": "1.1.1-rc.1",
4
4
  "description": "",
5
5
  "exports": {
6
6
  "./swap": {