@chainflip/sdk 1.1.0 → 1.1.1-rc.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.
@@ -2106,7 +2106,10 @@ var Vault__factory = _Vault__factory;
2106
2106
 
2107
2107
  // ../shared/src/consts.ts
2108
2108
  ({
2109
- [ChainflipNetworks.perseverance]: 100
2109
+ [ChainflipNetworks.backspin]: 1e3,
2110
+ [ChainflipNetworks.sisyphos]: 1e3,
2111
+ [ChainflipNetworks.perseverance]: 1e3,
2112
+ [ChainflipNetworks.mainnet]: 1e3
2110
2113
  });
2111
2114
  var GOERLI_USDC_CONTRACT_ADDRESS = "0x07865c6E87B9F70255377e024ace6630C1Eaa37F";
2112
2115
  var ADDRESSES = {
package/dist/funding.js CHANGED
@@ -833,7 +833,10 @@ var ChainflipNetworks = arrayToMap([
833
833
 
834
834
  // ../shared/src/consts.ts
835
835
  ({
836
- [ChainflipNetworks.perseverance]: 100
836
+ [ChainflipNetworks.backspin]: 1e3,
837
+ [ChainflipNetworks.sisyphos]: 1e3,
838
+ [ChainflipNetworks.perseverance]: 1e3,
839
+ [ChainflipNetworks.mainnet]: 1e3
837
840
  });
838
841
  var GOERLI_USDC_CONTRACT_ADDRESS = "0x07865c6E87B9F70255377e024ace6630C1Eaa37F";
839
842
  var ADDRESSES = {
package/dist/funding.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-LBKEYET5.mjs';
1
+ import { getFlipBalance, getFundingEnvironment, getStateChainGatewayContractAddress, approve, getTokenContractAddress, checkAllowance, extractOverrides, StateChainGateway__factory } from './chunk-VJRFC6HO.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
@@ -3141,15 +3141,15 @@ declare const ccmMetadataSchema: z.ZodObject<{
3141
3141
  gasBudget: string;
3142
3142
  }>;
3143
3143
  type CcmMetadata = z.infer<typeof ccmMetadataSchema>;
3144
- type QuoteFee = {
3145
- type: 'liquidity' | 'network';
3144
+ type SwapFee = {
3145
+ type: 'LIQUIDITY' | 'NETWORK';
3146
3146
  asset: Asset;
3147
3147
  amount: string;
3148
3148
  };
3149
3149
  type QuoteQueryResponse = {
3150
3150
  intermediateAmount?: string;
3151
3151
  egressAmount: string;
3152
- includedFees: QuoteFee[];
3152
+ includedFees: SwapFee[];
3153
3153
  };
3154
3154
 
3155
3155
  interface ChainData {
@@ -3243,6 +3243,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3243
3243
  egressAmount: string;
3244
3244
  egressScheduledAt: number;
3245
3245
  egressScheduledBlockIndex: string;
3246
+ feesPaid: SwapFee[];
3246
3247
  } | {
3247
3248
  state: 'BROADCAST_REQUESTED';
3248
3249
  swapId: string;
@@ -3255,6 +3256,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3255
3256
  egressAmount: string;
3256
3257
  egressScheduledAt: number;
3257
3258
  egressScheduledBlockIndex: string;
3259
+ feesPaid: SwapFee[];
3258
3260
  broadcastRequestedAt: number;
3259
3261
  broadcastRequestedBlockIndex: string;
3260
3262
  } | {
@@ -3269,6 +3271,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3269
3271
  egressAmount: string;
3270
3272
  egressScheduledAt: number;
3271
3273
  egressScheduledBlockIndex: string;
3274
+ feesPaid: SwapFee[];
3272
3275
  broadcastRequestedAt: number;
3273
3276
  broadcastRequestedBlockIndex: string;
3274
3277
  broadcastAbortedAt: number;
@@ -3285,6 +3288,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3285
3288
  egressAmount: string;
3286
3289
  egressScheduledAt: number;
3287
3290
  egressScheduledBlockIndex: string;
3291
+ feesPaid: SwapFee[];
3288
3292
  broadcastRequestedAt: number;
3289
3293
  broadcastRequestedBlockIndex: string;
3290
3294
  broadcastSucceededAt: number;
@@ -3297,7 +3301,7 @@ type RequestOptions = {
3297
3301
 
3298
3302
  type TransactionHash = `0x${string}`;
3299
3303
  type SwapSDKOptions = {
3300
- network?: Exclude<ChainflipNetwork, 'mainnet'>;
3304
+ network?: ChainflipNetwork;
3301
3305
  signer?: Signer;
3302
3306
  backendUrl?: string;
3303
3307
  broker?: {
package/dist/swap.d.ts CHANGED
@@ -3141,15 +3141,15 @@ declare const ccmMetadataSchema: z.ZodObject<{
3141
3141
  gasBudget: string;
3142
3142
  }>;
3143
3143
  type CcmMetadata = z.infer<typeof ccmMetadataSchema>;
3144
- type QuoteFee = {
3145
- type: 'liquidity' | 'network';
3144
+ type SwapFee = {
3145
+ type: 'LIQUIDITY' | 'NETWORK';
3146
3146
  asset: Asset;
3147
3147
  amount: string;
3148
3148
  };
3149
3149
  type QuoteQueryResponse = {
3150
3150
  intermediateAmount?: string;
3151
3151
  egressAmount: string;
3152
- includedFees: QuoteFee[];
3152
+ includedFees: SwapFee[];
3153
3153
  };
3154
3154
 
3155
3155
  interface ChainData {
@@ -3243,6 +3243,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3243
3243
  egressAmount: string;
3244
3244
  egressScheduledAt: number;
3245
3245
  egressScheduledBlockIndex: string;
3246
+ feesPaid: SwapFee[];
3246
3247
  } | {
3247
3248
  state: 'BROADCAST_REQUESTED';
3248
3249
  swapId: string;
@@ -3255,6 +3256,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3255
3256
  egressAmount: string;
3256
3257
  egressScheduledAt: number;
3257
3258
  egressScheduledBlockIndex: string;
3259
+ feesPaid: SwapFee[];
3258
3260
  broadcastRequestedAt: number;
3259
3261
  broadcastRequestedBlockIndex: string;
3260
3262
  } | {
@@ -3269,6 +3271,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3269
3271
  egressAmount: string;
3270
3272
  egressScheduledAt: number;
3271
3273
  egressScheduledBlockIndex: string;
3274
+ feesPaid: SwapFee[];
3272
3275
  broadcastRequestedAt: number;
3273
3276
  broadcastRequestedBlockIndex: string;
3274
3277
  broadcastAbortedAt: number;
@@ -3285,6 +3288,7 @@ type SwapStatusResponse = CommonStatusFields & ({
3285
3288
  egressAmount: string;
3286
3289
  egressScheduledAt: number;
3287
3290
  egressScheduledBlockIndex: string;
3291
+ feesPaid: SwapFee[];
3288
3292
  broadcastRequestedAt: number;
3289
3293
  broadcastRequestedBlockIndex: string;
3290
3294
  broadcastSucceededAt: number;
@@ -3297,7 +3301,7 @@ type RequestOptions = {
3297
3301
 
3298
3302
  type TransactionHash = `0x${string}`;
3299
3303
  type SwapSDKOptions = {
3300
- network?: Exclude<ChainflipNetwork, 'mainnet'>;
3304
+ network?: ChainflipNetwork;
3301
3305
  signer?: Signer;
3302
3306
  backendUrl?: string;
3303
3307
  broker?: {
package/dist/swap.js CHANGED
@@ -8215,7 +8215,10 @@ var Vault__factory = _Vault__factory;
8215
8215
  // ../shared/src/consts.ts
8216
8216
  init_enums();
8217
8217
  ({
8218
- [exports.ChainflipNetworks.perseverance]: 100
8218
+ [exports.ChainflipNetworks.backspin]: 1e3,
8219
+ [exports.ChainflipNetworks.sisyphos]: 1e3,
8220
+ [exports.ChainflipNetworks.perseverance]: 1e3,
8221
+ [exports.ChainflipNetworks.mainnet]: 1e3
8219
8222
  });
8220
8223
  var GOERLI_USDC_CONTRACT_ADDRESS = "0x07865c6E87B9F70255377e024ace6630C1Eaa37F";
8221
8224
  var ADDRESSES = {
@@ -8347,7 +8350,8 @@ init_enums();
8347
8350
  var BACKEND_SERVICE_URLS = {
8348
8351
  [exports.ChainflipNetworks.backspin]: "https://chainflip-swap-backspin.staging/",
8349
8352
  [exports.ChainflipNetworks.sisyphos]: "https://chainflip-swap.staging/",
8350
- [exports.ChainflipNetworks.perseverance]: "https://chainflip-swap-perseverance.chainflip.io/"
8353
+ [exports.ChainflipNetworks.perseverance]: "https://chainflip-swap-perseverance.chainflip.io/",
8354
+ [exports.ChainflipNetworks.mainnet]: "https://chainflip-swap.chainflip.io/"
8351
8355
  };
8352
8356
 
8353
8357
  // src/swap/services/ApiService.ts
package/dist/swap.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getEnvironment, getVaultManagerContractAddress, approve, getTokenContractAddress, checkAllowance, Vault__factory, extractOverrides } from './chunk-LBKEYET5.mjs';
1
+ import { getEnvironment, getVaultManagerContractAddress, approve, getTokenContractAddress, checkAllowance, Vault__factory, extractOverrides } from './chunk-VJRFC6HO.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';
@@ -2348,7 +2348,8 @@ var approveVault = /* @__PURE__ */ __name(async (params, networkOpts, txOpts) =>
2348
2348
  var BACKEND_SERVICE_URLS = {
2349
2349
  [ChainflipNetworks.backspin]: "https://chainflip-swap-backspin.staging/",
2350
2350
  [ChainflipNetworks.sisyphos]: "https://chainflip-swap.staging/",
2351
- [ChainflipNetworks.perseverance]: "https://chainflip-swap-perseverance.chainflip.io/"
2351
+ [ChainflipNetworks.perseverance]: "https://chainflip-swap-perseverance.chainflip.io/",
2352
+ [ChainflipNetworks.mainnet]: "https://chainflip-swap.chainflip.io/"
2352
2353
  };
2353
2354
 
2354
2355
  // src/swap/assets.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/sdk",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-rc.0",
4
4
  "description": "",
5
5
  "exports": {
6
6
  "./swap": {