@injectivelabs/utils 0.0.57 → 0.0.58
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/dist/numbers.d.ts +11 -11
- package/dist/numbers.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/numbers.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const denomAmountToChainDenomAmountToFixed: ({ value, decimals, d
|
|
|
22
22
|
value: number | string | BigNumber;
|
|
23
23
|
decimals?: string | number | undefined;
|
|
24
24
|
decimalPlaces?: number | undefined;
|
|
25
|
-
roundingMode
|
|
25
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
26
26
|
}) => string;
|
|
27
27
|
/**
|
|
28
28
|
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
@@ -41,7 +41,7 @@ export declare const denomAmountFromChainDenomAmountToFixed: ({ value, decimals,
|
|
|
41
41
|
value: number | string | BigNumber;
|
|
42
42
|
decimals?: string | number | undefined;
|
|
43
43
|
decimalPlaces?: number | undefined;
|
|
44
|
-
roundingMode
|
|
44
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
45
45
|
}) => string;
|
|
46
46
|
/**
|
|
47
47
|
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
@@ -57,7 +57,7 @@ export declare const derivativeMarginToChainMargin: ({ value, quoteDecimals, }:
|
|
|
57
57
|
*/
|
|
58
58
|
export declare const derivativeMarginToChainMarginToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
|
|
59
59
|
decimalPlaces?: number | undefined;
|
|
60
|
-
roundingMode
|
|
60
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
61
61
|
value: number | string | BigNumber;
|
|
62
62
|
quoteDecimals?: string | number | undefined;
|
|
63
63
|
}) => string;
|
|
@@ -77,7 +77,7 @@ export declare const derivativeMarginFromChainMarginToFixed: ({ value, quoteDeci
|
|
|
77
77
|
value: number | string | BigNumber;
|
|
78
78
|
quoteDecimals?: string | number | undefined;
|
|
79
79
|
decimalPlaces?: number | undefined;
|
|
80
|
-
roundingMode
|
|
80
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
81
81
|
}) => string;
|
|
82
82
|
/**
|
|
83
83
|
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
@@ -95,7 +95,7 @@ export declare const derivativePriceToChainPriceToFixed: ({ value, quoteDecimals
|
|
|
95
95
|
value: number | string | BigNumber;
|
|
96
96
|
quoteDecimals?: string | number | undefined;
|
|
97
97
|
decimalPlaces?: number | undefined;
|
|
98
|
-
roundingMode
|
|
98
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
99
99
|
}) => string;
|
|
100
100
|
/**
|
|
101
101
|
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
@@ -113,7 +113,7 @@ export declare const derivativePriceFromChainPriceToFixed: ({ value, quoteDecima
|
|
|
113
113
|
value: number | string | BigNumber;
|
|
114
114
|
quoteDecimals?: string | number | undefined;
|
|
115
115
|
decimalPlaces?: number | undefined;
|
|
116
|
-
roundingMode
|
|
116
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
117
117
|
}) => string;
|
|
118
118
|
/**
|
|
119
119
|
* Amount that the chain requires is in the x format
|
|
@@ -129,7 +129,7 @@ export declare const derivativeQuantityToChainQuantity: ({ value, }: {
|
|
|
129
129
|
export declare const derivativeQuantityToChainQuantityToFixed: ({ value, decimalPlaces, roundingMode, }: {
|
|
130
130
|
value: number | string | BigNumber;
|
|
131
131
|
decimalPlaces?: number | undefined;
|
|
132
|
-
roundingMode
|
|
132
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
133
133
|
}) => string;
|
|
134
134
|
/**
|
|
135
135
|
* Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
@@ -149,7 +149,7 @@ export declare const spotPriceToChainPriceToFixed: ({ value, baseDecimals, quote
|
|
|
149
149
|
quoteDecimals?: string | number | undefined;
|
|
150
150
|
baseDecimals?: string | number | undefined;
|
|
151
151
|
decimalPlaces?: number | undefined;
|
|
152
|
-
roundingMode
|
|
152
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
153
153
|
}) => string;
|
|
154
154
|
/**
|
|
155
155
|
* Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
@@ -169,7 +169,7 @@ export declare const spotPriceFromChainPriceToFixed: ({ value, baseDecimals, quo
|
|
|
169
169
|
quoteDecimals?: string | number | undefined;
|
|
170
170
|
baseDecimals?: string | number | undefined;
|
|
171
171
|
decimalPlaces?: number | undefined;
|
|
172
|
-
roundingMode
|
|
172
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
173
173
|
}) => string;
|
|
174
174
|
/**
|
|
175
175
|
* Amount that the chain requires is in the x * 10^(baseDecimals) format
|
|
@@ -187,7 +187,7 @@ export declare const spotQuantityToChainQuantityToFixed: ({ value, baseDecimals,
|
|
|
187
187
|
value: number | string | BigNumber;
|
|
188
188
|
baseDecimals?: string | number | undefined;
|
|
189
189
|
decimalPlaces?: number | undefined;
|
|
190
|
-
roundingMode
|
|
190
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
191
191
|
}) => string;
|
|
192
192
|
/**
|
|
193
193
|
* Amount that the chain returns is in the x * 10^(baseDecimals) format
|
|
@@ -205,6 +205,6 @@ export declare const spotQuantityFromChainQuantityToFixed: ({ value, baseDecimal
|
|
|
205
205
|
value: number | string | BigNumber;
|
|
206
206
|
baseDecimals?: string | number | undefined;
|
|
207
207
|
decimalPlaces?: number | undefined;
|
|
208
|
-
roundingMode
|
|
208
|
+
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
209
209
|
}) => string;
|
|
210
210
|
//# sourceMappingURL=numbers.d.ts.map
|
package/dist/numbers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../src/numbers.ts"],"names":[],"mappings":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;;eAEwC,CAAA;AAE5E;;;GAGG;AACH,eAAO,MAAM,oCAAoC;WAMxC,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAOK,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/utils",
|
|
3
3
|
"description": "List of utils and helper functions that can be reused throughout Injective's projects.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.58",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"shx": "^0.3.2",
|
|
36
36
|
"store2": "^2.12.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "bc0ec90c28bdf3e990165c64af39a91b2895a3b0"
|
|
39
39
|
}
|