@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/index.cjs +56 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -5
- package/dist/index.d.ts +39 -5
- package/dist/index.js +56 -90
- package/dist/index.js.map +1 -1
- package/dist/vendor.cjs +16 -16
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +2 -2
- package/dist/vendor.d.ts +2 -2
- package/dist/vendor.js +16 -16
- package/dist/vendor.js.map +1 -1
- package/package.json +2 -1
package/dist/vendor.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
2
|
import { PublicKey, TransactionInstruction, Connection, Transaction, Commitment, AccountInfo, AccountMeta as AccountMeta$1, Signer, AddressLookupTableAccount } from '@solana/web3.js';
|
|
3
3
|
import BigNumber$1 from 'bignumber.js';
|
|
4
|
+
import { Buffer as Buffer$1 } from 'buffer';
|
|
4
5
|
import { G as GammaLpVaultRaw, a as GammaWithdrawReceiptRaw } from './types-DLZaKA17.cjs';
|
|
5
6
|
export { b as CrossbarSimulatePayload, C as CurrentResult, F as FeedResponse, O as OracleSubmission, P as PullFeedAccountData, S as SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, d as decodeSwitchboardPullFeedData, g as getSwitchboardProgram, s as switchboardAccountCoder } from './types-DLZaKA17.cjs';
|
|
6
7
|
import { Program, BorshCoder, Address } from '@coral-xyz/anchor';
|
|
@@ -9,7 +10,6 @@ export { ab as FeeTier, ac as FeeTierJSON, ak as HistoricalIndexDataJSON, aj as
|
|
|
9
10
|
import BN from 'bn.js';
|
|
10
11
|
import Decimal from 'decimal.js';
|
|
11
12
|
import * as _solana_buffer_layout from '@solana/buffer-layout';
|
|
12
|
-
import { Buffer as Buffer$1 } from 'buffer';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
@@ -32378,7 +32378,7 @@ type StakeAccount = {
|
|
|
32378
32378
|
*
|
|
32379
32379
|
* Copied from https://github.com/solana-developers/solana-rpc-get-stake-activation/blob/main/web3js-1.0/src/stake.ts
|
|
32380
32380
|
* */
|
|
32381
|
-
declare const getStakeAccount: (data: Buffer) => StakeAccount;
|
|
32381
|
+
declare const getStakeAccount: (data: Buffer$1) => StakeAccount;
|
|
32382
32382
|
|
|
32383
32383
|
/** Information about a token account */
|
|
32384
32384
|
interface Account {
|
package/dist/vendor.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
2
|
import { PublicKey, TransactionInstruction, Connection, Transaction, Commitment, AccountInfo, AccountMeta as AccountMeta$1, Signer, AddressLookupTableAccount } from '@solana/web3.js';
|
|
3
3
|
import BigNumber$1 from 'bignumber.js';
|
|
4
|
+
import { Buffer as Buffer$1 } from 'buffer';
|
|
4
5
|
import { G as GammaLpVaultRaw, a as GammaWithdrawReceiptRaw } from './types-DLZaKA17.js';
|
|
5
6
|
export { b as CrossbarSimulatePayload, C as CurrentResult, F as FeedResponse, O as OracleSubmission, P as PullFeedAccountData, S as SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, d as decodeSwitchboardPullFeedData, g as getSwitchboardProgram, s as switchboardAccountCoder } from './types-DLZaKA17.js';
|
|
6
7
|
import { Program, BorshCoder, Address } from '@coral-xyz/anchor';
|
|
@@ -9,7 +10,6 @@ export { ab as FeeTier, ac as FeeTierJSON, ak as HistoricalIndexDataJSON, aj as
|
|
|
9
10
|
import BN from 'bn.js';
|
|
10
11
|
import Decimal from 'decimal.js';
|
|
11
12
|
import * as _solana_buffer_layout from '@solana/buffer-layout';
|
|
12
|
-
import { Buffer as Buffer$1 } from 'buffer';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
@@ -32378,7 +32378,7 @@ type StakeAccount = {
|
|
|
32378
32378
|
*
|
|
32379
32379
|
* Copied from https://github.com/solana-developers/solana-rpc-get-stake-activation/blob/main/web3js-1.0/src/stake.ts
|
|
32380
32380
|
* */
|
|
32381
|
-
declare const getStakeAccount: (data: Buffer) => StakeAccount;
|
|
32381
|
+
declare const getStakeAccount: (data: Buffer$1) => StakeAccount;
|
|
32382
32382
|
|
|
32383
32383
|
/** Information about a token account */
|
|
32384
32384
|
interface Account {
|
package/dist/vendor.js
CHANGED
|
@@ -45192,11 +45192,11 @@ function deriveExponentClmmEventAuthority() {
|
|
|
45192
45192
|
EXPONENT_CLMM_PROGRAM_ID
|
|
45193
45193
|
)[0];
|
|
45194
45194
|
}
|
|
45195
|
-
var MERGE_DISCRIMINATOR = Buffer.from([5]);
|
|
45195
|
+
var MERGE_DISCRIMINATOR = Buffer$1.from([5]);
|
|
45196
45196
|
function makeExponentMergeIx(accounts, amountNative) {
|
|
45197
45197
|
const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
|
|
45198
45198
|
const eventAuthority = deriveExponentEventAuthority();
|
|
45199
|
-
const data = Buffer.alloc(MERGE_DISCRIMINATOR.length + 8);
|
|
45199
|
+
const data = Buffer$1.alloc(MERGE_DISCRIMINATOR.length + 8);
|
|
45200
45200
|
MERGE_DISCRIMINATOR.copy(data, 0);
|
|
45201
45201
|
data.writeBigUInt64LE(amountNative, MERGE_DISCRIMINATOR.length);
|
|
45202
45202
|
const keys = [
|
|
@@ -45225,7 +45225,7 @@ function makeExponentMergeIx(accounts, amountNative) {
|
|
|
45225
45225
|
data
|
|
45226
45226
|
});
|
|
45227
45227
|
}
|
|
45228
|
-
var TRADE_PT_DISCRIMINATOR = Buffer.from([17]);
|
|
45228
|
+
var TRADE_PT_DISCRIMINATOR = Buffer$1.from([17]);
|
|
45229
45229
|
function exponentBuyPtArgs({
|
|
45230
45230
|
ptOutNative,
|
|
45231
45231
|
maxSyInNative
|
|
@@ -45235,7 +45235,7 @@ function exponentBuyPtArgs({
|
|
|
45235
45235
|
function makeExponentTradePtIx(accounts, args) {
|
|
45236
45236
|
const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
|
|
45237
45237
|
const eventAuthority = deriveExponentEventAuthority();
|
|
45238
|
-
const data = Buffer.alloc(TRADE_PT_DISCRIMINATOR.length + 16);
|
|
45238
|
+
const data = Buffer$1.alloc(TRADE_PT_DISCRIMINATOR.length + 16);
|
|
45239
45239
|
TRADE_PT_DISCRIMINATOR.copy(data, 0);
|
|
45240
45240
|
data.writeBigInt64LE(args.netTraderPt, TRADE_PT_DISCRIMINATOR.length);
|
|
45241
45241
|
data.writeBigInt64LE(args.syConstraint, TRADE_PT_DISCRIMINATOR.length + 8);
|
|
@@ -45261,11 +45261,11 @@ function makeExponentTradePtIx(accounts, args) {
|
|
|
45261
45261
|
data
|
|
45262
45262
|
});
|
|
45263
45263
|
}
|
|
45264
|
-
var STRIP_DISCRIMINATOR = Buffer.from([4]);
|
|
45264
|
+
var STRIP_DISCRIMINATOR = Buffer$1.from([4]);
|
|
45265
45265
|
function makeExponentStripIx(accounts, amountNative) {
|
|
45266
45266
|
const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
|
|
45267
45267
|
const eventAuthority = deriveExponentEventAuthority();
|
|
45268
|
-
const data = Buffer.alloc(STRIP_DISCRIMINATOR.length + 8);
|
|
45268
|
+
const data = Buffer$1.alloc(STRIP_DISCRIMINATOR.length + 8);
|
|
45269
45269
|
STRIP_DISCRIMINATOR.copy(data, 0);
|
|
45270
45270
|
data.writeBigUInt64LE(amountNative, STRIP_DISCRIMINATOR.length);
|
|
45271
45271
|
const keys = [
|
|
@@ -45289,11 +45289,11 @@ function makeExponentStripIx(accounts, amountNative) {
|
|
|
45289
45289
|
];
|
|
45290
45290
|
return new TransactionInstruction({ keys, programId: EXPONENT_CORE_PROGRAM_ID, data });
|
|
45291
45291
|
}
|
|
45292
|
-
var WRAPPER_MERGE_DISCRIMINATOR = Buffer.from([39]);
|
|
45292
|
+
var WRAPPER_MERGE_DISCRIMINATOR = Buffer$1.from([39]);
|
|
45293
45293
|
function makeExponentWrapperMergeIx(accounts, args) {
|
|
45294
45294
|
const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
|
|
45295
45295
|
const eventAuthority = deriveExponentEventAuthority();
|
|
45296
|
-
const data = Buffer.alloc(WRAPPER_MERGE_DISCRIMINATOR.length + 9);
|
|
45296
|
+
const data = Buffer$1.alloc(WRAPPER_MERGE_DISCRIMINATOR.length + 9);
|
|
45297
45297
|
WRAPPER_MERGE_DISCRIMINATOR.copy(data, 0);
|
|
45298
45298
|
data.writeBigUInt64LE(args.amountPyNative, WRAPPER_MERGE_DISCRIMINATOR.length);
|
|
45299
45299
|
data.writeUInt8(args.redeemSyAccountsUntil, WRAPPER_MERGE_DISCRIMINATOR.length + 8);
|
|
@@ -45319,7 +45319,7 @@ function makeExponentWrapperMergeIx(accounts, args) {
|
|
|
45319
45319
|
];
|
|
45320
45320
|
return new TransactionInstruction({ keys, programId: EXPONENT_CORE_PROGRAM_ID, data });
|
|
45321
45321
|
}
|
|
45322
|
-
var SPL_STAKE_POOL_UPDATE_BALANCE_TAG = Buffer.from([7]);
|
|
45322
|
+
var SPL_STAKE_POOL_UPDATE_BALANCE_TAG = Buffer$1.from([7]);
|
|
45323
45323
|
function makeSplStakePoolUpdateBalanceIx(accounts) {
|
|
45324
45324
|
const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
|
|
45325
45325
|
const keys = [
|
|
@@ -45334,13 +45334,13 @@ function makeSplStakePoolUpdateBalanceIx(accounts) {
|
|
|
45334
45334
|
return new TransactionInstruction({
|
|
45335
45335
|
keys,
|
|
45336
45336
|
programId: accounts.stakePoolProgram,
|
|
45337
|
-
data: Buffer.from(SPL_STAKE_POOL_UPDATE_BALANCE_TAG)
|
|
45337
|
+
data: Buffer$1.from(SPL_STAKE_POOL_UPDATE_BALANCE_TAG)
|
|
45338
45338
|
});
|
|
45339
45339
|
}
|
|
45340
|
-
var CLMM_TRADE_PT_DISCRIMINATOR = Buffer.from([3]);
|
|
45340
|
+
var CLMM_TRADE_PT_DISCRIMINATOR = Buffer$1.from([3]);
|
|
45341
45341
|
function encodeOptionU64(value) {
|
|
45342
|
-
if (value === null) return Buffer.from([0]);
|
|
45343
|
-
const buf = Buffer.alloc(9);
|
|
45342
|
+
if (value === null) return Buffer$1.from([0]);
|
|
45343
|
+
const buf = Buffer$1.alloc(9);
|
|
45344
45344
|
buf.writeUInt8(1, 0);
|
|
45345
45345
|
buf.writeBigUInt64LE(value, 1);
|
|
45346
45346
|
return buf;
|
|
@@ -45359,14 +45359,14 @@ function exponentClmmBuyPtArgs({
|
|
|
45359
45359
|
function makeExponentClmmTradePtIx(accounts, args) {
|
|
45360
45360
|
const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
|
|
45361
45361
|
const eventAuthority = deriveExponentClmmEventAuthority();
|
|
45362
|
-
const head = Buffer.alloc(CLMM_TRADE_PT_DISCRIMINATOR.length + 9);
|
|
45362
|
+
const head = Buffer$1.alloc(CLMM_TRADE_PT_DISCRIMINATOR.length + 9);
|
|
45363
45363
|
CLMM_TRADE_PT_DISCRIMINATOR.copy(head, 0);
|
|
45364
45364
|
head.writeBigUInt64LE(args.amountIn, CLMM_TRADE_PT_DISCRIMINATOR.length);
|
|
45365
45365
|
head.writeUInt8(args.swapDirection, CLMM_TRADE_PT_DISCRIMINATOR.length + 8);
|
|
45366
|
-
const data = Buffer.concat([
|
|
45366
|
+
const data = Buffer$1.concat([
|
|
45367
45367
|
head,
|
|
45368
45368
|
encodeOptionU64(args.amountOutConstraint),
|
|
45369
|
-
Buffer.from([0])
|
|
45369
|
+
Buffer$1.from([0])
|
|
45370
45370
|
]);
|
|
45371
45371
|
const keys = [
|
|
45372
45372
|
{ pubkey: accounts.trader, isSigner: true, isWritable: true },
|