pump-kit 0.2.4 → 0.2.5
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 +12 -36
- package/dist/index.js +12 -12
- package/dist/types/ammsdk/generated/accounts/bondingCurve.d.ts +43 -0
- package/dist/types/ammsdk/generated/accounts/feeConfig.d.ts +33 -0
- package/dist/types/ammsdk/generated/accounts/globalConfig.d.ts +16 -4
- package/dist/types/ammsdk/generated/accounts/globalVolumeAccumulator.d.ts +37 -0
- package/dist/types/ammsdk/generated/accounts/index.d.ts +5 -0
- package/dist/types/ammsdk/generated/accounts/pool.d.ts +6 -0
- package/dist/types/ammsdk/generated/accounts/sharingConfig.d.ts +39 -0
- package/dist/types/ammsdk/generated/accounts/userVolumeAccumulator.d.ts +43 -0
- package/dist/types/ammsdk/generated/errors/pumpAmm.d.ts +79 -29
- 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 +67 -14
- package/dist/types/ammsdk/generated/instructions/buyExactQuoteIn.d.ts +144 -0
- package/dist/types/ammsdk/generated/instructions/claimCashback.d.ts +74 -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 +26 -5
- package/dist/types/ammsdk/generated/instructions/createPool.d.ts +51 -12
- package/dist/types/ammsdk/generated/instructions/deposit.d.ts +33 -10
- package/dist/types/ammsdk/generated/instructions/disable.d.ts +16 -2
- package/dist/types/ammsdk/generated/instructions/extendAccount.d.ts +12 -2
- package/dist/types/ammsdk/generated/instructions/index.d.ts +15 -0
- package/dist/types/ammsdk/generated/instructions/initUserVolumeAccumulator.d.ts +62 -0
- package/dist/types/ammsdk/generated/instructions/migratePoolCoinCreator.d.ts +54 -0
- package/dist/types/ammsdk/generated/instructions/sell.d.ts +54 -14
- package/dist/types/ammsdk/generated/instructions/setCoinCreator.d.ts +58 -0
- package/dist/types/ammsdk/generated/instructions/setReservedFeeRecipients.d.ts +59 -0
- package/dist/types/ammsdk/generated/instructions/syncUserVolumeAccumulator.d.ts +58 -0
- package/dist/types/ammsdk/generated/instructions/toggleCashbackEnabled.d.ts +59 -0
- package/dist/types/ammsdk/generated/instructions/toggleMayhemMode.d.ts +59 -0
- package/dist/types/ammsdk/generated/instructions/transferCreatorFeesToPump.d.ts +81 -0
- package/dist/types/ammsdk/generated/instructions/updateAdmin.d.ts +12 -2
- package/dist/types/ammsdk/generated/instructions/updateFeeConfig.d.ts +22 -2
- package/dist/types/ammsdk/generated/instructions/withdraw.d.ts +33 -10
- package/dist/types/ammsdk/generated/programs/pumpAmm.d.ts +65 -15
- 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 +29 -4
- package/dist/types/ammsdk/generated/types/claimCashbackEvent.d.ts +25 -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/configStatus.d.ts +16 -0
- package/dist/types/ammsdk/generated/types/createConfigEvent.d.ts +4 -0
- package/dist/types/ammsdk/generated/types/createPoolEvent.d.ts +4 -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 +17 -2
- package/dist/types/ammsdk/generated/types/initUserVolumeAccumulatorEvent.d.ts +21 -0
- package/dist/types/ammsdk/generated/types/migratePoolCoinCreatorEvent.d.ts +27 -0
- package/dist/types/ammsdk/generated/types/optionBool.d.ts +13 -0
- package/dist/types/ammsdk/generated/types/reservedFeeRecipientsEvent.d.ts +21 -0
- package/dist/types/ammsdk/generated/types/sellEvent.d.ts +10 -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/shareholder.d.ts +16 -0
- package/dist/types/ammsdk/generated/types/syncUserVolumeAccumulatorEvent.d.ts +23 -0
- package/dist/types/ammsdk/generated/types/updateFeeConfigEvent.d.ts +4 -0
- package/dist/types/clients/amm.d.ts +2 -10
- package/dist/types/pumpsdk/generated/accounts/bondingCurve.d.ts +4 -0
- package/dist/types/pumpsdk/generated/accounts/global.d.ts +12 -0
- package/dist/types/pumpsdk/generated/accounts/index.d.ts +1 -0
- package/dist/types/pumpsdk/generated/accounts/sharingConfig.d.ts +39 -0
- package/dist/types/pumpsdk/generated/accounts/userVolumeAccumulator.d.ts +4 -0
- package/dist/types/pumpsdk/generated/errors/pump.d.ts +29 -1
- package/dist/types/pumpsdk/generated/instructions/buy.d.ts +1 -1
- package/dist/types/pumpsdk/generated/instructions/buyExactSolIn.d.ts +1 -1
- package/dist/types/pumpsdk/generated/instructions/claimCashback.d.ts +58 -0
- package/dist/types/pumpsdk/generated/instructions/createV2.d.ts +128 -0
- package/dist/types/pumpsdk/generated/instructions/distributeCreatorFees.d.ts +66 -0
- package/dist/types/pumpsdk/generated/instructions/getMinimumDistributableFee.d.ts +54 -0
- package/dist/types/pumpsdk/generated/instructions/index.d.ts +10 -0
- package/dist/types/pumpsdk/generated/instructions/migrateBondingCurveCreator.d.ts +58 -0
- package/dist/types/pumpsdk/generated/instructions/setMayhemVirtualParams.d.ts +70 -0
- package/dist/types/pumpsdk/generated/instructions/setReservedFeeRecipients.d.ts +59 -0
- package/dist/types/pumpsdk/generated/instructions/toggleCashbackEnabled.d.ts +59 -0
- package/dist/types/pumpsdk/generated/instructions/toggleCreateV2.d.ts +59 -0
- package/dist/types/pumpsdk/generated/instructions/toggleMayhemMode.d.ts +59 -0
- package/dist/types/pumpsdk/generated/programs/pump.d.ts +47 -16
- package/dist/types/pumpsdk/generated/types/claimCashbackEvent.d.ts +25 -0
- package/dist/types/pumpsdk/generated/types/configStatus.d.ts +16 -0
- package/dist/types/pumpsdk/generated/types/createEvent.d.ts +6 -0
- package/dist/types/pumpsdk/generated/types/distributeCreatorFeesEvent.d.ts +30 -0
- package/dist/types/pumpsdk/generated/types/index.d.ts +8 -0
- package/dist/types/pumpsdk/generated/types/migrateBondingCurveCreatorEvent.d.ts +27 -0
- package/dist/types/pumpsdk/generated/types/minimumDistributableFeeEvent.d.ts +21 -0
- package/dist/types/pumpsdk/generated/types/reservedFeeRecipientsEvent.d.ts +21 -0
- package/dist/types/pumpsdk/generated/types/shareholder.d.ts +16 -0
- package/dist/types/pumpsdk/generated/types/tradeEvent.d.ts +6 -0
- package/dist/types/pumpsdk/generated/types/updateMayhemVirtualParamsEvent.d.ts +31 -0
- package/llms.txt +24 -0
- package/metadata/actions-registry.json +278 -0
- package/package.json +4 -2
- package/dist/types/ammsdk/generated/types/globalConfig.d.ts +0 -49
- package/dist/types/ammsdk/generated/types/pool.d.ts +0 -35
|
@@ -0,0 +1,27 @@
|
|
|
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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
|
|
9
|
+
export type MigratePoolCoinCreatorEvent = {
|
|
10
|
+
timestamp: bigint;
|
|
11
|
+
baseMint: Address;
|
|
12
|
+
pool: Address;
|
|
13
|
+
sharingConfig: Address;
|
|
14
|
+
oldCoinCreator: Address;
|
|
15
|
+
newCoinCreator: Address;
|
|
16
|
+
};
|
|
17
|
+
export type MigratePoolCoinCreatorEventArgs = {
|
|
18
|
+
timestamp: number | bigint;
|
|
19
|
+
baseMint: Address;
|
|
20
|
+
pool: Address;
|
|
21
|
+
sharingConfig: Address;
|
|
22
|
+
oldCoinCreator: Address;
|
|
23
|
+
newCoinCreator: Address;
|
|
24
|
+
};
|
|
25
|
+
export declare function getMigratePoolCoinCreatorEventEncoder(): FixedSizeEncoder<MigratePoolCoinCreatorEventArgs>;
|
|
26
|
+
export declare function getMigratePoolCoinCreatorEventDecoder(): FixedSizeDecoder<MigratePoolCoinCreatorEvent>;
|
|
27
|
+
export declare function getMigratePoolCoinCreatorEventCodec(): FixedSizeCodec<MigratePoolCoinCreatorEventArgs, MigratePoolCoinCreatorEvent>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
|
|
9
|
+
export type OptionBool = readonly [boolean];
|
|
10
|
+
export type OptionBoolArgs = OptionBool;
|
|
11
|
+
export declare function getOptionBoolEncoder(): FixedSizeEncoder<OptionBoolArgs>;
|
|
12
|
+
export declare function getOptionBoolDecoder(): FixedSizeDecoder<OptionBool>;
|
|
13
|
+
export declare function getOptionBoolCodec(): FixedSizeCodec<OptionBoolArgs, OptionBool>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
|
|
9
|
+
export type ReservedFeeRecipientsEvent = {
|
|
10
|
+
timestamp: bigint;
|
|
11
|
+
reservedFeeRecipient: Address;
|
|
12
|
+
reservedFeeRecipients: Array<Address>;
|
|
13
|
+
};
|
|
14
|
+
export type ReservedFeeRecipientsEventArgs = {
|
|
15
|
+
timestamp: number | bigint;
|
|
16
|
+
reservedFeeRecipient: Address;
|
|
17
|
+
reservedFeeRecipients: Array<Address>;
|
|
18
|
+
};
|
|
19
|
+
export declare function getReservedFeeRecipientsEventEncoder(): FixedSizeEncoder<ReservedFeeRecipientsEventArgs>;
|
|
20
|
+
export declare function getReservedFeeRecipientsEventDecoder(): FixedSizeDecoder<ReservedFeeRecipientsEvent>;
|
|
21
|
+
export declare function getReservedFeeRecipientsEventCodec(): FixedSizeCodec<ReservedFeeRecipientsEventArgs, ReservedFeeRecipientsEvent>;
|
|
@@ -27,6 +27,11 @@ export type SellEvent = {
|
|
|
27
27
|
userQuoteTokenAccount: Address;
|
|
28
28
|
protocolFeeRecipient: Address;
|
|
29
29
|
protocolFeeRecipientTokenAccount: Address;
|
|
30
|
+
coinCreator: Address;
|
|
31
|
+
coinCreatorFeeBasisPoints: bigint;
|
|
32
|
+
coinCreatorFee: bigint;
|
|
33
|
+
cashbackFeeBasisPoints: bigint;
|
|
34
|
+
cashback: bigint;
|
|
30
35
|
};
|
|
31
36
|
export type SellEventArgs = {
|
|
32
37
|
timestamp: number | bigint;
|
|
@@ -49,6 +54,11 @@ export type SellEventArgs = {
|
|
|
49
54
|
userQuoteTokenAccount: Address;
|
|
50
55
|
protocolFeeRecipient: Address;
|
|
51
56
|
protocolFeeRecipientTokenAccount: Address;
|
|
57
|
+
coinCreator: Address;
|
|
58
|
+
coinCreatorFeeBasisPoints: number | bigint;
|
|
59
|
+
coinCreatorFee: number | bigint;
|
|
60
|
+
cashbackFeeBasisPoints: number | bigint;
|
|
61
|
+
cashback: number | bigint;
|
|
52
62
|
};
|
|
53
63
|
export declare function getSellEventEncoder(): FixedSizeEncoder<SellEventArgs>;
|
|
54
64
|
export declare function getSellEventDecoder(): FixedSizeDecoder<SellEvent>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
|
|
9
|
+
export type SetBondingCurveCoinCreatorEvent = {
|
|
10
|
+
timestamp: bigint;
|
|
11
|
+
baseMint: Address;
|
|
12
|
+
pool: Address;
|
|
13
|
+
bondingCurve: Address;
|
|
14
|
+
coinCreator: Address;
|
|
15
|
+
};
|
|
16
|
+
export type SetBondingCurveCoinCreatorEventArgs = {
|
|
17
|
+
timestamp: number | bigint;
|
|
18
|
+
baseMint: Address;
|
|
19
|
+
pool: Address;
|
|
20
|
+
bondingCurve: Address;
|
|
21
|
+
coinCreator: Address;
|
|
22
|
+
};
|
|
23
|
+
export declare function getSetBondingCurveCoinCreatorEventEncoder(): FixedSizeEncoder<SetBondingCurveCoinCreatorEventArgs>;
|
|
24
|
+
export declare function getSetBondingCurveCoinCreatorEventDecoder(): FixedSizeDecoder<SetBondingCurveCoinCreatorEvent>;
|
|
25
|
+
export declare function getSetBondingCurveCoinCreatorEventCodec(): FixedSizeCodec<SetBondingCurveCoinCreatorEventArgs, SetBondingCurveCoinCreatorEvent>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
|
|
9
|
+
export type SetMetaplexCoinCreatorEvent = {
|
|
10
|
+
timestamp: bigint;
|
|
11
|
+
baseMint: Address;
|
|
12
|
+
pool: Address;
|
|
13
|
+
metadata: Address;
|
|
14
|
+
coinCreator: Address;
|
|
15
|
+
};
|
|
16
|
+
export type SetMetaplexCoinCreatorEventArgs = {
|
|
17
|
+
timestamp: number | bigint;
|
|
18
|
+
baseMint: Address;
|
|
19
|
+
pool: Address;
|
|
20
|
+
metadata: Address;
|
|
21
|
+
coinCreator: Address;
|
|
22
|
+
};
|
|
23
|
+
export declare function getSetMetaplexCoinCreatorEventEncoder(): FixedSizeEncoder<SetMetaplexCoinCreatorEventArgs>;
|
|
24
|
+
export declare function getSetMetaplexCoinCreatorEventDecoder(): FixedSizeDecoder<SetMetaplexCoinCreatorEvent>;
|
|
25
|
+
export declare function getSetMetaplexCoinCreatorEventCodec(): FixedSizeCodec<SetMetaplexCoinCreatorEventArgs, SetMetaplexCoinCreatorEvent>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
|
|
9
|
+
export type Shareholder = {
|
|
10
|
+
address: Address;
|
|
11
|
+
shareBps: number;
|
|
12
|
+
};
|
|
13
|
+
export type ShareholderArgs = Shareholder;
|
|
14
|
+
export declare function getShareholderEncoder(): FixedSizeEncoder<ShareholderArgs>;
|
|
15
|
+
export declare function getShareholderDecoder(): FixedSizeDecoder<Shareholder>;
|
|
16
|
+
export declare function getShareholderCodec(): FixedSizeCodec<ShareholderArgs, Shareholder>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';
|
|
9
|
+
export type SyncUserVolumeAccumulatorEvent = {
|
|
10
|
+
user: Address;
|
|
11
|
+
totalClaimedTokensBefore: bigint;
|
|
12
|
+
totalClaimedTokensAfter: bigint;
|
|
13
|
+
timestamp: bigint;
|
|
14
|
+
};
|
|
15
|
+
export type SyncUserVolumeAccumulatorEventArgs = {
|
|
16
|
+
user: Address;
|
|
17
|
+
totalClaimedTokensBefore: number | bigint;
|
|
18
|
+
totalClaimedTokensAfter: number | bigint;
|
|
19
|
+
timestamp: number | bigint;
|
|
20
|
+
};
|
|
21
|
+
export declare function getSyncUserVolumeAccumulatorEventEncoder(): FixedSizeEncoder<SyncUserVolumeAccumulatorEventArgs>;
|
|
22
|
+
export declare function getSyncUserVolumeAccumulatorEventDecoder(): FixedSizeDecoder<SyncUserVolumeAccumulatorEvent>;
|
|
23
|
+
export declare function getSyncUserVolumeAccumulatorEventCodec(): FixedSizeCodec<SyncUserVolumeAccumulatorEventArgs, SyncUserVolumeAccumulatorEvent>;
|
|
@@ -12,6 +12,8 @@ export type UpdateFeeConfigEvent = {
|
|
|
12
12
|
lpFeeBasisPoints: bigint;
|
|
13
13
|
protocolFeeBasisPoints: bigint;
|
|
14
14
|
protocolFeeRecipients: Array<Address>;
|
|
15
|
+
coinCreatorFeeBasisPoints: bigint;
|
|
16
|
+
adminSetCoinCreatorAuthority: Address;
|
|
15
17
|
};
|
|
16
18
|
export type UpdateFeeConfigEventArgs = {
|
|
17
19
|
timestamp: number | bigint;
|
|
@@ -19,6 +21,8 @@ export type UpdateFeeConfigEventArgs = {
|
|
|
19
21
|
lpFeeBasisPoints: number | bigint;
|
|
20
22
|
protocolFeeBasisPoints: number | bigint;
|
|
21
23
|
protocolFeeRecipients: Array<Address>;
|
|
24
|
+
coinCreatorFeeBasisPoints: number | bigint;
|
|
25
|
+
adminSetCoinCreatorAuthority: Address;
|
|
22
26
|
};
|
|
23
27
|
export declare function getUpdateFeeConfigEventEncoder(): FixedSizeEncoder<UpdateFeeConfigEventArgs>;
|
|
24
28
|
export declare function getUpdateFeeConfigEventDecoder(): FixedSizeDecoder<UpdateFeeConfigEvent>;
|
|
@@ -87,11 +87,7 @@ export interface AmmBuyParams {
|
|
|
87
87
|
*
|
|
88
88
|
* TODO: Complete implementation once we verify the generated instruction signature.
|
|
89
89
|
*/
|
|
90
|
-
export declare function ammBuy(params: AmmBuyParams): Promise<
|
|
91
|
-
programAddress: import("@solana/nominal-types").NominalType<"brand", "Address"> & import("@solana/nominal-types").NominalType<"stringEncoding", "base58"> & "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA";
|
|
92
|
-
accounts: import("@solana/instructions").AccountMeta<string>[];
|
|
93
|
-
data: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike> & import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
|
|
94
|
-
}>;
|
|
90
|
+
export declare function ammBuy(params: AmmBuyParams): Promise<import("../ammsdk/generated").BuyInstruction<Address<"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA">, string, string, string, string, string, string, string, string, string, string, string, "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "11111111111111111111111111111111", "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", string, "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA", string, string, string, string, string, "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ", []>>;
|
|
95
91
|
export interface AmmSellParams {
|
|
96
92
|
user: TransactionSigner;
|
|
97
93
|
baseMint: Address | string;
|
|
@@ -110,8 +106,4 @@ export interface AmmSellParams {
|
|
|
110
106
|
*
|
|
111
107
|
* TODO: Complete implementation once we verify the generated instruction signature.
|
|
112
108
|
*/
|
|
113
|
-
export declare function ammSell(params: AmmSellParams): Promise<
|
|
114
|
-
programAddress: import("@solana/nominal-types").NominalType<"brand", "Address"> & import("@solana/nominal-types").NominalType<"stringEncoding", "base58"> & "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA";
|
|
115
|
-
accounts: import("@solana/instructions").AccountMeta<string>[];
|
|
116
|
-
data: import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike> & import("@solana/kit").ReadonlyUint8Array<ArrayBufferLike>;
|
|
117
|
-
}>;
|
|
109
|
+
export declare function ammSell(params: AmmSellParams): Promise<import("../ammsdk/generated").SellInstruction<Address<"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA">, string, string, string, string, string, string, string, string, string, string, string, "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "11111111111111111111111111111111", "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", string, "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA", string, string, string, "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ", []>>;
|
|
@@ -17,6 +17,8 @@ export type BondingCurve = {
|
|
|
17
17
|
tokenTotalSupply: bigint;
|
|
18
18
|
complete: boolean;
|
|
19
19
|
creator: Address;
|
|
20
|
+
isMayhemMode: boolean;
|
|
21
|
+
isCashbackCoin: boolean;
|
|
20
22
|
};
|
|
21
23
|
export type BondingCurveArgs = {
|
|
22
24
|
virtualTokenReserves: number | bigint;
|
|
@@ -26,6 +28,8 @@ export type BondingCurveArgs = {
|
|
|
26
28
|
tokenTotalSupply: number | bigint;
|
|
27
29
|
complete: boolean;
|
|
28
30
|
creator: Address;
|
|
31
|
+
isMayhemMode: boolean;
|
|
32
|
+
isCashbackCoin: boolean;
|
|
29
33
|
};
|
|
30
34
|
export declare function getBondingCurveEncoder(): FixedSizeEncoder<BondingCurveArgs>;
|
|
31
35
|
export declare function getBondingCurveDecoder(): FixedSizeDecoder<BondingCurve>;
|
|
@@ -27,6 +27,12 @@ export type Global = {
|
|
|
27
27
|
feeRecipients: Array<Address>;
|
|
28
28
|
setCreatorAuthority: Address;
|
|
29
29
|
adminSetCreatorAuthority: Address;
|
|
30
|
+
createV2Enabled: boolean;
|
|
31
|
+
whitelistPda: Address;
|
|
32
|
+
reservedFeeRecipient: Address;
|
|
33
|
+
mayhemModeEnabled: boolean;
|
|
34
|
+
reservedFeeRecipients: Array<Address>;
|
|
35
|
+
isCashbackEnabled: boolean;
|
|
30
36
|
};
|
|
31
37
|
export type GlobalArgs = {
|
|
32
38
|
/** Unused */
|
|
@@ -46,6 +52,12 @@ export type GlobalArgs = {
|
|
|
46
52
|
feeRecipients: Array<Address>;
|
|
47
53
|
setCreatorAuthority: Address;
|
|
48
54
|
adminSetCreatorAuthority: Address;
|
|
55
|
+
createV2Enabled: boolean;
|
|
56
|
+
whitelistPda: Address;
|
|
57
|
+
reservedFeeRecipient: Address;
|
|
58
|
+
mayhemModeEnabled: boolean;
|
|
59
|
+
reservedFeeRecipients: Array<Address>;
|
|
60
|
+
isCashbackEnabled: boolean;
|
|
49
61
|
};
|
|
50
62
|
export declare function getGlobalEncoder(): FixedSizeEncoder<GlobalArgs>;
|
|
51
63
|
export declare function getGlobalDecoder(): FixedSizeDecoder<Global>;
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { fetchEncodedAccount, fetchEncodedAccounts, type Account, type Address, type Codec, type Decoder, type EncodedAccount, type Encoder, type FetchAccountConfig, type FetchAccountsConfig, type MaybeAccount, type MaybeEncodedAccount, type ReadonlyUint8Array } from '@solana/kit';
|
|
9
|
+
import { type ConfigStatus, type ConfigStatusArgs, type Shareholder, type ShareholderArgs } from '../types';
|
|
10
|
+
export declare const SHARING_CONFIG_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getSharingConfigDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
12
|
+
export type SharingConfig = {
|
|
13
|
+
discriminator: ReadonlyUint8Array;
|
|
14
|
+
bump: number;
|
|
15
|
+
version: number;
|
|
16
|
+
status: ConfigStatus;
|
|
17
|
+
mint: Address;
|
|
18
|
+
admin: Address;
|
|
19
|
+
adminRevoked: boolean;
|
|
20
|
+
shareholders: Array<Shareholder>;
|
|
21
|
+
};
|
|
22
|
+
export type SharingConfigArgs = {
|
|
23
|
+
bump: number;
|
|
24
|
+
version: number;
|
|
25
|
+
status: ConfigStatusArgs;
|
|
26
|
+
mint: Address;
|
|
27
|
+
admin: Address;
|
|
28
|
+
adminRevoked: boolean;
|
|
29
|
+
shareholders: Array<ShareholderArgs>;
|
|
30
|
+
};
|
|
31
|
+
export declare function getSharingConfigEncoder(): Encoder<SharingConfigArgs>;
|
|
32
|
+
export declare function getSharingConfigDecoder(): Decoder<SharingConfig>;
|
|
33
|
+
export declare function getSharingConfigCodec(): Codec<SharingConfigArgs, SharingConfig>;
|
|
34
|
+
export declare function decodeSharingConfig<TAddress extends string = string>(encodedAccount: EncodedAccount<TAddress>): Account<SharingConfig, TAddress>;
|
|
35
|
+
export declare function decodeSharingConfig<TAddress extends string = string>(encodedAccount: MaybeEncodedAccount<TAddress>): MaybeAccount<SharingConfig, TAddress>;
|
|
36
|
+
export declare function fetchSharingConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<Account<SharingConfig, TAddress>>;
|
|
37
|
+
export declare function fetchMaybeSharingConfig<TAddress extends string = string>(rpc: Parameters<typeof fetchEncodedAccount>[0], address: Address<TAddress>, config?: FetchAccountConfig): Promise<MaybeAccount<SharingConfig, TAddress>>;
|
|
38
|
+
export declare function fetchAllSharingConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<Account<SharingConfig>[]>;
|
|
39
|
+
export declare function fetchAllMaybeSharingConfig(rpc: Parameters<typeof fetchEncodedAccounts>[0], addresses: Array<Address>, config?: FetchAccountsConfig): Promise<MaybeAccount<SharingConfig>[]>;
|
|
@@ -17,6 +17,8 @@ export type UserVolumeAccumulator = {
|
|
|
17
17
|
currentSolVolume: bigint;
|
|
18
18
|
lastUpdateTimestamp: bigint;
|
|
19
19
|
hasTotalClaimedTokens: boolean;
|
|
20
|
+
cashbackEarned: bigint;
|
|
21
|
+
totalCashbackClaimed: bigint;
|
|
20
22
|
};
|
|
21
23
|
export type UserVolumeAccumulatorArgs = {
|
|
22
24
|
user: Address;
|
|
@@ -26,6 +28,8 @@ export type UserVolumeAccumulatorArgs = {
|
|
|
26
28
|
currentSolVolume: number | bigint;
|
|
27
29
|
lastUpdateTimestamp: number | bigint;
|
|
28
30
|
hasTotalClaimedTokens: boolean;
|
|
31
|
+
cashbackEarned: number | bigint;
|
|
32
|
+
totalCashbackClaimed: number | bigint;
|
|
29
33
|
};
|
|
30
34
|
export declare function getUserVolumeAccumulatorEncoder(): FixedSizeEncoder<UserVolumeAccumulatorArgs>;
|
|
31
35
|
export declare function getUserVolumeAccumulatorDecoder(): FixedSizeDecoder<UserVolumeAccumulator>;
|
|
@@ -92,7 +92,35 @@ export declare const PUMP_ERROR__BUY_NOT_ENOUGH_SOL_TO_COVER_RENT = 6040;
|
|
|
92
92
|
export declare const PUMP_ERROR__BUY_NOT_ENOUGH_SOL_TO_COVER_FEES = 6041;
|
|
93
93
|
/** BuySlippageBelowMinTokensOut: Slippage: Would buy less tokens than expected min_tokens_out */
|
|
94
94
|
export declare const PUMP_ERROR__BUY_SLIPPAGE_BELOW_MIN_TOKENS_OUT = 6042;
|
|
95
|
-
|
|
95
|
+
/** NameTooLong: */
|
|
96
|
+
export declare const PUMP_ERROR__NAME_TOO_LONG = 6043;
|
|
97
|
+
/** SymbolTooLong: */
|
|
98
|
+
export declare const PUMP_ERROR__SYMBOL_TOO_LONG = 6044;
|
|
99
|
+
/** UriTooLong: */
|
|
100
|
+
export declare const PUMP_ERROR__URI_TOO_LONG = 6045;
|
|
101
|
+
/** CreateV2Disabled: */
|
|
102
|
+
export declare const PUMP_ERROR__CREATE_V2_DISABLED = 6046;
|
|
103
|
+
/** CpitializeMayhemFailed: */
|
|
104
|
+
export declare const PUMP_ERROR__CPITIALIZE_MAYHEM_FAILED = 6047;
|
|
105
|
+
/** MayhemModeDisabled: */
|
|
106
|
+
export declare const PUMP_ERROR__MAYHEM_MODE_DISABLED = 6048;
|
|
107
|
+
/** CreatorMigratedToSharingConfig: creator has been migrated to sharing config, use pump_fees::reset_fee_sharing_config instead */
|
|
108
|
+
export declare const PUMP_ERROR__CREATOR_MIGRATED_TO_SHARING_CONFIG = 6049;
|
|
109
|
+
/** UnableToDistributeCreatorVaultMigratedToSharingConfig: creator_vault has been migrated to sharing config, use pump:distribute_creator_fees instead */
|
|
110
|
+
export declare const PUMP_ERROR__UNABLE_TO_DISTRIBUTE_CREATOR_VAULT_MIGRATED_TO_SHARING_CONFIG = 6050;
|
|
111
|
+
/** SharingConfigNotActive: Sharing config is not active */
|
|
112
|
+
export declare const PUMP_ERROR__SHARING_CONFIG_NOT_ACTIVE = 6051;
|
|
113
|
+
/** UnableToDistributeCreatorFeesToExecutableRecipient: The recipient account is executable, so it cannot receive lamports, remove it from the team first */
|
|
114
|
+
export declare const PUMP_ERROR__UNABLE_TO_DISTRIBUTE_CREATOR_FEES_TO_EXECUTABLE_RECIPIENT = 6052;
|
|
115
|
+
/** BondingCurveAndSharingConfigCreatorMismatch: Bonding curve creator does not match sharing config */
|
|
116
|
+
export declare const PUMP_ERROR__BONDING_CURVE_AND_SHARING_CONFIG_CREATOR_MISMATCH = 6053;
|
|
117
|
+
/** ShareholdersAndRemainingAccountsMismatch: Remaining accounts do not match shareholders, make sure to pass exactly the same pubkeys in the same order */
|
|
118
|
+
export declare const PUMP_ERROR__SHAREHOLDERS_AND_REMAINING_ACCOUNTS_MISMATCH = 6054;
|
|
119
|
+
/** InvalidShareBps: Share bps must be greater than 0 */
|
|
120
|
+
export declare const PUMP_ERROR__INVALID_SHARE_BPS = 6055;
|
|
121
|
+
/** CashbackNotEnabled: Cashback is not enabled */
|
|
122
|
+
export declare const PUMP_ERROR__CASHBACK_NOT_ENABLED = 6056;
|
|
123
|
+
export type PumpError = typeof PUMP_ERROR__ACCOUNT_TYPE_NOT_SUPPORTED | typeof PUMP_ERROR__ALL_FEE_RECIPIENTS_SHOULD_BE_NON_ZERO | typeof PUMP_ERROR__ALL_ZEROS_WITHDRAW_AUTHORITY | typeof PUMP_ERROR__ALREADY_INITIALIZED | typeof PUMP_ERROR__BONDING_CURVE_AND_SHARING_CONFIG_CREATOR_MISMATCH | typeof PUMP_ERROR__BONDING_CURVE_COMPLETE | typeof PUMP_ERROR__BONDING_CURVE_NOT_COMPLETE | typeof PUMP_ERROR__BUY_NOT_ENOUGH_SOL_TO_COVER_FEES | typeof PUMP_ERROR__BUY_NOT_ENOUGH_SOL_TO_COVER_RENT | typeof PUMP_ERROR__BUY_SLIPPAGE_BELOW_MIN_TOKENS_OUT | typeof PUMP_ERROR__BUY_ZERO_AMOUNT | typeof PUMP_ERROR__CASHBACK_NOT_ENABLED | typeof PUMP_ERROR__CPITIALIZE_MAYHEM_FAILED | typeof PUMP_ERROR__CREATE_V2_DISABLED | typeof PUMP_ERROR__CREATOR_MIGRATED_TO_SHARING_CONFIG | typeof PUMP_ERROR__CREATOR_SHOULD_NOT_BE_ZERO | typeof PUMP_ERROR__DAY_IN_ACTIVE_RANGE | typeof PUMP_ERROR__DAY_INDEX_AFTER_END_INDEX | typeof PUMP_ERROR__DISABLED_MIGRATE | typeof PUMP_ERROR__DISABLED_WITHDRAW | typeof PUMP_ERROR__DIVISION_BY_ZERO | typeof PUMP_ERROR__END_TIME_BEFORE_CURRENT_DAY | typeof PUMP_ERROR__END_TIME_BEFORE_START_TIME | typeof PUMP_ERROR__END_TIME_IN_THE_PAST | typeof PUMP_ERROR__FEE_BASIS_POINTS_GREATER_THAN_MAXIMUM | typeof PUMP_ERROR__INITIAL_REAL_TOKEN_RESERVES_SHOULD_BE_LESS_THAN_TOKEN_TOTAL_SUPPLY | typeof PUMP_ERROR__INITIAL_VIRTUAL_TOKEN_RESERVES_SHOULD_BE_GREATER_THAN_INITIAL_REAL_TOKEN_RESERVES | typeof PUMP_ERROR__INVALID_CREATOR | typeof PUMP_ERROR__INVALID_INCENTIVE_MINT | typeof PUMP_ERROR__INVALID_SHARE_BPS | typeof PUMP_ERROR__MAYHEM_MODE_DISABLED | typeof PUMP_ERROR__MINT_DOES_NOT_MATCH_BONDING_CURVE | typeof PUMP_ERROR__NAME_TOO_LONG | typeof PUMP_ERROR__NEW_SIZE_SHOULD_BE_GREATER_THAN_CURRENT_SIZE | typeof PUMP_ERROR__NOT_AUTHORIZED | typeof PUMP_ERROR__NOT_ENOUGH_REMAINING_ACCOUNTS | typeof PUMP_ERROR__NOT_ENOUGH_TOKENS_TO_BUY | typeof PUMP_ERROR__NOT_ENOUGH_TOKENS_TO_SELL | typeof PUMP_ERROR__NOT_INITIALIZED | typeof PUMP_ERROR__OVERFLOW | typeof PUMP_ERROR__POOL_MIGRATION_FEE_SHOULD_BE_GREATER_THAN_CREATOR_FEE_PLUS_MAX_MIGRATE_FEES | typeof PUMP_ERROR__POOL_MIGRATION_FEE_SHOULD_BE_LESS_THAN_FINAL_REAL_SOL_RESERVES | typeof PUMP_ERROR__SELL_ZERO_AMOUNT | typeof PUMP_ERROR__SHAREHOLDERS_AND_REMAINING_ACCOUNTS_MISMATCH | typeof PUMP_ERROR__SHARING_CONFIG_NOT_ACTIVE | typeof PUMP_ERROR__START_TIME_IN_THE_PAST | typeof PUMP_ERROR__SUPPLY_UPDATE_FOR_FINISHED_RANGE | typeof PUMP_ERROR__SYMBOL_TOO_LONG | typeof PUMP_ERROR__TIME_RANGE_TOO_LARGE | typeof PUMP_ERROR__TOO_LITTLE_SOL_RECEIVED | typeof PUMP_ERROR__TOO_MUCH_SOL_REQUIRED | typeof PUMP_ERROR__TRUNCATION | typeof PUMP_ERROR__UNABLE_TO_DISTRIBUTE_CREATOR_FEES_TO_EXECUTABLE_RECIPIENT | typeof PUMP_ERROR__UNABLE_TO_DISTRIBUTE_CREATOR_VAULT_MIGRATED_TO_SHARING_CONFIG | typeof PUMP_ERROR__UNSORTED_NOT_UNIQUE_FEE_RECIPIENTS | typeof PUMP_ERROR__URI_TOO_LONG | typeof PUMP_ERROR__WITHDRAW_TOO_FREQUENT;
|
|
96
124
|
export declare function getPumpErrorMessage(code: PumpError): string;
|
|
97
125
|
export declare function isPumpError<TProgramErrorCode extends PumpError>(error: unknown, transactionMessage: {
|
|
98
126
|
instructions: Record<number, {
|
|
@@ -23,7 +23,7 @@ export type BuyInstruction<TProgram extends string = typeof PUMP_PROGRAM_ADDRESS
|
|
|
23
23
|
TAccountCreatorVault extends string ? WritableAccount<TAccountCreatorVault> : TAccountCreatorVault,
|
|
24
24
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
25
25
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
26
|
-
TAccountGlobalVolumeAccumulator extends string ?
|
|
26
|
+
TAccountGlobalVolumeAccumulator extends string ? ReadonlyAccount<TAccountGlobalVolumeAccumulator> : TAccountGlobalVolumeAccumulator,
|
|
27
27
|
TAccountUserVolumeAccumulator extends string ? WritableAccount<TAccountUserVolumeAccumulator> : TAccountUserVolumeAccumulator,
|
|
28
28
|
TAccountFeeConfig extends string ? ReadonlyAccount<TAccountFeeConfig> : TAccountFeeConfig,
|
|
29
29
|
TAccountFeeProgram extends string ? ReadonlyAccount<TAccountFeeProgram> : TAccountFeeProgram,
|
|
@@ -23,7 +23,7 @@ export type BuyExactSolInInstruction<TProgram extends string = typeof PUMP_PROGR
|
|
|
23
23
|
TAccountCreatorVault extends string ? WritableAccount<TAccountCreatorVault> : TAccountCreatorVault,
|
|
24
24
|
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
25
25
|
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
26
|
-
TAccountGlobalVolumeAccumulator extends string ?
|
|
26
|
+
TAccountGlobalVolumeAccumulator extends string ? ReadonlyAccount<TAccountGlobalVolumeAccumulator> : TAccountGlobalVolumeAccumulator,
|
|
27
27
|
TAccountUserVolumeAccumulator extends string ? WritableAccount<TAccountUserVolumeAccumulator> : TAccountUserVolumeAccumulator,
|
|
28
28
|
TAccountFeeConfig extends string ? ReadonlyAccount<TAccountFeeConfig> : TAccountFeeConfig,
|
|
29
29
|
TAccountFeeProgram extends string ? ReadonlyAccount<TAccountFeeProgram> : TAccountFeeProgram,
|
|
@@ -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_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
export declare const CLAIM_CASHBACK_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
11
|
+
export declare function getClaimCashbackDiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
12
|
+
export type ClaimCashbackInstruction<TProgram extends string = typeof PUMP_PROGRAM_ADDRESS, TAccountUser extends string | AccountMeta<string> = string, TAccountUserVolumeAccumulator extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountEventAuthority extends string | AccountMeta<string> = string, TAccountProgram extends string | AccountMeta<string> = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P', TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[
|
|
13
|
+
TAccountUser extends string ? WritableAccount<TAccountUser> : TAccountUser,
|
|
14
|
+
TAccountUserVolumeAccumulator extends string ? WritableAccount<TAccountUserVolumeAccumulator> : TAccountUserVolumeAccumulator,
|
|
15
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
16
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
17
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
18
|
+
...TRemainingAccounts
|
|
19
|
+
]>;
|
|
20
|
+
export type ClaimCashbackInstructionData = {
|
|
21
|
+
discriminator: ReadonlyUint8Array;
|
|
22
|
+
};
|
|
23
|
+
export type ClaimCashbackInstructionDataArgs = {};
|
|
24
|
+
export declare function getClaimCashbackInstructionDataEncoder(): FixedSizeEncoder<ClaimCashbackInstructionDataArgs>;
|
|
25
|
+
export declare function getClaimCashbackInstructionDataDecoder(): FixedSizeDecoder<ClaimCashbackInstructionData>;
|
|
26
|
+
export declare function getClaimCashbackInstructionDataCodec(): FixedSizeCodec<ClaimCashbackInstructionDataArgs, ClaimCashbackInstructionData>;
|
|
27
|
+
export type ClaimCashbackAsyncInput<TAccountUser extends string = string, TAccountUserVolumeAccumulator extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
28
|
+
user: Address<TAccountUser>;
|
|
29
|
+
userVolumeAccumulator?: Address<TAccountUserVolumeAccumulator>;
|
|
30
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
31
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
32
|
+
program?: Address<TAccountProgram>;
|
|
33
|
+
};
|
|
34
|
+
export declare function getClaimCashbackInstructionAsync<TAccountUser extends string, TAccountUserVolumeAccumulator extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_PROGRAM_ADDRESS>(input: ClaimCashbackAsyncInput<TAccountUser, TAccountUserVolumeAccumulator, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
35
|
+
programAddress?: TProgramAddress;
|
|
36
|
+
}): Promise<ClaimCashbackInstruction<TProgramAddress, TAccountUser, TAccountUserVolumeAccumulator, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>>;
|
|
37
|
+
export type ClaimCashbackInput<TAccountUser extends string = string, TAccountUserVolumeAccumulator extends string = string, TAccountSystemProgram extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
38
|
+
user: Address<TAccountUser>;
|
|
39
|
+
userVolumeAccumulator: Address<TAccountUserVolumeAccumulator>;
|
|
40
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
41
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
42
|
+
program?: Address<TAccountProgram>;
|
|
43
|
+
};
|
|
44
|
+
export declare function getClaimCashbackInstruction<TAccountUser extends string, TAccountUserVolumeAccumulator extends string, TAccountSystemProgram extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_PROGRAM_ADDRESS>(input: ClaimCashbackInput<TAccountUser, TAccountUserVolumeAccumulator, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
45
|
+
programAddress?: TProgramAddress;
|
|
46
|
+
}): ClaimCashbackInstruction<TProgramAddress, TAccountUser, TAccountUserVolumeAccumulator, TAccountSystemProgram, TAccountEventAuthority, TAccountProgram>;
|
|
47
|
+
export type ParsedClaimCashbackInstruction<TProgram extends string = typeof PUMP_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
48
|
+
programAddress: Address<TProgram>;
|
|
49
|
+
accounts: {
|
|
50
|
+
user: TAccountMetas[0];
|
|
51
|
+
userVolumeAccumulator: TAccountMetas[1];
|
|
52
|
+
systemProgram: TAccountMetas[2];
|
|
53
|
+
eventAuthority: TAccountMetas[3];
|
|
54
|
+
program: TAccountMetas[4];
|
|
55
|
+
};
|
|
56
|
+
data: ClaimCashbackInstructionData;
|
|
57
|
+
};
|
|
58
|
+
export declare function parseClaimCashbackInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedClaimCashbackInstruction<TProgram, TAccountMetas>;
|
|
@@ -0,0 +1,128 @@
|
|
|
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 Codec, type Decoder, type Encoder, type Instruction, type InstructionWithAccounts, type InstructionWithData, type ReadonlyAccount, type ReadonlyUint8Array, type TransactionSigner, type WritableAccount, type WritableSignerAccount } from '@solana/kit';
|
|
9
|
+
import { PUMP_PROGRAM_ADDRESS } from '../programs';
|
|
10
|
+
import { type OptionBool, type OptionBoolArgs } from '../types';
|
|
11
|
+
export declare const CREATE_V2_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
|
|
12
|
+
export declare function getCreateV2DiscriminatorBytes(): ReadonlyUint8Array<ArrayBuffer>;
|
|
13
|
+
export type CreateV2Instruction<TProgram extends string = typeof PUMP_PROGRAM_ADDRESS, TAccountMint extends string | AccountMeta<string> = string, TAccountMintAuthority extends string | AccountMeta<string> = string, TAccountBondingCurve extends string | AccountMeta<string> = string, TAccountAssociatedBondingCurve extends string | AccountMeta<string> = string, TAccountGlobal extends string | AccountMeta<string> = string, TAccountUser extends string | AccountMeta<string> = string, TAccountSystemProgram extends string | AccountMeta<string> = '11111111111111111111111111111111', TAccountTokenProgram extends string | AccountMeta<string> = 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb', TAccountAssociatedTokenProgram extends string | AccountMeta<string> = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL', TAccountMayhemProgramId extends string | AccountMeta<string> = 'MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e', TAccountGlobalParams extends string | AccountMeta<string> = string, TAccountSolVault extends string | AccountMeta<string> = string, TAccountMayhemState extends string | AccountMeta<string> = string, TAccountMayhemTokenVault 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<[
|
|
14
|
+
TAccountMint extends string ? WritableSignerAccount<TAccountMint> & AccountSignerMeta<TAccountMint> : TAccountMint,
|
|
15
|
+
TAccountMintAuthority extends string ? ReadonlyAccount<TAccountMintAuthority> : TAccountMintAuthority,
|
|
16
|
+
TAccountBondingCurve extends string ? WritableAccount<TAccountBondingCurve> : TAccountBondingCurve,
|
|
17
|
+
TAccountAssociatedBondingCurve extends string ? WritableAccount<TAccountAssociatedBondingCurve> : TAccountAssociatedBondingCurve,
|
|
18
|
+
TAccountGlobal extends string ? ReadonlyAccount<TAccountGlobal> : TAccountGlobal,
|
|
19
|
+
TAccountUser extends string ? WritableSignerAccount<TAccountUser> & AccountSignerMeta<TAccountUser> : TAccountUser,
|
|
20
|
+
TAccountSystemProgram extends string ? ReadonlyAccount<TAccountSystemProgram> : TAccountSystemProgram,
|
|
21
|
+
TAccountTokenProgram extends string ? ReadonlyAccount<TAccountTokenProgram> : TAccountTokenProgram,
|
|
22
|
+
TAccountAssociatedTokenProgram extends string ? ReadonlyAccount<TAccountAssociatedTokenProgram> : TAccountAssociatedTokenProgram,
|
|
23
|
+
TAccountMayhemProgramId extends string ? WritableAccount<TAccountMayhemProgramId> : TAccountMayhemProgramId,
|
|
24
|
+
TAccountGlobalParams extends string ? ReadonlyAccount<TAccountGlobalParams> : TAccountGlobalParams,
|
|
25
|
+
TAccountSolVault extends string ? WritableAccount<TAccountSolVault> : TAccountSolVault,
|
|
26
|
+
TAccountMayhemState extends string ? WritableAccount<TAccountMayhemState> : TAccountMayhemState,
|
|
27
|
+
TAccountMayhemTokenVault extends string ? WritableAccount<TAccountMayhemTokenVault> : TAccountMayhemTokenVault,
|
|
28
|
+
TAccountEventAuthority extends string ? ReadonlyAccount<TAccountEventAuthority> : TAccountEventAuthority,
|
|
29
|
+
TAccountProgram extends string ? ReadonlyAccount<TAccountProgram> : TAccountProgram,
|
|
30
|
+
...TRemainingAccounts
|
|
31
|
+
]>;
|
|
32
|
+
export type CreateV2InstructionData = {
|
|
33
|
+
discriminator: ReadonlyUint8Array;
|
|
34
|
+
name: string;
|
|
35
|
+
symbol: string;
|
|
36
|
+
uri: string;
|
|
37
|
+
creator: Address;
|
|
38
|
+
isMayhemMode: boolean;
|
|
39
|
+
isCashbackEnabled: OptionBool;
|
|
40
|
+
};
|
|
41
|
+
export type CreateV2InstructionDataArgs = {
|
|
42
|
+
name: string;
|
|
43
|
+
symbol: string;
|
|
44
|
+
uri: string;
|
|
45
|
+
creator: Address;
|
|
46
|
+
isMayhemMode: boolean;
|
|
47
|
+
isCashbackEnabled: OptionBoolArgs;
|
|
48
|
+
};
|
|
49
|
+
export declare function getCreateV2InstructionDataEncoder(): Encoder<CreateV2InstructionDataArgs>;
|
|
50
|
+
export declare function getCreateV2InstructionDataDecoder(): Decoder<CreateV2InstructionData>;
|
|
51
|
+
export declare function getCreateV2InstructionDataCodec(): Codec<CreateV2InstructionDataArgs, CreateV2InstructionData>;
|
|
52
|
+
export type CreateV2AsyncInput<TAccountMint extends string = string, TAccountMintAuthority extends string = string, TAccountBondingCurve extends string = string, TAccountAssociatedBondingCurve extends string = string, TAccountGlobal extends string = string, TAccountUser extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountMayhemProgramId extends string = string, TAccountGlobalParams extends string = string, TAccountSolVault extends string = string, TAccountMayhemState extends string = string, TAccountMayhemTokenVault extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
53
|
+
mint: TransactionSigner<TAccountMint>;
|
|
54
|
+
mintAuthority?: Address<TAccountMintAuthority>;
|
|
55
|
+
bondingCurve?: Address<TAccountBondingCurve>;
|
|
56
|
+
associatedBondingCurve?: Address<TAccountAssociatedBondingCurve>;
|
|
57
|
+
global?: Address<TAccountGlobal>;
|
|
58
|
+
user: TransactionSigner<TAccountUser>;
|
|
59
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
60
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
61
|
+
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
62
|
+
mayhemProgramId?: Address<TAccountMayhemProgramId>;
|
|
63
|
+
globalParams?: Address<TAccountGlobalParams>;
|
|
64
|
+
solVault?: Address<TAccountSolVault>;
|
|
65
|
+
mayhemState?: Address<TAccountMayhemState>;
|
|
66
|
+
mayhemTokenVault: Address<TAccountMayhemTokenVault>;
|
|
67
|
+
eventAuthority?: Address<TAccountEventAuthority>;
|
|
68
|
+
program: Address<TAccountProgram>;
|
|
69
|
+
name: CreateV2InstructionDataArgs['name'];
|
|
70
|
+
symbol: CreateV2InstructionDataArgs['symbol'];
|
|
71
|
+
uri: CreateV2InstructionDataArgs['uri'];
|
|
72
|
+
creator: CreateV2InstructionDataArgs['creator'];
|
|
73
|
+
isMayhemMode: CreateV2InstructionDataArgs['isMayhemMode'];
|
|
74
|
+
isCashbackEnabled: CreateV2InstructionDataArgs['isCashbackEnabled'];
|
|
75
|
+
};
|
|
76
|
+
export declare function getCreateV2InstructionAsync<TAccountMint extends string, TAccountMintAuthority extends string, TAccountBondingCurve extends string, TAccountAssociatedBondingCurve extends string, TAccountGlobal extends string, TAccountUser extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountMayhemProgramId extends string, TAccountGlobalParams extends string, TAccountSolVault extends string, TAccountMayhemState extends string, TAccountMayhemTokenVault extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_PROGRAM_ADDRESS>(input: CreateV2AsyncInput<TAccountMint, TAccountMintAuthority, TAccountBondingCurve, TAccountAssociatedBondingCurve, TAccountGlobal, TAccountUser, TAccountSystemProgram, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountMayhemProgramId, TAccountGlobalParams, TAccountSolVault, TAccountMayhemState, TAccountMayhemTokenVault, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
77
|
+
programAddress?: TProgramAddress;
|
|
78
|
+
}): Promise<CreateV2Instruction<TProgramAddress, TAccountMint, TAccountMintAuthority, TAccountBondingCurve, TAccountAssociatedBondingCurve, TAccountGlobal, TAccountUser, TAccountSystemProgram, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountMayhemProgramId, TAccountGlobalParams, TAccountSolVault, TAccountMayhemState, TAccountMayhemTokenVault, TAccountEventAuthority, TAccountProgram>>;
|
|
79
|
+
export type CreateV2Input<TAccountMint extends string = string, TAccountMintAuthority extends string = string, TAccountBondingCurve extends string = string, TAccountAssociatedBondingCurve extends string = string, TAccountGlobal extends string = string, TAccountUser extends string = string, TAccountSystemProgram extends string = string, TAccountTokenProgram extends string = string, TAccountAssociatedTokenProgram extends string = string, TAccountMayhemProgramId extends string = string, TAccountGlobalParams extends string = string, TAccountSolVault extends string = string, TAccountMayhemState extends string = string, TAccountMayhemTokenVault extends string = string, TAccountEventAuthority extends string = string, TAccountProgram extends string = string> = {
|
|
80
|
+
mint: TransactionSigner<TAccountMint>;
|
|
81
|
+
mintAuthority: Address<TAccountMintAuthority>;
|
|
82
|
+
bondingCurve: Address<TAccountBondingCurve>;
|
|
83
|
+
associatedBondingCurve: Address<TAccountAssociatedBondingCurve>;
|
|
84
|
+
global: Address<TAccountGlobal>;
|
|
85
|
+
user: TransactionSigner<TAccountUser>;
|
|
86
|
+
systemProgram?: Address<TAccountSystemProgram>;
|
|
87
|
+
tokenProgram?: Address<TAccountTokenProgram>;
|
|
88
|
+
associatedTokenProgram?: Address<TAccountAssociatedTokenProgram>;
|
|
89
|
+
mayhemProgramId?: Address<TAccountMayhemProgramId>;
|
|
90
|
+
globalParams: Address<TAccountGlobalParams>;
|
|
91
|
+
solVault: Address<TAccountSolVault>;
|
|
92
|
+
mayhemState: Address<TAccountMayhemState>;
|
|
93
|
+
mayhemTokenVault: Address<TAccountMayhemTokenVault>;
|
|
94
|
+
eventAuthority: Address<TAccountEventAuthority>;
|
|
95
|
+
program: Address<TAccountProgram>;
|
|
96
|
+
name: CreateV2InstructionDataArgs['name'];
|
|
97
|
+
symbol: CreateV2InstructionDataArgs['symbol'];
|
|
98
|
+
uri: CreateV2InstructionDataArgs['uri'];
|
|
99
|
+
creator: CreateV2InstructionDataArgs['creator'];
|
|
100
|
+
isMayhemMode: CreateV2InstructionDataArgs['isMayhemMode'];
|
|
101
|
+
isCashbackEnabled: CreateV2InstructionDataArgs['isCashbackEnabled'];
|
|
102
|
+
};
|
|
103
|
+
export declare function getCreateV2Instruction<TAccountMint extends string, TAccountMintAuthority extends string, TAccountBondingCurve extends string, TAccountAssociatedBondingCurve extends string, TAccountGlobal extends string, TAccountUser extends string, TAccountSystemProgram extends string, TAccountTokenProgram extends string, TAccountAssociatedTokenProgram extends string, TAccountMayhemProgramId extends string, TAccountGlobalParams extends string, TAccountSolVault extends string, TAccountMayhemState extends string, TAccountMayhemTokenVault extends string, TAccountEventAuthority extends string, TAccountProgram extends string, TProgramAddress extends Address = typeof PUMP_PROGRAM_ADDRESS>(input: CreateV2Input<TAccountMint, TAccountMintAuthority, TAccountBondingCurve, TAccountAssociatedBondingCurve, TAccountGlobal, TAccountUser, TAccountSystemProgram, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountMayhemProgramId, TAccountGlobalParams, TAccountSolVault, TAccountMayhemState, TAccountMayhemTokenVault, TAccountEventAuthority, TAccountProgram>, config?: {
|
|
104
|
+
programAddress?: TProgramAddress;
|
|
105
|
+
}): CreateV2Instruction<TProgramAddress, TAccountMint, TAccountMintAuthority, TAccountBondingCurve, TAccountAssociatedBondingCurve, TAccountGlobal, TAccountUser, TAccountSystemProgram, TAccountTokenProgram, TAccountAssociatedTokenProgram, TAccountMayhemProgramId, TAccountGlobalParams, TAccountSolVault, TAccountMayhemState, TAccountMayhemTokenVault, TAccountEventAuthority, TAccountProgram>;
|
|
106
|
+
export type ParsedCreateV2Instruction<TProgram extends string = typeof PUMP_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
107
|
+
programAddress: Address<TProgram>;
|
|
108
|
+
accounts: {
|
|
109
|
+
mint: TAccountMetas[0];
|
|
110
|
+
mintAuthority: TAccountMetas[1];
|
|
111
|
+
bondingCurve: TAccountMetas[2];
|
|
112
|
+
associatedBondingCurve: TAccountMetas[3];
|
|
113
|
+
global: TAccountMetas[4];
|
|
114
|
+
user: TAccountMetas[5];
|
|
115
|
+
systemProgram: TAccountMetas[6];
|
|
116
|
+
tokenProgram: TAccountMetas[7];
|
|
117
|
+
associatedTokenProgram: TAccountMetas[8];
|
|
118
|
+
mayhemProgramId: TAccountMetas[9];
|
|
119
|
+
globalParams: TAccountMetas[10];
|
|
120
|
+
solVault: TAccountMetas[11];
|
|
121
|
+
mayhemState: TAccountMetas[12];
|
|
122
|
+
mayhemTokenVault: TAccountMetas[13];
|
|
123
|
+
eventAuthority: TAccountMetas[14];
|
|
124
|
+
program: TAccountMetas[15];
|
|
125
|
+
};
|
|
126
|
+
data: CreateV2InstructionData;
|
|
127
|
+
};
|
|
128
|
+
export declare function parseCreateV2Instruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedCreateV2Instruction<TProgram, TAccountMetas>;
|