@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 +12 -0
- package/dist/index.d.mts +8 -20
- package/dist/index.d.ts +8 -20
- package/dist/index.global.js +4866 -221
- 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/index.ts +0 -1
- package/src/models/payloads/ModalIntegrationPayload.ts +1 -0
- package/src/models/payloads/WidgetIntegrationPayload.ts +1 -0
- package/src/models/payloads/index.ts +0 -1
- package/src/services/integrations/transactions.ts +2 -0
- package/src/models/Referral.ts +0 -10
- package/src/models/payloads/AddReferralPayload.ts +0 -4
package/CHANGELOG.md
CHANGED
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
|
|
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
|
|
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 };
|