@vordium/sdk 0.2.0 → 0.2.2
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 +13 -5
- package/dist/cjs/client.js +9 -3
- package/dist/cjs/http.js +58 -4
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/network.js +128 -10
- package/dist/cjs/nonce.js +7 -3
- package/dist/cjs/releaseRecord.js +833 -0
- package/dist/cjs/rounding.js +4 -0
- package/dist/esm/client.d.ts +9 -3
- package/dist/esm/client.js +10 -4
- package/dist/esm/http.d.ts +11 -0
- package/dist/esm/http.js +57 -3
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/network.d.ts +60 -12
- package/dist/esm/network.js +126 -9
- package/dist/esm/nonce.d.ts +3 -1
- package/dist/esm/nonce.js +7 -3
- package/dist/esm/pins.d.ts +3 -1
- package/dist/esm/releaseRecord.d.ts +141 -0
- package/dist/esm/releaseRecord.js +819 -0
- package/dist/esm/rounding.js +4 -0
- package/package.json +3 -1
package/dist/esm/rounding.js
CHANGED
|
@@ -197,6 +197,10 @@ export function pairSpecs(read) {
|
|
|
197
197
|
if (!s || typeof s !== 'object')
|
|
198
198
|
throw new OrderValueError('the market rules read has no specs; nothing was signed.');
|
|
199
199
|
const sp = s;
|
|
200
|
+
if (Array.isArray(sp.pairs) && sp.pairs.length && (sp.min_order_notional_6dec === undefined || sp.min_order_notional_6dec === null || sp.min_order_notional_6dec === '')) {
|
|
201
|
+
// a read that lists markets but not the smallest order value is trimmed or out of date: never read it as "no minimum"
|
|
202
|
+
throw new SpecsUnavailable('the market rules do not name the smallest order value (min_order_notional_6dec); nothing was signed.');
|
|
203
|
+
}
|
|
200
204
|
const minNotional6 = count(sp.min_order_notional_6dec);
|
|
201
205
|
const out = new Map();
|
|
202
206
|
for (const p of Array.isArray(sp.pairs) ? sp.pairs : []) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vordium/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "TypeScript and JavaScript SDK for Vordium Chain and the Vordex perpetuals exchange: signing, orders, session keys, agents, TWAP, margin mode and live feeds.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Vordium <dev@vordium.com>",
|
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
"test": "node --test test/*.test.mjs"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"@noble/curves": "1.2.0",
|
|
45
|
+
"@noble/hashes": "1.3.2",
|
|
44
46
|
"ethers": "^6.13.0",
|
|
45
47
|
"ws": "^8.18.0"
|
|
46
48
|
},
|