@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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @xswap-link/xswap-sdk
2
2
 
3
+ ## 0.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - e0d0400: update (simplify) Route model
8
+
9
+ ## 0.0.10
10
+
11
+ ### Patch Changes
12
+
13
+ - 0d5f673: add RouteType
14
+
3
15
  ## 0.0.9
4
16
 
5
17
  ### Patch Changes
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: string;
118
- nativeFee: string;
117
+ tokenFee?: string;
118
+ nativeFee?: string;
119
119
  };
120
120
 
121
121
  type XSwapFees = {
122
- ccipFee: string;
123
- xSwapFee: XSwapFee;
124
- expressDeliveryFee: string;
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: 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: string;
118
- nativeFee: string;
117
+ tokenFee?: string;
118
+ nativeFee?: string;
119
119
  };
120
120
 
121
121
  type XSwapFees = {
122
- ccipFee: string;
123
- xSwapFee: XSwapFee;
124
- expressDeliveryFee: string;
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: XSwapFees;
134
+ xSwapFees?: XSwapFees;
143
135
  message?: string;
144
136
  };
145
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xswap-link/sdk",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "JavaScript SDK for XSwap platform",
5
5
  "homepage": "https://github.com/xswap-link/xswap-sdk",
6
6
  "repository": {
@@ -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: XSwapFees;
11
+ xSwapFees?: XSwapFees;
23
12
  message?: string;
24
13
  };
@@ -1,4 +1,4 @@
1
1
  export type XSwapFee = {
2
- tokenFee: string;
3
- nativeFee: string;
2
+ tokenFee?: string;
3
+ nativeFee?: string;
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { XSwapFee } from "./XSwapFee";
2
2
 
3
3
  export type XSwapFees = {
4
- ccipFee: string;
5
- xSwapFee: XSwapFee;
6
- expressDeliveryFee: string;
4
+ ccipFee?: string;
5
+ xSwapFee?: XSwapFee;
6
+ expressDeliveryFee?: string;
7
7
  };