hyperstack-stacks 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +142 -362
- package/dist/index.d.cts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +141 -360
- package/dist/ore/index.cjs +2 -1
- package/dist/ore/index.d.cts +191 -164
- package/dist/ore/index.d.ts +191 -164
- package/dist/ore/index.js +2 -1
- package/package.json +4 -10
- package/dist/pumpfun/index.cjs +0 -284
- package/dist/pumpfun/index.d.cts +0 -4907
- package/dist/pumpfun/index.d.ts +0 -4907
- package/dist/pumpfun/index.js +0 -241
package/dist/pumpfun/index.js
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
// src/pumpfun/index.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { pda, literal, account, bytes } from "hyperstack-typescript";
|
|
4
|
-
var EventWrapperSchema = (data) => z.object({
|
|
5
|
-
timestamp: z.number(),
|
|
6
|
-
data,
|
|
7
|
-
slot: z.number().optional(),
|
|
8
|
-
signature: z.string().optional()
|
|
9
|
-
});
|
|
10
|
-
var CreateSchema = z.object({
|
|
11
|
-
mint: z.string().optional(),
|
|
12
|
-
mint_authority: z.string().optional(),
|
|
13
|
-
bonding_curve: z.string().optional(),
|
|
14
|
-
associated_bonding_curve: z.string().optional(),
|
|
15
|
-
global: z.string().optional(),
|
|
16
|
-
mpl_token_metadata: z.string().optional(),
|
|
17
|
-
metadata: z.string().optional(),
|
|
18
|
-
user: z.string().optional(),
|
|
19
|
-
system_program: z.string().optional(),
|
|
20
|
-
token_program: z.string().optional(),
|
|
21
|
-
associated_token_program: z.string().optional(),
|
|
22
|
-
rent: z.string().optional(),
|
|
23
|
-
event_authority: z.string().optional(),
|
|
24
|
-
program: z.string().optional(),
|
|
25
|
-
name: z.string().optional(),
|
|
26
|
-
symbol: z.string().optional(),
|
|
27
|
-
uri: z.string().optional(),
|
|
28
|
-
creator: z.string().optional()
|
|
29
|
-
});
|
|
30
|
-
var BuySchema = z.object({
|
|
31
|
-
global: z.string().optional(),
|
|
32
|
-
fee_recipient: z.string().optional(),
|
|
33
|
-
mint: z.string().optional(),
|
|
34
|
-
bonding_curve: z.string().optional(),
|
|
35
|
-
associated_bonding_curve: z.string().optional(),
|
|
36
|
-
associated_user: z.string().optional(),
|
|
37
|
-
user: z.string().optional(),
|
|
38
|
-
system_program: z.string().optional(),
|
|
39
|
-
token_program: z.string().optional(),
|
|
40
|
-
creator_vault: z.string().optional(),
|
|
41
|
-
event_authority: z.string().optional(),
|
|
42
|
-
program: z.string().optional(),
|
|
43
|
-
global_volume_accumulator: z.string().optional(),
|
|
44
|
-
user_volume_accumulator: z.string().optional(),
|
|
45
|
-
fee_config: z.string().optional(),
|
|
46
|
-
fee_program: z.string().optional(),
|
|
47
|
-
amount: z.number().optional(),
|
|
48
|
-
max_sol_cost: z.number().optional(),
|
|
49
|
-
track_volume: z.record(z.any()).optional()
|
|
50
|
-
});
|
|
51
|
-
var SellSchema = z.object({
|
|
52
|
-
global: z.string().optional(),
|
|
53
|
-
fee_recipient: z.string().optional(),
|
|
54
|
-
mint: z.string().optional(),
|
|
55
|
-
bonding_curve: z.string().optional(),
|
|
56
|
-
associated_bonding_curve: z.string().optional(),
|
|
57
|
-
associated_user: z.string().optional(),
|
|
58
|
-
user: z.string().optional(),
|
|
59
|
-
system_program: z.string().optional(),
|
|
60
|
-
creator_vault: z.string().optional(),
|
|
61
|
-
token_program: z.string().optional(),
|
|
62
|
-
event_authority: z.string().optional(),
|
|
63
|
-
program: z.string().optional(),
|
|
64
|
-
fee_config: z.string().optional(),
|
|
65
|
-
fee_program: z.string().optional(),
|
|
66
|
-
amount: z.number().optional(),
|
|
67
|
-
min_sol_output: z.number().optional()
|
|
68
|
-
});
|
|
69
|
-
var BondingCurveSchema = z.object({
|
|
70
|
-
virtual_token_reserves: z.number().optional(),
|
|
71
|
-
virtual_sol_reserves: z.number().optional(),
|
|
72
|
-
real_token_reserves: z.number().optional(),
|
|
73
|
-
real_sol_reserves: z.number().optional(),
|
|
74
|
-
token_total_supply: z.number().optional(),
|
|
75
|
-
complete: z.boolean().optional(),
|
|
76
|
-
creator: z.string().optional(),
|
|
77
|
-
is_mayhem_mode: z.boolean().optional()
|
|
78
|
-
});
|
|
79
|
-
var BuysEventSchema = z.object({
|
|
80
|
-
amount: z.number(),
|
|
81
|
-
max_sol_cost: z.number()
|
|
82
|
-
});
|
|
83
|
-
var BuysExactSolEventSchema = z.object({
|
|
84
|
-
spendable_sol_in: z.number(),
|
|
85
|
-
min_tokens_out: z.number()
|
|
86
|
-
});
|
|
87
|
-
var CreateEventSchema = z.object({});
|
|
88
|
-
var CreateV2EventSchema = z.object({});
|
|
89
|
-
var SellsEventSchema = z.object({});
|
|
90
|
-
var ConfigStatusSchema = z.enum(["Paused", "Active"]);
|
|
91
|
-
var PumpfunTokenEventsSchema = z.object({
|
|
92
|
-
buys: z.array(EventWrapperSchema(BuySchema)).nullable().optional(),
|
|
93
|
-
buys_exact_sol: z.array(z.any()).nullable().optional(),
|
|
94
|
-
create: CreateSchema.nullable().optional(),
|
|
95
|
-
create_v2: z.record(z.any()).nullable().optional(),
|
|
96
|
-
sells: z.array(EventWrapperSchema(SellSchema)).nullable().optional()
|
|
97
|
-
});
|
|
98
|
-
var PumpfunTokenIdSchema = z.object({
|
|
99
|
-
bonding_curve: z.string().nullable().optional(),
|
|
100
|
-
mint: z.string().nullable().optional()
|
|
101
|
-
});
|
|
102
|
-
var PumpfunTokenInfoSchema = z.object({
|
|
103
|
-
is_complete: z.boolean().nullable().optional(),
|
|
104
|
-
name: z.string().nullable().optional(),
|
|
105
|
-
symbol: z.string().nullable().optional(),
|
|
106
|
-
uri: z.string().nullable().optional()
|
|
107
|
-
});
|
|
108
|
-
var PumpfunTokenReservesSchema = z.object({
|
|
109
|
-
current_price_sol: z.number().nullable().optional(),
|
|
110
|
-
market_cap_sol: z.number().nullable().optional(),
|
|
111
|
-
real_sol_reserves: z.number().nullable().optional(),
|
|
112
|
-
real_token_reserves: z.number().nullable().optional(),
|
|
113
|
-
token_total_supply: z.number().nullable().optional(),
|
|
114
|
-
virtual_sol_reserves: z.number().nullable().optional(),
|
|
115
|
-
virtual_token_reserves: z.number().nullable().optional()
|
|
116
|
-
});
|
|
117
|
-
var PumpfunTokenTradingSchema = z.object({
|
|
118
|
-
average_trade_size: z.number().nullable().optional(),
|
|
119
|
-
buy_count: z.number().nullable().optional(),
|
|
120
|
-
largest_trade: z.number().nullable().optional(),
|
|
121
|
-
last_trade_price: z.number().nullable().optional(),
|
|
122
|
-
last_trade_timestamp: z.number().nullable().optional(),
|
|
123
|
-
last_whale_address: z.string().nullable().optional(),
|
|
124
|
-
sell_count: z.number().nullable().optional(),
|
|
125
|
-
smallest_trade: z.number().nullable().optional(),
|
|
126
|
-
total_buy_exact_sol_volume: z.number().nullable().optional(),
|
|
127
|
-
total_buy_volume: z.number().nullable().optional(),
|
|
128
|
-
total_sell_volume: z.number().nullable().optional(),
|
|
129
|
-
total_trades: z.number().nullable().optional(),
|
|
130
|
-
total_volume: z.number().nullable().optional(),
|
|
131
|
-
unique_traders: z.number().nullable().optional(),
|
|
132
|
-
whale_trade_count: z.number().nullable().optional()
|
|
133
|
-
});
|
|
134
|
-
var PumpfunTokenSchema = z.object({
|
|
135
|
-
events: PumpfunTokenEventsSchema.optional(),
|
|
136
|
-
id: PumpfunTokenIdSchema.optional(),
|
|
137
|
-
info: PumpfunTokenInfoSchema.optional(),
|
|
138
|
-
reserves: PumpfunTokenReservesSchema.optional(),
|
|
139
|
-
trading: PumpfunTokenTradingSchema.optional(),
|
|
140
|
-
bonding_curve_snapshot: BondingCurveSchema.nullable().optional()
|
|
141
|
-
});
|
|
142
|
-
var PumpfunTokenCompletedSchema = z.object({
|
|
143
|
-
events: PumpfunTokenEventsSchema,
|
|
144
|
-
id: PumpfunTokenIdSchema,
|
|
145
|
-
info: PumpfunTokenInfoSchema,
|
|
146
|
-
reserves: PumpfunTokenReservesSchema,
|
|
147
|
-
trading: PumpfunTokenTradingSchema,
|
|
148
|
-
bonding_curve_snapshot: BondingCurveSchema
|
|
149
|
-
});
|
|
150
|
-
function stateView(view) {
|
|
151
|
-
return { mode: "state", view };
|
|
152
|
-
}
|
|
153
|
-
function listView(view) {
|
|
154
|
-
return { mode: "list", view };
|
|
155
|
-
}
|
|
156
|
-
var PUMPFUN_STREAM_STACK = {
|
|
157
|
-
name: "pumpfun-stream",
|
|
158
|
-
url: "wss://pumpfun.stack.usehyperstack.com",
|
|
159
|
-
views: {
|
|
160
|
-
PumpfunToken: {
|
|
161
|
-
state: stateView("PumpfunToken/state"),
|
|
162
|
-
list: listView("PumpfunToken/list")
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
schemas: {
|
|
166
|
-
BondingCurve: BondingCurveSchema,
|
|
167
|
-
Buy: BuySchema,
|
|
168
|
-
BuysEvent: BuysEventSchema,
|
|
169
|
-
BuysExactSolEvent: BuysExactSolEventSchema,
|
|
170
|
-
ConfigStatus: ConfigStatusSchema,
|
|
171
|
-
CreateEvent: CreateEventSchema,
|
|
172
|
-
Create: CreateSchema,
|
|
173
|
-
CreateV2Event: CreateV2EventSchema,
|
|
174
|
-
EventWrapper: EventWrapperSchema,
|
|
175
|
-
PumpfunTokenCompleted: PumpfunTokenCompletedSchema,
|
|
176
|
-
PumpfunTokenEvents: PumpfunTokenEventsSchema,
|
|
177
|
-
PumpfunTokenId: PumpfunTokenIdSchema,
|
|
178
|
-
PumpfunTokenInfo: PumpfunTokenInfoSchema,
|
|
179
|
-
PumpfunTokenReserves: PumpfunTokenReservesSchema,
|
|
180
|
-
PumpfunToken: PumpfunTokenSchema,
|
|
181
|
-
PumpfunTokenTrading: PumpfunTokenTradingSchema,
|
|
182
|
-
Sell: SellSchema,
|
|
183
|
-
SellsEvent: SellsEventSchema
|
|
184
|
-
},
|
|
185
|
-
pdas: {
|
|
186
|
-
pump: {
|
|
187
|
-
amm_global_config: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("global_config")),
|
|
188
|
-
associated_bonding_curve: pda("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", account("bonding_curve"), account("token_program"), account("mint")),
|
|
189
|
-
bonding_curve: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("bonding-curve"), account("mint")),
|
|
190
|
-
creator_vault: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("creator-vault"), account("bonding_curve.creator")),
|
|
191
|
-
event_authority: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("__event_authority")),
|
|
192
|
-
fee_config: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("fee_config"), bytes(new Uint8Array([1, 86, 224, 246, 147, 102, 90, 207, 68, 219, 21, 104, 191, 23, 91, 170, 81, 137, 203, 151, 245, 210, 255, 59, 101, 93, 43, 182, 253, 109, 24, 176]))),
|
|
193
|
-
global: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("global")),
|
|
194
|
-
global_incentive_token_account: pda("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", account("global_volume_accumulator"), account("token_program"), account("mint")),
|
|
195
|
-
global_params: pda("MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e", literal("global-params")),
|
|
196
|
-
global_volume_accumulator: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("global_volume_accumulator")),
|
|
197
|
-
lp_mint: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("pool_lp_mint"), account("pool")),
|
|
198
|
-
mayhem_state: pda("MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e", literal("mayhem-state"), account("mint")),
|
|
199
|
-
mayhem_token_vault: pda("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", account("sol_vault_authority"), account("token_program"), account("mint")),
|
|
200
|
-
metadata: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("metadata"), bytes(new Uint8Array([11, 112, 101, 177, 227, 209, 124, 69, 56, 157, 82, 127, 107, 4, 195, 205, 88, 184, 108, 115, 26, 160, 253, 181, 73, 182, 209, 188, 3, 248, 41, 70])), account("mint")),
|
|
201
|
-
mint_authority: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("mint-authority")),
|
|
202
|
-
pool: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("pool"), literal("\0\0"), account("pool_authority"), account("mint"), account("wsol_mint")),
|
|
203
|
-
pool_authority: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("pool-authority"), account("mint")),
|
|
204
|
-
pool_authority_mint_account: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", account("pool_authority"), account("mint"), account("mint")),
|
|
205
|
-
pool_authority_wsol_account: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", account("pool_authority"), account("token_program"), account("wsol_mint")),
|
|
206
|
-
pool_base_token_account: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", account("pool"), account("mint"), account("mint")),
|
|
207
|
-
pool_quote_token_account: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", account("pool"), account("token_program"), account("wsol_mint")),
|
|
208
|
-
program_signer: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"),
|
|
209
|
-
pump_amm_event_authority: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("__event_authority")),
|
|
210
|
-
sharing_config: pda("pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ", literal("sharing-config"), account("mint")),
|
|
211
|
-
sol_vault: pda("MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e", literal("sol-vault")),
|
|
212
|
-
sol_vault_authority: pda("MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e", literal("sol-vault")),
|
|
213
|
-
user_ata: pda("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", account("user"), account("token_program"), account("mint")),
|
|
214
|
-
user_pool_token_account: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", account("pool_authority"), account("token_2022_program"), account("lp_mint")),
|
|
215
|
-
user_volume_accumulator: pda("6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P", literal("user_volume_accumulator"), account("user"))
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
var pumpfun_default = PUMPFUN_STREAM_STACK;
|
|
220
|
-
export {
|
|
221
|
-
BondingCurveSchema,
|
|
222
|
-
BuySchema,
|
|
223
|
-
BuysEventSchema,
|
|
224
|
-
BuysExactSolEventSchema,
|
|
225
|
-
ConfigStatusSchema,
|
|
226
|
-
CreateEventSchema,
|
|
227
|
-
CreateSchema,
|
|
228
|
-
CreateV2EventSchema,
|
|
229
|
-
EventWrapperSchema,
|
|
230
|
-
PUMPFUN_STREAM_STACK,
|
|
231
|
-
PumpfunTokenCompletedSchema,
|
|
232
|
-
PumpfunTokenEventsSchema,
|
|
233
|
-
PumpfunTokenIdSchema,
|
|
234
|
-
PumpfunTokenInfoSchema,
|
|
235
|
-
PumpfunTokenReservesSchema,
|
|
236
|
-
PumpfunTokenSchema,
|
|
237
|
-
PumpfunTokenTradingSchema,
|
|
238
|
-
SellSchema,
|
|
239
|
-
SellsEventSchema,
|
|
240
|
-
pumpfun_default as default
|
|
241
|
-
};
|