@hadron-fi/sdk 0.1.0 → 0.2.0

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.mjs CHANGED
@@ -327,7 +327,7 @@ function decodeCurveUpdates(data) {
327
327
  opKind: buf.readUInt8(opOffset + 1),
328
328
  pointIndex: buf.readUInt8(opOffset + 2),
329
329
  interpolation: buf.readUInt8(opOffset + 3),
330
- xIn: buf.readBigUInt64LE(opOffset + 4),
330
+ amountIn: buf.readBigUInt64LE(opOffset + 4),
331
331
  priceFactorQ32: buf.readBigUInt64LE(opOffset + 12),
332
332
  params: new Uint8Array(buf.subarray(opOffset + 20, opOffset + 24))
333
333
  });
@@ -348,7 +348,7 @@ function decodeCurveSide(data, curveType, slot, maxSlots, maxPoints) {
348
348
  for (let i = 0; i < n; i++) {
349
349
  const pOff = pointsStart + i * CURVE_POINT_LEN;
350
350
  points.push({
351
- xIn: buf.readBigUInt64LE(pOff),
351
+ amountIn: buf.readBigUInt64LE(pOff),
352
352
  priceFactorQ32: buf.readBigUInt64LE(pOff + 8),
353
353
  interpolation: buf.readUInt8(pOff + 16),
354
354
  params: new Uint8Array(buf.subarray(pOff + 17, pOff + 21))
@@ -664,7 +664,7 @@ function buildSetCurve(authority, curveMetaPda, curvePrefabsPda, params, program
664
664
  data.writeUInt8(xMode, offset);
665
665
  offset += 1;
666
666
  for (const p of params.points) {
667
- data.writeBigUInt64LE(p.xIn, offset);
667
+ data.writeBigUInt64LE(p.amountIn, offset);
668
668
  offset += 8;
669
669
  data.writeBigUInt64LE(toQ32(p.priceFactor), offset);
670
670
  offset += 8;
@@ -897,7 +897,7 @@ function buildSubmitCurveUpdates(authority, curveUpdatesPda, ops, programId = HA
897
897
  offset += 1;
898
898
  data.writeUInt8(op.interpolation, offset);
899
899
  offset += 1;
900
- data.writeBigUInt64LE(op.xIn, offset);
900
+ data.writeBigUInt64LE(op.amountIn, offset);
901
901
  offset += 8;
902
902
  data.writeBigUInt64LE(op.priceFactorQ32, offset);
903
903
  offset += 8;