@injectivelabs/utils 0.0.54 → 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.
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ // eslint-disable-next-line import/no-cycle
6
7
  const BigNumberInWei_1 = __importDefault(require("./BigNumberInWei"));
7
8
  const BigNumber_1 = __importDefault(require("./BigNumber"));
8
9
  class BigNumberInBase extends BigNumber_1.default {
@@ -1 +1 @@
1
- {"version":3,"file":"BigNumberInBase.js","sourceRoot":"","sources":["../../src/classes/BigNumberInBase.ts"],"names":[],"mappings":";;;;;AACA,sEAA6C;AAC7C,4DAAmC;AAEnC,MAAqB,eAAgB,SAAQ,mBAAS;IACpD,MAAM,CAAC,IAAI,CAAC,MAAuB;QACjC,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAA;IACpC,CAAC;IAED,KAAK,CAAC,CAAkB,EAAE,IAAa;QACrC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;IAED,IAAI,CAAC,CAAkB,EAAE,IAAa;QACpC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IACjD,CAAC;IAED,SAAS,CAAC,CAAkB,EAAE,IAAa;QACzC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IACtD,CAAC;IAED,GAAG,CAAC,CAAkB,EAAE,IAAa;QACnC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAChD,CAAC;IAED,YAAY,CAAC,CAAkB,EA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AC,EAAE,IAAI,CAAC,CAAC,CAAA;IACtD,CAAC;IAED,GAAG,CAAC,CAAkB,EAAE,IAAa;QACnC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAChD,CAAC;IAED,YAAY,CAAC,CAAkB,EAAE,IAAa;QAC5C,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IACzD,CAAC;IAED,KAAK,CAAC,CAAkB,EAAE,IAAa;QACrC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;IAED,GAAG,CAAC,CAAkB,EAAE,IAAa;QACnC,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAChD,CAAC;IAED,KAAK,CAAC,QAAQ,GAAG,EAAE;QACjB,OAAO,IAAI,wBAAc,CACvB,KAAK,CAAC,YAAY,CAAC,IAAI,mBAAS,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CACpD,CAAA;IACH,CAAC;CACF;AAtCD,kCAsCC"}
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ // eslint-disable-next-line import/no-cycle
6
7
  const BigNumberInBase_1 = __importDefault(require("./BigNumberInBase"));
7
8
  const BigNumber_1 = __importDefault(require("./BigNumber"));
8
9
  class BigNumberInWei extends BigNumber_1.default {
@@ -1 +1 @@
1
- {"version":3,"file":"BigNumberInWei.js","sourceRoot":"","sources":["../../src/classes/BigNumberInWei.ts"],"names":[],"mappings":";;;;;AACA,wEAA+C;AAC/C,4DAAmC;AAEnC,MAAqB,cAAe,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AC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IAC/C,CAAC;IAED,MAAM,CAAC,QAAQ,GAAG,EAAE;QAClB,OAAO,IAAI,yBAAe,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,mBAAS,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC9E,CAAC;CACF;AApCD,iCAoCC"}
package/dist/index.d.ts CHANGED
@@ -3,4 +3,5 @@ export * from './helpers';
3
3
  export * from './formatters';
4
4
  export * from './time';
5
5
  export * from './constants';
6
+ export * from './numbers';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAC3B,cAAc,WAAW,CAAA"}
package/dist/index.js CHANGED
@@ -15,4 +15,5 @@ __exportStar(require("./helpers"), exports);
15
15
  __exportStar(require("./formatters"), exports);
16
16
  __exportStar(require("./time"), exports);
17
17
  __exportStar(require("./constants"), exports);
18
+ __exportStar(require("./numbers"), exports);
18
19
  //# 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;AAC3B,4CAAyB"}
@@ -0,0 +1,210 @@
1
+ import { BigNumber } from './classes';
2
+ /**
3
+ * On chain amounts queried from a sentry using the
4
+ * gRPC API are returned with an extra decimal point
5
+ * 18 places from the beginning, so we need to remove it
6
+ * to get a workable amount
7
+ */
8
+ export declare const denomAmountFromGrpcChainDenomAmount: (value: string | number | BigNumber) => BigNumber;
9
+ /**
10
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
11
+ * where x is a human readable number
12
+ */
13
+ export declare const denomAmountToChainDenomAmount: ({ value, decimals, }: {
14
+ value: number | string | BigNumber;
15
+ decimals?: string | number | undefined;
16
+ }) => BigNumber;
17
+ /**
18
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
19
+ * where x is a human readable number
20
+ */
21
+ export declare const denomAmountToChainDenomAmountToFixed: ({ value, decimals, decimalPlaces, roundingMode, }: {
22
+ value: number | string | BigNumber;
23
+ decimals?: string | number | undefined;
24
+ decimalPlaces?: number | undefined;
25
+ roundingMode?: BigNumber.RoundingMode | undefined;
26
+ }) => string;
27
+ /**
28
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
29
+ * where x is a human readable number
30
+ */
31
+ export declare const denomAmountFromChainDenomAmount: ({ value, decimals, }: {
32
+ value: number | string | BigNumber;
33
+ decimals?: string | number | undefined;
34
+ }) => BigNumber;
35
+ /**
36
+ *
37
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
38
+ * where x is a human readable number stringified
39
+ */
40
+ export declare const denomAmountFromChainDenomAmountToFixed: ({ value, decimals, decimalPlaces, roundingMode, }: {
41
+ value: number | string | BigNumber;
42
+ decimals?: string | number | undefined;
43
+ decimalPlaces?: number | undefined;
44
+ roundingMode?: BigNumber.RoundingMode | undefined;
45
+ }) => string;
46
+ /**
47
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
48
+ * where x is a human readable number
49
+ */
50
+ export declare const derivativeMarginToChainMargin: ({ value, quoteDecimals, }: {
51
+ value: number | string | BigNumber;
52
+ quoteDecimals?: string | number | undefined;
53
+ }) => BigNumber;
54
+ /**
55
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
56
+ * where x is a human readable number stringified
57
+ */
58
+ export declare const derivativeMarginToChainMarginToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
59
+ decimalPlaces?: number | undefined;
60
+ roundingMode?: BigNumber.RoundingMode | undefined;
61
+ value: number | string | BigNumber;
62
+ quoteDecimals?: string | number | undefined;
63
+ }) => string;
64
+ /**
65
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
66
+ * where x is a human readable number
67
+ */
68
+ export declare const derivativeMarginFromChainMargin: ({ value, quoteDecimals, }: {
69
+ value: number | string | BigNumber;
70
+ quoteDecimals?: string | number | undefined;
71
+ }) => BigNumber;
72
+ /**
73
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
74
+ * where x is a human readable number
75
+ */
76
+ export declare const derivativeMarginFromChainMarginToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
77
+ value: number | string | BigNumber;
78
+ quoteDecimals?: string | number | undefined;
79
+ decimalPlaces?: number | undefined;
80
+ roundingMode?: BigNumber.RoundingMode | undefined;
81
+ }) => string;
82
+ /**
83
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
84
+ * where x is a human readable number
85
+ */
86
+ export declare const derivativePriceToChainPrice: ({ value, quoteDecimals, }: {
87
+ value: number | string | BigNumber;
88
+ quoteDecimals?: string | number | undefined;
89
+ }) => BigNumber;
90
+ /**
91
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
92
+ * where x is a human readable number stringified
93
+ */
94
+ export declare const derivativePriceToChainPriceToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
95
+ value: number | string | BigNumber;
96
+ quoteDecimals?: string | number | undefined;
97
+ decimalPlaces?: number | undefined;
98
+ roundingMode?: BigNumber.RoundingMode | undefined;
99
+ }) => string;
100
+ /**
101
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
102
+ * where x is a human readable number
103
+ */
104
+ export declare const derivativePriceFromChainPrice: ({ value, quoteDecimals, }: {
105
+ value: number | string | BigNumber;
106
+ quoteDecimals?: string | number | undefined;
107
+ }) => BigNumber;
108
+ /**
109
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
110
+ * where x is a human readable number stringified
111
+ */
112
+ export declare const derivativePriceFromChainPriceToFixed: ({ value, quoteDecimals, decimalPlaces, roundingMode, }: {
113
+ value: number | string | BigNumber;
114
+ quoteDecimals?: string | number | undefined;
115
+ decimalPlaces?: number | undefined;
116
+ roundingMode?: BigNumber.RoundingMode | undefined;
117
+ }) => string;
118
+ /**
119
+ * Amount that the chain requires is in the x format
120
+ * where x is a human readable number
121
+ */
122
+ export declare const derivativeQuantityToChainQuantity: ({ value, }: {
123
+ value: number | string | BigNumber;
124
+ }) => BigNumber;
125
+ /**
126
+ * Amount that the chain requires is in the x format
127
+ * where x is a human readable number stringified
128
+ */
129
+ export declare const derivativeQuantityToChainQuantityToFixed: ({ value, decimalPlaces, roundingMode, }: {
130
+ value: number | string | BigNumber;
131
+ decimalPlaces?: number | undefined;
132
+ roundingMode?: BigNumber.RoundingMode | undefined;
133
+ }) => string;
134
+ /**
135
+ * Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
136
+ * where x is a human readable number
137
+ */
138
+ export declare const spotPriceToChainPrice: ({ value, baseDecimals, quoteDecimals, }: {
139
+ value: number | string | BigNumber;
140
+ quoteDecimals?: string | number | undefined;
141
+ baseDecimals?: string | number | undefined;
142
+ }) => BigNumber;
143
+ /**
144
+ * Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
145
+ * where x is a human readable number stringified
146
+ */
147
+ export declare const spotPriceToChainPriceToFixed: ({ value, baseDecimals, quoteDecimals, decimalPlaces, roundingMode, }: {
148
+ value: number | string | BigNumber;
149
+ quoteDecimals?: string | number | undefined;
150
+ baseDecimals?: string | number | undefined;
151
+ decimalPlaces?: number | undefined;
152
+ roundingMode?: BigNumber.RoundingMode | undefined;
153
+ }) => string;
154
+ /**
155
+ * Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
156
+ * where x is a human readable number
157
+ */
158
+ export declare const spotPriceFromChainPrice: ({ value, baseDecimals, quoteDecimals, }: {
159
+ value: number | string | BigNumber;
160
+ quoteDecimals?: string | number | undefined;
161
+ baseDecimals?: string | number | undefined;
162
+ }) => BigNumber;
163
+ /**
164
+ * Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
165
+ * where x is a human readable number stringified
166
+ */
167
+ export declare const spotPriceFromChainPriceToFixed: ({ value, baseDecimals, quoteDecimals, decimalPlaces, roundingMode, }: {
168
+ value: number | string | BigNumber;
169
+ quoteDecimals?: string | number | undefined;
170
+ baseDecimals?: string | number | undefined;
171
+ decimalPlaces?: number | undefined;
172
+ roundingMode?: BigNumber.RoundingMode | undefined;
173
+ }) => string;
174
+ /**
175
+ * Amount that the chain requires is in the x * 10^(baseDecimals) format
176
+ * where x is a human readable number
177
+ */
178
+ export declare const spotQuantityToChainQuantity: ({ value, baseDecimals, }: {
179
+ value: number | string | BigNumber;
180
+ baseDecimals?: string | number | undefined;
181
+ }) => BigNumber;
182
+ /**
183
+ * Amount that the chain requires is in the x * 10^(baseDecimals) format
184
+ * where x is a human readable number
185
+ */
186
+ export declare const spotQuantityToChainQuantityToFixed: ({ value, baseDecimals, decimalPlaces, roundingMode, }: {
187
+ value: number | string | BigNumber;
188
+ baseDecimals?: string | number | undefined;
189
+ decimalPlaces?: number | undefined;
190
+ roundingMode?: BigNumber.RoundingMode | undefined;
191
+ }) => string;
192
+ /**
193
+ * Amount that the chain returns is in the x * 10^(baseDecimals) format
194
+ * where x is a human readable number
195
+ */
196
+ export declare const spotQuantityFromChainQuantity: ({ value, baseDecimals, }: {
197
+ value: number | string | BigNumber;
198
+ baseDecimals?: string | number | undefined;
199
+ }) => BigNumber;
200
+ /**
201
+ * Amount that the chain returns is in the x * 10^(baseDecimals) format
202
+ * where x is a human readable number
203
+ */
204
+ export declare const spotQuantityFromChainQuantityToFixed: ({ value, baseDecimals, decimalPlaces, roundingMode, }: {
205
+ value: number | string | BigNumber;
206
+ baseDecimals?: string | number | undefined;
207
+ decimalPlaces?: number | undefined;
208
+ roundingMode?: BigNumber.RoundingMode | undefined;
209
+ }) => string;
210
+ //# sourceMappingURL=numbers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../src/numbers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,UACvC,MAAM,GAAG,MAAM,GAAG,SAAS,cAC0B,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,6BAA6B;WAIjC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAEoC,CAAA;AAExE;;;GAGG;AACH,eAAO,MAAM,oCAAoC;WAMxC,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAOK,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,+BAA+B;WAInC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAEiC,CAAA;AACrE;;;;GAIG;AACH,eAAO,MAAM,sCAAsC;WAM1C,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAOK,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,6BAA6B;WAIjC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAEyC,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;;WAQxC,MAAM,GAAG,MAAM,GAAG,SAAS;;YAKK,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,+BAA+B;WAInC,MAAM,GAAG,MAAM,GAAG,SAAS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C;;;GAGG;AACH,eAAO,MAAM,6BAA6B;WAIjC,MAAM,GAAG,MAAM,GAAG,SAAS;;eAEwC,CAAA;AAE5E;;;GAGG;AACH,eAAO,MAAM,oCAAoC;WAMxC,MAAM,GAAG,MAAM,GAAG,SAAS;;;;YAOK,CAAA"}
@@ -0,0 +1,166 @@
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.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.denomAmountFromGrpcChainDenomAmount = void 0;
4
+ const classes_1 = require("./classes");
5
+ /**
6
+ * On chain amounts queried from a sentry using the
7
+ * gRPC API are returned with an extra decimal point
8
+ * 18 places from the beginning, so we need to remove it
9
+ * to get a workable amount
10
+ */
11
+ const denomAmountFromGrpcChainDenomAmount = (value) => new classes_1.BigNumber(value).dividedBy(new classes_1.BigNumber(10).pow(18));
12
+ exports.denomAmountFromGrpcChainDenomAmount = denomAmountFromGrpcChainDenomAmount;
13
+ /**
14
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
15
+ * where x is a human readable number
16
+ */
17
+ const denomAmountToChainDenomAmount = ({ value, decimals = 18, }) => new classes_1.BigNumber(value).multipliedBy(new classes_1.BigNumber(10).pow(decimals));
18
+ exports.denomAmountToChainDenomAmount = denomAmountToChainDenomAmount;
19
+ /**
20
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
21
+ * where x is a human readable number
22
+ */
23
+ const denomAmountToChainDenomAmountToFixed = ({ value, decimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
24
+ .multipliedBy(new classes_1.BigNumber(10).pow(decimals))
25
+ .toFixed(decimalPlaces, roundingMode);
26
+ exports.denomAmountToChainDenomAmountToFixed = denomAmountToChainDenomAmountToFixed;
27
+ /**
28
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
29
+ * where x is a human readable number
30
+ */
31
+ const denomAmountFromChainDenomAmount = ({ value, decimals = 18, }) => new classes_1.BigNumber(value).dividedBy(new classes_1.BigNumber(10).pow(decimals));
32
+ exports.denomAmountFromChainDenomAmount = denomAmountFromChainDenomAmount;
33
+ /**
34
+ *
35
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
36
+ * where x is a human readable number stringified
37
+ */
38
+ const denomAmountFromChainDenomAmountToFixed = ({ value, decimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
39
+ .dividedBy(new classes_1.BigNumber(10).pow(decimals))
40
+ .toFixed(decimalPlaces, roundingMode);
41
+ exports.denomAmountFromChainDenomAmountToFixed = denomAmountFromChainDenomAmountToFixed;
42
+ /**
43
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
44
+ * where x is a human readable number
45
+ */
46
+ const derivativeMarginToChainMargin = ({ value, quoteDecimals = 18, }) => new classes_1.BigNumber(value).multipliedBy(new classes_1.BigNumber(10).pow(quoteDecimals));
47
+ exports.derivativeMarginToChainMargin = derivativeMarginToChainMargin;
48
+ /**
49
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
50
+ * where x is a human readable number stringified
51
+ */
52
+ const derivativeMarginToChainMarginToFixed = ({ value, quoteDecimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
53
+ .multipliedBy(new classes_1.BigNumber(10).pow(quoteDecimals))
54
+ .toFixed(decimalPlaces, roundingMode);
55
+ exports.derivativeMarginToChainMarginToFixed = derivativeMarginToChainMarginToFixed;
56
+ /**
57
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
58
+ * where x is a human readable number
59
+ */
60
+ const derivativeMarginFromChainMargin = ({ value, quoteDecimals = 18, }) => new classes_1.BigNumber(value).dividedBy(new classes_1.BigNumber(10).pow(quoteDecimals));
61
+ exports.derivativeMarginFromChainMargin = derivativeMarginFromChainMargin;
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 derivativeMarginFromChainMarginToFixed = ({ value, quoteDecimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
67
+ .dividedBy(new classes_1.BigNumber(10).pow(quoteDecimals))
68
+ .toFixed(decimalPlaces, roundingMode);
69
+ exports.derivativeMarginFromChainMarginToFixed = derivativeMarginFromChainMarginToFixed;
70
+ /**
71
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
72
+ * where x is a human readable number
73
+ */
74
+ const derivativePriceToChainPrice = ({ value, quoteDecimals = 18, }) => new classes_1.BigNumber(value).multipliedBy(new classes_1.BigNumber(10).pow(quoteDecimals));
75
+ exports.derivativePriceToChainPrice = derivativePriceToChainPrice;
76
+ /**
77
+ * Amount that the chain requires is in the x * 10^(quoteDecimals) format
78
+ * where x is a human readable number stringified
79
+ */
80
+ const derivativePriceToChainPriceToFixed = ({ value, quoteDecimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
81
+ .multipliedBy(new classes_1.BigNumber(10).pow(quoteDecimals))
82
+ .toFixed(decimalPlaces, roundingMode);
83
+ exports.derivativePriceToChainPriceToFixed = derivativePriceToChainPriceToFixed;
84
+ /**
85
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
86
+ * where x is a human readable number
87
+ */
88
+ const derivativePriceFromChainPrice = ({ value, quoteDecimals = 18, }) => new classes_1.BigNumber(value).dividedBy(new classes_1.BigNumber(10).pow(quoteDecimals));
89
+ exports.derivativePriceFromChainPrice = derivativePriceFromChainPrice;
90
+ /**
91
+ * Amount that the chain returns is in the x * 10^(quoteDecimals) format
92
+ * where x is a human readable number stringified
93
+ */
94
+ const derivativePriceFromChainPriceToFixed = ({ value, quoteDecimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
95
+ .dividedBy(new classes_1.BigNumber(10).pow(quoteDecimals))
96
+ .toFixed(decimalPlaces, roundingMode);
97
+ exports.derivativePriceFromChainPriceToFixed = derivativePriceFromChainPriceToFixed;
98
+ /**
99
+ * Amount that the chain requires is in the x format
100
+ * where x is a human readable number
101
+ */
102
+ const derivativeQuantityToChainQuantity = ({ value, }) => new classes_1.BigNumber(value);
103
+ exports.derivativeQuantityToChainQuantity = derivativeQuantityToChainQuantity;
104
+ /**
105
+ * Amount that the chain requires is in the x format
106
+ * where x is a human readable number stringified
107
+ */
108
+ const derivativeQuantityToChainQuantityToFixed = ({ value, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value).toFixed(decimalPlaces, roundingMode);
109
+ exports.derivativeQuantityToChainQuantityToFixed = derivativeQuantityToChainQuantityToFixed;
110
+ /**
111
+ * Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
112
+ * where x is a human readable number
113
+ */
114
+ const spotPriceToChainPrice = ({ value, baseDecimals = 18, quoteDecimals = 6, }) => new classes_1.BigNumber(value).multipliedBy(new classes_1.BigNumber(10).pow(new classes_1.BigNumber(quoteDecimals).minus(baseDecimals)));
115
+ exports.spotPriceToChainPrice = spotPriceToChainPrice;
116
+ /**
117
+ * Amount that the chain requires is in the x / 10^(quoteDecimals - baseDecimals) format
118
+ * where x is a human readable number stringified
119
+ */
120
+ const spotPriceToChainPriceToFixed = ({ value, baseDecimals = 18, quoteDecimals = 6, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
121
+ .multipliedBy(new classes_1.BigNumber(10).pow(new classes_1.BigNumber(quoteDecimals).minus(baseDecimals)))
122
+ .toFixed(decimalPlaces, roundingMode);
123
+ exports.spotPriceToChainPriceToFixed = spotPriceToChainPriceToFixed;
124
+ /**
125
+ * Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
126
+ * where x is a human readable number
127
+ */
128
+ const spotPriceFromChainPrice = ({ value, baseDecimals = 18, quoteDecimals = 6, }) => new classes_1.BigNumber(value).dividedBy(new classes_1.BigNumber(10).pow(new classes_1.BigNumber(quoteDecimals).minus(baseDecimals)));
129
+ exports.spotPriceFromChainPrice = spotPriceFromChainPrice;
130
+ /**
131
+ * Amount that the chain returns is in the x / 10^(quoteDecimals - baseDecimals) format
132
+ * where x is a human readable number stringified
133
+ */
134
+ const spotPriceFromChainPriceToFixed = ({ value, baseDecimals = 18, quoteDecimals = 6, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
135
+ .dividedBy(new classes_1.BigNumber(10).pow(new classes_1.BigNumber(quoteDecimals).minus(baseDecimals)))
136
+ .toFixed(decimalPlaces, roundingMode);
137
+ exports.spotPriceFromChainPriceToFixed = spotPriceFromChainPriceToFixed;
138
+ /**
139
+ * Amount that the chain requires is in the x * 10^(baseDecimals) format
140
+ * where x is a human readable number
141
+ */
142
+ const spotQuantityToChainQuantity = ({ value, baseDecimals = 18, }) => new classes_1.BigNumber(value).multipliedBy(new classes_1.BigNumber(10).pow(baseDecimals));
143
+ exports.spotQuantityToChainQuantity = spotQuantityToChainQuantity;
144
+ /**
145
+ * Amount that the chain requires is in the x * 10^(baseDecimals) format
146
+ * where x is a human readable number
147
+ */
148
+ const spotQuantityToChainQuantityToFixed = ({ value, baseDecimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
149
+ .multipliedBy(new classes_1.BigNumber(10).pow(baseDecimals))
150
+ .toFixed(decimalPlaces, roundingMode);
151
+ exports.spotQuantityToChainQuantityToFixed = spotQuantityToChainQuantityToFixed;
152
+ /**
153
+ * Amount that the chain returns is in the x * 10^(baseDecimals) format
154
+ * where x is a human readable number
155
+ */
156
+ const spotQuantityFromChainQuantity = ({ value, baseDecimals = 18, }) => new classes_1.BigNumber(value).multipliedBy(new classes_1.BigNumber(10).pow(baseDecimals));
157
+ exports.spotQuantityFromChainQuantity = spotQuantityFromChainQuantity;
158
+ /**
159
+ * Amount that the chain returns is in the x * 10^(baseDecimals) format
160
+ * where x is a human readable number
161
+ */
162
+ const spotQuantityFromChainQuantityToFixed = ({ value, baseDecimals = 18, decimalPlaces = 0, roundingMode = classes_1.BigNumber.ROUND_DOWN, }) => new classes_1.BigNumber(value)
163
+ .multipliedBy(new classes_1.BigNumber(10).pow(baseDecimals))
164
+ .toFixed(decimalPlaces, roundingMode);
165
+ exports.spotQuantityFromChainQuantityToFixed = spotQuantityFromChainQuantityToFixed;
166
+ //# sourceMappingURL=numbers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numbers.js","sourceRoot":"","sources":["../src/numbers.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAErC;;;;;GAKG;AACI,MAAM,mCAAmC,GAAG,CACjD,KAAkC,EAClC,EAAE,CAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,mBAAS,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAA;AAFjD,QAAA,mCAAmC,uCAEc;AAE9D;;;GAGG;AACI,MAAM,6BAA6B,GAAG,CAAC,EAC5C,KAAK,EACL,QAAQ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;KACjD,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC,CAAA;AAb5B,QAAA,kCAAkC,sCAaN;AAEzC;;;GAGG;AACI,MAAM,6BAA6B,GAAG,CAAC,EAC5C,KAAK,EACL,YAAY,GAAG,EAAE,GAIlB,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,IAAI,mBAAS,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAA;AAN/D,QAAA,6BAA6B,iCAMkC;AAE5E;;;GAGG;AACI,MAAM,oCAAoC,GAAG,CAAC,EACnD,KAAK,EACL,YAAY,GAAG,EAAE,EACjB,aAAa,GAAG,CAAC,EACjB,YAAY,GAAG,mBAAS,CAAC,UAAU,GAMpC,EAAE,EAAE,CACH,IAAI,mBAAS,CAAC,KAAK,CAAC;KACjB,YAAY,CAAC,IAAI,mBAAS,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;KACjD,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC,CAAA;AAb5B,QAAA,oCAAoC,wCAaR"}
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.54",
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": "856755179ac526f415f108b90a7b6f58f3e3258d"
38
+ "gitHead": "bc0ec90c28bdf3e990165c64af39a91b2895a3b0"
39
39
  }