@chainflip/sdk 1.11.1 → 1.11.2

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/dist/swap.cjs CHANGED
@@ -659,12 +659,12 @@ var NetworkInfo = z6__default.default.object({
659
659
  ),
660
660
  cfBrokerCommissionBps: z6__default.default.number()
661
661
  });
662
- var ChainflipAsset = z6.z.enum(chainflip.chainflipAssets);
662
+ var ChainflipAsset2 = z6.z.enum(chainflip.chainflipAssets);
663
663
  var NetworkStatus = z6.z.object({
664
664
  assets: z6.z.object({
665
- deposit: z6.z.array(ChainflipAsset),
666
- destination: z6.z.array(ChainflipAsset),
667
- all: z6.z.array(ChainflipAsset)
665
+ deposit: z6.z.array(ChainflipAsset2),
666
+ destination: z6.z.array(ChainflipAsset2),
667
+ all: z6.z.array(ChainflipAsset2)
668
668
  }),
669
669
  boostDepositsEnabled: z6.z.boolean(),
670
670
  cfBrokerCommissionBps: z6.z.number()
@@ -885,8 +885,6 @@ var ADDRESSES = {
885
885
  };
886
886
  var ASSET_BLACKLIST = ["Dot"];
887
887
  var envSafeAssetBlacklist = (network) => isTestnet(network) ? ASSET_BLACKLIST : ASSET_BLACKLIST;
888
-
889
- // ../shared/src/dataStructures.ts
890
888
  var MultiCache = class {
891
889
  constructor(fetchers) {
892
890
  this.fetchers = fetchers;
@@ -1009,7 +1007,7 @@ var getChainData = (chain2, network, env) => ({
1009
1007
 
1010
1008
  // package.json
1011
1009
  var package_default = {
1012
- version: "1.11.1"};
1010
+ version: "1.11.2"};
1013
1011
 
1014
1012
  // src/swap/consts.ts
1015
1013
  var CF_SDK_VERSION_HEADERS = { "X-Chainflip-Sdk-Version": package_default.version };
package/dist/swap.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AssetAndChain, UncheckedAssetAndChain, ChainflipChain, ChainflipAsset, AssetOfChain, AssetSymbol, ChainflipNetwork, ChainAssetMap, ChainMap } from '@chainflip/utils/chainflip';
2
- export { AssetSymbol as Asset, ChainflipChain as Chain, ChainflipAsset as ChainflipId, ChainflipNetwork, UncheckedAssetAndChain, getInternalAsset as getChainflipId } from '@chainflip/utils/chainflip';
2
+ export { AssetSymbol as Asset, ChainflipNetwork, UncheckedAssetAndChain, getInternalAsset as getChainflipId } from '@chainflip/utils/chainflip';
3
3
  import { HexString } from '@chainflip/utils/types';
4
4
  import { z } from 'zod';
5
5
 
@@ -137,8 +137,12 @@ type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST' | 'REFU
137
137
  type PoolFee = Fee<'LIQUIDITY'>;
138
138
  type PaidFee = SwapFee | PoolFee;
139
139
  type PoolInfo = {
140
- baseAsset: AssetAndChain;
141
- quoteAsset: AssetAndChain;
140
+ baseAsset: Exclude<AssetAndChain, {
141
+ chain: 'Polkadot';
142
+ }>;
143
+ quoteAsset: Exclude<AssetAndChain, {
144
+ chain: 'Polkadot';
145
+ }>;
142
146
  fee: Omit<PoolFee, 'type'>;
143
147
  };
144
148
  type BoostedQuoteDetails = {
@@ -146,8 +150,12 @@ type BoostedQuoteDetails = {
146
150
  maxBoostFeeBps: number;
147
151
  };
148
152
  interface BaseQuoteDetails {
149
- srcAsset: AssetAndChain;
150
- destAsset: AssetAndChain;
153
+ srcAsset: Exclude<AssetAndChain, {
154
+ chain: 'Polkadot';
155
+ }>;
156
+ destAsset: Exclude<AssetAndChain, {
157
+ chain: 'Polkadot';
158
+ }>;
151
159
  isVaultSwap: boolean;
152
160
  isOnChain: boolean;
153
161
  ccmParams?: {
@@ -597,6 +605,11 @@ declare class SwapSDK {
597
605
  checkBoostEnabled(): Promise<boolean>;
598
606
  }
599
607
 
608
+ /**
609
+ * This file provides backwards compatibility for exports from before we started
610
+ * moving common stuff to the toolkit
611
+ */
612
+
600
613
  declare const ChainflipNetworks: {
601
614
  mainnet: "mainnet";
602
615
  backspin: "backspin";
@@ -633,5 +646,7 @@ declare const Assets: {
633
646
  BTC: "BTC";
634
647
  SOL: "SOL";
635
648
  };
649
+ type Chain = Exclude<ChainflipChain, 'Polkadot'>;
650
+ type InternalAsset = Exclude<ChainflipAsset, 'Dot'>;
636
651
 
637
- export { type AssetData, Assets, type BoostPoolDepth, type BoostQuote, type ChainData, InternalAssets as ChainflipIds, ChainflipNetworks, Chains, type ChainsAndAssets, type DCABoostQuote, type DCAQuote, type DepositAddressRequestV2, type DepositAddressResponseV2, type EncodeCfParametersRequest, type FillOrKillParamsWithSlippage, type Quote, type QuoteRequest, type QuoteResponseV2, type RegularQuote, SwapSDK, type SwapSDKOptions, type SwapStatusRequest, type SwapStatusResponseV2, type VaultSwapRequest, type VaultSwapResponse };
652
+ export { type AssetData, Assets, type BoostPoolDepth, type BoostQuote, type Chain, type ChainData, type InternalAsset as ChainflipId, InternalAssets as ChainflipIds, ChainflipNetworks, Chains, type ChainsAndAssets, type DCABoostQuote, type DCAQuote, type DepositAddressRequestV2, type DepositAddressResponseV2, type EncodeCfParametersRequest, type FillOrKillParamsWithSlippage, type Quote, type QuoteRequest, type QuoteResponseV2, type RegularQuote, SwapSDK, type SwapSDKOptions, type SwapStatusRequest, type SwapStatusResponseV2, type VaultSwapRequest, type VaultSwapResponse };
package/dist/swap.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AssetAndChain, UncheckedAssetAndChain, ChainflipChain, ChainflipAsset, AssetOfChain, AssetSymbol, ChainflipNetwork, ChainAssetMap, ChainMap } from '@chainflip/utils/chainflip';
2
- export { AssetSymbol as Asset, ChainflipChain as Chain, ChainflipAsset as ChainflipId, ChainflipNetwork, UncheckedAssetAndChain, getInternalAsset as getChainflipId } from '@chainflip/utils/chainflip';
2
+ export { AssetSymbol as Asset, ChainflipNetwork, UncheckedAssetAndChain, getInternalAsset as getChainflipId } from '@chainflip/utils/chainflip';
3
3
  import { HexString } from '@chainflip/utils/types';
4
4
  import { z } from 'zod';
5
5
 
@@ -137,8 +137,12 @@ type SwapFee = Fee<'NETWORK' | 'INGRESS' | 'EGRESS' | 'BROKER' | 'BOOST' | 'REFU
137
137
  type PoolFee = Fee<'LIQUIDITY'>;
138
138
  type PaidFee = SwapFee | PoolFee;
139
139
  type PoolInfo = {
140
- baseAsset: AssetAndChain;
141
- quoteAsset: AssetAndChain;
140
+ baseAsset: Exclude<AssetAndChain, {
141
+ chain: 'Polkadot';
142
+ }>;
143
+ quoteAsset: Exclude<AssetAndChain, {
144
+ chain: 'Polkadot';
145
+ }>;
142
146
  fee: Omit<PoolFee, 'type'>;
143
147
  };
144
148
  type BoostedQuoteDetails = {
@@ -146,8 +150,12 @@ type BoostedQuoteDetails = {
146
150
  maxBoostFeeBps: number;
147
151
  };
148
152
  interface BaseQuoteDetails {
149
- srcAsset: AssetAndChain;
150
- destAsset: AssetAndChain;
153
+ srcAsset: Exclude<AssetAndChain, {
154
+ chain: 'Polkadot';
155
+ }>;
156
+ destAsset: Exclude<AssetAndChain, {
157
+ chain: 'Polkadot';
158
+ }>;
151
159
  isVaultSwap: boolean;
152
160
  isOnChain: boolean;
153
161
  ccmParams?: {
@@ -597,6 +605,11 @@ declare class SwapSDK {
597
605
  checkBoostEnabled(): Promise<boolean>;
598
606
  }
599
607
 
608
+ /**
609
+ * This file provides backwards compatibility for exports from before we started
610
+ * moving common stuff to the toolkit
611
+ */
612
+
600
613
  declare const ChainflipNetworks: {
601
614
  mainnet: "mainnet";
602
615
  backspin: "backspin";
@@ -633,5 +646,7 @@ declare const Assets: {
633
646
  BTC: "BTC";
634
647
  SOL: "SOL";
635
648
  };
649
+ type Chain = Exclude<ChainflipChain, 'Polkadot'>;
650
+ type InternalAsset = Exclude<ChainflipAsset, 'Dot'>;
636
651
 
637
- export { type AssetData, Assets, type BoostPoolDepth, type BoostQuote, type ChainData, InternalAssets as ChainflipIds, ChainflipNetworks, Chains, type ChainsAndAssets, type DCABoostQuote, type DCAQuote, type DepositAddressRequestV2, type DepositAddressResponseV2, type EncodeCfParametersRequest, type FillOrKillParamsWithSlippage, type Quote, type QuoteRequest, type QuoteResponseV2, type RegularQuote, SwapSDK, type SwapSDKOptions, type SwapStatusRequest, type SwapStatusResponseV2, type VaultSwapRequest, type VaultSwapResponse };
652
+ export { type AssetData, Assets, type BoostPoolDepth, type BoostQuote, type Chain, type ChainData, type InternalAsset as ChainflipId, InternalAssets as ChainflipIds, ChainflipNetworks, Chains, type ChainsAndAssets, type DCABoostQuote, type DCAQuote, type DepositAddressRequestV2, type DepositAddressResponseV2, type EncodeCfParametersRequest, type FillOrKillParamsWithSlippage, type Quote, type QuoteRequest, type QuoteResponseV2, type RegularQuote, SwapSDK, type SwapSDKOptions, type SwapStatusRequest, type SwapStatusResponseV2, type VaultSwapRequest, type VaultSwapResponse };
package/dist/swap.js CHANGED
@@ -618,12 +618,12 @@ var NetworkInfo = z6.object({
618
618
  ),
619
619
  cfBrokerCommissionBps: z6.number()
620
620
  });
621
- var ChainflipAsset = z.enum(chainflipAssets);
621
+ var ChainflipAsset2 = z.enum(chainflipAssets);
622
622
  var NetworkStatus = z.object({
623
623
  assets: z.object({
624
- deposit: z.array(ChainflipAsset),
625
- destination: z.array(ChainflipAsset),
626
- all: z.array(ChainflipAsset)
624
+ deposit: z.array(ChainflipAsset2),
625
+ destination: z.array(ChainflipAsset2),
626
+ all: z.array(ChainflipAsset2)
627
627
  }),
628
628
  boostDepositsEnabled: z.boolean(),
629
629
  cfBrokerCommissionBps: z.number()
@@ -713,8 +713,6 @@ var apiContract = c.router(
713
713
  pathPrefix: "/api"
714
714
  }
715
715
  );
716
-
717
- // ../shared/src/dataStructures.ts
718
716
  var MultiCache = class {
719
717
  constructor(fetchers) {
720
718
  this.fetchers = fetchers;
@@ -815,7 +813,7 @@ var getChainData = (chain2, network, env) => ({
815
813
 
816
814
  // package.json
817
815
  var package_default = {
818
- version: "1.11.1"};
816
+ version: "1.11.2"};
819
817
 
820
818
  // src/swap/consts.ts
821
819
  var CF_SDK_VERSION_HEADERS = { "X-Chainflip-Sdk-Version": package_default.version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/sdk",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "",
5
5
  "exports": {
6
6
  "./swap": {
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@chainflip/bitcoin": "^1.2.7",
56
- "@chainflip/rpc": "~1.11.0",
56
+ "@chainflip/rpc": "~1.11.7",
57
57
  "@chainflip/solana": "^2.2.0",
58
58
  "@chainflip/utils": "^0.11.1",
59
59
  "@ts-rest/core": "^3.52.1",