@xswap-link/sdk 0.10.4 → 0.10.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @xswap-link/xswap-sdk
2
2
 
3
+ ## 0.10.6
4
+
5
+ ### Patch Changes
6
+
7
+ - b335c59: Add icon to selected dst tokens
8
+
9
+ ## 0.10.5
10
+
11
+ ### Patch Changes
12
+
13
+ - c9a64e8: Remove types used internally
14
+
3
15
  ## 0.10.4
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -87,11 +87,6 @@ type GenerateStakingCallsParams = {
87
87
  stakingFunParams: any[];
88
88
  };
89
89
 
90
- type AddReferralPayload = {
91
- code: string;
92
- address: string;
93
- };
94
-
95
90
  type GetTokenBalancesPayload = {
96
91
  walletAddress: string;
97
92
  };
@@ -200,6 +195,7 @@ type ModalIntegrationPayload = {
200
195
  };
201
196
  integratorFee?: number;
202
197
  integratorFeeReceiverAddress?: string;
198
+ highlightedDstTokens?: string[];
203
199
  };
204
200
 
205
201
  type WidgetIntegrationPayload = {
@@ -236,6 +232,7 @@ type WidgetIntegrationPayload = {
236
232
  };
237
233
  integratorFee?: number;
238
234
  integratorFeeReceiverAddress?: string;
235
+ highlightedDstTokens?: string[];
239
236
  };
240
237
 
241
238
  type Protocol = {
@@ -245,16 +242,6 @@ type Protocol = {
245
242
  toTokenAddress: string;
246
243
  };
247
244
 
248
- type Referral = {
249
- address: string;
250
- code: string;
251
- referrals: ReferralInfo[];
252
- };
253
- type ReferralInfo = {
254
- address: string;
255
- ipAddress: string;
256
- };
257
-
258
245
  type Route = {
259
246
  estAmountOut: string;
260
247
  minAmountOut: string;
@@ -427,6 +414,7 @@ type TxWidgetWCAttributes = {
427
414
  override: string | undefined;
428
415
  "integrator-fee": WidgetIntegrationPayload["integratorFee"] | undefined;
429
416
  "integrator-fee-receiver-address": WidgetIntegrationPayload["integratorFeeReceiverAddress"] | undefined;
417
+ "highlighted-dst-tokens": string | undefined;
430
418
  };
431
419
 
432
420
  declare global {
@@ -436,7 +424,7 @@ declare global {
436
424
  }
437
425
  }
438
426
  }
439
- declare const TxWidgetWCWrapped: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
427
+ declare const TxWidgetWCWrapped: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, highlightedDstTokens, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
440
428
 
441
429
  interface EvmHandlers {
442
430
  onSuccess?: (data: ContractReceipt) => void;
@@ -487,14 +475,14 @@ type TxStats = {
487
475
  cashback?: string;
488
476
  };
489
477
 
490
- declare const openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: ModalIntegrationPayload) => Promise<void>;
478
+ declare const openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, highlightedDstTokens, }: ModalIntegrationPayload) => Promise<void>;
491
479
 
492
480
  declare const TxWidgetWC: CustomElementConstructor;
493
481
 
494
482
  declare const XPay: {
495
- openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: ModalIntegrationPayload) => Promise<void>;
496
- TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
483
+ openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, highlightedDstTokens, }: ModalIntegrationPayload) => Promise<void>;
484
+ TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, highlightedDstTokens, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
497
485
  TxWidgetWC: CustomElementConstructor;
498
486
  };
499
487
 
500
- export { type AddReferralPayload, type Addresses, type BridgeToken, type BridgeTokensDictionary, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, type EnqueueTxProps, Environment, type GenerateStakingCallsParams, type GetLeaderboardChangePayload, type GetPricesPayload, type GetRoutePayload, type GetTokenBalancesPayload, type HistoryTransaction, type ImportedTokenData, type ModalIntegrationPayload, type ModalIntegrationStyles, type ModalIntegrationThemeStyles, type MonitoredTransaction, type Prices, type Protocol, type Referral, type ReferralInfo, type Route, type Token, type TokenBalances, type TokenOption, type TokenPrices, type Transaction, type TransactionHistory, type TransactionRequest, type TransactionStatus, type Transactions, type TxConfigFormData, type TxStats, TxStatus, type TxUIWrapperState, TxWidgetWCWrapped as TxWidget, TxWidgetWC, Web3Environment, type WidgetIntegrationPayload, XSwapCallType, type XSwapFee, type XSwapFees, XPay as default, openTransactionModal };
488
+ export { type Addresses, type BridgeToken, type BridgeTokensDictionary, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, type EnqueueTxProps, Environment, type GenerateStakingCallsParams, type GetLeaderboardChangePayload, type GetPricesPayload, type GetRoutePayload, type GetTokenBalancesPayload, type HistoryTransaction, type ImportedTokenData, type ModalIntegrationPayload, type ModalIntegrationStyles, type ModalIntegrationThemeStyles, type MonitoredTransaction, type Prices, type Protocol, type Route, type Token, type TokenBalances, type TokenOption, type TokenPrices, type Transaction, type TransactionHistory, type TransactionRequest, type TransactionStatus, type Transactions, type TxConfigFormData, type TxStats, TxStatus, type TxUIWrapperState, TxWidgetWCWrapped as TxWidget, TxWidgetWC, Web3Environment, type WidgetIntegrationPayload, XSwapCallType, type XSwapFee, type XSwapFees, XPay as default, openTransactionModal };
package/dist/index.d.ts CHANGED
@@ -87,11 +87,6 @@ type GenerateStakingCallsParams = {
87
87
  stakingFunParams: any[];
88
88
  };
