@0dotxyz/p0-ts-sdk 2.6.1 → 2.6.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/dist/vendor.cjs CHANGED
@@ -45218,11 +45218,11 @@ function deriveExponentClmmEventAuthority() {
45218
45218
  EXPONENT_CLMM_PROGRAM_ID
45219
45219
  )[0];
45220
45220
  }
45221
- var MERGE_DISCRIMINATOR = Buffer.from([5]);
45221
+ var MERGE_DISCRIMINATOR = buffer.Buffer.from([5]);
45222
45222
  function makeExponentMergeIx(accounts, amountNative) {
45223
45223
  const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
45224
45224
  const eventAuthority = deriveExponentEventAuthority();
45225
- const data = Buffer.alloc(MERGE_DISCRIMINATOR.length + 8);
45225
+ const data = buffer.Buffer.alloc(MERGE_DISCRIMINATOR.length + 8);
45226
45226
  MERGE_DISCRIMINATOR.copy(data, 0);
45227
45227
  data.writeBigUInt64LE(amountNative, MERGE_DISCRIMINATOR.length);
45228
45228
  const keys = [
@@ -45251,7 +45251,7 @@ function makeExponentMergeIx(accounts, amountNative) {
45251
45251
  data
45252
45252
  });
45253
45253
  }
45254
- var TRADE_PT_DISCRIMINATOR = Buffer.from([17]);
45254
+ var TRADE_PT_DISCRIMINATOR = buffer.Buffer.from([17]);
45255
45255
  function exponentBuyPtArgs({
45256
45256
  ptOutNative,
45257
45257
  maxSyInNative
@@ -45261,7 +45261,7 @@ function exponentBuyPtArgs({
45261
45261
  function makeExponentTradePtIx(accounts, args) {
45262
45262
  const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
45263
45263
  const eventAuthority = deriveExponentEventAuthority();
45264
- const data = Buffer.alloc(TRADE_PT_DISCRIMINATOR.length + 16);
45264
+ const data = buffer.Buffer.alloc(TRADE_PT_DISCRIMINATOR.length + 16);
45265
45265
  TRADE_PT_DISCRIMINATOR.copy(data, 0);
45266
45266
  data.writeBigInt64LE(args.netTraderPt, TRADE_PT_DISCRIMINATOR.length);
45267
45267
  data.writeBigInt64LE(args.syConstraint, TRADE_PT_DISCRIMINATOR.length + 8);
@@ -45287,11 +45287,11 @@ function makeExponentTradePtIx(accounts, args) {
45287
45287
  data
45288
45288
  });
45289
45289
  }
45290
- var STRIP_DISCRIMINATOR = Buffer.from([4]);
45290
+ var STRIP_DISCRIMINATOR = buffer.Buffer.from([4]);
45291
45291
  function makeExponentStripIx(accounts, amountNative) {
45292
45292
  const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
45293
45293
  const eventAuthority = deriveExponentEventAuthority();
45294
- const data = Buffer.alloc(STRIP_DISCRIMINATOR.length + 8);
45294
+ const data = buffer.Buffer.alloc(STRIP_DISCRIMINATOR.length + 8);
45295
45295
  STRIP_DISCRIMINATOR.copy(data, 0);
45296
45296
  data.writeBigUInt64LE(amountNative, STRIP_DISCRIMINATOR.length);
45297
45297
  const keys = [
@@ -45315,11 +45315,11 @@ function makeExponentStripIx(accounts, amountNative) {
45315
45315
  ];
45316
45316
  return new web3_js.TransactionInstruction({ keys, programId: EXPONENT_CORE_PROGRAM_ID, data });
45317
45317
  }
45318
- var WRAPPER_MERGE_DISCRIMINATOR = Buffer.from([39]);
45318
+ var WRAPPER_MERGE_DISCRIMINATOR = buffer.Buffer.from([39]);
45319
45319
  function makeExponentWrapperMergeIx(accounts, args) {
45320
45320
  const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
45321
45321
  const eventAuthority = deriveExponentEventAuthority();
45322
- const data = Buffer.alloc(WRAPPER_MERGE_DISCRIMINATOR.length + 9);
45322
+ const data = buffer.Buffer.alloc(WRAPPER_MERGE_DISCRIMINATOR.length + 9);
45323
45323
  WRAPPER_MERGE_DISCRIMINATOR.copy(data, 0);
45324
45324
  data.writeBigUInt64LE(args.amountPyNative, WRAPPER_MERGE_DISCRIMINATOR.length);
45325
45325
  data.writeUInt8(args.redeemSyAccountsUntil, WRAPPER_MERGE_DISCRIMINATOR.length + 8);
@@ -45345,7 +45345,7 @@ function makeExponentWrapperMergeIx(accounts, args) {
45345
45345
  ];
45346
45346
  return new web3_js.TransactionInstruction({ keys, programId: EXPONENT_CORE_PROGRAM_ID, data });
45347
45347
  }
45348
- var SPL_STAKE_POOL_UPDATE_BALANCE_TAG = Buffer.from([7]);
45348
+ var SPL_STAKE_POOL_UPDATE_BALANCE_TAG = buffer.Buffer.from([7]);
45349
45349
  function makeSplStakePoolUpdateBalanceIx(accounts) {
45350
45350
  const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
45351
45351
  const keys = [
@@ -45360,13 +45360,13 @@ function makeSplStakePoolUpdateBalanceIx(accounts) {
45360
45360
  return new web3_js.TransactionInstruction({
45361
45361
  keys,
45362
45362
  programId: accounts.stakePoolProgram,
45363
- data: Buffer.from(SPL_STAKE_POOL_UPDATE_BALANCE_TAG)
45363
+ data: buffer.Buffer.from(SPL_STAKE_POOL_UPDATE_BALANCE_TAG)
45364
45364
  });
45365
45365
  }
45366
- var CLMM_TRADE_PT_DISCRIMINATOR = Buffer.from([3]);
45366
+ var CLMM_TRADE_PT_DISCRIMINATOR = buffer.Buffer.from([3]);
45367
45367
  function encodeOptionU64(value) {
45368
- if (value === null) return Buffer.from([0]);
45369
- const buf = Buffer.alloc(9);
45368
+ if (value === null) return buffer.Buffer.from([0]);
45369
+ const buf = buffer.Buffer.alloc(9);
45370
45370
  buf.writeUInt8(1, 0);
45371
45371
  buf.writeBigUInt64LE(value, 1);
45372
45372
  return buf;
@@ -45385,14 +45385,14 @@ function exponentClmmBuyPtArgs({
45385
45385
  function makeExponentClmmTradePtIx(accounts, args) {
45386
45386
  const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
45387
45387
  const eventAuthority = deriveExponentClmmEventAuthority();
45388
- const head = Buffer.alloc(CLMM_TRADE_PT_DISCRIMINATOR.length + 9);
45388
+ const head = buffer.Buffer.alloc(CLMM_TRADE_PT_DISCRIMINATOR.length + 9);
45389
45389
  CLMM_TRADE_PT_DISCRIMINATOR.copy(head, 0);
45390
45390
  head.writeBigUInt64LE(args.amountIn, CLMM_TRADE_PT_DISCRIMINATOR.length);
45391
45391
  head.writeUInt8(args.swapDirection, CLMM_TRADE_PT_DISCRIMINATOR.length + 8);
45392
- const data = Buffer.concat([
45392
+ const data = buffer.Buffer.concat([
45393
45393
  head,
45394
45394
  encodeOptionU64(args.amountOutConstraint),
45395
- Buffer.from([0])
45395
+ buffer.Buffer.from([0])
45396
45396
  ]);
45397
45397
  const keys = [
45398
45398
  { pubkey: accounts.trader, isSigner: true, isWritable: true },