rainbow-swap-sdk 1.5.3 → 1.5.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.
@@ -0,0 +1,6 @@
1
+ export declare enum SwapStatusEnum {
2
+ Pending = "Pending",
3
+ Success = "Success",
4
+ Failed = "Failed",
5
+ PartiallyFilled = "Partially Filled"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwapStatusEnum = void 0;
4
+ var SwapStatusEnum;
5
+ (function (SwapStatusEnum) {
6
+ SwapStatusEnum["Pending"] = "Pending";
7
+ SwapStatusEnum["Success"] = "Success";
8
+ SwapStatusEnum["Failed"] = "Failed";
9
+ SwapStatusEnum["PartiallyFilled"] = "Partially Filled";
10
+ })(SwapStatusEnum || (exports.SwapStatusEnum = SwapStatusEnum = {}));
package/dist/index.d.ts CHANGED
@@ -9,6 +9,6 @@ export type { AssetsRecord } from './types/assets-record.type';
9
9
  export type { BestRouteDisplayData, RouteDisplayData, RouteStepDisplayData } from './types/best-route-display-data.type';
10
10
  export type { BestRouteParams } from './types/best-route-params.type';
11
11
  export type { BestRouteResponse } from './types/best-route-response.type';
12
- export { getAssetsRecord, getAssetsList, getBestRoute, getAppStatus } from './utils/api.utils';
12
+ export { getAssetsRecord, getAssetsList, getBestRoute, getAppStatus, getSwapHistoryData } from './utils/api.utils';
13
13
  export { toNano, fromNano } from './utils/big-int.utils';
14
14
  export { getQueryId } from './utils/transfer-params.utils';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getQueryId = exports.fromNano = exports.toNano = exports.getAppStatus = exports.getBestRoute = exports.getAssetsList = exports.getAssetsRecord = exports.SwapRouteType = exports.RouteDirectionEnum = exports.DexTypeEnum = void 0;
3
+ exports.getQueryId = exports.fromNano = exports.toNano = exports.getSwapHistoryData = exports.getAppStatus = exports.getBestRoute = exports.getAssetsList = exports.getAssetsRecord = exports.SwapRouteType = exports.RouteDirectionEnum = exports.DexTypeEnum = void 0;
4
4
  var dex_type_enum_1 = require("./enums/dex-type.enum");
5
5
  Object.defineProperty(exports, "DexTypeEnum", { enumerable: true, get: function () { return dex_type_enum_1.DexTypeEnum; } });
6
6
  var route_direction_enum_1 = require("./enums/route-direction.enum");
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "getAssetsRecord", { enumerable: true, get: funct
12
12
  Object.defineProperty(exports, "getAssetsList", { enumerable: true, get: function () { return api_utils_1.getAssetsList; } });
13
13
  Object.defineProperty(exports, "getBestRoute", { enumerable: true, get: function () { return api_utils_1.getBestRoute; } });
14
14
  Object.defineProperty(exports, "getAppStatus", { enumerable: true, get: function () { return api_utils_1.getAppStatus; } });
15
+ Object.defineProperty(exports, "getSwapHistoryData", { enumerable: true, get: function () { return api_utils_1.getSwapHistoryData; } });
15
16
  var big_int_utils_1 = require("./utils/big-int.utils");
16
17
  Object.defineProperty(exports, "toNano", { enumerable: true, get: function () { return big_int_utils_1.toNano; } });
17
18
  Object.defineProperty(exports, "fromNano", { enumerable: true, get: function () { return big_int_utils_1.fromNano; } });
@@ -0,0 +1,17 @@
1
+ import { SwapStatusEnum } from '../enums/swap-status.enum';
2
+ export interface SwapHistoryData {
3
+ timestamp: number;
4
+ bocHash: string;
5
+ status: SwapStatusEnum;
6
+ completedMessageCount: number;
7
+ sentInfo?: Info;
8
+ receivedInfo?: Info;
9
+ returnedInfo?: Info;
10
+ intermediateTokensInfo?: Info[];
11
+ }
12
+ interface Info {
13
+ amount: number;
14
+ usdAmount: number;
15
+ symbol: string;
16
+ }
17
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export type SwapHistoryDataParams = {
2
+ bocHash: string;
3
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,11 @@
1
+ import { SwapHistoryData } from '../interfaces/swap-history-data.interface';
1
2
  import { AppStatus } from '../types/app-status.type';
2
3
  import { Asset } from '../types/asset.type';
3
4
  import { AssetsListParams } from '../types/assets-list-patams.type';
4
5
  import { AssetsRecord } from '../types/assets-record.type';
5
6
  import { BestRouteParams } from '../types/best-route-params.type';
6
7
  import { BestRouteResponse } from '../types/best-route-response.type';
8
+ import { SwapHistoryDataParams } from '../types/swap-history-data.type';
7
9
  export declare const getAppStatus: () => Promise<AppStatus>;
8
10
  /**
9
11
  * @deprecated This method is deprecated and will be removed in the next major release.
@@ -12,3 +14,4 @@ export declare const getAppStatus: () => Promise<AppStatus>;
12
14
  export declare const getAssetsRecord: () => Promise<AssetsRecord>;
13
15
  export declare const getAssetsList: (params: AssetsListParams) => Promise<Asset[]>;
14
16
  export declare const getBestRoute: (params: BestRouteParams, authTokens?: string) => Promise<BestRouteResponse>;
17
+ export declare const getSwapHistoryData: (params: SwapHistoryDataParams) => Promise<SwapHistoryData>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBestRoute = exports.getAssetsList = exports.getAssetsRecord = exports.getAppStatus = void 0;
3
+ exports.getSwapHistoryData = exports.getBestRoute = exports.getAssetsList = exports.getAssetsRecord = exports.getAppStatus = void 0;
4
4
  const globals_1 = require("../globals");
5
5
  const getAppStatus = () => globals_1.API.get('/app-status').then(response => response.data);
6
6
  exports.getAppStatus = getAppStatus;
@@ -39,3 +39,5 @@ const getBestRoute = (params, authTokens) => {
39
39
  }).then(response => response.data);
40
40
  };
41
41
  exports.getBestRoute = getBestRoute;
42
+ const getSwapHistoryData = (params) => globals_1.API.get('/swap-history-data', { params }).then(response => response.data);
43
+ exports.getSwapHistoryData = getSwapHistoryData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rainbow-swap-sdk",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "SDK for building applications on top of Rainbow.ag - Swap Aggregator on TON 💎.",
5
5
  "repository": "https://github.com/0xblackbot/rainbow-swap-sdk.git",
6
6
  "license": "Apache-2.0",