@n1xyz/nord-ts 0.0.22 → 0.1.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.
- package/README.md +20 -16
- package/dist/gen/nord_pb.d.ts +100 -32
- package/dist/gen/nord_pb.js +62 -9
- package/dist/gen/openapi.d.ts +45 -8
- package/dist/nord/api/actions.d.ts +1 -0
- package/dist/nord/api/actions.js +51 -23
- package/dist/types.js +2 -2
- package/dist/utils.js +1 -0
- package/package.json +1 -1
- package/src/gen/nord_pb.ts +121 -36
- package/src/gen/openapi.ts +45 -8
- package/src/nord/api/actions.ts +59 -25
- package/src/types.ts +2 -2
- package/src/utils.ts +1 -0
- package/src/gen/nord.ts +0 -7593
package/src/types.ts
CHANGED
|
@@ -310,8 +310,8 @@ export class QuoteSize {
|
|
|
310
310
|
constructor(quotePrice: Decimal.Value, quoteSize: Decimal.Value) {
|
|
311
311
|
const p = new Decimal(quotePrice);
|
|
312
312
|
const s = new Decimal(quoteSize);
|
|
313
|
-
if (p.
|
|
314
|
-
throw new Error("quotePrice and quoteSize must be
|
|
313
|
+
if (!p.isPositive() || !s.isPositive()) {
|
|
314
|
+
throw new Error("quotePrice and quoteSize must be positive");
|
|
315
315
|
}
|
|
316
316
|
this.price = p;
|
|
317
317
|
this.size = s;
|
package/src/utils.ts
CHANGED
|
@@ -17,6 +17,7 @@ export const SESSION_TTL: bigint = 60n * 60n * 24n * 30n;
|
|
|
17
17
|
export const ZERO_DECIMAL = new Decimal(0);
|
|
18
18
|
export const MAX_BUFFER_LEN = 10_000;
|
|
19
19
|
|
|
20
|
+
// Max size of data returned from Nord endpoints
|
|
20
21
|
const MAX_PAYLOAD_SIZE = 100 * 1024; // 100 kB
|
|
21
22
|
|
|
22
23
|
/** Any type convertible to bigint */
|