pump-kit 0.0.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/@pump-kit.png +0 -0
- package/README.md +133 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +173 -0
- package/dist/types/ammsdk/bondingCurveMath.d.ts +41 -0
- package/dist/types/ammsdk/generated/accounts/bondingCurve.d.ts +39 -0
- package/dist/types/ammsdk/generated/accounts/feeConfig.d.ts +33 -0
- package/dist/types/ammsdk/generated/accounts/globalConfig.d.ts +61 -0
- package/dist/types/ammsdk/generated/accounts/globalVolumeAccumulator.d.ts +37 -0
- package/dist/types/ammsdk/generated/accounts/index.d.ts +13 -0
- package/dist/types/ammsdk/generated/accounts/pool.d.ts +47 -0
- package/dist/types/ammsdk/generated/accounts/userVolumeAccumulator.d.ts +39 -0
- package/dist/types/ammsdk/generated/errors/index.d.ts +8 -0
- package/dist/types/ammsdk/generated/errors/pumpAmm.d.ts +101 -0
- package/dist/types/ammsdk/generated/index.d.ts +12 -0
- package/dist/types/ammsdk/generated/instructions/adminSetCoinCreator.d.ts +63 -0
- package/dist/types/ammsdk/generated/instructions/adminUpdateTokenIncentives.d.ts +99 -0
- package/dist/types/ammsdk/generated/instructions/buy.d.ts +144 -0
- package/dist/types/ammsdk/generated/instructions/buyExactQuoteIn.d.ts +144 -0
- package/dist/types/ammsdk/generated/instructions/claimTokenIncentives.d.ts +86 -0
- package/dist/types/ammsdk/generated/instructions/closeUserVolumeAccumulator.d.ts +54 -0
- package/dist/types/ammsdk/generated/instructions/collectCoinCreatorFee.d.ts +70 -0
- package/dist/types/ammsdk/generated/instructions/createConfig.d.ts +79 -0
- package/dist/types/ammsdk/generated/instructions/createPool.d.ts +127 -0
- package/dist/types/ammsdk/generated/instructions/deposit.d.ts +111 -0
- package/dist/types/ammsdk/generated/instructions/disable.d.ts +75 -0
- package/dist/types/ammsdk/generated/instructions/extendAccount.d.ts +58 -0
- package/dist/types/ammsdk/generated/instructions/index.d.ts +26 -0
- package/dist/types/ammsdk/generated/instructions/initUserVolumeAccumulator.d.ts +62 -0
- package/dist/types/ammsdk/generated/instructions/sell.d.ts +131 -0
- package/dist/types/ammsdk/generated/instructions/setCoinCreator.d.ts +58 -0
- package/dist/types/ammsdk/generated/instructions/syncUserVolumeAccumulator.d.ts +58 -0
- package/dist/types/ammsdk/generated/instructions/updateAdmin.d.ts +58 -0
- package/dist/types/ammsdk/generated/instructions/updateFeeConfig.d.ts +75 -0
- package/dist/types/ammsdk/generated/instructions/withdraw.d.ts +111 -0
- package/dist/types/ammsdk/generated/programs/index.d.ts +8 -0
- package/dist/types/ammsdk/generated/programs/pumpAmm.d.ts +84 -0
- package/dist/types/ammsdk/generated/shared/index.d.ts +49 -0
- package/dist/types/ammsdk/generated/types/adminSetCoinCreatorEvent.d.ts +27 -0
- package/dist/types/ammsdk/generated/types/adminUpdateTokenIncentivesEvent.d.ts +29 -0
- package/dist/types/ammsdk/generated/types/buyEvent.d.ts +76 -0
- package/dist/types/ammsdk/generated/types/claimTokenIncentivesEvent.d.ts +27 -0
- package/dist/types/ammsdk/generated/types/closeUserVolumeAccumulatorEvent.d.ts +27 -0
- package/dist/types/ammsdk/generated/types/collectCoinCreatorFeeEvent.d.ts +25 -0
- package/dist/types/ammsdk/generated/types/createConfigEvent.d.ts +29 -0
- package/dist/types/ammsdk/generated/types/createPoolEvent.d.ts +55 -0
- package/dist/types/ammsdk/generated/types/depositEvent.d.ts +47 -0
- package/dist/types/ammsdk/generated/types/disableEvent.d.ts +29 -0
- package/dist/types/ammsdk/generated/types/extendAccountEvent.d.ts +25 -0
- package/dist/types/ammsdk/generated/types/feeTier.d.ts +20 -0
- package/dist/types/ammsdk/generated/types/fees.d.ts +21 -0
- package/dist/types/ammsdk/generated/types/index.d.ts +29 -0
- package/dist/types/ammsdk/generated/types/initUserVolumeAccumulatorEvent.d.ts +21 -0
- package/dist/types/ammsdk/generated/types/optionBool.d.ts +13 -0
- package/dist/types/ammsdk/generated/types/sellEvent.d.ts +61 -0
- package/dist/types/ammsdk/generated/types/setBondingCurveCoinCreatorEvent.d.ts +25 -0
- package/dist/types/ammsdk/generated/types/setMetaplexCoinCreatorEvent.d.ts +25 -0
- package/dist/types/ammsdk/generated/types/syncUserVolumeAccumulatorEvent.d.ts +23 -0
- package/dist/types/ammsdk/generated/types/updateAdminEvent.d.ts +21 -0
- package/dist/types/ammsdk/generated/types/updateFeeConfigEvent.d.ts +29 -0
- package/dist/types/ammsdk/generated/types/withdrawEvent.d.ts +47 -0
- package/dist/types/clients/amm.d.ts +109 -0
- package/dist/types/clients/pump.d.ts +76 -0
- package/dist/types/config/addresses.d.ts +12 -0
- package/dist/types/config/commitment.d.ts +4 -0
- package/dist/types/config/connection.d.ts +10 -0
- package/dist/types/config/constants.d.ts +4 -0
- package/dist/types/config/polyfills.d.ts +1 -0
- package/dist/types/events/pumpEvents.d.ts +30 -0
- package/dist/types/helpers/createAndBuy.d.ts +34 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/liquidity.d.ts +47 -0
- package/dist/types/pda/ata.d.ts +29 -0
- package/dist/types/pda/pump.d.ts +46 -0
- package/dist/types/pda/pumpAmm.d.ts +55 -0
- package/dist/types/pumpsdk/generated/accounts/bondingCurve.d.ts +39 -0
- package/dist/types/pumpsdk/generated/accounts/feeConfig.d.ts +33 -0
- package/dist/types/pumpsdk/generated/accounts/global.d.ts +59 -0
- package/dist/types/pumpsdk/generated/accounts/globalVolumeAccumulator.d.ts +37 -0
- package/dist/types/pumpsdk/generated/accounts/index.d.ts +12 -0
- package/dist/types/pumpsdk/generated/accounts/userVolumeAccumulator.d.ts +39 -0
- package/dist/types/pumpsdk/generated/errors/index.d.ts +8 -0
- package/dist/types/pumpsdk/generated/errors/pump.d.ts +105 -0
- package/dist/types/pumpsdk/generated/index.d.ts +12 -0
- package/dist/types/pumpsdk/generated/instructions/adminSetCreator.d.ts +67 -0
- package/dist/types/pumpsdk/generated/instructions/adminSetIdlAuthority.d.ts +71 -0
- package/dist/types/pumpsdk/generated/instructions/adminUpdateTokenIncentives.d.ts +99 -0
- package/dist/types/pumpsdk/generated/instructions/buy.d.ts +116 -0
- package/dist/types/pumpsdk/generated/instructions/buyExactSolIn.d.ts +116 -0
- package/dist/types/pumpsdk/generated/instructions/claimTokenIncentives.d.ts +86 -0
- package/dist/types/pumpsdk/generated/instructions/closeUserVolumeAccumulator.d.ts +54 -0
- package/dist/types/pumpsdk/generated/instructions/collectCreatorFee.d.ts +58 -0
- package/dist/types/pumpsdk/generated/instructions/create.d.ts +111 -0
- package/dist/types/pumpsdk/generated/instructions/extendAccount.d.ts +58 -0
- package/dist/types/pumpsdk/generated/instructions/index.d.ts +26 -0
- package/dist/types/pumpsdk/generated/instructions/initUserVolumeAccumulator.d.ts +62 -0
- package/dist/types/pumpsdk/generated/instructions/initialize.d.ts +50 -0
- package/dist/types/pumpsdk/generated/instructions/migrate.d.ts +134 -0
- package/dist/types/pumpsdk/generated/instructions/sell.d.ts +103 -0
- package/dist/types/pumpsdk/generated/instructions/setCreator.d.ts +71 -0
- package/dist/types/pumpsdk/generated/instructions/setMetaplexCreator.d.ts +58 -0
- package/dist/types/pumpsdk/generated/instructions/setParams.d.ts +99 -0
- package/dist/types/pumpsdk/generated/instructions/syncUserVolumeAccumulator.d.ts +58 -0
- package/dist/types/pumpsdk/generated/instructions/updateGlobalAuthority.d.ts +58 -0
- package/dist/types/pumpsdk/generated/programs/index.d.ts +8 -0
- package/dist/types/pumpsdk/generated/programs/pump.d.ts +83 -0
- package/dist/types/pumpsdk/generated/shared/index.d.ts +49 -0
- package/dist/types/pumpsdk/generated/types/adminSetCreatorEvent.d.ts +27 -0
- package/dist/types/pumpsdk/generated/types/adminSetIdlAuthorityEvent.d.ts +15 -0
- package/dist/types/pumpsdk/generated/types/adminUpdateTokenIncentivesEvent.d.ts +29 -0
- package/dist/types/pumpsdk/generated/types/claimTokenIncentivesEvent.d.ts +27 -0
- package/dist/types/pumpsdk/generated/types/closeUserVolumeAccumulatorEvent.d.ts +27 -0
- package/dist/types/pumpsdk/generated/types/collectCreatorFeeEvent.d.ts +21 -0
- package/dist/types/pumpsdk/generated/types/completeEvent.d.ts +23 -0
- package/dist/types/pumpsdk/generated/types/completePumpAmmMigrationEvent.d.ts +31 -0
- package/dist/types/pumpsdk/generated/types/createEvent.d.ts +39 -0
- package/dist/types/pumpsdk/generated/types/extendAccountEvent.d.ts +25 -0
- package/dist/types/pumpsdk/generated/types/feeTier.d.ts +20 -0
- package/dist/types/pumpsdk/generated/types/fees.d.ts +21 -0
- package/dist/types/pumpsdk/generated/types/index.d.ts +27 -0
- package/dist/types/pumpsdk/generated/types/initUserVolumeAccumulatorEvent.d.ts +21 -0
- package/dist/types/pumpsdk/generated/types/optionBool.d.ts +13 -0
- package/dist/types/pumpsdk/generated/types/setCreatorEvent.d.ts +23 -0
- package/dist/types/pumpsdk/generated/types/setMetaplexCreatorEvent.d.ts +25 -0
- package/dist/types/pumpsdk/generated/types/setParamsEvent.d.ts +43 -0
- package/dist/types/pumpsdk/generated/types/syncUserVolumeAccumulatorEvent.d.ts +23 -0
- package/dist/types/pumpsdk/generated/types/tradeEvent.d.ts +60 -0
- package/dist/types/pumpsdk/generated/types/updateGlobalAuthorityEvent.d.ts +23 -0
- package/dist/types/recipes/buy.d.ts +51 -0
- package/dist/types/recipes/mintFirstBuy.d.ts +51 -0
- package/dist/types/recipes/provideLiquidity.d.ts +42 -0
- package/dist/types/recipes/removeLiquidity.d.ts +40 -0
- package/dist/types/recipes/sell.d.ts +39 -0
- package/dist/types/simple.d.ts +10 -0
- package/dist/types/swap.d.ts +49 -0
- package/dist/types/utils/amounts.d.ts +4 -0
- package/dist/types/utils/ata.d.ts +15 -0
- package/dist/types/utils/slippage.d.ts +37 -0
- package/dist/types/utils/transaction.d.ts +101 -0
- package/dist/types/utils/wsol.d.ts +18 -0
- package/metadata/social.json +8 -0
- package/package.json +56 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type AccountSignerMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
|
|
9
|
+
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export declare const SELL_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
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> = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA', TAccountCoinCreatorVaultAta extends string | AccountMeta<string> = string, TAccountCoinCreatorVaultAuthority extends string | AccountMeta<string> = string, TAccountFeeConfig extends string | AccountMeta<string> = string, TAccountFeeProgram extends string | AccountMeta<string> = 'pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool,
|
|
14
|
+
TAccountUser extends string ? WritableSignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
15
|
+
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
16
|
+
TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint,
|
|
17
|
+
TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint,
|
|
18
|
+
TAccountUserBaseTokenAccount extends string ? WritableAccount<TAccountUserBaseTokenAccount> : TAccountUserBaseTokenAccount,
|
|
19
|
+
TAccountUserQuoteTokenAccount extends string ? WritableAccount<TAccountUserQuoteTokenAccount> : TAccountUserQuoteTokenAccount,
|
|
20
|
+
TAccountPoolBaseTokenAccount extends string ? WritableAccount<TAccountPoolBaseTokenAccount> : TAccountPoolBaseTokenAccount,
|
|
21
|
+
TAccountPoolQuoteTokenAccount extends string ? WritableAccount<TAccountPoolQuoteTokenAccount> : TAccountPoolQuoteTokenAccount,
|
|
22
|
+
TAccountProtocolFeeRecipient extends string ? ReadonlyAccount<TAccountProtocolFeeRecipient> : TAccountProtocolFeeRecipient,
|
|
23
|
+
TAccountProtocolFeeRecipientTokenAccount extends string ? WritableAccount<TAccountProtocolFeeRecipientTokenAccount> : TAccountProtocolFeeRecipientTokenAccount,
|
|
24
|
+
TAccountBaseTokenProgram extends string ? ReadonlyAccount<TAccountBaseTokenProgram> : TAccountBaseTokenProgram,
|
|
25
|
+
TAccountQuoteTokenProgram extends string ? ReadonlyAccount<TAccountQuoteTokenProgram> : TAccountQuoteTokenProgram,
|
|
26
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
27
|
+
TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram,
|
|
28
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
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
|
+
...TRemainingAccounts
|
|
35
|
+
]>;
|
|
36
|
+
export type SellInstructionData = {
|
|
37
|
+
discriminator: ReadonlyUint8Array;
|
|
38
|
+
baseAmountIn: bigint;
|
|
39
|
+
minQuoteAmountOut: bigint;
|
|
40
|
+
};
|
|
41
|
+
export type SellInstructionDataArgs = {
|
|
42
|
+
baseAmountIn: number | bigint;
|
|
43
|
+
minQuoteAmountOut: number | bigint;
|
|
44
|
+
};
|
|
45
|
+
export declare function getSellInstructionDataEncoder(): FixedSizeEncoder<SellInstructionDataArgs>;
|
|
46
|
+
export declare function getSellInstructionDataDecoder(): FixedSizeDecoder<SellInstructionData>;
|
|
47
|
+
export declare function getSellInstructionDataCodec(): FixedSizeCodec<SellInstructionDataArgs, SellInstructionData>;
|
|
48
|
+
export type SellAsyncInput<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> = {
|
|
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> = {
|
|
77
|
+
pool: Address<TAccountPool>;
|
|
78
|
+
user: TransactionSigner<TAccountUser>;
|
|
79
|
+
globalConfig: Address<TAccountGlobalConfig>;
|
|
80
|
+
baseMint: Address<TAccountBaseMint>;
|
|
81
|
+
quoteMint: Address<TAccountQuoteMint>;
|
|
82
|
+
userBaseTokenAccount: Address<TAccountUserBaseTokenAccount>;
|
|
83
|
+
userQuoteTokenAccount: Address<TAccountUserQuoteTokenAccount>;
|
|
84
|
+
poolBaseTokenAccount: Address<TAccountPoolBaseTokenAccount>;
|
|
85
|
+
poolQuoteTokenAccount: Address<TAccountPoolQuoteTokenAccount>;
|
|
86
|
+
protocolFeeRecipient: Address<TAccountProtocolFeeRecipient>;
|
|
87
|
+
protocolFeeRecipientTokenAccount: Address<TAccountProtocolFeeRecipientTokenAccount>;
|
|
88
|
+
baseTokenProgram: Address<TAccountBaseTokenProgram>;
|
|
89
|
+
quoteTokenProgram: Address<TAccountQuoteTokenProgram>;
|
|
90
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
91
|
+
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
92
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
93
|
+
program?: Address<TAccountProgram>;
|
|
94
|
+
coinCreatorVaultAta: Address<TAccountCoinCreatorVaultAta>;
|
|
95
|
+
coinCreatorVaultAuthority: Address<TAccountCoinCreatorVaultAuthority>;
|
|
96
|
+
feeConfig: Address<TAccountFeeConfig>;
|
|
97
|
+
feeProgram?: Address<TAccountFeeProgram>;
|
|
98
|
+
baseAmountIn: SellInstructionDataArgs['baseAmountIn'];
|
|
99
|
+
minQuoteAmountOut: SellInstructionDataArgs['minQuoteAmountOut'];
|
|
100
|
+
};
|
|
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, TAccountCoinCreatorVaultAta extends string, TAccountCoinCreatorVaultAuthority extends string, TAccountFeeConfig extends string, TAccountFeeProgram 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, TAccountCoinCreatorVaultAta, TAccountCoinCreatorVaultAuthority, TAccountFeeConfig, TAccountFeeProgram>, config?: {
|
|
102
|
+
programAddress?: TProgramAddress;
|
|
103
|
+
}): SellInstruction<TProgramAddress, TAccountPool, TAccountUser, TAccountGlobalConfig, TAccountBaseMint, TAccountQuoteMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountProtocolFeeRecipient, TAccountProtocolFeeRecipientTokenAccount, TAccountBaseTokenProgram, TAccountQuoteTokenProgram, TAccountSystemProgram, TAccountAssociatedTokenProgram, TAccountEventAuthority, TAccountProgram, TAccountCoinCreatorVaultAta, TAccountCoinCreatorVaultAuthority, TAccountFeeConfig, TAccountFeeProgram>;
|
|
104
|
+
export type ParsedSellInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
105
|
+
programAddress: Address<TProgram>;
|
|
106
|
+
accounts: {
|
|
107
|
+
pool: TAccountMetas[0];
|
|
108
|
+
user: TAccountMetas[1];
|
|
109
|
+
globalConfig: TAccountMetas[2];
|
|
110
|
+
baseMint: TAccountMetas[3];
|
|
111
|
+
quoteMint: TAccountMetas[4];
|
|
112
|
+
userBaseTokenAccount: TAccountMetas[5];
|
|
113
|
+
userQuoteTokenAccount: TAccountMetas[6];
|
|
114
|
+
poolBaseTokenAccount: TAccountMetas[7];
|
|
115
|
+
poolQuoteTokenAccount: TAccountMetas[8];
|
|
116
|
+
protocolFeeRecipient: TAccountMetas[9];
|
|
117
|
+
protocolFeeRecipientTokenAccount: TAccountMetas[10];
|
|
118
|
+
baseTokenProgram: TAccountMetas[11];
|
|
119
|
+
quoteTokenProgram: TAccountMetas[12];
|
|
120
|
+
systemProgram: TAccountMetas[13];
|
|
121
|
+
associatedTokenProgram: TAccountMetas[14];
|
|
122
|
+
eventAuthority: TAccountMetas[15];
|
|
123
|
+
program: TAccountMetas[16];
|
|
124
|
+
coinCreatorVaultAta: TAccountMetas[17];
|
|
125
|
+
coinCreatorVaultAuthority: TAccountMetas[18];
|
|
126
|
+
feeConfig: TAccountMetas[19];
|
|
127
|
+
feeProgram: TAccountMetas[20];
|
|
128
|
+
};
|
|
129
|
+
data: SellInstructionData;
|
|
130
|
+
};
|
|
131
|
+
export declare function parseSellInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSellInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';
|
|
9
|
+
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export declare const SET_COIN_CREATOR_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getSetCoinCreatorDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type SetCoinCreatorInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountMetadata extends string | AccountMeta<string> = string, TAccountBondingCurve 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 ? WritableAccount<TAccountPool> : TAccountPool,
|
|
14
|
+
TAccountMetadata extends string ? ReadonlyAccount<TAccountMetadata> : TAccountMetadata,
|
|
15
|
+
TAccountBondingCurve extends string ? ReadonlyAccount<TAccountBondingCurve> : TAccountBondingCurve,
|
|
16
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
17
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type SetCoinCreatorInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
};
|
|
23
|
+
export type SetCoinCreatorInstructionDataArgs = {};
|
|
24
|
+
export declare function getSetCoinCreatorInstructionDataEncoder(): FixedSizeEncoder<SetCoinCreatorInstructionDataArgs>;
|
|
25
|
+
export declare function getSetCoinCreatorInstructionDataDecoder(): FixedSizeDecoder<SetCoinCreatorInstructionData>;
|
|
26
|
+
export declare function getSetCoinCreatorInstructionDataCodec(): FixedSizeCodec<SetCoinCreatorInstructionDataArgs, SetCoinCreatorInstructionData>;
|
|
27
|
+
export type SetCoinCreatorAsyncInput<TAccountPool extends string = string, TAccountMetadata extends string = string, TAccountBondingCurve extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
28
|
+
pool: Address<TAccountPool>;
|
|
29
|
+
metadata: Address<TAccountMetadata>;
|
|
30
|
+
bondingCurve: Address<TAccountBondingCurve>;
|
|
31
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
32
|
+
program: Address<TAccountProgram>;
|
|
33
|
+
};
|
|
34
|
+
export declare function getSetCoinCreatorInstructionAsync<TAccountPool extends string, TAccountMetadata extends string, TAccountBondingCurve extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: SetCoinCreatorAsyncInput<TAccountPool, TAccountMetadata, TAccountBondingCurve, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
35
|
+
programAddress?: TProgramAddress;
|
|
36
|
+
}): Promise<SetCoinCreatorInstruction<TProgramAddress, TAccountPool, TAccountMetadata, TAccountBondingCurve, TAccountEventAuthority, TAccountProgram>>;
|
|
37
|
+
export type SetCoinCreatorInput<TAccountPool extends string = string, TAccountMetadata extends string = string, TAccountBondingCurve extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
|
+
pool: Address<TAccountPool>;
|
|
39
|
+
metadata: Address<TAccountMetadata>;
|
|
40
|
+
bondingCurve: Address<TAccountBondingCurve>;
|
|
41
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
42
|
+
program: Address<TAccountProgram>;
|
|
43
|
+
};
|
|
44
|
+
export declare function getSetCoinCreatorInstruction<TAccountPool extends string, TAccountMetadata extends string, TAccountBondingCurve extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: SetCoinCreatorInput<TAccountPool, TAccountMetadata, TAccountBondingCurve, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
45
|
+
programAddress?: TProgramAddress;
|
|
46
|
+
}): SetCoinCreatorInstruction<TProgramAddress, TAccountPool, TAccountMetadata, TAccountBondingCurve, TAccountEventAuthority, TAccountProgram>;
|
|
47
|
+
export type ParsedSetCoinCreatorInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
48
|
+
programAddress: Address<TProgram>;
|
|
49
|
+
accounts: {
|
|
50
|
+
pool: TAccountMetas[0];
|
|
51
|
+
metadata: TAccountMetas[1];
|
|
52
|
+
bondingCurve: TAccountMetas[2];
|
|
53
|
+
eventAuthority: TAccountMetas[3];
|
|
54
|
+
program: TAccountMetas[4];
|
|
55
|
+
};
|
|
56
|
+
data: SetCoinCreatorInstructionData;
|
|
57
|
+
};
|
|
58
|
+
export declare function parseSetCoinCreatorInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSetCoinCreatorInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type AccountMeta, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type WritableAccount } from '@solana/kit';
|
|
9
|
+
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export declare const SYNC_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getSyncUserVolumeAccumulatorDiscriminatorBytes(): ReadonlyUint8Array;
|
|
12
|
+
export type SyncUserVolumeAccumulatorInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountUser extends string | AccountMeta<string> = string, TAccountGlobalVolumeAccumulator extends string | AccountMeta<string> = string, TAccountUserVolumeAccumulator 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
|
+
TAccountUser extends string ? ReadonlyAccount<TAccountUser> : TAccountUser,
|
|
14
|
+
TAccountGlobalVolumeAccumulator extends string ? ReadonlyAccount<TAccountGlobalVolumeAccumulator> : TAccountGlobalVolumeAccumulator,
|
|
15
|
+
TAccountUserVolumeAccumulator extends string ? WritableAccount<TAccountUserVolumeAccumulator> : TAccountUserVolumeAccumulator,
|
|
16
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
17
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type SyncUserVolumeAccumulatorInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
};
|
|
23
|
+
export type SyncUserVolumeAccumulatorInstructionDataArgs = {};
|
|
24
|
+
export declare function getSyncUserVolumeAccumulatorInstructionDataEncoder(): FixedSizeEncoder<SyncUserVolumeAccumulatorInstructionDataArgs>;
|
|
25
|
+
export declare function getSyncUserVolumeAccumulatorInstructionDataDecoder(): FixedSizeDecoder<SyncUserVolumeAccumulatorInstructionData>;
|
|
26
|
+
export declare function getSyncUserVolumeAccumulatorInstructionDataCodec(): FixedSizeCodec<SyncUserVolumeAccumulatorInstructionDataArgs, SyncUserVolumeAccumulatorInstructionData>;
|
|
27
|
+
export type SyncUserVolumeAccumulatorAsyncInput<TAccountUser extends string = string, TAccountGlobalVolumeAccumulator extends string = string, TAccountUserVolumeAccumulator extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
28
|
+
user: Address<TAccountUser>;
|
|
29
|
+
globalVolumeAccumulator?: Address<TAccountGlobalVolumeAccumulator>;
|
|
30
|
+
userVolumeAccumulator?: Address<TAccountUserVolumeAccumulator>;
|
|
31
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
32
|
+
program: Address<TAccountProgram>;
|
|
33
|
+
};
|
|
34
|
+
export declare function getSyncUserVolumeAccumulatorInstructionAsync<TAccountUser extends string, TAccountGlobalVolumeAccumulator extends string, TAccountUserVolumeAccumulator extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: SyncUserVolumeAccumulatorAsyncInput<TAccountUser, TAccountGlobalVolumeAccumulator, TAccountUserVolumeAccumulator, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
35
|
+
programAddress?: TProgramAddress;
|
|
36
|
+
}): Promise<SyncUserVolumeAccumulatorInstruction<TProgramAddress, TAccountUser, TAccountGlobalVolumeAccumulator, TAccountUserVolumeAccumulator, TAccountEventAuthority, TAccountProgram>>;
|
|
37
|
+
export type SyncUserVolumeAccumulatorInput<TAccountUser extends string = string, TAccountGlobalVolumeAccumulator extends string = string, TAccountUserVolumeAccumulator extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
|
+
user: Address<TAccountUser>;
|
|
39
|
+
globalVolumeAccumulator: Address<TAccountGlobalVolumeAccumulator>;
|
|
40
|
+
userVolumeAccumulator: Address<TAccountUserVolumeAccumulator>;
|
|
41
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
42
|
+
program: Address<TAccountProgram>;
|
|
43
|
+
};
|
|
44
|
+
export declare function getSyncUserVolumeAccumulatorInstruction<TAccountUser extends string, TAccountGlobalVolumeAccumulator extends string, TAccountUserVolumeAccumulator extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: SyncUserVolumeAccumulatorInput<TAccountUser, TAccountGlobalVolumeAccumulator, TAccountUserVolumeAccumulator, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
45
|
+
programAddress?: TProgramAddress;
|
|
46
|
+
}): SyncUserVolumeAccumulatorInstruction<TProgramAddress, TAccountUser, TAccountGlobalVolumeAccumulator, TAccountUserVolumeAccumulator, TAccountEventAuthority, TAccountProgram>;
|
|
47
|
+
export type ParsedSyncUserVolumeAccumulatorInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
48
|
+
programAddress: Address<TProgram>;
|
|
49
|
+
accounts: {
|
|
50
|
+
user: TAccountMetas[0];
|
|
51
|
+
globalVolumeAccumulator: TAccountMetas[1];
|
|
52
|
+
userVolumeAccumulator: TAccountMetas[2];
|
|
53
|
+
eventAuthority: TAccountMetas[3];
|
|
54
|
+
program: TAccountMetas[4];
|
|
55
|
+
};
|
|
56
|
+
data: SyncUserVolumeAccumulatorInstructionData;
|
|
57
|
+
};
|
|
58
|
+
export declare function parseSyncUserVolumeAccumulatorInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSyncUserVolumeAccumulatorInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
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, type WritableAccount } from '@solana/kit';
|
|
9
|
+
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export declare const UPDATE_ADMIN_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getUpdateAdminDiscriminatorBytes(): ReadonlyUint8Array;
|
|
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
|
+
TAccountAdmin extends string ? ReadonlySignerAccount<TAccountAdmin> & AccountSignerMeta<TAccountAdmin> : TAccountAdmin,
|
|
14
|
+
TAccountGlobalConfig extends string ? WritableAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
|
+
TAccountNewAdmin extends string ? ReadonlyAccount<TAccountNewAdmin> : TAccountNewAdmin,
|
|
16
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
17
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type UpdateAdminInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
};
|
|
23
|
+
export type UpdateAdminInstructionDataArgs = {};
|
|
24
|
+
export declare function getUpdateAdminInstructionDataEncoder(): FixedSizeEncoder<UpdateAdminInstructionDataArgs>;
|
|
25
|
+
export declare function getUpdateAdminInstructionDataDecoder(): FixedSizeDecoder<UpdateAdminInstructionData>;
|
|
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
|
+
export type UpdateAdminInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountNewAdmin extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
|
+
admin: TransactionSigner<TAccountAdmin>;
|
|
39
|
+
globalConfig: Address<TAccountGlobalConfig>;
|
|
40
|
+
newAdmin: Address<TAccountNewAdmin>;
|
|
41
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
42
|
+
program: Address<TAccountProgram>;
|
|
43
|
+
};
|
|
44
|
+
export declare function getUpdateAdminInstruction<TAccountAdmin extends string, TAccountGlobalConfig extends string, TAccountNewAdmin extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_AMM_PROGRAM_ADDRESS>(input: UpdateAdminInput<TAccountAdmin, TAccountGlobalConfig, TAccountNewAdmin, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
45
|
+
programAddress?: TProgramAddress;
|
|
46
|
+
}): UpdateAdminInstruction<TProgramAddress, TAccountAdmin, TAccountGlobalConfig, TAccountNewAdmin, TAccountEventAuthority, TAccountProgram>;
|
|
47
|
+
export type ParsedUpdateAdminInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
48
|
+
programAddress: Address<TProgram>;
|
|
49
|
+
accounts: {
|
|
50
|
+
admin: TAccountMetas[0];
|
|
51
|
+
globalConfig: TAccountMetas[1];
|
|
52
|
+
newAdmin: TAccountMetas[2];
|
|
53
|
+
eventAuthority: TAccountMetas[3];
|
|
54
|
+
program: TAccountMetas[4];
|
|
55
|
+
};
|
|
56
|
+
data: UpdateAdminInstructionData;
|
|
57
|
+
};
|
|
58
|
+
export declare function parseUpdateAdminInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUpdateAdminInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
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, type WritableAccount } from '@solana/kit';
|
|
9
|
+
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export declare const UPDATE_FEE_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getUpdateFeeConfigDiscriminatorBytes(): ReadonlyUint8Array;
|
|
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
|
+
TAccountAdmin extends string ? ReadonlySignerAccount<TAccountAdmin> & AccountSignerMeta<TAccountAdmin> : TAccountAdmin,
|
|
14
|
+
TAccountGlobalConfig extends string ? WritableAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
16
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
17
|
+
...TRemainingAccounts
|
|
18
|
+
]>;
|
|
19
|
+
export type UpdateFeeConfigInstructionData = {
|
|
20
|
+
discriminator: ReadonlyUint8Array;
|
|
21
|
+
lpFeeBasisPoints: bigint;
|
|
22
|
+
protocolFeeBasisPoints: bigint;
|
|
23
|
+
protocolFeeRecipients: Array<Address>;
|
|
24
|
+
coinCreatorFeeBasisPoints: bigint;
|
|
25
|
+
adminSetCoinCreatorAuthority: Address;
|
|
26
|
+
};
|
|
27
|
+
export type UpdateFeeConfigInstructionDataArgs = {
|
|
28
|
+
lpFeeBasisPoints: number | bigint;
|
|
29
|
+
protocolFeeBasisPoints: number | bigint;
|
|
30
|
+
protocolFeeRecipients: Array<Address>;
|
|
31
|
+
coinCreatorFeeBasisPoints: number | bigint;
|
|
32
|
+
adminSetCoinCreatorAuthority: Address;
|
|
33
|
+
};
|
|
34
|
+
export declare function getUpdateFeeConfigInstructionDataEncoder(): FixedSizeEncoder<UpdateFeeConfigInstructionDataArgs>;
|
|
35
|
+
export declare function getUpdateFeeConfigInstructionDataDecoder(): FixedSizeDecoder<UpdateFeeConfigInstructionData>;
|
|
36
|
+
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
|
+
export type UpdateFeeConfigInput<TAccountAdmin extends string = string, TAccountGlobalConfig extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
52
|
+
admin: TransactionSigner<TAccountAdmin>;
|
|
53
|
+
globalConfig: Address<TAccountGlobalConfig>;
|
|
54
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
55
|
+
program: Address<TAccountProgram>;
|
|
56
|
+
lpFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['lpFeeBasisPoints'];
|
|
57
|
+
protocolFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['protocolFeeBasisPoints'];
|
|
58
|
+
protocolFeeRecipients: UpdateFeeConfigInstructionDataArgs['protocolFeeRecipients'];
|
|
59
|
+
coinCreatorFeeBasisPoints: UpdateFeeConfigInstructionDataArgs['coinCreatorFeeBasisPoints'];
|
|
60
|
+
adminSetCoinCreatorAuthority: UpdateFeeConfigInstructionDataArgs['adminSetCoinCreatorAuthority'];
|
|
61
|
+
};
|
|
62
|
+
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
|
+
programAddress?: TProgramAddress;
|
|
64
|
+
}): UpdateFeeConfigInstruction<TProgramAddress, TAccountAdmin, TAccountGlobalConfig, TAccountEventAuthority, TAccountProgram>;
|
|
65
|
+
export type ParsedUpdateFeeConfigInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
66
|
+
programAddress: Address<TProgram>;
|
|
67
|
+
accounts: {
|
|
68
|
+
admin: TAccountMetas[0];
|
|
69
|
+
globalConfig: TAccountMetas[1];
|
|
70
|
+
eventAuthority: TAccountMetas[2];
|
|
71
|
+
program: TAccountMetas[3];
|
|
72
|
+
};
|
|
73
|
+
data: UpdateFeeConfigInstructionData;
|
|
74
|
+
};
|
|
75
|
+
export declare function parseUpdateFeeConfigInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedUpdateFeeConfigInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
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, type WritableAccount } from '@solana/kit';
|
|
9
|
+
import { PUMP_AMM_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export declare const WITHDRAW_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
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> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', 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 ? WritableAccount<TAccountPool> : TAccountPool,
|
|
14
|
+
TAccountGlobalConfig extends string ? ReadonlyAccount<TAccountGlobalConfig> : TAccountGlobalConfig,
|
|
15
|
+
TAccountUser extends string ? ReadonlySignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
16
|
+
TAccountBaseMint extends string ? ReadonlyAccount<TAccountBaseMint> : TAccountBaseMint,
|
|
17
|
+
TAccountQuoteMint extends string ? ReadonlyAccount<TAccountQuoteMint> : TAccountQuoteMint,
|
|
18
|
+
TAccountLpMint extends string ? WritableAccount<TAccountLpMint> : TAccountLpMint,
|
|
19
|
+
TAccountUserBaseTokenAccount extends string ? WritableAccount<TAccountUserBaseTokenAccount> : TAccountUserBaseTokenAccount,
|
|
20
|
+
TAccountUserQuoteTokenAccount extends string ? WritableAccount<TAccountUserQuoteTokenAccount> : TAccountUserQuoteTokenAccount,
|
|
21
|
+
TAccountUserPoolTokenAccount extends string ? WritableAccount<TAccountUserPoolTokenAccount> : TAccountUserPoolTokenAccount,
|
|
22
|
+
TAccountPoolBaseTokenAccount extends string ? WritableAccount<TAccountPoolBaseTokenAccount> : TAccountPoolBaseTokenAccount,
|
|
23
|
+
TAccountPoolQuoteTokenAccount extends string ? WritableAccount<TAccountPoolQuoteTokenAccount> : TAccountPoolQuoteTokenAccount,
|
|
24
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
25
|
+
TAccountToken2022Program extends string ? ReadonlyAccount<TAccountToken2022Program> : TAccountToken2022Program,
|
|
26
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
27
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
28
|
+
...TRemainingAccounts
|
|
29
|
+
]>;
|
|
30
|
+
export type WithdrawInstructionData = {
|
|
31
|
+
discriminator: ReadonlyUint8Array;
|
|
32
|
+
lpTokenAmountIn: bigint;
|
|
33
|
+
minBaseAmountOut: bigint;
|
|
34
|
+
minQuoteAmountOut: bigint;
|
|
35
|
+
};
|
|
36
|
+
export type WithdrawInstructionDataArgs = {
|
|
37
|
+
lpTokenAmountIn: number | bigint;
|
|
38
|
+
minBaseAmountOut: number | bigint;
|
|
39
|
+
minQuoteAmountOut: number | bigint;
|
|
40
|
+
};
|
|
41
|
+
export declare function getWithdrawInstructionDataEncoder(): FixedSizeEncoder<WithdrawInstructionDataArgs>;
|
|
42
|
+
export declare function getWithdrawInstructionDataDecoder(): FixedSizeDecoder<WithdrawInstructionData>;
|
|
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
|
+
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
|
+
pool: Address<TAccountPool>;
|
|
69
|
+
globalConfig: Address<TAccountGlobalConfig>;
|
|
70
|
+
user: TransactionSigner<TAccountUser>;
|
|
71
|
+
baseMint: Address<TAccountBaseMint>;
|
|
72
|
+
quoteMint: Address<TAccountQuoteMint>;
|
|
73
|
+
lpMint: Address<TAccountLpMint>;
|
|
74
|
+
userBaseTokenAccount: Address<TAccountUserBaseTokenAccount>;
|
|
75
|
+
userQuoteTokenAccount: Address<TAccountUserQuoteTokenAccount>;
|
|
76
|
+
userPoolTokenAccount: Address<TAccountUserPoolTokenAccount>;
|
|
77
|
+
poolBaseTokenAccount: Address<TAccountPoolBaseTokenAccount>;
|
|
78
|
+
poolQuoteTokenAccount: Address<TAccountPoolQuoteTokenAccount>;
|
|
79
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
80
|
+
token2022Program?: Address<TAccountToken2022Program>;
|
|
81
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
82
|
+
program: Address<TAccountProgram>;
|
|
83
|
+
lpTokenAmountIn: WithdrawInstructionDataArgs['lpTokenAmountIn'];
|
|
84
|
+
minBaseAmountOut: WithdrawInstructionDataArgs['minBaseAmountOut'];
|
|
85
|
+
minQuoteAmountOut: WithdrawInstructionDataArgs['minQuoteAmountOut'];
|
|
86
|
+
};
|
|
87
|
+
export declare function getWithdrawInstruction<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: WithdrawInput<TAccountPool, TAccountGlobalConfig, TAccountUser, TAccountBaseMint, TAccountQuoteMint, TAccountLpMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountUserPoolTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountTokenProgram, TAccountToken2022Program, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
88
|
+
programAddress?: TProgramAddress;
|
|
89
|
+
}): WithdrawInstruction<TProgramAddress, TAccountPool, TAccountGlobalConfig, TAccountUser, TAccountBaseMint, TAccountQuoteMint, TAccountLpMint, TAccountUserBaseTokenAccount, TAccountUserQuoteTokenAccount, TAccountUserPoolTokenAccount, TAccountPoolBaseTokenAccount, TAccountPoolQuoteTokenAccount, TAccountTokenProgram, TAccountToken2022Program, TAccountEventAuthority, TAccountProgram>;
|
|
90
|
+
export type ParsedWithdrawInstruction<TProgram extends string = typeof PUMP_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
91
|
+
programAddress: Address<TProgram>;
|
|
92
|
+
accounts: {
|
|
93
|
+
pool: TAccountMetas[0];
|
|
94
|
+
globalConfig: TAccountMetas[1];
|
|
95
|
+
user: TAccountMetas[2];
|
|
96
|
+
baseMint: TAccountMetas[3];
|
|
97
|
+
quoteMint: TAccountMetas[4];
|
|
98
|
+
lpMint: TAccountMetas[5];
|
|
99
|
+
userBaseTokenAccount: TAccountMetas[6];
|
|
100
|
+
userQuoteTokenAccount: TAccountMetas[7];
|
|
101
|
+
userPoolTokenAccount: TAccountMetas[8];
|
|
102
|
+
poolBaseTokenAccount: TAccountMetas[9];
|
|
103
|
+
poolQuoteTokenAccount: TAccountMetas[10];
|
|
104
|
+
tokenProgram: TAccountMetas[11];
|
|
105
|
+
token2022Program: TAccountMetas[12];
|
|
106
|
+
eventAuthority: TAccountMetas[13];
|
|
107
|
+
program: TAccountMetas[14];
|
|
108
|
+
};
|
|
109
|
+
data: WithdrawInstructionData;
|
|
110
|
+
};
|
|
111
|
+
export declare function parseWithdrawInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedWithdrawInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
3
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
4
|
+
* to add features, then rerun Codama to update it.
|
|
5
|
+
*
|
|
6
|
+
* @see https://github.com/codama-idl/codama
|
|
7
|
+
*/
|
|
8
|
+
import { type Address, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
+
import { type ParsedAdminSetCoinCreatorInstruction, type ParsedAdminUpdateTokenIncentivesInstruction, type ParsedBuyExactQuoteInInstruction, type ParsedBuyInstruction, type ParsedClaimTokenIncentivesInstruction, type ParsedCloseUserVolumeAccumulatorInstruction, type ParsedCollectCoinCreatorFeeInstruction, type ParsedCreateConfigInstruction, type ParsedCreatePoolInstruction, type ParsedDepositInstruction, type ParsedDisableInstruction, type ParsedExtendAccountInstruction, type ParsedInitUserVolumeAccumulatorInstruction, type ParsedSellInstruction, type ParsedSetCoinCreatorInstruction, type ParsedSyncUserVolumeAccumulatorInstruction, type ParsedUpdateAdminInstruction, type ParsedUpdateFeeConfigInstruction, type ParsedWithdrawInstruction } from '../instructions';
|
|
10
|
+
export declare const PUMP_AMM_PROGRAM_ADDRESS: Address<"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA">;
|
|
11
|
+
export declare enum PumpAmmAccount {
|
|
12
|
+
BondingCurve = 0,
|
|
13
|
+
FeeConfig = 1,
|
|
14
|
+
GlobalConfig = 2,
|
|
15
|
+
GlobalVolumeAccumulator = 3,
|
|
16
|
+
Pool = 4,
|
|
17
|
+
UserVolumeAccumulator = 5
|
|
18
|
+
}
|
|
19
|
+
export declare function identifyPumpAmmAccount(account: {
|
|
20
|
+
data: ReadonlyUint8Array;
|
|
21
|
+
} | ReadonlyUint8Array): PumpAmmAccount;
|
|
22
|
+
export declare enum PumpAmmInstruction {
|
|
23
|
+
AdminSetCoinCreator = 0,
|
|
24
|
+
AdminUpdateTokenIncentives = 1,
|
|
25
|
+
Buy = 2,
|
|
26
|
+
BuyExactQuoteIn = 3,
|
|
27
|
+
ClaimTokenIncentives = 4,
|
|
28
|
+
CloseUserVolumeAccumulator = 5,
|
|
29
|
+
CollectCoinCreatorFee = 6,
|
|
30
|
+
CreateConfig = 7,
|
|
31
|
+
CreatePool = 8,
|
|
32
|
+
Deposit = 9,
|
|
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
|
|
42
|
+
}
|
|
43
|
+
export declare function identifyPumpAmmInstruction(instruction: {
|
|
44
|
+
data: ReadonlyUint8Array;
|
|
45
|
+
} | ReadonlyUint8Array): PumpAmmInstruction;
|
|
46
|
+
export type ParsedPumpAmmInstruction<TProgram extends string = 'pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA'> = ({
|
|
47
|
+
instructionType: PumpAmmInstruction.AdminSetCoinCreator;
|
|
48
|
+
} & ParsedAdminSetCoinCreatorInstruction<TProgram>) | ({
|
|
49
|
+
instructionType: PumpAmmInstruction.AdminUpdateTokenIncentives;
|
|
50
|
+
} & ParsedAdminUpdateTokenIncentivesInstruction<TProgram>) | ({
|
|
51
|
+
instructionType: PumpAmmInstruction.Buy;
|
|
52
|
+
} & 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
|
+
instructionType: PumpAmmInstruction.CreateConfig;
|
|
62
|
+
} & ParsedCreateConfigInstruction<TProgram>) | ({
|
|
63
|
+
instructionType: PumpAmmInstruction.CreatePool;
|
|
64
|
+
} & ParsedCreatePoolInstruction<TProgram>) | ({
|
|
65
|
+
instructionType: PumpAmmInstruction.Deposit;
|
|
66
|
+
} & ParsedDepositInstruction<TProgram>) | ({
|
|
67
|
+
instructionType: PumpAmmInstruction.Disable;
|
|
68
|
+
} & ParsedDisableInstruction<TProgram>) | ({
|
|
69
|
+
instructionType: PumpAmmInstruction.ExtendAccount;
|
|
70
|
+
} & ParsedExtendAccountInstruction<TProgram>) | ({
|
|
71
|
+
instructionType: PumpAmmInstruction.InitUserVolumeAccumulator;
|
|
72
|
+
} & ParsedInitUserVolumeAccumulatorInstruction<TProgram>) | ({
|
|
73
|
+
instructionType: PumpAmmInstruction.Sell;
|
|
74
|
+
} & ParsedSellInstruction<TProgram>) | ({
|
|
75
|
+
instructionType: PumpAmmInstruction.SetCoinCreator;
|
|
76
|
+
} & ParsedSetCoinCreatorInstruction<TProgram>) | ({
|
|
77
|
+
instructionType: PumpAmmInstruction.SyncUserVolumeAccumulator;
|
|
78
|
+
} & ParsedSyncUserVolumeAccumulatorInstruction<TProgram>) | ({
|
|
79
|
+
instructionType: PumpAmmInstruction.UpdateAdmin;
|
|
80
|
+
} & ParsedUpdateAdminInstruction<TProgram>) | ({
|
|
81
|
+
instructionType: PumpAmmInstruction.UpdateFeeConfig;
|
|
82
|
+
} & ParsedUpdateFeeConfigInstruction<TProgram>) | ({
|
|
83
|
+
instructionType: PumpAmmInstruction.Withdraw;
|
|
84
|
+
} & ParsedWithdrawInstruction<TProgram>);
|