@xswap-link/sdk 0.0.9 → 0.0.11
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 +7 -15
- package/dist/index.d.ts +7 -15
- package/package.json +1 -1
- package/src/models/Route.ts +1 -12
- package/src/models/XSwapFee.ts +2 -2
- package/src/models/XSwapFees.ts +3 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BigNumberish, BigNumber, ethers } from 'ethers';
|
|
2
1
|
import { TransactionRequest } from '@ethersproject/providers';
|
|
2
|
+
import { BigNumber, BigNumberish, ethers } from 'ethers';
|
|
3
3
|
|
|
4
4
|
type ApiOverrides = {
|
|
5
5
|
apiUrl?: string;
|
|
@@ -114,32 +114,24 @@ type Protocol = {
|
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
type XSwapFee = {
|
|
117
|
-
tokenFee
|
|
118
|
-
nativeFee
|
|
117
|
+
tokenFee?: string;
|
|
118
|
+
nativeFee?: string;
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
type XSwapFees = {
|
|
122
|
-
ccipFee
|
|
123
|
-
xSwapFee
|
|
124
|
-
expressDeliveryFee
|
|
122
|
+
ccipFee?: string;
|
|
123
|
+
xSwapFee?: XSwapFee;
|
|
124
|
+
expressDeliveryFee?: string;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
type Route = {
|
|
128
|
-
originChainXSwapCalls: ContractCall[];
|
|
129
|
-
originProtocols: Protocol[][][];
|
|
130
|
-
destinationChainXSwapCalls: ContractCall[];
|
|
131
|
-
destinationProtocols: Protocol[][][];
|
|
132
|
-
originCrossChainTransferToken: string;
|
|
133
|
-
destinationCrossChainTransferToken: string;
|
|
134
|
-
amountToTransferCrossChain: BigNumberish;
|
|
135
128
|
estAmountOut: string;
|
|
136
129
|
minAmountOut: string;
|
|
137
|
-
estimatedGasDestination: number;
|
|
138
130
|
transactions: {
|
|
139
131
|
approve: TransactionRequest;
|
|
140
132
|
swap: TransactionRequest;
|
|
141
133
|
};
|
|
142
|
-
xSwapFees
|
|
134
|
+
xSwapFees?: XSwapFees;
|
|
143
135
|
message?: string;
|
|
144
136
|
};
|
|
145
137
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BigNumberish, BigNumber, ethers } from 'ethers';
|
|
2
1
|
import { TransactionRequest } from '@ethersproject/providers';
|
|
2
|
+
import { BigNumber, BigNumberish, ethers } from 'ethers';
|
|
3
3
|
|
|
4
4
|
type ApiOverrides = {
|
|
5
5
|
apiUrl?: string;
|
|
@@ -114,32 +114,24 @@ type Protocol = {
|
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
type XSwapFee = {
|
|
117
|
-
tokenFee
|
|
118
|
-
nativeFee
|
|
117
|
+
tokenFee?: string;
|
|
118
|
+
nativeFee?: string;
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
type XSwapFees = {
|
|
122
|
-
ccipFee
|
|
123
|
-
xSwapFee
|
|
124
|
-
expressDeliveryFee
|
|
122
|
+
ccipFee?: string;
|
|
123
|
+
xSwapFee?: XSwapFee;
|
|
124
|
+
expressDeliveryFee?: string;
|
|
125
125
|
};
|
|
126
126
|
|
|
127
127
|
type Route = {
|
|
128
|
-
originChainXSwapCalls: ContractCall[];
|
|
129
|
-
originProtocols: Protocol[][][];
|
|
130
|
-
destinationChainXSwapCalls: ContractCall[];
|
|
131
|
-
destinationProtocols: Protocol[][][];
|
|
132
|
-
originCrossChainTransferToken: string;
|
|
133
|
-
destinationCrossChainTransferToken: string;
|
|
134
|
-
amountToTransferCrossChain: BigNumberish;
|
|
135
128
|
estAmountOut: string;
|
|
136
129
|
minAmountOut: string;
|
|
137
|
-
estimatedGasDestination: number;
|
|
138
130
|
transactions: {
|
|
139
131
|
approve: TransactionRequest;
|
|
140
132
|
swap: TransactionRequest;
|
|
141
133
|
};
|
|
142
|
-
xSwapFees
|
|
134
|
+
xSwapFees?: XSwapFees;
|
|
143
135
|
message?: string;
|
|
144
136
|
};
|
|
145
137
|
|
package/package.json
CHANGED
package/src/models/Route.ts
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
|
-
import { BigNumberish } from "ethers";
|
|
2
1
|
import { TransactionRequest } from "@ethersproject/providers";
|
|
3
|
-
import { ContractCall } from "./ContractCall";
|
|
4
2
|
import { XSwapFees } from "./XSwapFees";
|
|
5
|
-
import { Protocol } from "./Protocol";
|
|
6
3
|
|
|
7
4
|
export type Route = {
|
|
8
|
-
originChainXSwapCalls: ContractCall[];
|
|
9
|
-
originProtocols: Protocol[][][];
|
|
10
|
-
destinationChainXSwapCalls: ContractCall[];
|
|
11
|
-
destinationProtocols: Protocol[][][];
|
|
12
|
-
originCrossChainTransferToken: string;
|
|
13
|
-
destinationCrossChainTransferToken: string;
|
|
14
|
-
amountToTransferCrossChain: BigNumberish;
|
|
15
5
|
estAmountOut: string;
|
|
16
6
|
minAmountOut: string;
|
|
17
|
-
estimatedGasDestination: number;
|
|
18
7
|
transactions: {
|
|
19
8
|
approve: TransactionRequest;
|
|
20
9
|
swap: TransactionRequest;
|
|
21
10
|
};
|
|
22
|
-
xSwapFees
|
|
11
|
+
xSwapFees?: XSwapFees;
|
|
23
12
|
message?: string;
|
|
24
13
|
};
|
package/src/models/XSwapFee.ts
CHANGED
package/src/models/XSwapFees.ts
CHANGED