@percolatorct/sdk 1.0.0-beta.10 → 1.0.0-beta.11

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 CHANGED
@@ -2215,10 +2215,10 @@ function buildLayoutVSetDexPool(maxAccounts) {
2215
2215
  };
2216
2216
  }
2217
2217
  function buildLayoutV12_1(maxAccounts, dataLen) {
2218
- const engineOff = V12_1_ENGINE_OFF;
2219
- const bitmapOff = V12_1_ENGINE_BITMAP_OFF;
2220
- const hostSize = computeSlabSize(engineOff, bitmapOff, V12_1_ACCOUNT_SIZE, maxAccounts, 18);
2218
+ const hostSize = computeSlabSize(V12_1_ENGINE_OFF, V12_1_ENGINE_BITMAP_OFF, V12_1_ACCOUNT_SIZE, maxAccounts, 18);
2221
2219
  const isSbf = dataLen !== void 0 && dataLen !== hostSize;
2220
+ const engineOff = isSbf ? 616 : V12_1_ENGINE_OFF;
2221
+ const bitmapOff = isSbf ? 590 : V12_1_ENGINE_BITMAP_OFF - V12_1_ENGINE_OFF;
2222
2222
  const accountSize = isSbf ? V12_1_ACCOUNT_SIZE_SBF : V12_1_ACCOUNT_SIZE;
2223
2223
  const bitmapWords = Math.ceil(maxAccounts / 64);
2224
2224
  const bitmapBytes = bitmapWords * 8;
@@ -2234,8 +2234,8 @@ function buildLayoutV12_1(maxAccounts, dataLen) {
2234
2234
  // 72 (not 104 — V12_1 removed the 32-byte header extension)
2235
2235
  configOffset: V0_HEADER_LEN,
2236
2236
  // 72
2237
- configLen: 576,
2238
- // 544 + 32 (dex_pool: [u8;32] added in V12_1)
2237
+ configLen: isSbf ? 544 : 576,
2238
+ // SBF=544, host=576 (alignment diff)
2239
2239
  reservedOff: V1_RESERVED_OFF,
2240
2240
  engineOff,
2241
2241
  accountSize,