pump-kit 0.0.8 → 0.1.1
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/README.md +60 -45
- package/dist/index.js +12 -12
- package/dist/types/ammsdk/bondingCurveMath.d.ts +1 -1
- package/dist/types/ammsdk/generated/accounts/globalConfig.d.ts +4 -6
- package/dist/types/ammsdk/generated/accounts/index.d.ts +0 -4
- package/dist/types/ammsdk/generated/accounts/pool.d.ts +0 -2
- package/dist/types/ammsdk/generated/errors/pumpAmm.d.ts +29 -55
- package/dist/types/ammsdk/generated/index.d.ts +1 -1
- package/dist/types/ammsdk/generated/instructions/buy.d.ts +14 -67
- package/dist/types/ammsdk/generated/instructions/createConfig.d.ts +5 -26
- package/dist/types/ammsdk/generated/instructions/createPool.d.ts +12 -42
- package/dist/types/ammsdk/generated/instructions/deposit.d.ts +10 -33
- package/dist/types/ammsdk/generated/instructions/disable.d.ts +2 -16
- package/dist/types/ammsdk/generated/instructions/extendAccount.d.ts +2 -12
- package/dist/types/ammsdk/generated/instructions/index.d.ts +0 -9
- package/dist/types/ammsdk/generated/instructions/sell.d.ts +14 -54
- package/dist/types/ammsdk/generated/instructions/updateAdmin.d.ts +2 -12
- package/dist/types/ammsdk/generated/instructions/updateFeeConfig.d.ts +2 -22
- package/dist/types/ammsdk/generated/instructions/withdraw.d.ts +10 -33
- package/dist/types/ammsdk/generated/programs/pumpAmm.d.ts +15 -46
- package/dist/types/ammsdk/generated/types/buyEvent.d.ts +4 -25
- package/dist/types/ammsdk/generated/types/createConfigEvent.d.ts +0 -4
- package/dist/types/ammsdk/generated/types/createPoolEvent.d.ts +0 -2
- package/dist/types/ammsdk/generated/types/globalConfig.d.ts +49 -0
- package/dist/types/ammsdk/generated/types/index.d.ts +2 -12
- package/dist/types/ammsdk/generated/types/pool.d.ts +35 -0
- package/dist/types/ammsdk/generated/types/sellEvent.d.ts +0 -6
- package/dist/types/ammsdk/generated/types/updateFeeConfigEvent.d.ts +0 -4
- package/dist/types/clients/amm.d.ts +10 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/pda/pumpAmm.d.ts +4 -0
- package/dist/types/pumpsdk/generated/index.d.ts +1 -1
- package/dist/types/simple.d.ts +2 -2
- package/dist/types/swap/amm.d.ts +35 -0
- package/dist/types/swap/curve.d.ts +36 -0
- package/dist/types/swap.d.ts +10 -49
- package/package.json +3 -3
- package/dist/types/ammsdk/generated/accounts/bondingCurve.d.ts +0 -39
- package/dist/types/ammsdk/generated/accounts/feeConfig.d.ts +0 -33
- package/dist/types/ammsdk/generated/accounts/globalVolumeAccumulator.d.ts +0 -37
- package/dist/types/ammsdk/generated/accounts/userVolumeAccumulator.d.ts +0 -39
- package/dist/types/ammsdk/generated/instructions/adminSetCoinCreator.d.ts +0 -63
- package/dist/types/ammsdk/generated/instructions/adminUpdateTokenIncentives.d.ts +0 -99
- package/dist/types/ammsdk/generated/instructions/buyExactQuoteIn.d.ts +0 -144
- package/dist/types/ammsdk/generated/instructions/claimTokenIncentives.d.ts +0 -86
- package/dist/types/ammsdk/generated/instructions/closeUserVolumeAccumulator.d.ts +0 -54
- package/dist/types/ammsdk/generated/instructions/collectCoinCreatorFee.d.ts +0 -70
- package/dist/types/ammsdk/generated/instructions/initUserVolumeAccumulator.d.ts +0 -62
- package/dist/types/ammsdk/generated/instructions/setCoinCreator.d.ts +0 -58
- package/dist/types/ammsdk/generated/instructions/syncUserVolumeAccumulator.d.ts +0 -58
- package/dist/types/ammsdk/generated/types/adminSetCoinCreatorEvent.d.ts +0 -27
- package/dist/types/ammsdk/generated/types/adminUpdateTokenIncentivesEvent.d.ts +0 -29
- package/dist/types/ammsdk/generated/types/claimTokenIncentivesEvent.d.ts +0 -27
- package/dist/types/ammsdk/generated/types/closeUserVolumeAccumulatorEvent.d.ts +0 -27
- package/dist/types/ammsdk/generated/types/collectCoinCreatorFeeEvent.d.ts +0 -25
- package/dist/types/ammsdk/generated/types/feeTier.d.ts +0 -20
- package/dist/types/ammsdk/generated/types/fees.d.ts +0 -21
- package/dist/types/ammsdk/generated/types/initUserVolumeAccumulatorEvent.d.ts +0 -21
- package/dist/types/ammsdk/generated/types/optionBool.d.ts +0 -13
- package/dist/types/ammsdk/generated/types/setBondingCurveCoinCreatorEvent.d.ts +0 -25
- package/dist/types/ammsdk/generated/types/setMetaplexCoinCreatorEvent.d.ts +0 -25
- package/dist/types/ammsdk/generated/types/syncUserVolumeAccumulatorEvent.d.ts +0 -23
|
@@ -5,22 +5,22 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit';
|
|
9
9
|
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const DEPOSIT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getDepositDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
-
export type DepositInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountUserBaseTokenAccount extends string | AccountMeta<string> = string, TAccountUserQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountUserPoolTokenAccount extends string | AccountMeta<string> = string, TAccountPoolBaseTokenAccount extends string | AccountMeta<string> = string, TAccountPoolQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountToken2022Program extends string | AccountMeta<string> =
|
|
13
|
-
TAccountPool extends string ?
|
|
12
|
+
export type DepositInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountUserBaseTokenAccount extends string | AccountMeta<string> = string, TAccountUserQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountUserPoolTokenAccount extends string | AccountMeta<string> = string, TAccountPoolBaseTokenAccount extends string | AccountMeta<string> = string, TAccountPoolQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountToken2022Program extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountPool extends string ? ReadonlyAccount<TAccountPool> : TAccountPool,
|
|
14
14
|
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
15
|
TAccountUser extends string ? ReadonlySignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
16
16
|
TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint,
|
|
17
17
|
TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint,
|
|
18
|
-
TAccountLpMint extends string ?
|
|
19
|
-
TAccountUserBaseTokenAccount extends string ?
|
|
20
|
-
TAccountUserQuoteTokenAccount extends string ?
|
|
21
|
-
TAccountUserPoolTokenAccount extends string ?
|
|
22
|
-
TAccountPoolBaseTokenAccount extends string ?
|
|
23
|
-
TAccountPoolQuoteTokenAccount extends string ?
|
|
18
|
+
TAccountLpMint extends string ? ReadonlyAccount<TAccountLpMint> : TAccountLpMint,
|
|
19
|
+
TAccountUserBaseTokenAccount extends string ? ReadonlyAccount<TAccountUserBaseTokenAccount> : TAccountUserBaseTokenAccount,
|
|
20
|
+
TAccountUserQuoteTokenAccount extends string ? ReadonlyAccount<TAccountUserQuoteTokenAccount> : TAccountUserQuoteTokenAccount,
|
|
21
|
+
TAccountUserPoolTokenAccount extends string ? ReadonlyAccount<TAccountUserPoolTokenAccount> : TAccountUserPoolTokenAccount,
|
|
22
|
+
TAccountPoolBaseTokenAccount extends string ? ReadonlyAccount<TAccountPoolBaseTokenAccount> : TAccountPoolBaseTokenAccount,
|
|
23
|
+
TAccountPoolQuoteTokenAccount extends string ? ReadonlyAccount<TAccountPoolQuoteTokenAccount> : TAccountPoolQuoteTokenAccount,
|
|
24
24
|
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
25
25
|
TAccountToken2022Program extends string ? ReadonlyAccount<TAccountToken2022Program> : TAccountToken2022Program,
|
|
26
26
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
@@ -41,29 +41,6 @@ export type DepositInstructionDataArgs = {
|
|
|
41
41
|
export declare function getDepositInstructionDataEncoder(): FixedSizeEncoder<DepositInstructionDataArgs>;
|
|
42
42
|
export declare function getDepositInstructionDataDecoder(): FixedSizeDecoder<DepositInstructionData>;
|
|
43
43
|
export declare function getDepositInstructionDataCodec(): FixedSizeCodec<DepositInstructionDataArgs, DepositInstructionData>;
|
|
44
|
-
export type DepositAsyncInput<TAccountPool extends string = string, TAccountGlobalConfig extends string = string, TAccountUser extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountLpMint extends string = string, TAccountUserBaseTokenAccount extends string = string, TAccountUserQuoteTokenAccount extends string = string, TAccountUserPoolTokenAccount extends string = string, TAccountPoolBaseTokenAccount extends string = string, TAccountPoolQuoteTokenAccount extends string = string, TAccountTokenProgram extends string = string, TAccountToken2022Program extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
45
|
-
pool: Address<TAccountPool>;
|
|
46
|
-
globalConfig: Address<TAccountGlobalConfig>;
|
|
47
|
-
user: TransactionSigner<TAccountUser>;
|
|
48
|
-
baseMint: Address<TAccountBaseMint>;
|
|
49
|
-
quoteMint: Address<TAccountQuoteMint>;
|
|
50
|
-
lpMint: Address<TAccountLpMint>;
|
|
51
|
-
userBaseTokenAccount: Address<TAccountUserBaseTokenAccount>;
|
|
52
|
-
userQuoteTokenAccount: Address<TAccountUserQuoteTokenAccount>;
|
|
53
|
-
userPoolTokenAccount: Address<TAccountUserPoolTokenAccount>;
|
|
54
|
-
poolBaseTokenAccount: Address<TAccountPoolBaseTokenAccount>;
|
|
55
|
-
poolQuoteTokenAccount: Address<TAccountPoolQuoteTokenAccount>;
|
|
56
|
-
tokenProgram?: Address<TAccountTokenProgram>;
|
|
57
|
-
token2022Program?: Address<TAccountToken2022Program>;
|
|
58
|
-
eventAuthority?: Address<TAccountEventAuthority>;
|
|
59
|
-
program: Address<TAccountProgram>;
|
|
60
|
-
lpTokenAmountOut: DepositInstructionDataArgs['lpTokenAmountOut'];
|
|
61
|
-
maxBaseAmountIn: DepositInstructionDataArgs['maxBaseAmountIn'];
|
|
62
|
-
maxQuoteAmountIn: DepositInstructionDataArgs['maxQuoteAmountIn'];
|
|
63
|
-
};
|
|
64
|
-
export declare function getDepositInstructionAsync<TAccountPool extends string, TAccountGlobalConfig extends string, TAccountUser extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountLpMint extends string, TAccountUserBaseTokenAccount extends string, TAccountUserQuoteTokenAccount extends string, TAccountUserPoolTokenAccount extends string, TAccountPoolBaseTokenAccount extends string, TAccountPoolQuoteTokenAccount extends string, TAccountTokenProgram extends string, TAccountToken2022Program extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: DepositAsyncInput<TAccountPool, TAccountGlobalConfig, TAccountUser, TAccountBaseMint, TAccountQuoteMint, TAccountLpMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountUserPoolTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountTokenProgram, TAccountToken2022Program, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
65
|
-
programAddress?: TProgramAddress;
|
|
66
|
-
}): Promise<DepositInstruction<TProgramAddress, TAccountPool, TAccountGlobalConfig, TAccountUser, TAccountBaseMint, TAccountQuoteMint, TAccountLpMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountUserPoolTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountTokenProgram, TAccountToken2022Program, TAccountEventAuthority, TAccountProgram>>;
|
|
67
44
|
export type DepositInput<TAccountPool extends string = string, TAccountGlobalConfig extends string = string, TAccountUser extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountLpMint extends string = string, TAccountUserBaseTokenAccount extends string = string, TAccountUserQuoteTokenAccount extends string = string, TAccountUserPoolTokenAccount extends string = string, TAccountPoolBaseTokenAccount extends string = string, TAccountPoolQuoteTokenAccount extends string = string, TAccountTokenProgram extends string = string, TAccountToken2022Program extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
68
45
|
pool: Address<TAccountPool>;
|
|
69
46
|
globalConfig: Address<TAccountGlobalConfig>;
|
|
@@ -77,7 +54,7 @@ export type DepositInput<TAccountPool extends string = string, TAccountGlobalCon
|
|
|
77
54
|
poolBaseTokenAccount: Address<TAccountPoolBaseTokenAccount>;
|
|
78
55
|
poolQuoteTokenAccount: Address<TAccountPoolQuoteTokenAccount>;
|
|
79
56
|
tokenProgram?: Address<TAccountTokenProgram>;
|
|
80
|
-
token2022Program
|
|
57
|
+
token2022Program: Address<TAccountToken2022Program>;
|
|
81
58
|
eventAuthority: Address<TAccountEventAuthority>;
|
|
82
59
|
program: Address<TAccountProgram>;
|
|
83
60
|
lpTokenAmountOut: DepositInstructionDataArgs['lpTokenAmountOut'];
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit';
|
|
9
9
|
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const DISABLE_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getDisableDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
12
|
export type DisableInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountAdmin extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
13
|
TAccountAdmin extends string ? ReadonlySignerAccount<TAccountAdmin> & AccountSignerMeta<TAccountAdmin> : TAccountAdmin,
|
|
14
|
-
TAccountGlobalConfig extends string ?
|
|
14
|
+
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
15
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
16
16
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
17
17
|
...TRemainingAccounts
|
|
@@ -34,20 +34,6 @@ export type DisableInstructionDataArgs = {
|
|
|
34
34
|
export declare function getDisableInstructionDataEncoder(): FixedSizeEncoder<DisableInstructionDataArgs>;
|
|
35
35
|
export declare function getDisableInstructionDataDecoder(): FixedSizeDecoder<DisableInstructionData>;
|
|
36
36
|
export declare function getDisableInstructionDataCodec(): FixedSizeCodec<DisableInstructionDataArgs, DisableInstructionData>;
|
|
37
|
-
export type DisableAsyncInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
|
-
admin: TransactionSigner<TAccountAdmin>;
|
|
39
|
-
globalConfig: Address<TAccountGlobalConfig>;
|
|
40
|
-
eventAuthority?: Address<TAccountEventAuthority>;
|
|
41
|
-
program: Address<TAccountProgram>;
|
|
42
|
-
disableCreatePool: DisableInstructionDataArgs['disableCreatePool'];
|
|
43
|
-
disableDeposit: DisableInstructionDataArgs['disableDeposit'];
|
|
44
|
-
disableWithdraw: DisableInstructionDataArgs['disableWithdraw'];
|
|
45
|
-
disableBuy: DisableInstructionDataArgs['disableBuy'];
|
|
46
|
-
disableSell: DisableInstructionDataArgs['disableSell'];
|
|
47
|
-
};
|
|
48
|
-
export declare function getDisableInstructionAsync<TAccountAdmin extends string, TAccountGlobalConfig extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: DisableAsyncInput<TAccountAdmin, TAccountGlobalConfig, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
49
|
-
programAddress?: TProgramAddress;
|
|
50
|
-
}): Promise<DisableInstruction<TProgramAddress, TAccountAdmin, TAccountGlobalConfig, TAccountEventAuthority, TAccountProgram>>;
|
|
51
37
|
export type DisableInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
52
38
|
admin: TransactionSigner<TAccountAdmin>;
|
|
53
39
|
globalConfig: Address<TAccountGlobalConfig>;
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit';
|
|
9
9
|
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const EXTEND_ACCOUNT_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getExtendAccountDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
12
|
export type ExtendAccountInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountAccount extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
-
TAccountAccount extends string ?
|
|
13
|
+
TAccountAccount extends string ? ReadonlyAccount<TAccountAccount> : TAccountAccount,
|
|
14
14
|
TAccountUser extends string ? ReadonlySignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
15
15
|
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
16
16
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
@@ -24,16 +24,6 @@ export type ExtendAccountInstructionDataArgs = {};
|
|
|
24
24
|
export declare function getExtendAccountInstructionDataEncoder(): FixedSizeEncoder<ExtendAccountInstructionDataArgs>;
|
|
25
25
|
export declare function getExtendAccountInstructionDataDecoder(): FixedSizeDecoder<ExtendAccountInstructionData>;
|
|
26
26
|
export declare function getExtendAccountInstructionDataCodec(): FixedSizeCodec<ExtendAccountInstructionDataArgs, ExtendAccountInstructionData>;
|
|
27
|
-
export type ExtendAccountAsyncInput<TAccountAccount extends string = string, TAccountUser extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
28
|
-
account: Address<TAccountAccount>;
|
|
29
|
-
user: TransactionSigner<TAccountUser>;
|
|
30
|
-
systemProgram?: Address<TAccountSystemProgram>;
|
|
31
|
-
eventAuthority?: Address<TAccountEventAuthority>;
|
|
32
|
-
program: Address<TAccountProgram>;
|
|
33
|
-
};
|
|
34
|
-
export declare function getExtendAccountInstructionAsync<TAccountAccount extends string, TAccountUser extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: ExtendAccountAsyncInput<TAccountAccount, TAccountUser, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
35
|
-
programAddress?: TProgramAddress;
|
|
36
|
-
}): Promise<ExtendAccountInstruction<TProgramAddress, TAccountAccount, TAccountUser, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>>;
|
|
37
27
|
export type ExtendAccountInput<TAccountAccount extends string = string, TAccountUser extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
28
|
account: Address<TAccountAccount>;
|
|
39
29
|
user: TransactionSigner<TAccountUser>;
|
|
@@ -5,22 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
export * from './adminSetCoinCreator';
|
|
9
|
-
export * from './adminUpdateTokenIncentives';
|
|
10
8
|
export * from './buy';
|
|
11
|
-
export * from './buyExactQuoteIn';
|
|
12
|
-
export * from './claimTokenIncentives';
|
|
13
|
-
export * from './closeUserVolumeAccumulator';
|
|
14
|
-
export * from './collectCoinCreatorFee';
|
|
15
9
|
export * from './createConfig';
|
|
16
10
|
export * from './createPool';
|
|
17
11
|
export * from './deposit';
|
|
18
12
|
export * from './disable';
|
|
19
13
|
export * from './extendAccount';
|
|
20
|
-
export * from './initUserVolumeAccumulator';
|
|
21
14
|
export * from './sell';
|
|
22
|
-
export * from './setCoinCreator';
|
|
23
|
-
export * from './syncUserVolumeAccumulator';
|
|
24
15
|
export * from './updateAdmin';
|
|
25
16
|
export * from './updateFeeConfig';
|
|
26
17
|
export * from './withdraw';
|
|
@@ -5,32 +5,28 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit';
|
|
9
9
|
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const SELL_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getSellDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
-
export type SellInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountUserBaseTokenAccount extends string | AccountMeta<string> = string, TAccountUserQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountPoolBaseTokenAccount extends string | AccountMeta<string> = string, TAccountPoolQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountProtocolFeeRecipient extends string | AccountMeta<string> = string, TAccountProtocolFeeRecipientTokenAccount extends string | AccountMeta<string> = string, TAccountBaseTokenProgram extends string | AccountMeta<string> = string, TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountAssociatedTokenProgram extends string | AccountMeta<string> =
|
|
13
|
-
TAccountPool extends string ?
|
|
14
|
-
TAccountUser extends string ?
|
|
12
|
+
export type SellInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountUserBaseTokenAccount extends string | AccountMeta<string> = string, TAccountUserQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountPoolBaseTokenAccount extends string | AccountMeta<string> = string, TAccountPoolQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountProtocolFeeRecipient extends string | AccountMeta<string> = string, TAccountProtocolFeeRecipientTokenAccount extends string | AccountMeta<string> = string, TAccountBaseTokenProgram extends string | AccountMeta<string> = string, TAccountQuoteTokenProgram extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountAssociatedTokenProgram extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountPool extends string ? ReadonlyAccount<TAccountPool> : TAccountPool,
|
|
14
|
+
TAccountUser extends string ? ReadonlySignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
15
15
|
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
16
16
|
TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint,
|
|
17
17
|
TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint,
|
|
18
|
-
TAccountUserBaseTokenAccount extends string ?
|
|
19
|
-
TAccountUserQuoteTokenAccount extends string ?
|
|
20
|
-
TAccountPoolBaseTokenAccount extends string ?
|
|
21
|
-
TAccountPoolQuoteTokenAccount extends string ?
|
|
18
|
+
TAccountUserBaseTokenAccount extends string ? ReadonlyAccount<TAccountUserBaseTokenAccount> : TAccountUserBaseTokenAccount,
|
|
19
|
+
TAccountUserQuoteTokenAccount extends string ? ReadonlyAccount<TAccountUserQuoteTokenAccount> : TAccountUserQuoteTokenAccount,
|
|
20
|
+
TAccountPoolBaseTokenAccount extends string ? ReadonlyAccount<TAccountPoolBaseTokenAccount> : TAccountPoolBaseTokenAccount,
|
|
21
|
+
TAccountPoolQuoteTokenAccount extends string ? ReadonlyAccount<TAccountPoolQuoteTokenAccount> : TAccountPoolQuoteTokenAccount,
|
|
22
22
|
TAccountProtocolFeeRecipient extends string ? ReadonlyAccount<TAccountProtocolFeeRecipient> : TAccountProtocolFeeRecipient,
|
|
23
|
-
TAccountProtocolFeeRecipientTokenAccount extends string ?
|
|
23
|
+
TAccountProtocolFeeRecipientTokenAccount extends string ? ReadonlyAccount<TAccountProtocolFeeRecipientTokenAccount> : TAccountProtocolFeeRecipientTokenAccount,
|
|
24
24
|
TAccountBaseTokenProgram extends string ? ReadonlyAccount<TAccountBaseTokenProgram> : TAccountBaseTokenProgram,
|
|
25
25
|
TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram,
|
|
26
26
|
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
27
27
|
TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram,
|
|
28
28
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
29
29
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
30
|
-
TAccountCoinCreatorVaultAta extends string ? WritableAccount<TAccountCoinCreatorVaultAta> : TAccountCoinCreatorVaultAta,
|
|
31
|
-
TAccountCoinCreatorVaultAuthority extends string ? ReadonlyAccount<TAccountCoinCreatorVaultAuthority> : TAccountCoinCreatorVaultAuthority,
|
|
32
|
-
TAccountFeeConfig extends string ? ReadonlyAccount<TAccountFeeConfig> : TAccountFeeConfig,
|
|
33
|
-
TAccountFeeProgram extends string ? ReadonlyAccount<TAccountFeeProgram> : TAccountFeeProgram,
|
|
34
30
|
...TRemainingAccounts
|
|
35
31
|
]>;
|
|
36
32
|
export type SellInstructionData = {
|
|
@@ -45,35 +41,7 @@ export type SellInstructionDataArgs = {
|
|
|
45
41
|
export declare function getSellInstructionDataEncoder(): FixedSizeEncoder<SellInstructionDataArgs>;
|
|
46
42
|
export declare function getSellInstructionDataDecoder(): FixedSizeDecoder<SellInstructionData>;
|
|
47
43
|
export declare function getSellInstructionDataCodec(): FixedSizeCodec<SellInstructionDataArgs, SellInstructionData>;
|
|
48
|
-
export type
|
|
49
|
-
pool: Address<TAccountPool>;
|
|
50
|
-
user: TransactionSigner<TAccountUser>;
|
|
51
|
-
globalConfig: Address<TAccountGlobalConfig>;
|
|
52
|
-
baseMint: Address<TAccountBaseMint>;
|
|
53
|
-
quoteMint: Address<TAccountQuoteMint>;
|
|
54
|
-
userBaseTokenAccount: Address<TAccountUserBaseTokenAccount>;
|
|
55
|
-
userQuoteTokenAccount: Address<TAccountUserQuoteTokenAccount>;
|
|
56
|
-
poolBaseTokenAccount: Address<TAccountPoolBaseTokenAccount>;
|
|
57
|
-
poolQuoteTokenAccount: Address<TAccountPoolQuoteTokenAccount>;
|
|
58
|
-
protocolFeeRecipient: Address<TAccountProtocolFeeRecipient>;
|
|
59
|
-
protocolFeeRecipientTokenAccount?: Address<TAccountProtocolFeeRecipientTokenAccount>;
|
|
60
|
-
baseTokenProgram: Address<TAccountBaseTokenProgram>;
|
|
61
|
-
quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
|
|
62
|
-
systemProgram?: Address<TAccountSystemProgram>;
|
|
63
|
-
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
64
|
-
eventAuthority?: Address<TAccountEventAuthority>;
|
|
65
|
-
program?: Address<TAccountProgram>;
|
|
66
|
-
coinCreatorVaultAta?: Address<TAccountCoinCreatorVaultAta>;
|
|
67
|
-
coinCreatorVaultAuthority: Address<TAccountCoinCreatorVaultAuthority>;
|
|
68
|
-
feeConfig?: Address<TAccountFeeConfig>;
|
|
69
|
-
feeProgram?: Address<TAccountFeeProgram>;
|
|
70
|
-
baseAmountIn: SellInstructionDataArgs['baseAmountIn'];
|
|
71
|
-
minQuoteAmountOut: SellInstructionDataArgs['minQuoteAmountOut'];
|
|
72
|
-
};
|
|
73
|
-
export declare function getSellInstructionAsync<TAccountPool extends string, TAccountUser extends string, TAccountGlobalConfig extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountUserBaseTokenAccount extends string, TAccountUserQuoteTokenAccount extends string, TAccountPoolBaseTokenAccount extends string, TAccountPoolQuoteTokenAccount extends string, TAccountProtocolFeeRecipient extends string, TAccountProtocolFeeRecipientTokenAccount extends string, TAccountBaseTokenProgram extends string, TAccountQuoteTokenProgram extends string, TAccountSystemProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TAccountCoinCreatorVaultAta extends string, TAccountCoinCreatorVaultAuthority extends string, TAccountFeeConfig extends string, TAccountFeeProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: SellAsyncInput<TAccountPool, TAccountUser, TAccountGlobalConfig, TAccountBaseMint, TAccountQuoteMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountProtocolFeeRecipient, TAccountProtocolFeeRecipientTokenAccount, TAccountBaseTokenProgram, TAccountQuoteTokenProgram, TAccountSystemProgram, TAccountAssociatedTokenProgram, TAccountEventAuthority, TAccountProgram, TAccountCoinCreatorVaultAta, TAccountCoinCreatorVaultAuthority, TAccountFeeConfig, TAccountFeeProgram>, config?: {
|
|
74
|
-
programAddress?: TProgramAddress;
|
|
75
|
-
}): Promise<SellInstruction<TProgramAddress, TAccountPool, TAccountUser, TAccountGlobalConfig, TAccountBaseMint, TAccountQuoteMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountProtocolFeeRecipient, TAccountProtocolFeeRecipientTokenAccount, TAccountBaseTokenProgram, TAccountQuoteTokenProgram, TAccountSystemProgram, TAccountAssociatedTokenProgram, TAccountEventAuthority, TAccountProgram, TAccountCoinCreatorVaultAta, TAccountCoinCreatorVaultAuthority, TAccountFeeConfig, TAccountFeeProgram>>;
|
|
76
|
-
export type SellInput<TAccountPool extends string = string, TAccountUser extends string = string, TAccountGlobalConfig extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountUserBaseTokenAccount extends string = string, TAccountUserQuoteTokenAccount extends string = string, TAccountPoolBaseTokenAccount extends string = string, TAccountPoolQuoteTokenAccount extends string = string, TAccountProtocolFeeRecipient extends string = string, TAccountProtocolFeeRecipientTokenAccount extends string = string, TAccountBaseTokenProgram extends string = string, TAccountQuoteTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string, TAccountCoinCreatorVaultAta extends string = string, TAccountCoinCreatorVaultAuthority extends string = string, TAccountFeeConfig extends string = string, TAccountFeeProgram extends string = string> = {
|
|
44
|
+
export type SellInput<TAccountPool extends string = string, TAccountUser extends string = string, TAccountGlobalConfig extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountUserBaseTokenAccount extends string = string, TAccountUserQuoteTokenAccount extends string = string, TAccountPoolBaseTokenAccount extends string = string, TAccountPoolQuoteTokenAccount extends string = string, TAccountProtocolFeeRecipient extends string = string, TAccountProtocolFeeRecipientTokenAccount extends string = string, TAccountBaseTokenProgram extends string = string, TAccountQuoteTokenProgram extends string = string, TAccountSystemProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
77
45
|
pool: Address<TAccountPool>;
|
|
78
46
|
user: TransactionSigner<TAccountUser>;
|
|
79
47
|
globalConfig: Address<TAccountGlobalConfig>;
|
|
@@ -88,19 +56,15 @@ export type SellInput<TAccountPool extends string = string, TAccountUser extends
|
|
|
88
56
|
baseTokenProgram: Address<TAccountBaseTokenProgram>;
|
|
89
57
|
quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
|
|
90
58
|
systemProgram?: Address<TAccountSystemProgram>;
|
|
91
|
-
associatedTokenProgram
|
|
59
|
+
associatedTokenProgram: Address<TAccountAssociatedTokenProgram>;
|
|
92
60
|
eventAuthority: Address<TAccountEventAuthority>;
|
|
93
|
-
program
|
|
94
|
-
coinCreatorVaultAta: Address<TAccountCoinCreatorVaultAta>;
|
|
95
|
-
coinCreatorVaultAuthority: Address<TAccountCoinCreatorVaultAuthority>;
|
|
96
|
-
feeConfig: Address<TAccountFeeConfig>;
|
|
97
|
-
feeProgram?: Address<TAccountFeeProgram>;
|
|
61
|
+
program: Address<TAccountProgram>;
|
|
98
62
|
baseAmountIn: SellInstructionDataArgs['baseAmountIn'];
|
|
99
63
|
minQuoteAmountOut: SellInstructionDataArgs['minQuoteAmountOut'];
|
|
100
64
|
};
|
|
101
|
-
export declare function getSellInstruction<TAccountPool extends string, TAccountUser extends string, TAccountGlobalConfig extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountUserBaseTokenAccount extends string, TAccountUserQuoteTokenAccount extends string, TAccountPoolBaseTokenAccount extends string, TAccountPoolQuoteTokenAccount extends string, TAccountProtocolFeeRecipient extends string, TAccountProtocolFeeRecipientTokenAccount extends string, TAccountBaseTokenProgram extends string, TAccountQuoteTokenProgram extends string, TAccountSystemProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string,
|
|
65
|
+
export declare function getSellInstruction<TAccountPool extends string, TAccountUser extends string, TAccountGlobalConfig extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountUserBaseTokenAccount extends string, TAccountUserQuoteTokenAccount extends string, TAccountPoolBaseTokenAccount extends string, TAccountPoolQuoteTokenAccount extends string, TAccountProtocolFeeRecipient extends string, TAccountProtocolFeeRecipientTokenAccount extends string, TAccountBaseTokenProgram extends string, TAccountQuoteTokenProgram extends string, TAccountSystemProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: SellInput<TAccountPool, TAccountUser, TAccountGlobalConfig, TAccountBaseMint, TAccountQuoteMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountProtocolFeeRecipient, TAccountProtocolFeeRecipientTokenAccount, TAccountBaseTokenProgram, TAccountQuoteTokenProgram, TAccountSystemProgram, TAccountAssociatedTokenProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
102
66
|
programAddress?: TProgramAddress;
|
|
103
|
-
}): SellInstruction<TProgramAddress, TAccountPool, TAccountUser, TAccountGlobalConfig, TAccountBaseMint, TAccountQuoteMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountProtocolFeeRecipient, TAccountProtocolFeeRecipientTokenAccount, TAccountBaseTokenProgram, TAccountQuoteTokenProgram, TAccountSystemProgram, TAccountAssociatedTokenProgram, TAccountEventAuthority, TAccountProgram
|
|
67
|
+
}): SellInstruction<TProgramAddress, TAccountPool, TAccountUser, TAccountGlobalConfig, TAccountBaseMint, TAccountQuoteMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountProtocolFeeRecipient, TAccountProtocolFeeRecipientTokenAccount, TAccountBaseTokenProgram, TAccountQuoteTokenProgram, TAccountSystemProgram, TAccountAssociatedTokenProgram, TAccountEventAuthority, TAccountProgram>;
|
|
104
68
|
export type ParsedSellInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
105
69
|
programAddress: Address<TProgram>;
|
|
106
70
|
accounts: {
|
|
@@ -121,10 +85,6 @@ export type ParsedSellInstruction<TProgram extends string = typeof PUMP_AMM_PROG
|
|
|
121
85
|
associatedTokenProgram: TAccountMetas[14];
|
|
122
86
|
eventAuthority: TAccountMetas[15];
|
|
123
87
|
program: TAccountMetas[16];
|
|
124
|
-
coinCreatorVaultAta: TAccountMetas[17];
|
|
125
|
-
coinCreatorVaultAuthority: TAccountMetas[18];
|
|
126
|
-
feeConfig: TAccountMetas[19];
|
|
127
|
-
feeProgram: TAccountMetas[20];
|
|
128
88
|
};
|
|
129
89
|
data: SellInstructionData;
|
|
130
90
|
};
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit';
|
|
9
9
|
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const UPDATE_ADMIN_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getUpdateAdminDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
12
|
export type UpdateAdminInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountAdmin extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountNewAdmin extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
13
|
TAccountAdmin extends string ? ReadonlySignerAccount<TAccountAdmin> & AccountSignerMeta<TAccountAdmin> : TAccountAdmin,
|
|
14
|
-
TAccountGlobalConfig extends string ?
|
|
14
|
+
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
15
|
TAccountNewAdmin extends string ? ReadonlyAccount<TAccountNewAdmin> : TAccountNewAdmin,
|
|
16
16
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
17
17
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
@@ -24,16 +24,6 @@ export type UpdateAdminInstructionDataArgs = {};
|
|
|
24
24
|
export declare function getUpdateAdminInstructionDataEncoder(): FixedSizeEncoder<UpdateAdminInstructionDataArgs>;
|
|
25
25
|
export declare function getUpdateAdminInstructionDataDecoder(): FixedSizeDecoder<UpdateAdminInstructionData>;
|
|
26
26
|
export declare function getUpdateAdminInstructionDataCodec(): FixedSizeCodec<UpdateAdminInstructionDataArgs, UpdateAdminInstructionData>;
|
|
27
|
-
export type UpdateAdminAsyncInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountNewAdmin extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
28
|
-
admin: TransactionSigner<TAccountAdmin>;
|
|
29
|
-
globalConfig: Address<TAccountGlobalConfig>;
|
|
30
|
-
newAdmin: Address<TAccountNewAdmin>;
|
|
31
|
-
eventAuthority?: Address<TAccountEventAuthority>;
|
|
32
|
-
program: Address<TAccountProgram>;
|
|
33
|
-
};
|
|
34
|
-
export declare function getUpdateAdminInstructionAsync<TAccountAdmin extends string, TAccountGlobalConfig extends string, TAccountNewAdmin extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: UpdateAdminAsyncInput<TAccountAdmin, TAccountGlobalConfig, TAccountNewAdmin, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
35
|
-
programAddress?: TProgramAddress;
|
|
36
|
-
}): Promise<UpdateAdminInstruction<TProgramAddress, TAccountAdmin, TAccountGlobalConfig, TAccountNewAdmin, TAccountEventAuthority, TAccountProgram>>;
|
|
37
27
|
export type UpdateAdminInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountNewAdmin extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
28
|
admin: TransactionSigner<TAccountAdmin>;
|
|
39
29
|
globalConfig: Address<TAccountGlobalConfig>;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit';
|
|
9
9
|
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const UPDATE_FEE_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getUpdateFeeConfigDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
12
|
export type UpdateFeeConfigInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountAdmin extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
13
|
TAccountAdmin extends string ? ReadonlySignerAccount<TAccountAdmin> & AccountSignerMeta<TAccountAdmin> : TAccountAdmin,
|
|
14
|
-
TAccountGlobalConfig extends string ?
|
|
14
|
+
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
15
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
16
16
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
17
17
|
...TRemainingAccounts
|
|
@@ -21,33 +21,15 @@ export type UpdateFeeConfigInstructionData = {
|
|
|
21
21
|
lpFeeBasisPoints: bigint;
|
|
22
22
|
protocolFeeBasisPoints: bigint;
|
|
23
23
|
protocolFeeRecipients: Array<Address>;
|
|
24
|
-
coinCreatorFeeBasisPoints: bigint;
|
|
25
|
-
adminSetCoinCreatorAuthority: Address;
|
|
26
24
|
};
|
|
27
25
|
export type UpdateFeeConfigInstructionDataArgs = {
|
|
28
26
|
lpFeeBasisPoints: number | bigint;
|
|
29
27
|
protocolFeeBasisPoints: number | bigint;
|
|
30
28
|
protocolFeeRecipients: Array<Address>;
|
|
31
|
-
coinCreatorFeeBasisPoints: number | bigint;
|
|
32
|
-
adminSetCoinCreatorAuthority: Address;
|
|
33
29
|
};
|
|
34
30
|
export declare function getUpdateFeeConfigInstructionDataEncoder(): FixedSizeEncoder<UpdateFeeConfigInstructionDataArgs>;
|
|
35
31
|
export declare function getUpdateFeeConfigInstructionDataDecoder(): FixedSizeDecoder<UpdateFeeConfigInstructionData>;
|
|
36
32
|
export declare function getUpdateFeeConfigInstructionDataCodec(): FixedSizeCodec<UpdateFeeConfigInstructionDataArgs, UpdateFeeConfigInstructionData>;
|
|
37
|
-
export type UpdateFeeConfigAsyncInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
|
-
admin: TransactionSigner<TAccountAdmin>;
|
|
39
|
-
globalConfig: Address<TAccountGlobalConfig>;
|
|
40
|
-
eventAuthority?: Address<TAccountEventAuthority>;
|
|
41
|
-
program: Address<TAccountProgram>;
|
|
42
|
-
lpFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['lpFeeBasisPoints'];
|
|
43
|
-
protocolFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['protocolFeeBasisPoints'];
|
|
44
|
-
protocolFeeRecipients: UpdateFeeConfigInstructionDataArgs['protocolFeeRecipients'];
|
|
45
|
-
coinCreatorFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['coinCreatorFeeBasisPoints'];
|
|
46
|
-
adminSetCoinCreatorAuthority: UpdateFeeConfigInstructionDataArgs['adminSetCoinCreatorAuthority'];
|
|
47
|
-
};
|
|
48
|
-
export declare function getUpdateFeeConfigInstructionAsync<TAccountAdmin extends string, TAccountGlobalConfig extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: UpdateFeeConfigAsyncInput<TAccountAdmin, TAccountGlobalConfig, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
49
|
-
programAddress?: TProgramAddress;
|
|
50
|
-
}): Promise<UpdateFeeConfigInstruction<TProgramAddress, TAccountAdmin, TAccountGlobalConfig, TAccountEventAuthority, TAccountProgram>>;
|
|
51
33
|
export type UpdateFeeConfigInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
52
34
|
admin: TransactionSigner<TAccountAdmin>;
|
|
53
35
|
globalConfig: Address<TAccountGlobalConfig>;
|
|
@@ -56,8 +38,6 @@ export type UpdateFeeConfigInput<TAccountAdmin extends string = string, TAccount
|
|
|
56
38
|
lpFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['lpFeeBasisPoints'];
|
|
57
39
|
protocolFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['protocolFeeBasisPoints'];
|
|
58
40
|
protocolFeeRecipients: UpdateFeeConfigInstructionDataArgs['protocolFeeRecipients'];
|
|
59
|
-
coinCreatorFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['coinCreatorFeeBasisPoints'];
|
|
60
|
-
adminSetCoinCreatorAuthority: UpdateFeeConfigInstructionDataArgs['adminSetCoinCreatorAuthority'];
|
|
61
41
|
};
|
|
62
42
|
export declare function getUpdateFeeConfigInstruction<TAccountAdmin extends string, TAccountGlobalConfig extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: UpdateFeeConfigInput<TAccountAdmin, TAccountGlobalConfig, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
63
43
|
programAddress?: TProgramAddress;
|
|
@@ -5,22 +5,22 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
|
-
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlySignerAccount, type ReadonlyUint8Array, type TransactionSigner } from '@solana/kit';
|
|
9
9
|
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
10
|
export declare const WITHDRAW_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
11
|
export declare function getWithdrawDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
-
export type WithdrawInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountUserBaseTokenAccount extends string | AccountMeta<string> = string, TAccountUserQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountUserPoolTokenAccount extends string | AccountMeta<string> = string, TAccountPoolBaseTokenAccount extends string | AccountMeta<string> = string, TAccountPoolQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountToken2022Program extends string | AccountMeta<string> =
|
|
13
|
-
TAccountPool extends string ?
|
|
12
|
+
export type WithdrawInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountGlobalConfig extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountBaseMint extends string | AccountMeta<string> = string, TAccountQuoteMint extends string | AccountMeta<string> = string, TAccountLpMint extends string | AccountMeta<string> = string, TAccountUserBaseTokenAccount extends string | AccountMeta<string> = string, TAccountUserQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountUserPoolTokenAccount extends string | AccountMeta<string> = string, TAccountPoolBaseTokenAccount extends string | AccountMeta<string> = string, TAccountPoolQuoteTokenAccount extends string | AccountMeta<string> = string, TAccountTokenProgram extends string | AccountMeta<string> = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA', TAccountToken2022Program extends string | AccountMeta<string> = string, TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountPool extends string ? ReadonlyAccount<TAccountPool> : TAccountPool,
|
|
14
14
|
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
15
|
TAccountUser extends string ? ReadonlySignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
16
16
|
TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint,
|
|
17
17
|
TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint,
|
|
18
|
-
TAccountLpMint extends string ?
|
|
19
|
-
TAccountUserBaseTokenAccount extends string ?
|
|
20
|
-
TAccountUserQuoteTokenAccount extends string ?
|
|
21
|
-
TAccountUserPoolTokenAccount extends string ?
|
|
22
|
-
TAccountPoolBaseTokenAccount extends string ?
|
|
23
|
-
TAccountPoolQuoteTokenAccount extends string ?
|
|
18
|
+
TAccountLpMint extends string ? ReadonlyAccount<TAccountLpMint> : TAccountLpMint,
|
|
19
|
+
TAccountUserBaseTokenAccount extends string ? ReadonlyAccount<TAccountUserBaseTokenAccount> : TAccountUserBaseTokenAccount,
|
|
20
|
+
TAccountUserQuoteTokenAccount extends string ? ReadonlyAccount<TAccountUserQuoteTokenAccount> : TAccountUserQuoteTokenAccount,
|
|
21
|
+
TAccountUserPoolTokenAccount extends string ? ReadonlyAccount<TAccountUserPoolTokenAccount> : TAccountUserPoolTokenAccount,
|
|
22
|
+
TAccountPoolBaseTokenAccount extends string ? ReadonlyAccount<TAccountPoolBaseTokenAccount> : TAccountPoolBaseTokenAccount,
|
|
23
|
+
TAccountPoolQuoteTokenAccount extends string ? ReadonlyAccount<TAccountPoolQuoteTokenAccount> : TAccountPoolQuoteTokenAccount,
|
|
24
24
|
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
25
25
|
TAccountToken2022Program extends string ? ReadonlyAccount<TAccountToken2022Program> : TAccountToken2022Program,
|
|
26
26
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
@@ -41,29 +41,6 @@ export type WithdrawInstructionDataArgs = {
|
|
|
41
41
|
export declare function getWithdrawInstructionDataEncoder(): FixedSizeEncoder<WithdrawInstructionDataArgs>;
|
|
42
42
|
export declare function getWithdrawInstructionDataDecoder(): FixedSizeDecoder<WithdrawInstructionData>;
|
|
43
43
|
export declare function getWithdrawInstructionDataCodec(): FixedSizeCodec<WithdrawInstructionDataArgs, WithdrawInstructionData>;
|
|
44
|
-
export type WithdrawAsyncInput<TAccountPool extends string = string, TAccountGlobalConfig extends string = string, TAccountUser extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountLpMint extends string = string, TAccountUserBaseTokenAccount extends string = string, TAccountUserQuoteTokenAccount extends string = string, TAccountUserPoolTokenAccount extends string = string, TAccountPoolBaseTokenAccount extends string = string, TAccountPoolQuoteTokenAccount extends string = string, TAccountTokenProgram extends string = string, TAccountToken2022Program extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
45
|
-
pool: Address<TAccountPool>;
|
|
46
|
-
globalConfig: Address<TAccountGlobalConfig>;
|
|
47
|
-
user: TransactionSigner<TAccountUser>;
|
|
48
|
-
baseMint: Address<TAccountBaseMint>;
|
|
49
|
-
quoteMint: Address<TAccountQuoteMint>;
|
|
50
|
-
lpMint: Address<TAccountLpMint>;
|
|
51
|
-
userBaseTokenAccount: Address<TAccountUserBaseTokenAccount>;
|
|
52
|
-
userQuoteTokenAccount: Address<TAccountUserQuoteTokenAccount>;
|
|
53
|
-
userPoolTokenAccount: Address<TAccountUserPoolTokenAccount>;
|
|
54
|
-
poolBaseTokenAccount: Address<TAccountPoolBaseTokenAccount>;
|
|
55
|
-
poolQuoteTokenAccount: Address<TAccountPoolQuoteTokenAccount>;
|
|
56
|
-
tokenProgram?: Address<TAccountTokenProgram>;
|
|
57
|
-
token2022Program?: Address<TAccountToken2022Program>;
|
|
58
|
-
eventAuthority?: Address<TAccountEventAuthority>;
|
|
59
|
-
program: Address<TAccountProgram>;
|
|
60
|
-
lpTokenAmountIn: WithdrawInstructionDataArgs['lpTokenAmountIn'];
|
|
61
|
-
minBaseAmountOut: WithdrawInstructionDataArgs['minBaseAmountOut'];
|
|
62
|
-
minQuoteAmountOut: WithdrawInstructionDataArgs['minQuoteAmountOut'];
|
|
63
|
-
};
|
|
64
|
-
export declare function getWithdrawInstructionAsync<TAccountPool extends string, TAccountGlobalConfig extends string, TAccountUser extends string, TAccountBaseMint extends string, TAccountQuoteMint extends string, TAccountLpMint extends string, TAccountUserBaseTokenAccount extends string, TAccountUserQuoteTokenAccount extends string, TAccountUserPoolTokenAccount extends string, TAccountPoolBaseTokenAccount extends string, TAccountPoolQuoteTokenAccount extends string, TAccountTokenProgram extends string, TAccountToken2022Program extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: WithdrawAsyncInput<TAccountPool, TAccountGlobalConfig, TAccountUser, TAccountBaseMint, TAccountQuoteMint, TAccountLpMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountUserPoolTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountTokenProgram, TAccountToken2022Program, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
65
|
-
programAddress?: TProgramAddress;
|
|
66
|
-
}): Promise<WithdrawInstruction<TProgramAddress, TAccountPool, TAccountGlobalConfig, TAccountUser, TAccountBaseMint, TAccountQuoteMint, TAccountLpMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountUserPoolTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountTokenProgram, TAccountToken2022Program, TAccountEventAuthority, TAccountProgram>>;
|
|
67
44
|
export type WithdrawInput<TAccountPool extends string = string, TAccountGlobalConfig extends string = string, TAccountUser extends string = string, TAccountBaseMint extends string = string, TAccountQuoteMint extends string = string, TAccountLpMint extends string = string, TAccountUserBaseTokenAccount extends string = string, TAccountUserQuoteTokenAccount extends string = string, TAccountUserPoolTokenAccount extends string = string, TAccountPoolBaseTokenAccount extends string = string, TAccountPoolQuoteTokenAccount extends string = string, TAccountTokenProgram extends string = string, TAccountToken2022Program extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
68
45
|
pool: Address<TAccountPool>;
|
|
69
46
|
globalConfig: Address<TAccountGlobalConfig>;
|
|
@@ -77,7 +54,7 @@ export type WithdrawInput<TAccountPool extends string = string, TAccountGlobalCo
|
|
|
77
54
|
poolBaseTokenAccount: Address<TAccountPoolBaseTokenAccount>;
|
|
78
55
|
poolQuoteTokenAccount: Address<TAccountPoolQuoteTokenAccount>;
|
|
79
56
|
tokenProgram?: Address<TAccountTokenProgram>;
|
|
80
|
-
token2022Program
|
|
57
|
+
token2022Program: Address<TAccountToken2022Program>;
|
|
81
58
|
eventAuthority: Address<TAccountEventAuthority>;
|
|
82
59
|
program: Address<TAccountProgram>;
|
|
83
60
|
lpTokenAmountIn: WithdrawInstructionDataArgs['lpTokenAmountIn'];
|
|
@@ -6,58 +6,33 @@
|
|
|
6
6
|
* @see https://github.com/codama-idl/codama
|
|
7
7
|
*/
|
|
8
8
|
import { type Address, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
-
import { type
|
|
10
|
-
export declare const PUMP_AMM_PROGRAM_ADDRESS: Address<"
|
|
9
|
+
import { type ParsedBuyInstruction, type ParsedCreateConfigInstruction, type ParsedCreatePoolInstruction, type ParsedDepositInstruction, type ParsedDisableInstruction, type ParsedExtendAccountInstruction, type ParsedSellInstruction, type ParsedUpdateAdminInstruction, type ParsedUpdateFeeConfigInstruction, type ParsedWithdrawInstruction } from '../instructions';
|
|
10
|
+
export declare const PUMP_AMM_PROGRAM_ADDRESS: Address<"">;
|
|
11
11
|
export declare enum PumpAmmAccount {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
GlobalConfig = 2,
|
|
15
|
-
GlobalVolumeAccumulator = 3,
|
|
16
|
-
Pool = 4,
|
|
17
|
-
UserVolumeAccumulator = 5
|
|
12
|
+
GlobalConfig = 0,
|
|
13
|
+
Pool = 1
|
|
18
14
|
}
|
|
19
15
|
export declare function identifyPumpAmmAccount(account: {
|
|
20
16
|
data: ReadonlyUint8Array;
|
|
21
17
|
} | ReadonlyUint8Array): PumpAmmAccount;
|
|
22
18
|
export declare enum PumpAmmInstruction {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Disable = 10,
|
|
34
|
-
ExtendAccount = 11,
|
|
35
|
-
InitUserVolumeAccumulator = 12,
|
|
36
|
-
Sell = 13,
|
|
37
|
-
SetCoinCreator = 14,
|
|
38
|
-
SyncUserVolumeAccumulator = 15,
|
|
39
|
-
UpdateAdmin = 16,
|
|
40
|
-
UpdateFeeConfig = 17,
|
|
41
|
-
Withdraw = 18
|
|
19
|
+
Buy = 0,
|
|
20
|
+
CreateConfig = 1,
|
|
21
|
+
CreatePool = 2,
|
|
22
|
+
Deposit = 3,
|
|
23
|
+
Disable = 4,
|
|
24
|
+
ExtendAccount = 5,
|
|
25
|
+
Sell = 6,
|
|
26
|
+
UpdateAdmin = 7,
|
|
27
|
+
UpdateFeeConfig = 8,
|
|
28
|
+
Withdraw = 9
|
|
42
29
|
}
|
|
43
30
|
export declare function identifyPumpAmmInstruction(instruction: {
|
|
44
31
|
data: ReadonlyUint8Array;
|
|
45
32
|
} | ReadonlyUint8Array): PumpAmmInstruction;
|
|
46
|
-
export type ParsedPumpAmmInstruction<TProgram extends string = '
|
|
47
|
-
instructionType: PumpAmmInstruction.AdminSetCoinCreator;
|
|
48
|
-
} & ParsedAdminSetCoinCreatorInstruction<TProgram>) | ({
|
|
49
|
-
instructionType: PumpAmmInstruction.AdminUpdateTokenIncentives;
|
|
50
|
-
} & ParsedAdminUpdateTokenIncentivesInstruction<TProgram>) | ({
|
|
33
|
+
export type ParsedPumpAmmInstruction<TProgram extends string = ''> = ({
|
|
51
34
|
instructionType: PumpAmmInstruction.Buy;
|
|
52
35
|
} & ParsedBuyInstruction<TProgram>) | ({
|
|
53
|
-
instructionType: PumpAmmInstruction.BuyExactQuoteIn;
|
|
54
|
-
} & ParsedBuyExactQuoteInInstruction<TProgram>) | ({
|
|
55
|
-
instructionType: PumpAmmInstruction.ClaimTokenIncentives;
|
|
56
|
-
} & ParsedClaimTokenIncentivesInstruction<TProgram>) | ({
|
|
57
|
-
instructionType: PumpAmmInstruction.CloseUserVolumeAccumulator;
|
|
58
|
-
} & ParsedCloseUserVolumeAccumulatorInstruction<TProgram>) | ({
|
|
59
|
-
instructionType: PumpAmmInstruction.CollectCoinCreatorFee;
|
|
60
|
-
} & ParsedCollectCoinCreatorFeeInstruction<TProgram>) | ({
|
|
61
36
|
instructionType: PumpAmmInstruction.CreateConfig;
|
|
62
37
|
} & ParsedCreateConfigInstruction<TProgram>) | ({
|
|
63
38
|
instructionType: PumpAmmInstruction.CreatePool;
|
|
@@ -68,14 +43,8 @@ export type ParsedPumpAmmInstruction<TProgram extends string = 'pAMMBay6oceH9fJK
|
|
|
68
43
|
} & ParsedDisableInstruction<TProgram>) | ({
|
|
69
44
|
instructionType: PumpAmmInstruction.ExtendAccount;
|
|
70
45
|
} & ParsedExtendAccountInstruction<TProgram>) | ({
|
|
71
|
-
instructionType: PumpAmmInstruction.InitUserVolumeAccumulator;
|
|
72
|
-
} & ParsedInitUserVolumeAccumulatorInstruction<TProgram>) | ({
|
|
73
46
|
instructionType: PumpAmmInstruction.Sell;
|
|
74
47
|
} & ParsedSellInstruction<TProgram>) | ({
|
|
75
|
-
instructionType: PumpAmmInstruction.SetCoinCreator;
|
|
76
|
-
} & ParsedSetCoinCreatorInstruction<TProgram>) | ({
|
|
77
|
-
instructionType: PumpAmmInstruction.SyncUserVolumeAccumulator;
|
|
78
|
-
} & ParsedSyncUserVolumeAccumulatorInstruction<TProgram>) | ({
|
|
79
48
|
instructionType: PumpAmmInstruction.UpdateAdmin;
|
|
80
49
|
} & ParsedUpdateAdminInstruction<TProgram>) | ({
|
|
81
50
|
instructionType: PumpAmmInstruction.UpdateFeeConfig;
|