@injectivelabs/utils 1.0.44 → 1.0.46
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/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/numbers.d.ts +0 -242
- package/dist/numbers.d.ts.map +0 -1
- package/dist/numbers.js +0 -267
- package/dist/numbers.js.map +0 -1
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -19,5 +19,4 @@ __exportStar(require("./helpers"), exports);
|
|
|
19
19
|
__exportStar(require("./formatters"), exports);
|
|
20
20
|
__exportStar(require("./time"), exports);
|
|
21
21
|
__exportStar(require("./constants"), exports);
|
|
22
|
-
__exportStar(require("./numbers"), exports);
|
|
23
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,4CAAyB;AACzB,+CAA4B;AAC5B,yCAAsB;AACtB,8CAA2B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,4CAAyB;AACzB,+CAA4B;AAC5B,yCAAsB;AACtB,8CAA2B"}
|
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": "1.0.
|
|
4
|
+
"version": "1.0.46",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bojan Angjelkoski",
|
|
7
7
|
"email": "bojan@injectivelabs.org"
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"start": "node dist/index.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@injectivelabs/exceptions": "^1.0.
|
|
35
|
-
"@injectivelabs/ts-types": "^1.0.
|
|
34
|
+
"@injectivelabs/exceptions": "^1.0.32",
|
|
35
|
+
"@injectivelabs/ts-types": "^1.0.18",
|
|
36
36
|
"axios": "^0.21.1",
|
|
37
37
|
"bignumber.js": "^9.0.1",
|
|
38
38
|
"link-module-alias": "^1.2.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"snakecase-keys": "^5.1.2",
|
|
41
41
|
"store2": "^2.12.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "3f774e11b95ba0f7d63d52efdbf568ba4643a000"
|
|
44
44
|
}
|
package/dist/numbers.d.ts
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { BigNumber } from './classes';
|
|
2
|
-
export declare const getSignificantDecimalsFromNumber: (number: BigNumber | number | string) => number;
|
|
3
|
-
/**
|
|
4
|
-
* On chain amounts queried from a sentry using the
|
|
5
|
-
* gRPC API are returned with an extra decimal point
|
|
6
|
-
* 18 places from the beginning, so we need to remove it
|
|
7
|
-
* to get a workable amount
|
|
8
|
-
*/
|
|
9
|
-
export declare const denomAmountFromGrpcChainDenomAmount: (value: string | number | BigNumber) => BigNumber;
|
|
10
|
-
/**
|
|
11
|
-
* On chain amounts broadcasted to a sentry directly using the
|
|
12
|
-
* gRPC API should be passed with an extra decimal point
|
|
13
|
-
* 18 places from the beginning, so we need to add it
|
|
14
|
-
* to get a workable amount
|
|
15
|
-
*/
|
|
16
|
-
export declare const denomAmountToGrpcChainDenomAmount: (value: string | number | BigNumber) => BigNumber;
|
|
17
|
-
/**
|
|
18
|
-
* On chain amounts (based on the cosmosSdk.Dec type)
|
|
19
|
-
* broadcasted to a sentry directly using the
|
|
20
|
-
* gRPC API should be passed with an extra decimal point
|
|
21
|
-
* 18 places from the beginning (i.e multiplied by 1e18), so we need to add it
|
|
22
|
-
* to get a workable amount
|
|
23
|
-
*/
|
|
24
|
-
export declare const amountToCosmosSdkDecAmount: (value: string | number | BigNumber) => BigNumber;
|
|
25
|
-
/**
|
|
26
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
27
|
-
* where x is a human readable number
|
|
28
|
-
*/
|
|
29
|
-
export declare const denomAmountToChainDenomAmount: ({ value, decimals, }: {
|
|
30
|
-
value: number | string | BigNumber;
|
|
31
|
-
decimals?: string | number | undefined;
|
|
32
|
-
}) => BigNumber;
|
|
33
|
-
/**
|
|
34
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
35
|
-
* where x is a human readable number
|
|
36
|
-
*/
|
|
37
|
-
export declare const denomAmountToChainDenomAmountToFixed: ({ value, decimals, decimalPlaces, roundingMode, }: {
|
|
38
|
-
value: number | string | BigNumber;
|
|
39
|
-
decimals?: string | number | undefined;
|
|
40
|
-
decimalPlaces?: number | undefined;
|
|
41
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
42
|
-
}) => string;
|
|
43
|
-
/**
|
|
44
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
45
|
-
* where x is a human readable number
|
|
46
|
-
*/
|
|
47
|
-
export declare const denomAmountFromChainDenomAmount: ({ value, decimals, }: {
|
|
48
|
-
value: number | string | BigNumber;
|
|
49
|
-
decimals?: string | number | undefined;
|
|
50
|
-
}) => BigNumber;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
54
|
-
* where x is a human readable number stringified
|
|
55
|
-
*/
|
|
56
|
-
export declare const denomAmountFromChainDenomAmountToFixed: ({ value, decimals, decimalPlaces, roundingMode, }: {
|
|
57
|
-
value: number | string | BigNumber;
|
|
58
|
-
decimals?: string | number | undefined;
|
|
59
|
-
decimalPlaces?: number | undefined;
|
|
60
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
61
|
-
}) => string;
|
|
62
|
-
/**
|
|
63
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
64
|
-
* where x is a human readable number
|
|
65
|
-
*/
|
|
66
|
-
export declare const derivativeMarginToChainMargin: ({ value, quoteDecimals, }: {
|
|
67
|
-
value: number | string | BigNumber;
|
|
68
|
-
quoteDecimals?: string | number | undefined;
|
|
69
|
-
}) => BigNumber;
|
|
70
|
-
/**
|
|
71
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
72
|
-
* where x is a human readable number stringified
|
|
73
|
-
*/
|
|
74
|
-
export declare const derivativeMarginToChainMarginToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
|
|
75
|
-
decimalPlaces?: number | undefined;
|
|
76
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
77
|
-
value: number | string | BigNumber;
|
|
78
|
-
quoteDecimals?: string | number | undefined;
|
|
79
|
-
}) => string;
|
|
80
|
-
/**
|
|
81
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
82
|
-
* where x is a human readable number
|
|
83
|
-
*/
|
|
84
|
-
export declare const derivativeMarginFromChainMargin: ({ value, quoteDecimals, }: {
|
|
85
|
-
value: number | string | BigNumber;
|
|
86
|
-
quoteDecimals?: string | number | undefined;
|
|
87
|
-
}) => BigNumber;
|
|
88
|
-
/**
|
|
89
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
90
|
-
* where x is a human readable number
|
|
91
|
-
*/
|
|
92
|
-
export declare const derivativeMarginFromChainMarginToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
|
|
93
|
-
value: number | string | BigNumber;
|
|
94
|
-
quoteDecimals?: string | number | undefined;
|
|
95
|
-
decimalPlaces?: number | undefined;
|
|
96
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
97
|
-
}) => string;
|
|
98
|
-
/**
|
|
99
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
100
|
-
* where x is a human readable number
|
|
101
|
-
*/
|
|
102
|
-
export declare const derivativePriceToChainPrice: ({ value, quoteDecimals, }: {
|
|
103
|
-
value: number | string | BigNumber;
|
|
104
|
-
quoteDecimals?: string | number | undefined;
|
|
105
|
-
}) => BigNumber;
|
|
106
|
-
/**
|
|
107
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
108
|
-
* where x is a human readable number stringified
|
|
109
|
-
*/
|
|
110
|
-
export declare const derivativePriceToChainPriceToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
|
|
111
|
-
value: number | string | BigNumber;
|
|
112
|
-
quoteDecimals?: string | number | undefined;
|
|
113
|
-
decimalPlaces?: number | undefined;
|
|
114
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
115
|
-
}) => string;
|
|
116
|
-
/**
|
|
117
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
118
|
-
* where x is a human readable number
|
|
119
|
-
*/
|
|
120
|
-
export declare const derivativePriceFromChainPrice: ({ value, quoteDecimals, }: {
|
|
121
|
-
value: number | string | BigNumber;
|
|
122
|
-
quoteDecimals?: string | number | undefined;
|
|
123
|
-
}) => BigNumber;
|
|
124
|
-
/**
|
|
125
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
126
|
-
* where x is a human readable number stringified
|
|
127
|
-
*/
|
|
128
|
-
export declare const derivativePriceFromChainPriceToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
|
|
129
|
-
value: number | string | BigNumber;
|
|
130
|
-
quoteDecimals?: string | number | undefined;
|
|
131
|
-
decimalPlaces?: number | undefined;
|
|
132
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
133
|
-
}) => string;
|
|
134
|
-
/**
|
|
135
|
-
* Amount that the chain requires is in the x format
|
|
136
|
-
* where x is a human readable number
|
|
137
|
-
*/
|
|
138
|
-
export declare const derivativeQuantityToChainQuantity: ({ value, }: {
|
|
139
|
-
value: number | string | BigNumber;
|
|
140
|
-
}) => BigNumber;
|
|
141
|
-
/**
|
|
142
|
-
* Amount that the chain requires is in the x format
|
|
143
|
-
* where x is a human readable number stringified
|
|
144
|
-
*/
|
|
145
|
-
export declare const derivativeQuantityToChainQuantityToFixed: ({ value, decimalPlaces, roundingMode, }: {
|
|
146
|
-
value: number | string | BigNumber;
|
|
147
|
-
decimalPlaces?: number | undefined;
|
|
148
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
149
|
-
}) => string;
|
|
150
|
-
/**
|
|
151
|
-
* Amount that the chain requires is in the x format
|
|
152
|
-
* where x is a human readable number
|
|
153
|
-
*/
|
|
154
|
-
export declare const derivativeQuantityFromChainQuantity: ({ value, }: {
|
|
155
|
-
value: number | string | BigNumber;
|
|
156
|
-
}) => BigNumber;
|
|
157
|
-
/**
|
|
158
|
-
* Amount that the chain requires is in the x format
|
|
159
|
-
* where x is a human readable number stringified
|
|
160
|
-
*/
|
|
161
|
-
export declare const derivativeQuantityFromChainQuantityToFixed: ({ value, decimalPlaces, roundingMode, }: {
|
|
162
|
-
value: number | string | BigNumber;
|
|
163
|
-
decimalPlaces?: number | undefined;
|
|
164
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
165
|
-
}) => string;
|
|
166
|
-
/**
|
|
167
|
-
* Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
168
|
-
* where x is a human readable number
|
|
169
|
-
*/
|
|
170
|
-
export declare const spotPriceToChainPrice: ({ value, baseDecimals, quoteDecimals, }: {
|
|
171
|
-
value: number | string | BigNumber;
|
|
172
|
-
quoteDecimals?: string | number | undefined;
|
|
173
|
-
baseDecimals?: string | number | undefined;
|
|
174
|
-
}) => BigNumber;
|
|
175
|
-
/**
|
|
176
|
-
* Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
177
|
-
* where x is a human readable number stringified
|
|
178
|
-
*/
|
|
179
|
-
export declare const spotPriceToChainPriceToFixed: ({ value, baseDecimals, quoteDecimals, decimalPlaces, roundingMode, }: {
|
|
180
|
-
value: number | string | BigNumber;
|
|
181
|
-
quoteDecimals?: string | number | undefined;
|
|
182
|
-
baseDecimals?: string | number | undefined;
|
|
183
|
-
decimalPlaces?: number | undefined;
|
|
184
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
185
|
-
}) => string;
|
|
186
|
-
/**
|
|
187
|
-
* Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
188
|
-
* where x is a human readable number
|
|
189
|
-
*/
|
|
190
|
-
export declare const spotPriceFromChainPrice: ({ value, baseDecimals, quoteDecimals, }: {
|
|
191
|
-
value: number | string | BigNumber;
|
|
192
|
-
quoteDecimals?: string | number | undefined;
|
|
193
|
-
baseDecimals?: string | number | undefined;
|
|
194
|
-
}) => BigNumber;
|
|
195
|
-
/**
|
|
196
|
-
* Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
197
|
-
* where x is a human readable number stringified
|
|
198
|
-
*/
|
|
199
|
-
export declare const spotPriceFromChainPriceToFixed: ({ value, baseDecimals, quoteDecimals, decimalPlaces, roundingMode, }: {
|
|
200
|
-
value: number | string | BigNumber;
|
|
201
|
-
quoteDecimals?: string | number | undefined;
|
|
202
|
-
baseDecimals?: string | number | undefined;
|
|
203
|
-
decimalPlaces?: number | undefined;
|
|
204
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
205
|
-
}) => string;
|
|
206
|
-
/**
|
|
207
|
-
* Amount that the chain requires is in the x * 10^(baseDecimals) format
|
|
208
|
-
* where x is a human readable number
|
|
209
|
-
*/
|
|
210
|
-
export declare const spotQuantityToChainQuantity: ({ value, baseDecimals, }: {
|
|
211
|
-
value: number | string | BigNumber;
|
|
212
|
-
baseDecimals?: string | number | undefined;
|
|
213
|
-
}) => BigNumber;
|
|
214
|
-
/**
|
|
215
|
-
* Amount that the chain requires is in the x * 10^(baseDecimals) format
|
|
216
|
-
* where x is a human readable number
|
|
217
|
-
*/
|
|
218
|
-
export declare const spotQuantityToChainQuantityToFixed: ({ value, baseDecimals, decimalPlaces, roundingMode, }: {
|
|
219
|
-
value: number | string | BigNumber;
|
|
220
|
-
baseDecimals?: string | number | undefined;
|
|
221
|
-
decimalPlaces?: number | undefined;
|
|
222
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
223
|
-
}) => string;
|
|
224
|
-
/**
|
|
225
|
-
* Amount that the chain returns is in the x * 10^(baseDecimals) format
|
|
226
|
-
* where x is a human readable number
|
|
227
|
-
*/
|
|
228
|
-
export declare const spotQuantityFromChainQuantity: ({ value, baseDecimals, }: {
|
|
229
|
-
value: number | string | BigNumber;
|
|
230
|
-
baseDecimals?: string | number | undefined;
|
|
231
|
-
}) => BigNumber;
|
|
232
|
-
/**
|
|
233
|
-
* Amount that the chain returns is in the x * 10^(baseDecimals) format
|
|
234
|
-
* where x is a human readable number
|
|
235
|
-
*/
|
|
236
|
-
export declare const spotQuantityFromChainQuantityToFixed: ({ value, baseDecimals, decimalPlaces, roundingMode, }: {
|
|
237
|
-
value: number | string | BigNumber;
|
|
238
|
-
baseDecimals?: string | number | undefined;
|
|
239
|
-
decimalPlaces?: number | undefined;
|
|
240
|
-
roundingMode?: BigNumber.RoundingMode | undefined;
|
|
241
|
-
}) => string;
|
|
242
|
-
//# sourceMappingURL=numbers.d.ts.map
|
package/dist/numbers.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../src/numbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAIrC,eAAO,MAAM,gCAAgC,WACnC,SAAS,GAAG,MAAM,GAAG,MAAM,KAClC,MAcF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,UACvC,MAAM,GAAG,MAAM,GAAG,SAAS,cAC4B,CAAA;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,UACrC,MAAM,GAAG,MAAM,GAAG,SAAS,cAC+B,CAAA;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,UAC9B,MAAM,GAAG,MAAM,GAAG,SAAS,cAC+B,CAAA;AAEnE;;;GAGG;AACH,eAAO,MAAM,6BAA6B;WAIjC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAEsC,CAAA;AAE1E;;;GAGG;AACH,eAAO,MAAM,oCAAoC;WAMxC,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAYnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B;WAInC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAEmC,CAAA;AACvE;;;;GAIG;AACH,eAAO,MAAM,sCAAsC;WAM1C,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAYnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B;WAIjC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAE2C,CAAA;AAE/E;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;;WAQxC,MAAM,GAAG,MAAM,GAAG,SAAS;;YAUnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,+BAA+B;WAInC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAEwC,CA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BAA2B;WAI/B,MAAM,GAAG,MAAM,GAAG,SAAS;;eAE0C,CAAA;AAE9E;;;GAGG;AACH,eAAO,MAAM,kCAAkC;WAMtC,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAenC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B;WAIjC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAE0C,CAAA;AAE9E;;;GAGG;AACH,eAAO,MAAM,oCAAoC;WAMxC,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAenC,CAAA"}
|
package/dist/numbers.js
DELETED
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.spotQuantityFromChainQuantityToFixed = exports.spotQuantityFromChainQuantity = exports.spotQuantityToChainQuantityToFixed = exports.spotQuantityToChainQuantity = exports.spotPriceFromChainPriceToFixed = exports.spotPriceFromChainPrice = exports.spotPriceToChainPriceToFixed = exports.spotPriceToChainPrice = exports.derivativeQuantityFromChainQuantityToFixed = exports.derivativeQuantityFromChainQuantity = exports.derivativeQuantityToChainQuantityToFixed = exports.derivativeQuantityToChainQuantity = exports.derivativePriceFromChainPriceToFixed = exports.derivativePriceFromChainPrice = exports.derivativePriceToChainPriceToFixed = exports.derivativePriceToChainPrice = exports.derivativeMarginFromChainMarginToFixed = exports.derivativeMarginFromChainMargin = exports.derivativeMarginToChainMarginToFixed = exports.derivativeMarginToChainMargin = exports.denomAmountFromChainDenomAmountToFixed = exports.denomAmountFromChainDenomAmount = exports.denomAmountToChainDenomAmountToFixed = exports.denomAmountToChainDenomAmount = exports.amountToCosmosSdkDecAmount = exports.denomAmountToGrpcChainDenomAmount = exports.denomAmountFromGrpcChainDenomAmount = exports.getSignificantDecimalsFromNumber = void 0;
|
|
4
|
-
const classes_1 = require("./classes");
|
|
5
|
-
const $BigNumber = classes_1.BigNumber.clone({ ROUNDING_MODE: classes_1.BigNumber.ROUND_DOWN });
|
|
6
|
-
const getSignificantDecimalsFromNumber = (number) => {
|
|
7
|
-
if (Math.floor(new $BigNumber(number).toNumber()) === number) {
|
|
8
|
-
return 0;
|
|
9
|
-
}
|
|
10
|
-
const parts = new $BigNumber(number).toFixed().split('.');
|
|
11
|
-
const [, decimals] = parts;
|
|
12
|
-
/** Number doesn't have decimals */
|
|
13
|
-
if (!decimals) {
|
|
14
|
-
return 0;
|
|
15
|
-
}
|
|
16
|
-
return decimals.length;
|
|
17
|
-
};
|
|
18
|
-
exports.getSignificantDecimalsFromNumber = getSignificantDecimalsFromNumber;
|
|
19
|
-
/**
|
|
20
|
-
* On chain amounts queried from a sentry using the
|
|
21
|
-
* gRPC API are returned with an extra decimal point
|
|
22
|
-
* 18 places from the beginning, so we need to remove it
|
|
23
|
-
* to get a workable amount
|
|
24
|
-
*/
|
|
25
|
-
const denomAmountFromGrpcChainDenomAmount = (value) => new $BigNumber(value).dividedBy(new $BigNumber(10).pow(18));
|
|
26
|
-
exports.denomAmountFromGrpcChainDenomAmount = denomAmountFromGrpcChainDenomAmount;
|
|
27
|
-
/**
|
|
28
|
-
* On chain amounts broadcasted to a sentry directly using the
|
|
29
|
-
* gRPC API should be passed with an extra decimal point
|
|
30
|
-
* 18 places from the beginning, so we need to add it
|
|
31
|
-
* to get a workable amount
|
|
32
|
-
*/
|
|
33
|
-
const denomAmountToGrpcChainDenomAmount = (value) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(18));
|
|
34
|
-
exports.denomAmountToGrpcChainDenomAmount = denomAmountToGrpcChainDenomAmount;
|
|
35
|
-
/**
|
|
36
|
-
* On chain amounts (based on the cosmosSdk.Dec type)
|
|
37
|
-
* broadcasted to a sentry directly using the
|
|
38
|
-
* gRPC API should be passed with an extra decimal point
|
|
39
|
-
* 18 places from the beginning (i.e multiplied by 1e18), so we need to add it
|
|
40
|
-
* to get a workable amount
|
|
41
|
-
*/
|
|
42
|
-
const amountToCosmosSdkDecAmount = (value) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(18));
|
|
43
|
-
exports.amountToCosmosSdkDecAmount = amountToCosmosSdkDecAmount;
|
|
44
|
-
/**
|
|
45
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
46
|
-
* where x is a human readable number
|
|
47
|
-
*/
|
|
48
|
-
const denomAmountToChainDenomAmount = ({ value, decimals = 18, }) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(decimals));
|
|
49
|
-
exports.denomAmountToChainDenomAmount = denomAmountToChainDenomAmount;
|
|
50
|
-
/**
|
|
51
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
52
|
-
* where x is a human readable number
|
|
53
|
-
*/
|
|
54
|
-
const denomAmountToChainDenomAmountToFixed = ({ value, decimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
55
|
-
const number = (0, exports.denomAmountToChainDenomAmount)({ value, decimals });
|
|
56
|
-
if (decimalPlaces === undefined) {
|
|
57
|
-
return number.toFixed();
|
|
58
|
-
}
|
|
59
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
60
|
-
};
|
|
61
|
-
exports.denomAmountToChainDenomAmountToFixed = denomAmountToChainDenomAmountToFixed;
|
|
62
|
-
/**
|
|
63
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
64
|
-
* where x is a human readable number
|
|
65
|
-
*/
|
|
66
|
-
const denomAmountFromChainDenomAmount = ({ value, decimals = 18, }) => new $BigNumber(value).dividedBy(new $BigNumber(10).pow(decimals));
|
|
67
|
-
exports.denomAmountFromChainDenomAmount = denomAmountFromChainDenomAmount;
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
71
|
-
* where x is a human readable number stringified
|
|
72
|
-
*/
|
|
73
|
-
const denomAmountFromChainDenomAmountToFixed = ({ value, decimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
74
|
-
const number = (0, exports.denomAmountFromChainDenomAmount)({ value, decimals });
|
|
75
|
-
if (decimalPlaces === undefined) {
|
|
76
|
-
return number.toFixed();
|
|
77
|
-
}
|
|
78
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
79
|
-
};
|
|
80
|
-
exports.denomAmountFromChainDenomAmountToFixed = denomAmountFromChainDenomAmountToFixed;
|
|
81
|
-
/**
|
|
82
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
83
|
-
* where x is a human readable number
|
|
84
|
-
*/
|
|
85
|
-
const derivativeMarginToChainMargin = ({ value, quoteDecimals = 18, }) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(quoteDecimals));
|
|
86
|
-
exports.derivativeMarginToChainMargin = derivativeMarginToChainMargin;
|
|
87
|
-
/**
|
|
88
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
89
|
-
* where x is a human readable number stringified
|
|
90
|
-
*/
|
|
91
|
-
const derivativeMarginToChainMarginToFixed = ({ value, quoteDecimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
92
|
-
const number = (0, exports.derivativeMarginToChainMargin)({ value, quoteDecimals });
|
|
93
|
-
if (decimalPlaces === undefined) {
|
|
94
|
-
return number.toFixed();
|
|
95
|
-
}
|
|
96
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
97
|
-
};
|
|
98
|
-
exports.derivativeMarginToChainMarginToFixed = derivativeMarginToChainMarginToFixed;
|
|
99
|
-
/**
|
|
100
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
101
|
-
* where x is a human readable number
|
|
102
|
-
*/
|
|
103
|
-
const derivativeMarginFromChainMargin = ({ value, quoteDecimals = 18, }) => new $BigNumber(value).dividedBy(new $BigNumber(10).pow(quoteDecimals));
|
|
104
|
-
exports.derivativeMarginFromChainMargin = derivativeMarginFromChainMargin;
|
|
105
|
-
/**
|
|
106
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
107
|
-
* where x is a human readable number
|
|
108
|
-
*/
|
|
109
|
-
const derivativeMarginFromChainMarginToFixed = ({ value, quoteDecimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
110
|
-
const number = (0, exports.derivativeMarginFromChainMargin)({ value, quoteDecimals });
|
|
111
|
-
if (decimalPlaces === undefined) {
|
|
112
|
-
return number.toFixed();
|
|
113
|
-
}
|
|
114
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
115
|
-
};
|
|
116
|
-
exports.derivativeMarginFromChainMarginToFixed = derivativeMarginFromChainMarginToFixed;
|
|
117
|
-
/**
|
|
118
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
119
|
-
* where x is a human readable number
|
|
120
|
-
*/
|
|
121
|
-
const derivativePriceToChainPrice = ({ value, quoteDecimals = 18, }) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(quoteDecimals));
|
|
122
|
-
exports.derivativePriceToChainPrice = derivativePriceToChainPrice;
|
|
123
|
-
/**
|
|
124
|
-
* Amount that the chain requires is in the x * 10^(quoteDecimals) format
|
|
125
|
-
* where x is a human readable number stringified
|
|
126
|
-
*/
|
|
127
|
-
const derivativePriceToChainPriceToFixed = ({ value, quoteDecimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
128
|
-
const number = (0, exports.derivativePriceToChainPrice)({ value, quoteDecimals });
|
|
129
|
-
if (decimalPlaces === undefined) {
|
|
130
|
-
return number.toFixed();
|
|
131
|
-
}
|
|
132
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
133
|
-
};
|
|
134
|
-
exports.derivativePriceToChainPriceToFixed = derivativePriceToChainPriceToFixed;
|
|
135
|
-
/**
|
|
136
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
137
|
-
* where x is a human readable number
|
|
138
|
-
*/
|
|
139
|
-
const derivativePriceFromChainPrice = ({ value, quoteDecimals = 18, }) => new $BigNumber(value).dividedBy(new $BigNumber(10).pow(quoteDecimals));
|
|
140
|
-
exports.derivativePriceFromChainPrice = derivativePriceFromChainPrice;
|
|
141
|
-
/**
|
|
142
|
-
* Amount that the chain returns is in the x * 10^(quoteDecimals) format
|
|
143
|
-
* where x is a human readable number stringified
|
|
144
|
-
*/
|
|
145
|
-
const derivativePriceFromChainPriceToFixed = ({ value, quoteDecimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
146
|
-
const number = (0, exports.derivativePriceFromChainPrice)({ value, quoteDecimals });
|
|
147
|
-
if (decimalPlaces === undefined) {
|
|
148
|
-
return number.toFixed();
|
|
149
|
-
}
|
|
150
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
151
|
-
};
|
|
152
|
-
exports.derivativePriceFromChainPriceToFixed = derivativePriceFromChainPriceToFixed;
|
|
153
|
-
/**
|
|
154
|
-
* Amount that the chain requires is in the x format
|
|
155
|
-
* where x is a human readable number
|
|
156
|
-
*/
|
|
157
|
-
const derivativeQuantityToChainQuantity = ({ value, }) => new $BigNumber(value);
|
|
158
|
-
exports.derivativeQuantityToChainQuantity = derivativeQuantityToChainQuantity;
|
|
159
|
-
/**
|
|
160
|
-
* Amount that the chain requires is in the x format
|
|
161
|
-
* where x is a human readable number stringified
|
|
162
|
-
*/
|
|
163
|
-
const derivativeQuantityToChainQuantityToFixed = ({ value, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
164
|
-
const number = (0, exports.derivativeQuantityToChainQuantity)({ value });
|
|
165
|
-
if (decimalPlaces === undefined) {
|
|
166
|
-
return number.toFixed();
|
|
167
|
-
}
|
|
168
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
169
|
-
};
|
|
170
|
-
exports.derivativeQuantityToChainQuantityToFixed = derivativeQuantityToChainQuantityToFixed;
|
|
171
|
-
/**
|
|
172
|
-
* Amount that the chain requires is in the x format
|
|
173
|
-
* where x is a human readable number
|
|
174
|
-
*/
|
|
175
|
-
const derivativeQuantityFromChainQuantity = ({ value, }) => new $BigNumber(value);
|
|
176
|
-
exports.derivativeQuantityFromChainQuantity = derivativeQuantityFromChainQuantity;
|
|
177
|
-
/**
|
|
178
|
-
* Amount that the chain requires is in the x format
|
|
179
|
-
* where x is a human readable number stringified
|
|
180
|
-
*/
|
|
181
|
-
const derivativeQuantityFromChainQuantityToFixed = ({ value, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
182
|
-
const number = (0, exports.derivativeQuantityFromChainQuantity)({ value });
|
|
183
|
-
if (decimalPlaces === undefined) {
|
|
184
|
-
return number.toFixed();
|
|
185
|
-
}
|
|
186
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
187
|
-
};
|
|
188
|
-
exports.derivativeQuantityFromChainQuantityToFixed = derivativeQuantityFromChainQuantityToFixed;
|
|
189
|
-
/**
|
|
190
|
-
* Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
191
|
-
* where x is a human readable number
|
|
192
|
-
*/
|
|
193
|
-
const spotPriceToChainPrice = ({ value, baseDecimals = 18, quoteDecimals = 6, }) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(new $BigNumber(quoteDecimals).minus(baseDecimals)));
|
|
194
|
-
exports.spotPriceToChainPrice = spotPriceToChainPrice;
|
|
195
|
-
/**
|
|
196
|
-
* Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
197
|
-
* where x is a human readable number stringified
|
|
198
|
-
*/
|
|
199
|
-
const spotPriceToChainPriceToFixed = ({ value, baseDecimals = 18, quoteDecimals = 6, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
200
|
-
const number = (0, exports.spotPriceToChainPrice)({ value, baseDecimals, quoteDecimals });
|
|
201
|
-
if (decimalPlaces === undefined) {
|
|
202
|
-
return number.toFixed();
|
|
203
|
-
}
|
|
204
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
205
|
-
};
|
|
206
|
-
exports.spotPriceToChainPriceToFixed = spotPriceToChainPriceToFixed;
|
|
207
|
-
/**
|
|
208
|
-
* Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
209
|
-
* where x is a human readable number
|
|
210
|
-
*/
|
|
211
|
-
const spotPriceFromChainPrice = ({ value, baseDecimals = 18, quoteDecimals = 6, }) => new $BigNumber(value).dividedBy(new $BigNumber(10).pow(new $BigNumber(quoteDecimals).minus(baseDecimals)));
|
|
212
|
-
exports.spotPriceFromChainPrice = spotPriceFromChainPrice;
|
|
213
|
-
/**
|
|
214
|
-
* Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
|
|
215
|
-
* where x is a human readable number stringified
|
|
216
|
-
*/
|
|
217
|
-
const spotPriceFromChainPriceToFixed = ({ value, baseDecimals = 18, quoteDecimals = 6, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
218
|
-
const number = (0, exports.spotPriceFromChainPrice)({ value, baseDecimals, quoteDecimals });
|
|
219
|
-
if (decimalPlaces === undefined) {
|
|
220
|
-
return number.toFixed();
|
|
221
|
-
}
|
|
222
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
223
|
-
};
|
|
224
|
-
exports.spotPriceFromChainPriceToFixed = spotPriceFromChainPriceToFixed;
|
|
225
|
-
/**
|
|
226
|
-
* Amount that the chain requires is in the x * 10^(baseDecimals) format
|
|
227
|
-
* where x is a human readable number
|
|
228
|
-
*/
|
|
229
|
-
const spotQuantityToChainQuantity = ({ value, baseDecimals = 18, }) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(baseDecimals));
|
|
230
|
-
exports.spotQuantityToChainQuantity = spotQuantityToChainQuantity;
|
|
231
|
-
/**
|
|
232
|
-
* Amount that the chain requires is in the x * 10^(baseDecimals) format
|
|
233
|
-
* where x is a human readable number
|
|
234
|
-
*/
|
|
235
|
-
const spotQuantityToChainQuantityToFixed = ({ value, baseDecimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
236
|
-
const number = (0, exports.spotQuantityToChainQuantity)({
|
|
237
|
-
value,
|
|
238
|
-
baseDecimals,
|
|
239
|
-
});
|
|
240
|
-
if (decimalPlaces === undefined) {
|
|
241
|
-
return number.toFixed();
|
|
242
|
-
}
|
|
243
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
244
|
-
};
|
|
245
|
-
exports.spotQuantityToChainQuantityToFixed = spotQuantityToChainQuantityToFixed;
|
|
246
|
-
/**
|
|
247
|
-
* Amount that the chain returns is in the x * 10^(baseDecimals) format
|
|
248
|
-
* where x is a human readable number
|
|
249
|
-
*/
|
|
250
|
-
const spotQuantityFromChainQuantity = ({ value, baseDecimals = 18, }) => new $BigNumber(value).multipliedBy(new $BigNumber(10).pow(baseDecimals));
|
|
251
|
-
exports.spotQuantityFromChainQuantity = spotQuantityFromChainQuantity;
|
|
252
|
-
/**
|
|
253
|
-
* Amount that the chain returns is in the x * 10^(baseDecimals) format
|
|
254
|
-
* where x is a human readable number
|
|
255
|
-
*/
|
|
256
|
-
const spotQuantityFromChainQuantityToFixed = ({ value, baseDecimals = 18, decimalPlaces = undefined, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => {
|
|
257
|
-
const number = (0, exports.spotQuantityFromChainQuantity)({
|
|
258
|
-
value,
|
|
259
|
-
baseDecimals,
|
|
260
|
-
});
|
|
261
|
-
if (decimalPlaces === undefined) {
|
|
262
|
-
return number.toFixed();
|
|
263
|
-
}
|
|
264
|
-
return number.toFixed((0, exports.getSignificantDecimalsFromNumber)(number), roundingMode);
|
|
265
|
-
};
|
|
266
|
-
exports.spotQuantityFromChainQuantityToFixed = spotQuantityFromChainQuantityToFixed;
|
|
267
|
-
//# sourceMappingURL=numbers.js.map
|
package/dist/numbers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.js","sourceRoot":"","sources":["../src/numbers.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAErC,MAAM,UAAU,GAAG,mBAAS,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,mBAAS,CAAC,UAAU,EAAE,CAAC,CAAA;AAEpE,MAAM,gCAAgC,GAAG,CAC9C,MAAmC,EAC3B,EAAE;IACV,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,EAAE;QAC5D,OAAO,CAAC,CAAA;KACT;IAED,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACzD,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAA;IAE1B,mCAAmC;IACnC,IAAI,CAAC,QAAQ,EAAE;QACb,OAAO,CAAC,CAAA;KACT;IAED,OAAO,QAAQ,CAAC,MAAM,CAAA;AACxB,CAAC,CAAA;AAhBY,QAAA,gCAAgC,oCAgB5C;AAED;;;;;GAKG;AACI,MAAM,mCAAmC,GAAG,CACjD,KAAkC,EAClC,EAAE,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;AAFnD,QAAA,mCAAmC,uCAEgB;AAEhE;;;;;GAKG;AACI,MAAM,iCAAiC,GAAG,CAC/C,KAAkC,EAClC,EAAE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