89
89
 
90
- type AddReferralPayload = {
91
- code: string;
92
- address: string;
93
- };
94
-
95
90
  type GetTokenBalancesPayload = {
96
91
  walletAddress: string;
97
92
  };
@@ -200,6 +195,7 @@ type ModalIntegrationPayload = {
200
195
  };
201
196
  integratorFee?: number;
202
197
  integratorFeeReceiverAddress?: string;
198
+ highlightedDstTokens?: string[];
203
199
  };
204
200
 
205
201
  type WidgetIntegrationPayload = {
@@ -236,6 +232,7 @@ type WidgetIntegrationPayload = {
236
232
  };
237
233
  integratorFee?: number;
238
234
  integratorFeeReceiverAddress?: string;
235
+ highlightedDstTokens?: string[];
239
236
  };
240
237
 
241
238
  type Protocol = {
@@ -245,16 +242,6 @@ type Protocol = {
245
242
  toTokenAddress: string;
246
243
  };
247
244
 
248
- type Referral = {
249
- address: string;
250
- code: string;
251
- referrals: ReferralInfo[];
252
- };
253
- type ReferralInfo = {
254
- address: string;
255
- ipAddress: string;
256
- };
257
-
258
245
  type Route = {
259
246
  estAmountOut: string;
260
247
  minAmountOut: string;
@@ -427,6 +414,7 @@ type TxWidgetWCAttributes = {
427
414
  override: string | undefined;
428
415
  "integrator-fee": WidgetIntegrationPayload["integratorFee"] | undefined;
429
416
  "integrator-fee-receiver-address": WidgetIntegrationPayload["integratorFeeReceiverAddress"] | undefined;
417
+ "highlighted-dst-tokens": string | undefined;
430
418
  };
431
419
 
432
420
  declare global {
@@ -436,7 +424,7 @@ declare global {
436
424
  }
437
425
  }
438
426
  }
439
- declare const TxWidgetWCWrapped: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
427
+ declare const TxWidgetWCWrapped: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, highlightedDstTokens, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
440
428
 
441
429
  interface EvmHandlers {
442
430
  onSuccess?: (data: ContractReceipt) => void;
@@ -487,14 +475,14 @@ type TxStats = {
487
475
  cashback?: string;
488
476
  };
489
477
 
490
- declare const openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: ModalIntegrationPayload) => Promise<void>;
478
+ declare const openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, highlightedDstTokens, }: ModalIntegrationPayload) => Promise<void>;
491
479
 
492
480
  declare const TxWidgetWC: CustomElementConstructor;
493
481
 
494
482
  declare const XPay: {
495
- openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: ModalIntegrationPayload) => Promise<void>;
496
- TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
483
+ openTransactionModal: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, highlightedDstTokens, }: ModalIntegrationPayload) => Promise<void>;
484
+ TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, override, integratorFee, integratorFeeReceiverAddress, highlightedDstTokens, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
497
485
  TxWidgetWC: CustomElementConstructor;
498
486
  };
499
487
 
500
- export { type AddReferralPayload, type Addresses, type BridgeToken, type BridgeTokensDictionary, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, type EnqueueTxProps, Environment, type GenerateStakingCallsParams, type GetLeaderboardChangePayload, type GetPricesPayload, type GetRoutePayload, type GetTokenBalancesPayload, type HistoryTransaction, type ImportedTokenData, type ModalIntegrationPayload, type ModalIntegrationStyles, type ModalIntegrationThemeStyles, type MonitoredTransaction, type Prices, type Protocol, type Referral, type ReferralInfo, type Route, type Token, type TokenBalances, type TokenOption, type TokenPrices, type Transaction, type TransactionHistory, type TransactionRequest, type TransactionStatus, type Transactions, type TxConfigFormData, type TxStats, TxStatus, type TxUIWrapperState, TxWidgetWCWrapped as TxWidget, TxWidgetWC, Web3Environment, type WidgetIntegrationPayload, XSwapCallType, type XSwapFee, type XSwapFees, XPay as default, openTransactionModal };
488
+ export { type Addresses, type BridgeToken, type BridgeTokensDictionary, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, type EnqueueTxProps, Environment, type GenerateStakingCallsParams, type GetLeaderboardChangePayload, type GetPricesPayload, type GetRoutePayload, type GetTokenBalancesPayload, type HistoryTransaction, type ImportedTokenData, type ModalIntegrationPayload, type ModalIntegrationStyles, type ModalIntegrationThemeStyles, type MonitoredTransaction, type Prices, type Protocol, type Route, type Token, type TokenBalances, type TokenOption, type TokenPrices, type Transaction, type TransactionHistory, type TransactionRequest, type TransactionStatus, type Transactions, type TxConfigFormData, type TxStats, TxStatus, type TxUIWrapperState, TxWidgetWCWrapped as TxWidget, TxWidgetWC, Web3Environment, type WidgetIntegrationPayload, XSwapCallType, type XSwapFee, type XSwapFees, XPay as default, openTransactionModal };