@percolatorct/sdk 2.0.3 → 2.0.5
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 +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/solana/slab.d.ts +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript SDK for building clients, bots, and UIs on top of the [Percolator](https://github.com/dcccrypto/percolator) perpetual futures protocol on Solana.
|
|
4
4
|
|
|
5
|
-
> **EXPERIMENTAL. NOT AUDITED.** `2.0.
|
|
5
|
+
> **EXPERIMENTAL. NOT AUDITED.** `2.0.5`. v12.19 single-target. 792 tests passing. Do NOT use with real funds.
|
|
6
6
|
|
|
7
7
|
## Target wrapper
|
|
8
8
|
|
package/dist/index.js
CHANGED
|
@@ -2871,6 +2871,12 @@ for (const [label, n] of [["Small", 256], ["Medium", 1024], ["Large", 4096]]) {
|
|
|
2871
2871
|
const size = V12_17_ENGINE_OFF_SBF + accountsOff + n * V12_17_ACCOUNT_SIZE_SBF + V12_17_RISK_BUF_LEN + n * V12_17_GEN_TABLE_ENTRY;
|
|
2872
2872
|
SLAB_TIERS_V12_17[label.toLowerCase()] = { maxAccounts: n, dataSize: size, label, description: `${n} slots (v12.17)` };
|
|
2873
2873
|
}
|
|
2874
|
+
var SLAB_TIERS_V12_19 = {
|
|
2875
|
+
micro: { maxAccounts: 64, dataSize: 26848, label: "Micro", description: "64 slots (v12.19, --features micro)" },
|
|
2876
|
+
small: { maxAccounts: 256, dataSize: 96760, label: "Small", description: "256 slots (v12.19, --features small) \u2014 deployed mainnet ESa89R5..." },
|
|
2877
|
+
medium: { maxAccounts: 1024, dataSize: 376408, label: "Medium", description: "1024 slots (v12.19, --features medium)" },
|
|
2878
|
+
large: { maxAccounts: 4096, dataSize: 1495e3, label: "Large", description: "4096 slots (v12.19, default features)" }
|
|
2879
|
+
};
|
|
2874
2880
|
function buildLayoutVSetDexPool(maxAccounts) {
|
|
2875
2881
|
const engineOff = V_SETDEXPOOL_ENGINE_OFF;
|
|
2876
2882
|
const bitmapOff = V_ADL_ENGINE_BITMAP_OFF;
|
|
@@ -3985,7 +3991,7 @@ function parseAccount(data, idx) {
|
|
|
3985
3991
|
if (data.length < base + layout.accountSize) {
|
|
3986
3992
|
throw new Error("Slab data too short for account");
|
|
3987
3993
|
}
|
|
3988
|
-
const isV12_17 = layout.accountSize === V12_17_ACCOUNT_SIZE || layout.accountSize === V12_17_ACCOUNT_SIZE_SBF;
|
|
3994
|
+
const isV12_17 = layout.accountSize === V12_17_ACCOUNT_SIZE || layout.accountSize === V12_17_ACCOUNT_SIZE_SBF || layout.accountSize === V12_19_ACCOUNT_SIZE_SBF;
|
|
3989
3995
|
const isV12_15 = !isV12_17 && (layout.accountSize === V12_15_ACCOUNT_SIZE || layout.accountSize === V12_15_ACCOUNT_SIZE_SMALL);
|
|
3990
3996
|
const isV12_1EP = !isV12_17 && !isV12_15 && layout.accountSize === V12_1_EP_SBF_ACCOUNT_SIZE && layout.engineOff === V12_1_SBF_ENGINE_OFF;
|
|
3991
3997
|
const isV12_1 = !isV12_17 && !isV12_15 && !isV12_1EP && (layout.engineOff === V12_1_ENGINE_OFF || layout.engineOff === V12_1_SBF_ENGINE_OFF) && (layout.accountSize === V12_1_ACCOUNT_SIZE || layout.accountSize === V12_1_ACCOUNT_SIZE_SBF);
|
|
@@ -4651,6 +4657,10 @@ async function discoverMarkets(connection, programId, options = {}) {
|
|
|
4651
4657
|
const ALL_TIERS = [
|
|
4652
4658
|
...Object.values(SLAB_TIERS),
|
|
4653
4659
|
// v12.17 (default)
|
|
4660
|
+
...Object.values(SLAB_TIERS_V12_19),
|
|
4661
|
+
// v12.19 (deployed mainnet)
|
|
4662
|
+
...Object.values(SLAB_TIERS_V12_17),
|
|
4663
|
+
// v12.17 (explicit)
|
|
4654
4664
|
...Object.values(SLAB_TIERS_V12_15),
|
|
4655
4665
|
// v12.15
|
|
4656
4666
|
...Object.values(SLAB_TIERS_V12_1),
|
|
@@ -7043,6 +7053,7 @@ export {
|
|
|
7043
7053
|
SLAB_TIERS_V12_1,
|
|
7044
7054
|
SLAB_TIERS_V12_15,
|
|
7045
7055
|
SLAB_TIERS_V12_17,
|
|
7056
|
+
SLAB_TIERS_V12_19,
|
|
7046
7057
|
SLAB_TIERS_V1D,
|
|
7047
7058
|
SLAB_TIERS_V1D_LEGACY,
|
|
7048
7059
|
SLAB_TIERS_V1M,
|