@xswap-link/sdk 0.9.0 → 0.9.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @xswap-link/xswap-sdk
2
2
 
3
+ ## 0.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b098740: feat: add onWalletConnect callback"
8
+
9
+ ## 0.9.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 615902c: Feat: add token values in token picker
14
+
3
15
  ## 0.9.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -106,7 +106,7 @@ type GetLeaderboardChangePayload = {
106
106
  };
107
107
 
108
108
  type GetPricesPayload = {
109
- chainId: string;
109
+ chainId: string[];
110
110
  currency?: string;
111
111
  };
112
112
 
@@ -193,6 +193,7 @@ type ModalIntegrationPayload = {
193
193
  symbol: string;
194
194
  } | undefined) => void;
195
195
  onSrcChainChange?: (chain: string | undefined) => void;
196
+ onConnectWallet?: () => void;
196
197
  bridge?: boolean;
197
198
  };
198
199
 
@@ -223,6 +224,7 @@ type WidgetIntegrationPayload = {
223
224
  symbol: string;
224
225
  } | undefined) => void;
225
226
  onSrcChainChange?: (chain: string | undefined) => void;
227
+ onConnectWallet?: () => void;
226
228
  bridge?: boolean;
227
229
  };
228
230
 
@@ -311,7 +313,9 @@ type Prices = {
311
313
  prices: TokenPrices;
312
314
  };
313
315
  type TokenPrices = {
314
- [tokenAddress: string]: string;
316
+ [chainId: string]: {
317
+ [tokenAddress: string]: string;
318
+ };
315
319
  };
316
320
  type TokenBalances = {
317
321
  [tokenAddress: string]: BigNumber | undefined;
@@ -417,7 +421,7 @@ declare global {
417
421
  }
418
422
  }
419
423
  }
420
- declare const TxWidgetWCWrapped: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
424
+ 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, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
421
425
 
422
426
  interface EvmHandlers {
423
427
  onSuccess?: (data: ContractReceipt) => void;
@@ -479,7 +483,7 @@ declare const TxWidgetWC: CustomElementConstructor;
479
483
 
480
484
  declare const XPay: {
481
485
  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>;
482
- TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
486
+ TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
483
487
  TxWidgetWC: CustomElementConstructor;
484
488
  };
485
489
 
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ type GetLeaderboardChangePayload = {
106
106
  };
107
107
 
108
108
  type GetPricesPayload = {
109
- chainId: string;
109
+ chainId: string[];
110
110
  currency?: string;
111
111
  };
112
112
 
@@ -193,6 +193,7 @@ type ModalIntegrationPayload = {
193
193
  symbol: string;
194
194
  } | undefined) => void;
195
195
  onSrcChainChange?: (chain: string | undefined) => void;
196
+ onConnectWallet?: () => void;
196
197
  bridge?: boolean;
197
198
  };
198
199
 
@@ -223,6 +224,7 @@ type WidgetIntegrationPayload = {
223
224
  symbol: string;
224
225
  } | undefined) => void;
225
226
  onSrcChainChange?: (chain: string | undefined) => void;
227
+ onConnectWallet?: () => void;
226
228
  bridge?: boolean;
227
229
  };
228
230
 
@@ -311,7 +313,9 @@ type Prices = {
311
313
  prices: TokenPrices;
312
314
  };
313
315
  type TokenPrices = {
314
- [tokenAddress: string]: string;
316
+ [chainId: string]: {
317
+ [tokenAddress: string]: string;
318
+ };
315
319
  };
316
320
  type TokenBalances = {
317
321
  [tokenAddress: string]: BigNumber | undefined;
@@ -417,7 +421,7 @@ declare global {
417
421
  }
418
422
  }
419
423
  }
420
- declare const TxWidgetWCWrapped: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
424
+ 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, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
421
425
 
422
426
  interface EvmHandlers {
423
427
  onSuccess?: (data: ContractReceipt) => void;
@@ -479,7 +483,7 @@ declare const TxWidgetWC: CustomElementConstructor;
479
483
 
480
484
  declare const XPay: {
481
485
  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>;
482
- TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, bridge, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
486
+ TxWidget: ({ integratorId, dstChain, dstToken, srcChain, srcToken, customContractCalls, desc, dstDisplayToken, lightTheme, defaultWalletPicker, styles, onPendingTransactionsChange, dstTokenLocked, dstChainLocked, srcTokenLocked, srcChainLocked, onDstTokenChange, onDstChainChange, onSrcTokenChange, onSrcChainChange, onConnectWallet, bridge, }: WidgetIntegrationPayload) => react_jsx_runtime.JSX.Element;
483
487
  TxWidgetWC: CustomElementConstructor;
484
488
  };
485
489