@xswap-link/sdk 0.10.5 → 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 +6 -0
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.global.js +4866 -224
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/package.json +2 -2
- package/src/assets/icons/StarsIcon.tsx +18 -0
- package/src/assets/icons/index.ts +1 -0
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/TokenItem/index.tsx +20 -2
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx +1 -0
- package/src/components/TxConfigForm/index.tsx +3 -0
- package/src/components/TxWidgetWC/index.tsx +4 -0
- package/src/components/TxWidgetWCWrapped/index.tsx +2 -0
- package/src/models/payloads/ModalIntegrationPayload.ts +1 -0
- package/src/models/payloads/WidgetIntegrationPayload.ts +1 -0
- package/src/services/integrations/transactions.ts +2 -0
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -195,6 +195,7 @@ type ModalIntegrationPayload = {
|
|
|
195
195
|
};
|
|
196
196
|
integratorFee?: number;
|
|
197
197
|
integratorFeeReceiverAddress?: string;
|
|
198
|
+
highlightedDstTokens?: string[];
|
|
198
199
|
};
|
|
199
200
|
|
|
200
201
|
type WidgetIntegrationPayload = {
|
|
@@ -231,6 +232,7 @@ type WidgetIntegrationPayload = {
|
|
|
231
232
|
};
|
|
232
233
|
integratorFee?: number;
|
|
233
234
|
integratorFeeReceiverAddress?: string;
|
|
235
|
+
highlightedDstTokens?: string[];
|
|
234
236
|
};
|
|
235
237
|
|
|
236
238
|
type Protocol = {
|
|
@@ -412,6 +414,7 @@ type TxWidgetWCAttributes = {
|
|
|
412
414
|
override: string | undefined;
|
|
413
415
|
"integrator-fee": WidgetIntegrationPayload["integratorFee"] | undefined;
|
|
414
416
|
"integrator-fee-receiver-address": WidgetIntegrationPayload["integratorFeeReceiverAddress"] | undefined;
|
|
417
|
+
"highlighted-dst-tokens": string | undefined;
|
|
415
418
|
};
|
|
416
419
|
|
|
417
420
|
declare global {
|
|
@@ -421,7 +424,7 @@ declare global {
|
|
|
421
424
|
}
|
|
422
425
|
}
|
|
423
426
|
}
|
|
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, 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;
|
|
425
428
|
|
|
426
429
|
interface EvmHandlers {
|
|
427
430
|
onSuccess?: (data: ContractReceipt) => void;
|
|
@@ -472,13 +475,13 @@ type TxStats = {
|
|
|
472
475
|
cashback?: string;
|
|
473
476
|
};
|
|
474
477
|
|
|
475
|
-
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>;
|
|
476
479
|
|
|
477
480
|
declare const TxWidgetWC: CustomElementConstructor;
|
|
478
481
|
|
|
479
482
|
declare const XPay: {
|
|
480
|
-
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>;
|
|
481
|
-
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;
|
|
482
485
|
TxWidgetWC: CustomElementConstructor;
|
|
483
486
|
};
|
|
484
487
|
|
package/dist/index.d.ts
CHANGED
|
@@ -195,6 +195,7 @@ type ModalIntegrationPayload = {
|
|
|
195
195
|
};
|
|
196
196
|
integratorFee?: number;
|
|
197
197
|
integratorFeeReceiverAddress?: string;
|
|
198
|
+
highlightedDstTokens?: string[];
|
|
198
199
|
};
|
|
199
200
|
|
|
200
201
|
type WidgetIntegrationPayload = {
|
|
@@ -231,6 +232,7 @@ type WidgetIntegrationPayload = {
|
|
|
231
232
|
};
|
|
232
233
|
integratorFee?: number;
|
|
233
234
|
integratorFeeReceiverAddress?: string;
|
|
235
|
+
highlightedDstTokens?: string[];
|
|
234
236
|
};
|
|
235
237
|
|
|
236
238
|
type Protocol = {
|
|
@@ -412,6 +414,7 @@ type TxWidgetWCAttributes = {
|
|
|
412
414
|
override: string | undefined;
|
|
413
415
|
"integrator-fee": WidgetIntegrationPayload["integratorFee"] | undefined;
|
|
414
416
|
"integrator-fee-receiver-address": WidgetIntegrationPayload["integratorFeeReceiverAddress"] | undefined;
|
|
417
|
+
"highlighted-dst-tokens": string | undefined;
|
|
415
418
|
};
|
|
416
419
|
|
|
417
420
|
declare global {
|
|
@@ -421,7 +424,7 @@ declare global {
|
|
|
421
424
|
}
|
|
422
425
|
}
|
|
423
426
|
}
|
|
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, 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;
|
|
425
428
|
|
|
426
429
|
interface EvmHandlers {
|
|
427
430
|
onSuccess?: (data: ContractReceipt) => void;
|
|
@@ -472,13 +475,13 @@ type TxStats = {
|
|
|
472
475
|
cashback?: string;
|
|
473
476
|
};
|
|
474
477
|
|
|
475
|
-
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>;
|
|
476
479
|
|
|
477
480
|
declare const TxWidgetWC: CustomElementConstructor;
|
|
478
481
|
|
|
479
482
|
declare const XPay: {
|
|
480
|
-
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>;
|
|
481
|
-
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;
|
|
482
485
|
TxWidgetWC: CustomElementConstructor;
|
|
483
486
|
};
|
|
484
487
|
|