pump-kit 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -22
- package/dist/index.js +12 -12
- package/dist/types/ammsdk/generated/accounts/globalConfig.d.ts +4 -6
- package/dist/types/ammsdk/generated/accounts/index.d.ts +0 -4
- package/dist/types/ammsdk/generated/accounts/pool.d.ts +0 -2
- package/dist/types/ammsdk/generated/errors/pumpAmm.d.ts +29 -55
- package/dist/types/ammsdk/generated/index.d.ts +1 -1
- package/dist/types/ammsdk/generated/instructions/buy.d.ts +14 -67
- package/dist/types/ammsdk/generated/instructions/createConfig.d.ts +5 -26
- package/dist/types/ammsdk/generated/instructions/createPool.d.ts +12 -42
- package/dist/types/ammsdk/generated/instructions/deposit.d.ts +10 -33
- package/dist/types/ammsdk/generated/instructions/disable.d.ts +2 -16
- package/dist/types/ammsdk/generated/instructions/extendAccount.d.ts +2 -12
- package/dist/types/ammsdk/generated/instructions/index.d.ts +0 -9
- package/dist/types/ammsdk/generated/instructions/sell.d.ts +14 -54
- package/dist/types/ammsdk/generated/instructions/updateAdmin.d.ts +2 -12
- package/dist/types/ammsdk/generated/instructions/updateFeeConfig.d.ts +2 -22
- package/dist/types/ammsdk/generated/instructions/withdraw.d.ts +10 -33
- package/dist/types/ammsdk/generated/programs/pumpAmm.d.ts +15 -46
- package/dist/types/ammsdk/generated/types/buyEvent.d.ts +4 -25
- package/dist/types/ammsdk/generated/types/createConfigEvent.d.ts +0 -4
- package/dist/types/ammsdk/generated/types/createPoolEvent.d.ts +0 -2
- package/dist/types/ammsdk/generated/types/globalConfig.d.ts +49 -0
- package/dist/types/ammsdk/generated/types/index.d.ts +2 -12
- package/dist/types/ammsdk/generated/types/pool.d.ts +35 -0
- package/dist/types/ammsdk/generated/types/sellEvent.d.ts +0 -6
- package/dist/types/ammsdk/generated/types/updateFeeConfigEvent.d.ts +0 -4
- package/dist/types/clients/amm.d.ts +10 -2
- package/dist/types/pda/pumpAmm.d.ts +4 -0
- package/dist/types/pumpsdk/generated/index.d.ts +1 -1
- package/dist/types/swap/curve.d.ts +1 -4
- package/dist/types/swap.d.ts +7 -23
- package/package.json +1 -1
- package/dist/types/ammsdk/generated/accounts/bondingCurve.d.ts +0 -39
- package/dist/types/ammsdk/generated/accounts/feeConfig.d.ts +0 -33
- package/dist/types/ammsdk/generated/accounts/globalVolumeAccumulator.d.ts +0 -37
- package/dist/types/ammsdk/generated/accounts/userVolumeAccumulator.d.ts +0 -39
- package/dist/types/ammsdk/generated/instructions/adminSetCoinCreator.d.ts +0 -63
- package/dist/types/ammsdk/generated/instructions/adminUpdateTokenIncentives.d.ts +0 -99
- package/dist/types/ammsdk/generated/instructions/buyExactQuoteIn.d.ts +0 -144
- package/dist/types/ammsdk/generated/instructions/claimTokenIncentives.d.ts +0 -86
- package/dist/types/ammsdk/generated/instructions/closeUserVolumeAccumulator.d.ts +0 -54
- package/dist/types/ammsdk/generated/instructions/collectCoinCreatorFee.d.ts +0 -70
- package/dist/types/ammsdk/generated/instructions/initUserVolumeAccumulator.d.ts +0 -62
- package/dist/types/ammsdk/generated/instructions/setCoinCreator.d.ts +0 -58
- package/dist/types/ammsdk/generated/instructions/syncUserVolumeAccumulator.d.ts +0 -58
- package/dist/types/ammsdk/generated/types/adminSetCoinCreatorEvent.d.ts +0 -27
- package/dist/types/ammsdk/generated/types/adminUpdateTokenIncentivesEvent.d.ts +0 -29
- package/dist/types/ammsdk/generated/types/claimTokenIncentivesEvent.d.ts +0 -27
- package/dist/types/ammsdk/generated/types/closeUserVolumeAccumulatorEvent.d.ts +0 -27
- package/dist/types/ammsdk/generated/types/collectCoinCreatorFeeEvent.d.ts +0 -25
- package/dist/types/ammsdk/generated/types/feeTier.d.ts +0 -20
- package/dist/types/ammsdk/generated/types/fees.d.ts +0 -21
- package/dist/types/ammsdk/generated/types/initUserVolumeAccumulatorEvent.d.ts +0 -21
- package/dist/types/ammsdk/generated/types/optionBool.d.ts +0 -13
- package/dist/types/ammsdk/generated/types/setBondingCurveCoinCreatorEvent.d.ts +0 -25
- package/dist/types/ammsdk/generated/types/setMetaplexCoinCreatorEvent.d.ts +0 -25
- package/dist/types/ammsdk/generated/types/syncUserVolumeAccumulatorEvent.d.ts +0 -23
package/README.md
CHANGED
|
@@ -95,31 +95,27 @@ await curveSell({
|
|
|
95
95
|
### Buy Tokens (AMM)
|
|
96
96
|
|
|
97
97
|
```ts
|
|
98
|
-
import {
|
|
98
|
+
import { ammBuy } from "pump-kit";
|
|
99
99
|
|
|
100
|
-
await
|
|
100
|
+
await ammBuy({
|
|
101
101
|
user: myWallet,
|
|
102
102
|
mint: "TokenMintAddress",
|
|
103
103
|
solAmount: 0.5,
|
|
104
|
-
route: "amm", // force AMM routing
|
|
105
104
|
poolCreator: "CreatorAddress", // optional if auto detection works
|
|
106
105
|
rpc,
|
|
107
106
|
});
|
|
108
107
|
```
|
|
109
108
|
|
|
110
|
-
> `route` defaults to `"auto"`, which prefers the bonding curve when available and falls back to the AMM after migration.
|
|
111
|
-
|
|
112
109
|
### Sell Tokens (AMM)
|
|
113
110
|
|
|
114
111
|
```ts
|
|
115
|
-
import {
|
|
112
|
+
import { ammSell } from "pump-kit";
|
|
116
113
|
|
|
117
|
-
await
|
|
114
|
+
await ammSell({
|
|
118
115
|
user: myWallet,
|
|
119
116
|
mint: "TokenMintAddress",
|
|
120
117
|
useWalletPercentage: true,
|
|
121
|
-
walletPercentage:
|
|
122
|
-
route: "amm",
|
|
118
|
+
walletPercentage: 100,
|
|
123
119
|
poolCreator: "CreatorAddress",
|
|
124
120
|
rpc,
|
|
125
121
|
});
|
|
@@ -129,19 +125,6 @@ await sell({
|
|
|
129
125
|
|
|
130
126
|
## API Reference
|
|
131
127
|
|
|
132
|
-
### Unified Swap Entry Points
|
|
133
|
-
|
|
134
|
-
```ts
|
|
135
|
-
// Auto route (default)
|
|
136
|
-
buy({ user, mint, solAmount, rpc, ...options });
|
|
137
|
-
|
|
138
|
-
sell({ user, mint, tokenAmount?, useWalletPercentage?, rpc, ...options });
|
|
139
|
-
|
|
140
|
-
// Force AMM routing, optionally provide pool hints
|
|
141
|
-
buy({ user, mint, solAmount, rpc, route: "amm", poolCreator?, poolAddress?, quoteMint? });
|
|
142
|
-
sell({ user, mint, route: "amm", poolCreator?, poolAddress?, quoteMint?, useWalletPercentage? });
|
|
143
|
-
```
|
|
144
|
-
|
|
145
128
|
### Curve Swap Helpers
|
|
146
129
|
|
|
147
130
|
```ts
|