@super-protocol/sdk-js 0.13.0 → 0.13.1

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.
@@ -7,9 +7,9 @@ export declare const HardwareInfoStructure: {
7
7
  diskUsage: NumberConstructor;
8
8
  };
9
9
  optionInfo: {
10
- bandwidth: StringConstructor;
11
- traffic: StringConstructor;
12
- externalPort: StringConstructor;
10
+ bandwidth: NumberConstructor;
11
+ traffic: NumberConstructor;
12
+ externalPort: NumberConstructor;
13
13
  };
14
14
  };
15
15
  export type HardwareInfo = {
@@ -1,10 +1,10 @@
1
1
  export declare const OptionInfoStructure: {
2
- bandwidth: StringConstructor;
3
- traffic: StringConstructor;
4
- externalPort: StringConstructor;
2
+ bandwidth: NumberConstructor;
3
+ traffic: NumberConstructor;
4
+ externalPort: NumberConstructor;
5
5
  };
6
6
  export type OptionInfo = {
7
- bandwidth: string;
8
- traffic: string;
9
- externalPort: string;
7
+ bandwidth: number;
8
+ traffic: number;
9
+ externalPort: number;
10
10
  };
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OptionInfoStructure = void 0;
4
4
  // Order of keys and type conversion functions for this object in blockchain contract
5
5
  exports.OptionInfoStructure = {
6
- bandwidth: String,
7
- traffic: String,
8
- externalPort: String,
6
+ bandwidth: Number,
7
+ traffic: Number,
8
+ externalPort: Number,
9
9
  };
@@ -114,9 +114,9 @@ export declare const OrderUsageStructure: {
114
114
  maxTimeMinutes: NumberConstructor;
115
115
  };
116
116
  optionInfo: {
117
- bandwidth: StringConstructor;
118
- traffic: StringConstructor;
119
- externalPort: StringConstructor;
117
+ bandwidth: NumberConstructor;
118
+ traffic: NumberConstructor;
119
+ externalPort: NumberConstructor;
120
120
  }[];
121
121
  optionUsage: {
122
122
  priceType: typeof import("./SlotUsage").PriceType;
@@ -13,9 +13,9 @@ export declare const TeeOfferInfoStructure: {
13
13
  diskUsage: NumberConstructor;
14
14
  };
15
15
  optionInfo: {
16
- bandwidth: StringConstructor;
17
- traffic: StringConstructor;
18
- externalPort: StringConstructor;
16
+ bandwidth: NumberConstructor;
17
+ traffic: NumberConstructor;
18
+ externalPort: NumberConstructor;
19
19
  };
20
20
  };
21
21
  };
@@ -3,9 +3,9 @@ import { SlotUsage } from "./SlotUsage";
3
3
  export declare const TeeOfferOptionStructure: {
4
4
  id: StringConstructor;
5
5
  info: {
6
- bandwidth: StringConstructor;
7
- traffic: StringConstructor;
8
- externalPort: StringConstructor;
6
+ bandwidth: NumberConstructor;
7
+ traffic: NumberConstructor;
8
+ externalPort: NumberConstructor;
9
9
  };
10
10
  usage: {
11
11
  priceType: typeof import("./SlotUsage").PriceType;
@@ -9,9 +9,9 @@ export declare const ValueOfferSlotStructure: {
9
9
  diskUsage: NumberConstructor;
10
10
  };
11
11
  option: {
12
- bandwidth: StringConstructor;
13
- traffic: StringConstructor;
14
- externalPort: StringConstructor;
12
+ bandwidth: NumberConstructor;
13
+ traffic: NumberConstructor;
14
+ externalPort: NumberConstructor;
15
15
  };
16
16
  usage: {
17
17
  priceType: typeof import("./SlotUsage").PriceType;
package/build/utils.js CHANGED
@@ -121,6 +121,10 @@ var tupleToObject = function (data, format) {
121
121
  return formatItem.$obj(dataItem);
122
122
  }
123
123
  else if (typeof formatItem === "function") {
124
+ if (formatItem.name === "Number") {
125
+ var value = formatItem(dataItem);
126
+ return value < Number.MAX_SAFE_INTEGER ? value : Number.MAX_SAFE_INTEGER;
127
+ }
124
128
  return formatItem(dataItem);
125
129
  }
126
130
  else if (typeof formatItem === "object" && typeof dataItem === "object") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-protocol/sdk-js",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "main": "build/index.js",
5
5
  "license": "MIT",
6
6
  "files": [