@whetstone-research/doppler-sdk 1.0.26 → 1.0.28

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.
@@ -1,5 +1,5 @@
1
1
  import { MAX_HOOK_ALLOWLIST, MAX_ORACLE_OBSERVATIONS, ACCOUNT_DISCRIMINATORS, CPMM_PROGRAM_ID, Q64_ONE, BPS_DENOM, getPoolAddress, sortMints, getPositionAddress, getOracleAddress } from './chunk-WD5VOZGI.js';
2
- import { getAddressCodec, getBooleanCodec, getU8Codec, getU16Codec, getU32Codec, getU64Codec, getU128Codec, transformCodec, getArrayCodec, fixCodecSize, getBytesCodec, getStructCodec, getHiddenPrefixDecoder, getConstantDecoder, mergeBytes, fixEncoderSize, getBytesEncoder, transformEncoder, getStructEncoder, getStructDecoder, fixDecoderSize, getBytesDecoder, combineCodec, SolanaError, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, getU64Encoder, getU64Decoder, getProgramDerivedAddress, getAddressEncoder, getU16Encoder, getBooleanEncoder, getArrayEncoder, getAddressDecoder, getU16Decoder, getBooleanDecoder, getArrayDecoder, getU128Encoder, getU32Encoder, getU128Decoder, getU32Decoder, getU8Encoder, getU8Decoder } from '@solana/kit';
2
+ import { getAddressCodec, getBooleanCodec, getU8Codec, getU16Codec, getU32Codec, getU64Codec, getU128Codec, transformCodec, getArrayCodec, fixCodecSize, getBytesCodec, getStructCodec, getHiddenPrefixDecoder, getConstantDecoder, mergeBytes, AccountRole, fixEncoderSize, getBytesEncoder, transformEncoder, getStructEncoder, getStructDecoder, fixDecoderSize, getBytesDecoder, combineCodec, SolanaError, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, getU64Encoder, getU64Decoder, getProgramDerivedAddress, getAddressEncoder, getU16Encoder, getBooleanEncoder, getArrayEncoder, getAddressDecoder, getU16Decoder, getBooleanDecoder, getArrayDecoder, getU128Encoder, getU32Encoder, getU128Decoder, getU32Decoder, getU8Encoder, getU8Decoder } from '@solana/kit';
3
3
  import { getAccountMetaFactory, getAddressFromResolvedInstructionAccount, getNonNullResolvedInstructionInput } from '@solana/program-client-core';
4
4
 
5
5
  var addressCodec = getAddressCodec();
