@xswap-link/sdk 0.2.2 → 0.2.4
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 +15 -0
- package/dist/index.css +7 -14
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +466 -388
- package/dist/index.mjs +405 -327
- package/package.json +1 -1
- package/src/components/TxConfigForm/FeesDetails.tsx +44 -30
- package/src/components/TxConfigForm/Form.tsx +9 -2
- package/src/components/TxConfigForm/Summary.tsx +15 -10
- package/src/components/TxConfigForm/SwapPanel.tsx +4 -0
- package/src/components/TxConfigForm/TopBar.tsx +8 -3
- package/src/components/TxConfigForm/UsdPrice.tsx +14 -1
- package/src/components/TxConfigForm/index.tsx +5 -10
- package/src/components/WaitingForInit/index.tsx +20 -0
- package/src/config/init.tsx +75 -0
- package/src/constants/index.ts +1 -0
- package/src/models/Route.ts +6 -2
- package/src/utils/contracts.ts +2 -4
- package/tailwind.config.js +2 -2
- package/src/config/init.ts +0 -31
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @xswap-link/xswap-sdk
|
|
2
2
|
|
|
3
|
+
## 0.2.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c07f86d: add custom TransactionRequest type
|
|
8
|
+
- 108928b: express delivery limit validation
|
|
9
|
+
- 909851c: add initialization indicator
|
|
10
|
+
- 9ecf3bc: fix mobile version styling
|
|
11
|
+
|
|
12
|
+
## 0.2.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 867df58: fix api/sdk/css request params
|
|
17
|
+
|
|
3
18
|
## 0.2.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.css
CHANGED
|
@@ -358,9 +358,6 @@ video {
|
|
|
358
358
|
.top-4 {
|
|
359
359
|
top: 1rem;
|
|
360
360
|
}
|
|
361
|
-
.top-7 {
|
|
362
|
-
top: 1.75rem;
|
|
363
|
-
}
|
|
364
361
|
.top-\[46px\] {
|
|
365
362
|
top: 46px;
|
|
366
363
|
}
|
|
@@ -565,9 +562,6 @@ video {
|
|
|
565
562
|
.w-full {
|
|
566
563
|
width: 100%;
|
|
567
564
|
}
|
|
568
|
-
.w-x_mobile {
|
|
569
|
-
width: 320px;
|
|
570
|
-
}
|
|
571
565
|
.min-w-60 {
|
|
572
566
|
min-width: 15rem;
|
|
573
567
|
}
|
|
@@ -904,12 +898,6 @@ video {
|
|
|
904
898
|
padding-top: 1rem;
|
|
905
899
|
padding-bottom: 1rem;
|
|
906
900
|
}
|
|
907
|
-
.pr-8 {
|
|
908
|
-
padding-right: 2rem;
|
|
909
|
-
}
|
|
910
|
-
.pt-2 {
|
|
911
|
-
padding-top: 0.5rem;
|
|
912
|
-
}
|
|
913
901
|
.text-left {
|
|
914
902
|
text-align: left;
|
|
915
903
|
}
|
|
@@ -1120,8 +1108,8 @@ video {
|
|
|
1120
1108
|
.sm\:gap-5 {
|
|
1121
1109
|
gap: 1.25rem;
|
|
1122
1110
|
}
|
|
1123
|
-
.sm\:
|
|
1124
|
-
padding
|
|
1111
|
+
.sm\:p-4 {
|
|
1112
|
+
padding: 1rem;
|
|
1125
1113
|
}
|
|
1126
1114
|
.sm\:text-3xl {
|
|
1127
1115
|
font-size: 1.875rem;
|
|
@@ -1140,3 +1128,8 @@ video {
|
|
|
1140
1128
|
line-height: 1.75rem;
|
|
1141
1129
|
}
|
|
1142
1130
|
}
|
|
1131
|
+
@media (min-width: 768px) {
|
|
1132
|
+
.md\:p-4 {
|
|
1133
|
+
padding: 1rem;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BigNumber } from 'ethers';
|
|
2
|
-
import { TransactionRequest } from '@ethersproject/providers';
|
|
3
2
|
|
|
4
3
|
type Addresses = {
|
|
5
4
|
[chainId: string]: Contracts;
|
|
@@ -175,6 +174,11 @@ type Transactions = {
|
|
|
175
174
|
approve?: TransactionRequest;
|
|
176
175
|
swap: TransactionRequest;
|
|
177
176
|
};
|
|
177
|
+
type TransactionRequest = {
|
|
178
|
+
to: string;
|
|
179
|
+
data: string;
|
|
180
|
+
value: string;
|
|
181
|
+
};
|
|
178
182
|
type XSwapFees = {
|
|
179
183
|
ccipFee?: string;
|
|
180
184
|
xSwapFee: XSwapFee;
|
|
@@ -255,4 +259,4 @@ declare const monitorTransactionStatus: (txChainId: string, txHash: string) => P
|
|
|
255
259
|
|
|
256
260
|
declare const getSwapTx: ({ dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
|
|
257
261
|
|
|
258
|
-
export { type AddReferralPayload, type Addresses, type BridgeToken, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, Environment, type GenerateStakingCallsParams, type GetPricesPayload, type GetRoutePayload, type GetSwapTxPayload, type HistoryTransaction, type MonitoredTransaction, type Prices, type Protocol, type Referral, type ReferralInfo, type Route, type Token, type TokenBalances, type TokenPrices, type Transaction, type TransactionHistory, type TransactionStatus, type Transactions, type TxConfigFormData, Web3Environment, XSwapCallType, type XSwapConfig, type XSwapFee, type XSwapFees, getSwapTx, monitorTransactionStatus };
|
|
262
|
+
export { type AddReferralPayload, type Addresses, type BridgeToken, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, Environment, type GenerateStakingCallsParams, type GetPricesPayload, type GetRoutePayload, type GetSwapTxPayload, type HistoryTransaction, type MonitoredTransaction, type Prices, type Protocol, type Referral, type ReferralInfo, type Route, type Token, type TokenBalances, type TokenPrices, type Transaction, type TransactionHistory, type TransactionRequest, type TransactionStatus, type Transactions, type TxConfigFormData, Web3Environment, XSwapCallType, type XSwapConfig, type XSwapFee, type XSwapFees, getSwapTx, monitorTransactionStatus };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BigNumber } from 'ethers';
|
|
2
|
-
import { TransactionRequest } from '@ethersproject/providers';
|
|
3
2
|
|
|
4
3
|
type Addresses = {
|
|
5
4
|
[chainId: string]: Contracts;
|
|
@@ -175,6 +174,11 @@ type Transactions = {
|
|
|
175
174
|
approve?: TransactionRequest;
|
|
176
175
|
swap: TransactionRequest;
|
|
177
176
|
};
|
|
177
|
+
type TransactionRequest = {
|
|
178
|
+
to: string;
|
|
179
|
+
data: string;
|
|
180
|
+
value: string;
|
|
181
|
+
};
|
|
178
182
|
type XSwapFees = {
|
|
179
183
|
ccipFee?: string;
|
|
180
184
|
xSwapFee: XSwapFee;
|
|
@@ -255,4 +259,4 @@ declare const monitorTransactionStatus: (txChainId: string, txHash: string) => P
|
|
|
255
259
|
|
|
256
260
|
declare const getSwapTx: ({ dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
|
|
257
261
|
|
|
258
|
-
export { type AddReferralPayload, type Addresses, type BridgeToken, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, Environment, type GenerateStakingCallsParams, type GetPricesPayload, type GetRoutePayload, type GetSwapTxPayload, type HistoryTransaction, type MonitoredTransaction, type Prices, type Protocol, type Referral, type ReferralInfo, type Route, type Token, type TokenBalances, type TokenPrices, type Transaction, type TransactionHistory, type TransactionStatus, type Transactions, type TxConfigFormData, Web3Environment, XSwapCallType, type XSwapConfig, type XSwapFee, type XSwapFees, getSwapTx, monitorTransactionStatus };
|
|
262
|
+
export { type AddReferralPayload, type Addresses, type BridgeToken, type Chain, type CoinTypeAddress, type CollectFees, type ContractCall, ContractName, type Contracts, Ecosystem, Environment, type GenerateStakingCallsParams, type GetPricesPayload, type GetRoutePayload, type GetSwapTxPayload, type HistoryTransaction, type MonitoredTransaction, type Prices, type Protocol, type Referral, type ReferralInfo, type Route, type Token, type TokenBalances, type TokenPrices, type Transaction, type TransactionHistory, type TransactionRequest, type TransactionStatus, type Transactions, type TxConfigFormData, Web3Environment, XSwapCallType, type XSwapConfig, type XSwapFee, type XSwapFees, getSwapTx, monitorTransactionStatus };
|