@percolatorct/sdk 1.0.0-beta.35 → 1.0.0-beta.37
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.js +85 -1
- package/dist/index.js.map +1 -1
- package/dist/solana/slab.d.ts +1 -8
- package/package.json +10 -10
package/dist/solana/slab.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export interface SlabLayout {
|
|
|
52
52
|
hasInsuranceIsolation: boolean;
|
|
53
53
|
engineInsuranceIsolatedOff: number;
|
|
54
54
|
engineInsuranceIsolationBpsOff: number;
|
|
55
|
+
configMarkEwmaOff?: number;
|
|
55
56
|
}
|
|
56
57
|
export declare const ENGINE_OFF = 600;
|
|
57
58
|
export declare const ENGINE_MARK_PRICE_OFF = 400;
|
|
@@ -434,14 +435,6 @@ export declare function readLastThrUpdateSlot(data: Uint8Array): bigint;
|
|
|
434
435
|
* Parse slab header (first 72 bytes — layout-independent).
|
|
435
436
|
*/
|
|
436
437
|
export declare function parseHeader(data: Uint8Array): SlabHeader;
|
|
437
|
-
/**
|
|
438
|
-
* Parse market config. Layout-version aware.
|
|
439
|
-
* For V0 slabs, fields beyond the basic config are read if present in the data,
|
|
440
|
-
* otherwise defaults are returned.
|
|
441
|
-
*
|
|
442
|
-
* @param data - Slab data (may be a partial slice for discovery; pass layoutHint in that case)
|
|
443
|
-
* @param layoutHint - Pre-detected layout to use; if omitted, detected from data.length.
|
|
444
|
-
*/
|
|
445
438
|
export declare function parseConfig(data: Uint8Array, layoutHint?: SlabLayout | null): MarketConfig;
|
|
446
439
|
/**
|
|
447
440
|
* Parse RiskParams from engine data. Layout-version aware.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percolatorct/sdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.37",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -19,6 +19,14 @@
|
|
|
19
19
|
"files": [
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
24
|
+
"test": "tsx test/abi.test.ts && tsx test/slab.test.ts && tsx test/validation.test.ts && tsx test/dex-oracle.test.ts && tsx test/trading.test.ts && tsx test/warmup-leverage-cap.test.ts && tsx test/dynamic-fees.test.ts && tsx test/oracle.test.ts && vitest run",
|
|
25
|
+
"lint": "tsc --noEmit",
|
|
26
|
+
"verify-layout": "tsx scripts/verify-layout.ts",
|
|
27
|
+
"update-parity-fixtures": "node scripts/update-parity-fixtures.mjs",
|
|
28
|
+
"parity:check": "node scripts/check-parity-fixtures.mjs"
|
|
29
|
+
},
|
|
22
30
|
"dependencies": {
|
|
23
31
|
"@solana/spl-token": "^0.4.14",
|
|
24
32
|
"@solana/web3.js": "^1.95.4"
|
|
@@ -30,13 +38,5 @@
|
|
|
30
38
|
"tsx": "^4.21.0",
|
|
31
39
|
"typescript": "^5.7.2",
|
|
32
40
|
"vitest": "^4.0.18"
|
|
33
|
-
},
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "tsup && tsc --emitDeclarationOnly --declaration --outDir dist",
|
|
36
|
-
"test": "tsx test/abi.test.ts && tsx test/slab.test.ts && tsx test/validation.test.ts && tsx test/dex-oracle.test.ts && tsx test/trading.test.ts && tsx test/warmup-leverage-cap.test.ts && tsx test/dynamic-fees.test.ts && tsx test/oracle.test.ts && vitest run",
|
|
37
|
-
"lint": "tsc --noEmit",
|
|
38
|
-
"verify-layout": "tsx scripts/verify-layout.ts",
|
|
39
|
-
"update-parity-fixtures": "node scripts/update-parity-fixtures.mjs",
|
|
40
|
-
"parity:check": "node scripts/check-parity-fixtures.mjs"
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
}
|