@@ -262,6 +262,85 @@ function encodeTransferAdminArgs(args) {
262
262
  function encodeOracleConsultArgs(args) {
263
263
  return new Uint8Array(oracleConsultArgsCodec.encode(args));
264
264
  }
265
+ function isObject(value) {
266
+ return typeof value === "object" && value !== null;
267
+ }
268
+ function isTransactionSigner(value) {
269
+ return isObject(value) && "address" in value && "signTransactions" in value;
270
+ }
271
+ function getAddressFromAddressOrSigner(value) {
272
+ return isTransactionSigner(value) ? value.address : value;
273
+ }
274
+ function getAddressFromRemainingAccount(account) {
275
+ if (typeof account === "string") {
276
+ return account;
277
+ }
278
+ return account.address;
279
+ }
280
+ function createAccountMeta(value, role) {
281
+ if (isTransactionSigner(value)) {
282
+ return { address: value.address, role, signer: value };
283
+ }
284
+ return { address: value, role };
285
+ }
286
+ function createReadonlyRemainingAccountMeta(account) {
287
+ if (typeof account === "string") {
288
+ return { address: account, role: AccountRole.READONLY };
289
+ }
290
+ if (isTransactionSigner(account)) {
291
+ return {
292
+ address: account.address,
293
+ role: AccountRole.READONLY_SIGNER,
294
+ signer: account
295
+ };
296
+ }
297
+ return account;
298
+ }
299
+ function bytesToBase64(bytes) {
300
+ let binary = "";
301
+ for (let i = 0; i < bytes.length; i++) {
302
+ binary += String.fromCharCode(bytes[i]);
303
+ }
304
+ return btoa(binary);
305
+ }
306
+ function bytesToBase64EncodedBytes(bytes) {
307
+ return bytesToBase64(bytes);
308
+ }
309
+ function base64ToBytes(base64) {
310
+ const binary = atob(base64);
311
+ const bytes = new Uint8Array(binary.length);
312
+ for (let i = 0; i < binary.length; i++) {
313
+ bytes[i] = binary.charCodeAt(i);
314
+ }
315
+ return bytes;
316
+ }
317
+ function addressToBase58EncodedBytes(address) {
318
+ return address;
319
+ }
320
+ function isEncodedProgramAccount(account) {
321
+ if (!isObject(account) || typeof account.pubkey !== "string") {
322
+ return false;
323
+ }
324
+ const accountData = account.account;
325
+ if (!isObject(accountData) || !Array.isArray(accountData.data)) {
326
+ return false;
327
+ }
328
+ const [encodedData, encoding] = accountData.data;
329
+ return typeof encodedData === "string" && encoding === "base64";
330
+ }
331
+ function normalizeProgramAccountsResponse(response) {
332
+ const accounts = Array.isArray(response) ? response : isObject(response) && Array.isArray(response.value) ? response.value : null;
333
+ if (!accounts) {
334
+ throw new Error("Unexpected getProgramAccounts response shape");
335
+ }
336
+ if (!accounts.every(isEncodedProgramAccount)) {
337
+ throw new Error("Unexpected getProgramAccounts account shape");
338
+ }
339
+ return accounts;
340
+ }
341
+ function warnAccountDecodeFailure(accountType, accountAddress) {
342
+ console.warn(`Failed to decode ${accountType} account: ${accountAddress}`);
343
+ }
265
344
 
266
345
  // src/solana/core/math.ts
267
346
  function q64ToNumber(q64) {
@@ -3350,21 +3429,6 @@ function parseAddLiquidityInstruction(instruction) {
3350
3429
  }
3351
3430
 
3352
3431
  // src/solana/client/pool.ts
3353
- function bytesToBase64(bytes) {
3354
- let binary = "";
3355
- for (let i = 0; i < bytes.length; i++) {
3356
- binary += String.fromCharCode(bytes[i]);
3357
- }
3358
- return btoa(binary);
3359
- }
3360
- function base64ToBytes(base64) {
3361
- const binary = atob(base64);
3362
- const bytes = new Uint8Array(binary.length);
3363
- for (let i = 0; i < binary.length; i++) {
3364
- bytes[i] = binary.charCodeAt(i);
3365
- }
3366
- return bytes;
3367
- }
3368
3432
  async function fetchPool(rpc, address, config) {
3369
3433
  const response = await rpc.getAccountInfo(address, {
3370
3434
  encoding: "base64",
@@ -3380,7 +3444,7 @@ async function fetchAllPools(rpc, config) {
3380
3444
  const discriminatorFilter = {
3381
3445
  memcmp: {
3382
3446
  offset: 0n,
3383
- bytes: bytesToBase64(ACCOUNT_DISCRIMINATORS.Pool),
3447
+ bytes: bytesToBase64EncodedBytes(ACCOUNT_DISCRIMINATORS.Pool),
3384
3448
  encoding: "base64"
3385
3449
  }
3386
3450
  };
@@ -3389,7 +3453,7 @@ async function fetchAllPools(rpc, config) {
3389
3453
  commitment: config?.commitment,
3390
3454
  filters: [discriminatorFilter]
3391
3455
  }).send();
3392
- const accounts = Array.isArray(response) ? response : response.value;
3456
+ const accounts = normalizeProgramAccountsResponse(response);
3393
3457
  const pools = [];
3394
3458
  for (const account of accounts) {
3395
3459
  try {
@@ -3399,7 +3463,7 @@ async function fetchAllPools(rpc, config) {
3399
3463
  account: pool
3400
3464
  });
3401
3465
  } catch {
3402
- console.warn(`Failed to decode pool account: ${account.pubkey}`);
3466
+ warnAccountDecodeFailure("pool", account.pubkey);
3403
3467
  }
3404
3468
  }
3405
3469
  return pools;
@@ -3457,21 +3521,6 @@ function sortPoolsByReserves(pools, descending = true) {
3457
3521
  }
3458
3522
 
3459
3523
  // src/solana/client/position.ts
3460
- function bytesToBase642(bytes) {
3461
- let binary = "";
3462
- for (let i = 0; i < bytes.length; i++) {
3463
- binary += String.fromCharCode(bytes[i]);
3464
- }
3465
- return btoa(binary);
3466
- }
3467
- function base64ToBytes2(base64) {
3468
- const binary = atob(base64);
3469
- const bytes = new Uint8Array(binary.length);
3470
- for (let i = 0; i < binary.length; i++) {
3471
- bytes[i] = binary.charCodeAt(i);
3472
- }
3473
- return bytes;
3474
- }
3475
3524
  async function fetchPosition(rpc, address, config) {
3476
3525
  const response = await rpc.getAccountInfo(address, {
3477
3526
  encoding: "base64",
@@ -3480,7 +3529,7 @@ async function fetchPosition(rpc, address, config) {
3480
3529
  if (!response.value) {
3481
3530
  return null;
3482
3531
  }
3483
- return decodePosition(base64ToBytes2(response.value.data[0]));
3532
+ return decodePosition(base64ToBytes(response.value.data[0]));
3484
3533
  }
3485
3534
  async function fetchUserPositions(rpc, owner, pool, config) {
3486
3535
  const programId = config?.programId ?? CPMM_PROGRAM_ID;
@@ -3489,9 +3538,7 @@ async function fetchUserPositions(rpc, owner, pool, config) {
3489
3538
  {
3490
3539
  memcmp: {
3491
3540
  offset: 0n,
3492
- bytes: bytesToBase642(
3493
- ACCOUNT_DISCRIMINATORS.Position
3494
- ),
3541
+ bytes: bytesToBase64EncodedBytes(ACCOUNT_DISCRIMINATORS.Position),
3495
3542
  encoding: "base64"
3496
3543
  }
3497
3544
  },
@@ -3499,7 +3546,7 @@ async function fetchUserPositions(rpc, owner, pool, config) {
3499
3546
  {
3500
3547
  memcmp: {
3501
3548
  offset: 40n,
3502
- bytes: owner,
3549
+ bytes: addressToBase58EncodedBytes(owner),
3503
3550
  encoding: "base58"
3504
3551
  }
3505
3552
  }
@@ -3508,7 +3555,7 @@ async function fetchUserPositions(rpc, owner, pool, config) {
3508
3555
  filters.push({
3509
3556
  memcmp: {
3510
3557
  offset: 8n,
3511
- bytes: pool,
3558
+ bytes: addressToBase58EncodedBytes(pool),
3512
3559
  encoding: "base58"
3513
3560
  }
3514
3561
  });
@@ -3518,17 +3565,17 @@ async function fetchUserPositions(rpc, owner, pool, config) {
3518
3565
  commitment: config?.commitment,
3519
3566
  filters
3520
3567
  }).send();
3521
- const accounts = Array.isArray(response) ? response : response.value;
3568
+ const accounts = normalizeProgramAccountsResponse(response);
3522
3569
  const positions = [];
3523
3570
  for (const account of accounts) {
3524
3571
  try {
3525
- const position = decodePosition(base64ToBytes2(account.account.data[0]));
3572
+ const position = decodePosition(base64ToBytes(account.account.data[0]));
3526
3573
  positions.push({
3527
3574
  address: account.pubkey,
3528
3575
  account: position
3529
3576
  });
3530
3577
  } catch {
3531
- console.warn(`Failed to decode position account: ${account.pubkey}`);
3578
+ warnAccountDecodeFailure("position", account.pubkey);
3532
3579
  }
3533
3580
  }
3534
3581
  return positions;
@@ -3540,9 +3587,7 @@ async function fetchPoolPositions(rpc, pool, config) {
3540
3587
  {
3541
3588
  memcmp: {
3542
3589
  offset: 0n,
3543
- bytes: bytesToBase642(
3544
- ACCOUNT_DISCRIMINATORS.Position
3545
- ),
3590
+ bytes: bytesToBase64EncodedBytes(ACCOUNT_DISCRIMINATORS.Position),
3546
3591
  encoding: "base64"
3547
3592
  }
3548
3593
  },
@@ -3550,7 +3595,7 @@ async function fetchPoolPositions(rpc, pool, config) {
3550
3595
  {
3551
3596
  memcmp: {
3552
3597
  offset: 8n,
3553
- bytes: pool,
3598
+ bytes: addressToBase58EncodedBytes(pool),
3554
3599
  encoding: "base58"
3555
3600
  }
3556
3601
  }
@@ -3560,17 +3605,17 @@ async function fetchPoolPositions(rpc, pool, config) {
3560
3605
  commitment: config?.commitment,
3561
3606
  filters
3562
3607
  }).send();
3563
- const accounts = Array.isArray(response) ? response : response.value;
3608
+ const accounts = normalizeProgramAccountsResponse(response);
3564
3609
  const positions = [];
3565
3610
  for (const account of accounts) {
3566
3611
  try {
3567
- const position = decodePosition(base64ToBytes2(account.account.data[0]));
3612
+ const position = decodePosition(base64ToBytes(account.account.data[0]));
3568
3613
  positions.push({
3569
3614
  address: account.pubkey,
3570
3615
  account: position
3571
3616
  });
3572
3617
  } catch {
3573
- console.warn(`Failed to decode position account: ${account.pubkey}`);
3618
+ warnAccountDecodeFailure("position", account.pubkey);
3574
3619
  }
3575
3620
  }
3576
3621
  return positions;
@@ -3651,14 +3696,6 @@ function sortPositionsByShares(positions, descending = true) {
3651
3696
  }
3652
3697
 
3653
3698
  // src/solana/client/oracle.ts
3654
- function base64ToBytes3(base64) {
3655
- const binary = atob(base64);
3656
- const bytes = new Uint8Array(binary.length);
3657
- for (let i = 0; i < binary.length; i++) {
3658
- bytes[i] = binary.charCodeAt(i);
3659
- }
3660
- return bytes;
3661
- }
3662
3699
  async function fetchOracle(rpc, address, config) {
3663
3700
  const response = await rpc.getAccountInfo(address, {
3664
3701
  encoding: "base64",
@@ -3667,7 +3704,7 @@ async function fetchOracle(rpc, address, config) {
3667
3704
  if (!response.value) {
3668
3705
  return null;
3669
3706
  }
3670
- return decodeOracleState(base64ToBytes3(response.value.data[0]));
3707
+ return decodeOracleState(base64ToBytes(response.value.data[0]));
3671
3708
  }
3672
3709
  async function getOracleForPool(rpc, pool, config) {
3673
3710
  const programId = config?.programId ?? CPMM_PROGRAM_ID;
@@ -3835,6 +3872,6 @@ function comparePoolAndOraclePrices(pool, oracle) {
3835
3872
  };
3836
3873
  }
3837
3874
 
3838
- export { ADD_LIQUIDITY_DISCRIMINATOR, CLOSE_POSITION_DISCRIMINATOR, COLLECT_FEES_DISCRIMINATOR, COLLECT_PROTOCOL_FEES_DISCRIMINATOR, CPMM_PROGRAM_ADDRESS, CREATE_POSITION_DISCRIMINATOR, INITIALIZE_CONFIG_DISCRIMINATOR, INITIALIZE_ORACLE_DISCRIMINATOR, INITIALIZE_POOL_DISCRIMINATOR, ORACLE_CONSULT_DISCRIMINATOR, ORACLE_UPDATE_DISCRIMINATOR, PAUSE_DISCRIMINATOR, PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR, REDEEM_PROTOCOL_SHARES_DISCRIMINATOR, REMOVE_LIQUIDITY_DISCRIMINATOR, SET_FEES_DISCRIMINATOR, SET_HOOK_DISCRIMINATOR, SWAP_EXACT_IN_DISCRIMINATOR, TRANSFER_ADMIN_DISCRIMINATOR, UNPAUSE_DISCRIMINATOR, UPDATE_CONFIG_DISCRIMINATOR, WITHDRAW_VAULT_EXCESS_DISCRIMINATOR, addLiquidityArgsCodec, ammConfigDataCodec, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, collectFeesArgsCodec, collectProtocolFeesArgsCodec, comparePoolAndOraclePrices, computePrice0Q64, computePrice1Q64, consultTwap, createPositionArgsCodec, decodeAmmConfig, decodeOracleState, decodePool, decodePosition, encodeAddLiquidityArgs, encodeCollectFeesArgs, encodeCollectProtocolFeesArgs, encodeCreatePositionArgs, encodeInitializeConfigArgs, encodeInitializeOracleArgs, encodeInitializePoolArgs, encodeInstructionData, encodeOracleConsultArgs, encodeRemoveLiquidityArgs, encodeSetFeesArgs, encodeSetHookArgs, encodeSwapExactInArgs, encodeTransferAdminArgs, fetchAllPools, fetchOracle, fetchOraclesBatch, fetchPool, fetchPoolPositions, fetchPoolsBatch, fetchPosition, fetchPositionByParams, fetchPositionsBatch, fetchUserPositions, filterActivePositions, filterPoolsByMint, getAddLiquidityDiscriminatorBytes, getAddLiquidityInstruction, getAddLiquidityInstructionAsync, getAddLiquidityInstructionDataCodec, getAddLiquidityInstructionDataDecoder, getAddLiquidityInstructionDataEncoder, getAddLiquidityQuote, getClosePositionDiscriminatorBytes, getClosePositionInstruction, getClosePositionInstructionDataCodec, getClosePositionInstructionDataDecoder, getClosePositionInstructionDataEncoder, getCollectFeesDiscriminatorBytes, getCollectFeesInstruction, getCollectFeesInstructionAsync, getCollectFeesInstructionDataCodec, getCollectFeesInstructionDataDecoder, getCollectFeesInstructionDataEncoder, getCollectProtocolFeesDiscriminatorBytes, getCollectProtocolFeesInstruction, getCollectProtocolFeesInstructionAsync, getCollectProtocolFeesInstructionDataCodec, getCollectProtocolFeesInstructionDataDecoder, getCollectProtocolFeesInstructionDataEncoder, getCreatePositionDiscriminatorBytes, getCreatePositionInstruction, getCreatePositionInstructionAsync, getCreatePositionInstructionDataCodec, getCreatePositionInstructionDataDecoder, getCreatePositionInstructionDataEncoder, getInitializeConfigDiscriminatorBytes, getInitializeConfigInstruction, getInitializeConfigInstructionAsync, getInitializeConfigInstructionDataCodec, getInitializeConfigInstructionDataDecoder, getInitializeConfigInstructionDataEncoder, getInitializeOracleDiscriminatorBytes, getInitializeOracleInstruction, getInitializeOracleInstructionAsync, getInitializeOracleInstructionDataCodec, getInitializeOracleInstructionDataDecoder, getInitializeOracleInstructionDataEncoder, getInitializePoolDiscriminatorBytes, getInitializePoolInstruction, getInitializePoolInstructionAsync, getInitializePoolInstructionDataCodec, getInitializePoolInstructionDataDecoder, getInitializePoolInstructionDataEncoder, getK, getOracleAddressFromPool, getOracleAge, getOracleBufferStats, getOracleConsultDiscriminatorBytes, getOracleConsultInstruction, getOracleConsultInstructionAsync, getOracleConsultInstructionDataCodec, getOracleConsultInstructionDataDecoder, getOracleConsultInstructionDataEncoder, getOracleDeviation, getOracleForPool, getOracleSpotPrices, getOracleUpdateDiscriminatorBytes, getOracleUpdateInstruction, getOracleUpdateInstructionAsync, getOracleUpdateInstructionDataCodec, getOracleUpdateInstructionDataDecoder, getOracleUpdateInstructionDataEncoder, getPauseDiscriminatorBytes, getPauseInstruction, getPauseInstructionDataCodec, getPauseInstructionDataDecoder, getPauseInstructionDataEncoder, getPendingFees, getPoolAddressFromMints, getPoolByMints, getPositionAddressFromParams, getPositionValue, getPreviewSwapExactInDiscriminatorBytes, getPreviewSwapExactInInstruction, getPreviewSwapExactInInstructionDataCodec, getPreviewSwapExactInInstructionDataDecoder, getPreviewSwapExactInInstructionDataEncoder, getRedeemProtocolSharesDiscriminatorBytes, getRedeemProtocolSharesInstruction, getRedeemProtocolSharesInstructionAsync, getRedeemProtocolSharesInstructionDataCodec, getRedeemProtocolSharesInstructionDataDecoder, getRedeemProtocolSharesInstructionDataEncoder, getRemoveLiquidityDiscriminatorBytes, getRemoveLiquidityInstruction, getRemoveLiquidityInstructionAsync, getRemoveLiquidityInstructionDataCodec, getRemoveLiquidityInstructionDataDecoder, getRemoveLiquidityInstructionDataEncoder, getRemoveLiquidityQuote, getSetFeesDiscriminatorBytes, getSetFeesInstruction, getSetFeesInstructionDataCodec, getSetFeesInstructionDataDecoder, getSetFeesInstructionDataEncoder, getSetHookDiscriminatorBytes, getSetHookInstruction, getSetHookInstructionDataCodec, getSetHookInstructionDataDecoder, getSetHookInstructionDataEncoder, getSpotPrice0, getSpotPrice1, getSwapExactInDiscriminatorBytes, getSwapExactInInstruction, getSwapExactInInstructionAsync, getSwapExactInInstructionDataCodec, getSwapExactInInstructionDataDecoder, getSwapExactInInstructionDataEncoder, getSwapQuote, getSwapQuoteExactOut, getTransferAdminDiscriminatorBytes, getTransferAdminInstruction, getTransferAdminInstructionDataCodec, getTransferAdminInstructionDataDecoder, getTransferAdminInstructionDataEncoder, getTvl, getUnpauseDiscriminatorBytes, getUnpauseInstruction, getUnpauseInstructionDataCodec, getUnpauseInstructionDataDecoder, getUnpauseInstructionDataEncoder, getUpdateConfigDiscriminatorBytes, getUpdateConfigInstruction, getUpdateConfigInstructionDataCodec, getUpdateConfigInstructionDataDecoder, getUpdateConfigInstructionDataEncoder, getWithdrawVaultExcessDiscriminatorBytes, getWithdrawVaultExcessInstruction, getWithdrawVaultExcessInstructionAsync, getWithdrawVaultExcessInstructionDataCodec, getWithdrawVaultExcessInstructionDataDecoder, getWithdrawVaultExcessInstructionDataEncoder, initializeConfigArgsCodec, initializeOracleArgsCodec, initializePoolArgsCodec, isOracleStale, isqrt, maxBigInt, minBigInt, numberToQ64, observationCodec, oracleConsultArgsCodec, oracleStateDataCodec, parseAddLiquidityInstruction, parseClosePositionInstruction, parseCollectFeesInstruction, parseCollectProtocolFeesInstruction, parseCreatePositionInstruction, parseInitializeConfigInstruction, parseInitializeOracleInstruction, parseInitializePoolInstruction, parseOracleConsultInstruction, parseOracleUpdateInstruction, parsePauseInstruction, parsePreviewSwapExactInInstruction, parseRedeemProtocolSharesInstruction, parseRemoveLiquidityInstruction, parseSetFeesInstruction, parseSetHookInstruction, parseSwapExactInInstruction, parseTransferAdminInstruction, parseUnpauseInstruction, parseUpdateConfigInstruction, parseWithdrawVaultExcessInstruction, poolDataCodec, poolExists, positionDataCodec, q64Div, q64Mul, q64ToNumber, ratioToNumber, removeLiquidityArgsCodec, setFeesArgsCodec, setHookArgsCodec, sortPoolsByReserves, sortPositionsByShares, swapExactInArgsCodec, transferAdminArgsCodec };
3839
- //# sourceMappingURL=chunk-RVDRWCJN.js.map
3840
- //# sourceMappingURL=chunk-RVDRWCJN.js.map
3875
+ export { ADD_LIQUIDITY_DISCRIMINATOR, CLOSE_POSITION_DISCRIMINATOR, COLLECT_FEES_DISCRIMINATOR, COLLECT_PROTOCOL_FEES_DISCRIMINATOR, CPMM_PROGRAM_ADDRESS, CREATE_POSITION_DISCRIMINATOR, INITIALIZE_CONFIG_DISCRIMINATOR, INITIALIZE_ORACLE_DISCRIMINATOR, INITIALIZE_POOL_DISCRIMINATOR, ORACLE_CONSULT_DISCRIMINATOR, ORACLE_UPDATE_DISCRIMINATOR, PAUSE_DISCRIMINATOR, PREVIEW_SWAP_EXACT_IN_DISCRIMINATOR, REDEEM_PROTOCOL_SHARES_DISCRIMINATOR, REMOVE_LIQUIDITY_DISCRIMINATOR, SET_FEES_DISCRIMINATOR, SET_HOOK_DISCRIMINATOR, SWAP_EXACT_IN_DISCRIMINATOR, TRANSFER_ADMIN_DISCRIMINATOR, UNPAUSE_DISCRIMINATOR, UPDATE_CONFIG_DISCRIMINATOR, WITHDRAW_VAULT_EXCESS_DISCRIMINATOR, addLiquidityArgsCodec, addressToBase58EncodedBytes, ammConfigDataCodec, base64ToBytes, bytesToBase64, bytesToBase64EncodedBytes, calculateAccruedFees, calculateTwap, calculateTwapNumber, ceilDiv, collectFeesArgsCodec, collectProtocolFeesArgsCodec, comparePoolAndOraclePrices, computePrice0Q64, computePrice1Q64, consultTwap, createAccountMeta, createPositionArgsCodec, createReadonlyRemainingAccountMeta, decodeAmmConfig, decodeOracleState, decodePool, decodePosition, encodeAddLiquidityArgs, encodeCollectFeesArgs, encodeCollectProtocolFeesArgs, encodeCreatePositionArgs, encodeInitializeConfigArgs, encodeInitializeOracleArgs, encodeInitializePoolArgs, encodeInstructionData, encodeOracleConsultArgs, encodeRemoveLiquidityArgs, encodeSetFeesArgs, encodeSetHookArgs, encodeSwapExactInArgs, encodeTransferAdminArgs, fetchAllPools, fetchOracle, fetchOraclesBatch, fetchPool, fetchPoolPositions, fetchPoolsBatch, fetchPosition, fetchPositionByParams, fetchPositionsBatch, fetchUserPositions, filterActivePositions, filterPoolsByMint, getAddLiquidityDiscriminatorBytes, getAddLiquidityInstruction, getAddLiquidityInstructionAsync, getAddLiquidityInstructionDataCodec, getAddLiquidityInstructionDataDecoder, getAddLiquidityInstructionDataEncoder, getAddLiquidityQuote, getAddressFromAddressOrSigner, getAddressFromRemainingAccount, getClosePositionDiscriminatorBytes, getClosePositionInstruction, getClosePositionInstructionDataCodec, getClosePositionInstructionDataDecoder, getClosePositionInstructionDataEncoder, getCollectFeesDiscriminatorBytes, getCollectFeesInstruction, getCollectFeesInstructionAsync, getCollectFeesInstructionDataCodec, getCollectFeesInstructionDataDecoder, getCollectFeesInstructionDataEncoder, getCollectProtocolFeesDiscriminatorBytes, getCollectProtocolFeesInstruction, getCollectProtocolFeesInstructionAsync, getCollectProtocolFeesInstructionDataCodec, getCollectProtocolFeesInstructionDataDecoder, getCollectProtocolFeesInstructionDataEncoder, getCreatePositionDiscriminatorBytes, getCreatePositionInstruction, getCreatePositionInstructionAsync, getCreatePositionInstructionDataCodec, getCreatePositionInstructionDataDecoder, getCreatePositionInstructionDataEncoder, getInitializeConfigDiscriminatorBytes, getInitializeConfigInstruction, getInitializeConfigInstructionAsync, getInitializeConfigInstructionDataCodec, getInitializeConfigInstructionDataDecoder, getInitializeConfigInstructionDataEncoder, getInitializeOracleDiscriminatorBytes, getInitializeOracleInstruction, getInitializeOracleInstructionAsync, getInitializeOracleInstructionDataCodec, getInitializeOracleInstructionDataDecoder, getInitializeOracleInstructionDataEncoder, getInitializePoolDiscriminatorBytes, getInitializePoolInstruction, getInitializePoolInstructionAsync, getInitializePoolInstructionDataCodec, getInitializePoolInstructionDataDecoder, getInitializePoolInstructionDataEncoder, getK, getOracleAddressFromPool, getOracleAge, getOracleBufferStats, getOracleConsultDiscriminatorBytes, getOracleConsultInstruction, getOracleConsultInstructionAsync, getOracleConsultInstructionDataCodec, getOracleConsultInstructionDataDecoder, getOracleConsultInstructionDataEncoder, getOracleDeviation, getOracleForPool, getOracleSpotPrices, getOracleUpdateDiscriminatorBytes, getOracleUpdateInstruction, getOracleUpdateInstructionAsync, getOracleUpdateInstructionDataCodec, getOracleUpdateInstructionDataDecoder, getOracleUpdateInstructionDataEncoder, getPauseDiscriminatorBytes, getPauseInstruction, getPauseInstructionDataCodec, getPauseInstructionDataDecoder, getPauseInstructionDataEncoder, getPendingFees, getPoolAddressFromMints, getPoolByMints, getPositionAddressFromParams, getPositionValue, getPreviewSwapExactInDiscriminatorBytes, getPreviewSwapExactInInstruction, getPreviewSwapExactInInstructionDataCodec, getPreviewSwapExactInInstructionDataDecoder, getPreviewSwapExactInInstructionDataEncoder, getRedeemProtocolSharesDiscriminatorBytes, getRedeemProtocolSharesInstruction, getRedeemProtocolSharesInstructionAsync, getRedeemProtocolSharesInstructionDataCodec, getRedeemProtocolSharesInstructionDataDecoder, getRedeemProtocolSharesInstructionDataEncoder, getRemoveLiquidityDiscriminatorBytes, getRemoveLiquidityInstruction, getRemoveLiquidityInstructionAsync, getRemoveLiquidityInstructionDataCodec, getRemoveLiquidityInstructionDataDecoder, getRemoveLiquidityInstructionDataEncoder, getRemoveLiquidityQuote, getSetFeesDiscriminatorBytes, getSetFeesInstruction, getSetFeesInstructionDataCodec, getSetFeesInstructionDataDecoder, getSetFeesInstructionDataEncoder, getSetHookDiscriminatorBytes, getSetHookInstruction, getSetHookInstructionDataCodec, getSetHookInstructionDataDecoder, getSetHookInstructionDataEncoder, getSpotPrice0, getSpotPrice1, getSwapExactInDiscriminatorBytes, getSwapExactInInstruction, getSwapExactInInstructionAsync, getSwapExactInInstructionDataCodec, getSwapExactInInstructionDataDecoder, getSwapExactInInstructionDataEncoder, getSwapQuote, getSwapQuoteExactOut, getTransferAdminDiscriminatorBytes, getTransferAdminInstruction, getTransferAdminInstructionDataCodec, getTransferAdminInstructionDataDecoder, getTransferAdminInstructionDataEncoder, getTvl, getUnpauseDiscriminatorBytes, getUnpauseInstruction, getUnpauseInstructionDataCodec, getUnpauseInstructionDataDecoder, getUnpauseInstructionDataEncoder, getUpdateConfigDiscriminatorBytes, getUpdateConfigInstruction, getUpdateConfigInstructionDataCodec, getUpdateConfigInstructionDataDecoder, getUpdateConfigInstructionDataEncoder, getWithdrawVaultExcessDiscriminatorBytes, getWithdrawVaultExcessInstruction, getWithdrawVaultExcessInstructionAsync, getWithdrawVaultExcessInstructionDataCodec, getWithdrawVaultExcessInstructionDataDecoder, getWithdrawVaultExcessInstructionDataEncoder, initializeConfigArgsCodec, initializeOracleArgsCodec, initializePoolArgsCodec, isOracleStale, isTransactionSigner, isqrt, maxBigInt, minBigInt, normalizeProgramAccountsResponse, numberToQ64, observationCodec, oracleConsultArgsCodec, oracleStateDataCodec, parseAddLiquidityInstruction, parseClosePositionInstruction, parseCollectFeesInstruction, parseCollectProtocolFeesInstruction, parseCreatePositionInstruction, parseInitializeConfigInstruction, parseInitializeOracleInstruction, parseInitializePoolInstruction, parseOracleConsultInstruction, parseOracleUpdateInstruction, parsePauseInstruction, parsePreviewSwapExactInInstruction, parseRedeemProtocolSharesInstruction, parseRemoveLiquidityInstruction, parseSetFeesInstruction, parseSetHookInstruction, parseSwapExactInInstruction, parseTransferAdminInstruction, parseUnpauseInstruction, parseUpdateConfigInstruction, parseWithdrawVaultExcessInstruction, poolDataCodec, poolExists, positionDataCodec, q64Div, q64Mul, q64ToNumber, ratioToNumber, removeLiquidityArgsCodec, setFeesArgsCodec, setHookArgsCodec, sortPoolsByReserves, sortPositionsByShares, swapExactInArgsCodec, transferAdminArgsCodec, warnAccountDecodeFailure };
3876
+ //# sourceMappingURL=chunk-AYVFWD5P.js.map
3877
+ //# sourceMappingURL=chunk-AYVFWD5P.js.map