@xswap-link/sdk 0.2.4 → 0.2.5

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,13 @@
1
1
  # @xswap-link/xswap-sdk
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 88f6ea9: Add integrator id to route payload
8
+ - 564895e: Set percision of max button to token decimals
9
+ - 81cf582: feat: unknown tokens and small ui improvements
10
+
3
11
  ## 0.2.4
4
12
 
5
13
  ### Patch Changes
package/dist/index.css CHANGED
@@ -994,6 +994,10 @@ video {
994
994
  .text-\[rgba\(255\,255\,255\,0\.6\)\] {
995
995
  color: rgba(255, 255, 255, 0.6);
996
996
  }
997
+ .text-black {
998
+ --tw-text-opacity: 1;
999
+ color: rgb(0 0 0 / var(--tw-text-opacity));
1000
+ }
997
1001
  .text-transparent {
998
1002
  color: transparent;
999
1003
  }
@@ -1018,6 +1022,14 @@ video {
1018
1022
  .opacity-60 {
1019
1023
  opacity: 0.6;
1020
1024
  }
1025
+ .shadow-sm {
1026
+ --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
1027
+ --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
1028
+ box-shadow:
1029
+ var(--tw-ring-offset-shadow, 0 0 #0000),
1030
+ var(--tw-ring-shadow, 0 0 #0000),
1031
+ var(--tw-shadow);
1032
+ }
1021
1033
  .outline-none {
1022
1034
  outline: 2px solid transparent;
1023
1035
  outline-offset: 2px;
@@ -1051,7 +1063,7 @@ video {
1051
1063
  }
1052
1064
  }
1053
1065
  .xswap-tx-status {
1054
- position: absolute;
1066
+ position: fixed;
1055
1067
  bottom: 1.25rem;
1056
1068
  right: 0.5rem;
1057
1069
  z-index: 50;
@@ -1087,12 +1099,6 @@ video {
1087
1099
  opacity: 0.25;
1088
1100
  }
1089
1101
  @media (min-width: 640px) {
1090
- .sm\:h-6 {
1091
- height: 1.5rem;
1092
- }
1093
- .sm\:w-6 {
1094
- width: 1.5rem;
1095
- }
1096
1102
  .sm\:w-\[190px\] {
1097
1103
  width: 190px;
1098
1104
  }
package/dist/index.d.mts CHANGED
@@ -48,7 +48,7 @@ type Token = {
48
48
  name: string;
49
49
  symbol: string;
50
50
  decimals: number;
51
- image: string;
51
+ image?: string;
52
52
  priority: number;
53
53
  quickPick?: boolean;
54
54
  supported?: boolean;
@@ -119,6 +119,7 @@ type GenerateStakingCallsParams = {
119
119
  };
120
120
 
121
121
  type GetRoutePayload = {
122
+ integratorId: string;
122
123
  fromChain: string;
123
124
  toChain: string;
124
125
  fromToken: string;
@@ -145,6 +146,7 @@ type AddReferralPayload = {
145
146
  };
146
147
 
147
148
  type GetSwapTxPayload = {
149
+ integratorId: string;
148
150
  dstChain: string;
149
151
  dstToken: string;
150
152
  customContractCalls?: ContractCall[];
@@ -229,7 +231,7 @@ type HistoryTransaction = {
229
231
  tokenAddress: string;
230
232
  } | null;
231
233
  };
232
- type TransactionStatus = "IN_PROGRESS" | "DONE" | "REVERTED";
234
+ type TransactionStatus = "IN_PROGRESS" | "DONE" | "REVERTED" | "NOT_FOUND";
233
235
  type Transaction = {
234
236
  hash: string;
235
237
  timestamp: number;
@@ -243,20 +245,25 @@ type Transaction = {
243
245
  status: TransactionStatus;
244
246
  };
245
247
  type MonitoredTransaction = {
246
- fromChain: string | undefined;
247
- fromChainImage: string | undefined;
248
- fromToken: string | undefined;
249
- fromTokenImage: string | undefined;
250
- fromAmount: string | undefined;
251
- toChain: string | undefined;
252
- toChainImage: string | undefined;
248
+ srcChain: string | undefined;
249
+ srcChainImage: string | undefined;
250
+ srcToken: string | undefined;
251
+ srcTokenImage: string | undefined;
252
+ srcAmount: string | undefined;
253
+ dstChain: string | undefined;
254
+ dstChainImage: string | undefined;
253
255
  isDone: boolean;
254
256
  txHash: string;
255
257
  explorer: string | undefined;
256
258
  };
257
259
 
258
- declare const monitorTransactionStatus: (txChainId: string, txHash: string) => Promise<void>;
260
+ declare const renderTxStatus: (txChainId: string, txHash: string) => Promise<void>;
261
+
262
+ declare const openTransactionModal: ({ integratorId, dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
259
263
 
260
- declare const getSwapTx: ({ dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
264
+ declare const XPay: {
265
+ openTransactionModal: ({ integratorId, dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
266
+ renderTxStatus: (txChainId: string, txHash: string) => Promise<void>;
267
+ };
261
268
 
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 };
269
+ 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, XPay as default, openTransactionModal, renderTxStatus };
package/dist/index.d.ts CHANGED
@@ -48,7 +48,7 @@ type Token = {
48
48
  name: string;
49
49
  symbol: string;
50
50
  decimals: number;
51
- image: string;
51
+ image?: string;
52
52
  priority: number;
53
53
  quickPick?: boolean;
54
54
  supported?: boolean;
@@ -119,6 +119,7 @@ type GenerateStakingCallsParams = {
119
119
  };
120
120
 
121
121
  type GetRoutePayload = {
122
+ integratorId: string;
122
123
  fromChain: string;
123
124
  toChain: string;
124
125
  fromToken: string;
@@ -145,6 +146,7 @@ type AddReferralPayload = {
145
146
  };
146
147
 
147
148
  type GetSwapTxPayload = {
149
+ integratorId: string;
148
150
  dstChain: string;
149
151
  dstToken: string;
150
152
  customContractCalls?: ContractCall[];
@@ -229,7 +231,7 @@ type HistoryTransaction = {
229
231
  tokenAddress: string;
230
232
  } | null;
231
233
  };
232
- type TransactionStatus = "IN_PROGRESS" | "DONE" | "REVERTED";
234
+ type TransactionStatus = "IN_PROGRESS" | "DONE" | "REVERTED" | "NOT_FOUND";
233
235
  type Transaction = {
234
236
  hash: string;
235
237
  timestamp: number;
@@ -243,20 +245,25 @@ type Transaction = {
243
245
  status: TransactionStatus;
244
246
  };
245
247
  type MonitoredTransaction = {
246
- fromChain: string | undefined;
247
- fromChainImage: string | undefined;
248
- fromToken: string | undefined;
249
- fromTokenImage: string | undefined;
250
- fromAmount: string | undefined;
251
- toChain: string | undefined;
252
- toChainImage: string | undefined;
248
+ srcChain: string | undefined;
249
+ srcChainImage: string | undefined;
250
+ srcToken: string | undefined;
251
+ srcTokenImage: string | undefined;
252
+ srcAmount: string | undefined;
253
+ dstChain: string | undefined;
254
+ dstChainImage: string | undefined;
253
255
  isDone: boolean;
254
256
  txHash: string;
255
257
  explorer: string | undefined;
256
258
  };
257
259
 
258
- declare const monitorTransactionStatus: (txChainId: string, txHash: string) => Promise<void>;
260
+ declare const renderTxStatus: (txChainId: string, txHash: string) => Promise<void>;
261
+
262
+ declare const openTransactionModal: ({ integratorId, dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
259
263
 
260
- declare const getSwapTx: ({ dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
264
+ declare const XPay: {
265
+ openTransactionModal: ({ integratorId, dstChain, dstToken, customContractCalls, desc, }: GetSwapTxPayload) => Promise<Transactions>;
266
+ renderTxStatus: (txChainId: string, txHash: string) => Promise<void>;
267
+ };
261
268
 
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 };
269
+ 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, XPay as default, openTransactionModal, renderTxStatus };