helius-mcp 1.2.0 → 2.0.0

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +42 -30
  3. package/dist/http.d.ts +1 -1
  4. package/dist/index.js +2 -56
  5. package/dist/results/store.d.ts +8 -0
  6. package/dist/results/store.js +72 -0
  7. package/dist/results/types.d.ts +47 -0
  8. package/dist/results/types.js +1 -0
  9. package/dist/router/action-groups.d.ts +6 -0
  10. package/dist/router/action-groups.js +32 -0
  11. package/dist/router/action-handlers.d.ts +20 -0
  12. package/dist/router/action-handlers.js +125 -0
  13. package/dist/router/actions.d.ts +12 -0
  14. package/dist/router/actions.js +123 -0
  15. package/dist/router/catalog.d.ts +6 -0
  16. package/dist/router/catalog.js +388 -0
  17. package/dist/router/context.d.ts +5 -0
  18. package/dist/router/context.js +10 -0
  19. package/dist/router/dispatch.d.ts +4 -0
  20. package/dist/router/dispatch.js +276 -0
  21. package/dist/router/instructions.d.ts +1 -0
  22. package/dist/router/instructions.js +25 -0
  23. package/dist/router/register.d.ts +2 -0
  24. package/dist/router/register.js +15 -0
  25. package/dist/router/required-params.d.ts +9 -0
  26. package/dist/router/required-params.js +66 -0
  27. package/dist/router/responses.d.ts +29 -0
  28. package/dist/router/responses.js +186 -0
  29. package/dist/router/schemas.d.ts +216 -0
  30. package/dist/router/schemas.js +195 -0
  31. package/dist/router/telemetry.d.ts +27 -0
  32. package/dist/router/telemetry.js +52 -0
  33. package/dist/router/types.d.ts +46 -0
  34. package/dist/router/types.js +1 -0
  35. package/dist/scripts/validate-catalog.d.ts +2 -2
  36. package/dist/scripts/validate-catalog.js +10 -10
  37. package/dist/tools/accounts.js +5 -5
  38. package/dist/tools/assets.js +5 -5
  39. package/dist/tools/auth.js +392 -288
  40. package/dist/tools/config.js +3 -3
  41. package/dist/tools/das-extras.js +6 -6
  42. package/dist/tools/docs.js +55 -41
  43. package/dist/tools/enhanced-websockets.js +13 -13
  44. package/dist/tools/fees.js +3 -3
  45. package/dist/tools/index.d.ts +1 -1
  46. package/dist/tools/index.js +2 -80
  47. package/dist/tools/laserstream.js +20 -23
  48. package/dist/tools/network.js +41 -2
  49. package/dist/tools/plans.d.ts +0 -5
  50. package/dist/tools/plans.js +167 -12
  51. package/dist/tools/product-catalog.d.ts +1 -0
  52. package/dist/tools/product-catalog.js +51 -16
  53. package/dist/tools/recommend.d.ts +0 -1
  54. package/dist/tools/recommend.js +9 -28
  55. package/dist/tools/shared.d.ts +1 -0
  56. package/dist/tools/shared.js +10 -2
  57. package/dist/tools/solana-knowledge.js +23 -7
  58. package/dist/tools/staking.d.ts +2 -0
  59. package/dist/tools/staking.js +268 -0
  60. package/dist/tools/transactions.js +167 -3
  61. package/dist/tools/transfers.js +38 -43
  62. package/dist/tools/wallet.js +27 -16
  63. package/dist/tools/webhooks.js +3 -3
  64. package/dist/tools/zk-compression.d.ts +2 -0
  65. package/dist/tools/zk-compression.js +781 -0
  66. package/dist/utils/config.d.ts +2 -2
  67. package/dist/utils/config.js +68 -6
  68. package/dist/utils/errors.d.ts +10 -1
  69. package/dist/utils/errors.js +46 -12
  70. package/dist/utils/feedback.js +1 -4
  71. package/dist/utils/helius.js +2 -1
  72. package/dist/utils/ows.d.ts +74 -0
  73. package/dist/utils/ows.js +155 -0
  74. package/dist/version.d.ts +1 -1
  75. package/dist/version.js +1 -1
  76. package/package.json +2 -2
  77. package/system-prompts/helius/claude.system.md +56 -25
  78. package/system-prompts/helius/full.md +474 -130
  79. package/system-prompts/helius/openai.developer.md +56 -25
  80. package/system-prompts/helius-dflow/claude.system.md +41 -6
  81. package/system-prompts/helius-dflow/full.md +581 -92
  82. package/system-prompts/helius-dflow/openai.developer.md +41 -6
  83. package/system-prompts/helius-jupiter/claude.system.md +333 -0
  84. package/system-prompts/helius-jupiter/full.md +5109 -0
  85. package/system-prompts/helius-jupiter/openai.developer.md +333 -0
  86. package/system-prompts/helius-okx/claude.system.md +182 -0
  87. package/system-prompts/helius-okx/full.md +584 -0
  88. package/system-prompts/helius-okx/openai.developer.md +182 -0
  89. package/system-prompts/helius-phantom/claude.system.md +15 -2
  90. package/system-prompts/helius-phantom/full.md +254 -101
  91. package/system-prompts/helius-phantom/openai.developer.md +15 -2
  92. package/system-prompts/svm/claude.system.md +1 -0
  93. package/system-prompts/svm/full.md +1 -0
  94. package/system-prompts/svm/openai.developer.md +1 -0
@@ -0,0 +1,123 @@
1
+ export const HELIUS_ACCOUNT_ACTIONS = [
2
+ 'getStarted',
3
+ 'setHeliusApiKey',
4
+ 'generateKeypair',
5
+ 'signup',
6
+ 'getAccountStatus',
7
+ 'getAccountPlan',
8
+ 'getHeliusPlanInfo',
9
+ 'compareHeliusPlans',
10
+ 'previewUpgrade',
11
+ 'upgradePlan',
12
+ 'payRenewal',
13
+ 'purchaseCredits',
14
+ ];
15
+ export const HELIUS_WALLET_ACTIONS = [
16
+ 'getBalance',
17
+ 'getTokenBalances',
18
+ 'getWalletBalances',
19
+ 'getWalletHistory',
20
+ 'getWalletTransfers',
21
+ 'getWalletIdentity',
22
+ 'batchWalletIdentity',
23
+ 'getWalletFundedBy',
24
+ ];
25
+ export const HELIUS_ASSET_ACTIONS = [
26
+ 'getAsset',
27
+ 'getAssetsByOwner',
28
+ 'searchAssets',
29
+ 'getAssetsByGroup',
30
+ 'getAssetProof',
31
+ 'getAssetProofBatch',
32
+ 'getSignaturesForAsset',
33
+ 'getNftEditions',
34
+ 'getTokenHolders',
35
+ ];
36
+ export const HELIUS_TRANSACTION_ACTIONS = [
37
+ 'parseTransactions',
38
+ 'getTransactionHistory',
39
+ 'getTransfersByAddress',
40
+ ];
41
+ export const HELIUS_CHAIN_ACTIONS = [
42
+ 'getAccountInfo',
43
+ 'getTokenAccounts',
44
+ 'getProgramAccounts',
45
+ 'getBlock',
46
+ 'getNetworkStatus',
47
+ 'getPriorityFeeEstimate',
48
+ 'getStakeAccounts',
49
+ 'getWithdrawableAmount',
50
+ ];
51
+ export const HELIUS_STREAMING_ACTIONS = [
52
+ 'createWebhook',
53
+ 'getAllWebhooks',
54
+ 'getWebhookByID',
55
+ 'updateWebhook',
56
+ 'deleteWebhook',
57
+ 'transactionSubscribe',
58
+ 'accountSubscribe',
59
+ 'laserstreamSubscribe',
60
+ ];
61
+ export const HELIUS_KNOWLEDGE_ACTIONS = [
62
+ 'lookupHeliusDocs',
63
+ 'listHeliusDocTopics',
64
+ 'getHeliusCreditsInfo',
65
+ 'getRateLimitInfo',
66
+ 'troubleshootError',
67
+ 'recommendStack',
68
+ 'getSIMD',
69
+ 'listSIMDs',
70
+ 'searchSolanaDocs',
71
+ 'readSolanaSourceFile',
72
+ 'fetchHeliusBlog',
73
+ 'getPumpFunGuide',
74
+ 'getSenderInfo',
75
+ 'getWebhookGuide',
76
+ 'getLatencyComparison',
77
+ 'getEnhancedWebSocketInfo',
78
+ 'getLaserstreamInfo',
79
+ ];
80
+ export const HELIUS_WRITE_ACTIONS = [
81
+ 'transferSol',
82
+ 'transferToken',
83
+ 'stakeSOL',
84
+ 'unstakeSOL',
85
+ 'withdrawStake',
86
+ ];
87
+ export const HELIUS_COMPRESSION_ACTIONS = [
88
+ 'getCompressedAccount',
89
+ 'getCompressedAccountsByOwner',
90
+ 'getMultipleCompressedAccounts',
91
+ 'getCompressedBalance',
92
+ 'getCompressedBalanceByOwner',
93
+ 'getCompressedMintTokenHolders',
94
+ 'getCompressedTokenAccountBalance',
95
+ 'getCompressedTokenAccountsByOwner',
96
+ 'getCompressedTokenAccountsByDelegate',
97
+ 'getCompressedTokenBalancesByOwnerV2',
98
+ 'getCompressedAccountProof',
99
+ 'getMultipleCompressedAccountProofs',
100
+ 'getMultipleNewAddressProofs',
101
+ 'getCompressionSignaturesForAccount',
102
+ 'getCompressionSignaturesForAddress',
103
+ 'getCompressionSignaturesForOwner',
104
+ 'getCompressionSignaturesForTokenOwner',
105
+ 'getLatestCompressionSignatures',
106
+ 'getLatestNonVotingSignatures',
107
+ 'getTransactionWithCompressionInfo',
108
+ 'getValidityProof',
109
+ 'getIndexerHealth',
110
+ 'getIndexerSlot',
111
+ ];
112
+ export const ACTION_NAMES = [
113
+ ...HELIUS_ACCOUNT_ACTIONS,
114
+ ...HELIUS_WALLET_ACTIONS,
115
+ ...HELIUS_ASSET_ACTIONS,
116
+ ...HELIUS_TRANSACTION_ACTIONS,
117
+ ...HELIUS_CHAIN_ACTIONS,
118
+ ...HELIUS_STREAMING_ACTIONS,
119
+ ...HELIUS_KNOWLEDGE_ACTIONS,
120
+ ...HELIUS_WRITE_ACTIONS,
121
+ ...HELIUS_COMPRESSION_ACTIONS,
122
+ ];
123
+ export const ACTION_NAME_SET = new Set(ACTION_NAMES);
@@ -0,0 +1,6 @@
1
+ import { type ActionName } from './actions.js';
2
+ import { type RoutedPublicToolName } from './action-groups.js';
3
+ import type { ActionCatalogEntry } from './types.js';
4
+ export declare const ACTION_CATALOG: Record<ActionName, ActionCatalogEntry>;
5
+ export declare function getActionCatalogEntry(action: ActionName): ActionCatalogEntry;
6
+ export declare function getActionsForTool(tool: RoutedPublicToolName): ActionName[];
@@ -0,0 +1,388 @@
1
+ import { HELIUS_ACCOUNT_ACTIONS, HELIUS_ASSET_ACTIONS, HELIUS_CHAIN_ACTIONS, HELIUS_COMPRESSION_ACTIONS, HELIUS_KNOWLEDGE_ACTIONS, HELIUS_STREAMING_ACTIONS, HELIUS_TRANSACTION_ACTIONS, HELIUS_WALLET_ACTIONS, HELIUS_WRITE_ACTIONS, ACTION_NAMES, } from './actions.js';
2
+ import { findPublicToolForAction } from './action-groups.js';
3
+ const always = { kind: 'always' };
4
+ function gate(minimumPlan, label, variants) {
5
+ return {
6
+ baseline: {
7
+ id: `${minimumPlan}:${label}`,
8
+ minimumPlan,
9
+ predicate: always,
10
+ label,
11
+ },
12
+ ...(variants ? { variants } : {}),
13
+ };
14
+ }
15
+ function makeEntry(action, overrides = {}) {
16
+ const publicTool = overrides.publicTool ?? findPublicToolForAction(action);
17
+ const responseFamily = overrides.responseFamily ?? 'record';
18
+ const defaultDetail = overrides.defaultDetail ?? (responseFamily === 'scalar' || responseFamily === 'mutationReceipt'
19
+ ? 'full'
20
+ : responseFamily === 'document' || responseFamily === 'streamingConfig' || responseFamily === 'catalog'
21
+ ? 'summary'
22
+ : 'standard');
23
+ return {
24
+ action,
25
+ publicTool,
26
+ aliases: overrides.aliases ?? [],
27
+ authRequirement: overrides.authRequirement ?? 'apiKey',
28
+ capabilityGate: overrides.capabilityGate ?? gate('agent', 'Available on every plan'),
29
+ mutability: overrides.mutability ?? (publicTool === 'heliusWrite' ? 'write' : 'read'),
30
+ responseFamily,
31
+ defaultDetail,
32
+ handleEligibility: overrides.handleEligibility ?? !['scalar', 'mutationReceipt'].includes(responseFamily),
33
+ normalizer: overrides.normalizer ?? responseFamily,
34
+ continuationModel: overrides.continuationModel ?? 'none',
35
+ };
36
+ }
37
+ function addEntries(target, actions, overrides = {}) {
38
+ for (const action of actions) {
39
+ target[action] = makeEntry(action, overrides);
40
+ }
41
+ }
42
+ const catalog = {};
43
+ addEntries(catalog, HELIUS_ACCOUNT_ACTIONS, {
44
+ authRequirement: 'none',
45
+ capabilityGate: gate('agent', 'Account setup and plan metadata'),
46
+ responseFamily: 'record',
47
+ });
48
+ addEntries(catalog, HELIUS_WALLET_ACTIONS, {
49
+ capabilityGate: gate('agent', 'Wallet data'),
50
+ responseFamily: 'record',
51
+ });
52
+ addEntries(catalog, HELIUS_ASSET_ACTIONS, {
53
+ capabilityGate: gate('agent', 'Asset and DAS queries'),
54
+ responseFamily: 'record',
55
+ });
56
+ addEntries(catalog, HELIUS_TRANSACTION_ACTIONS, {
57
+ capabilityGate: gate('agent', 'Transaction parsing and history'),
58
+ responseFamily: 'history',
59
+ });
60
+ addEntries(catalog, HELIUS_CHAIN_ACTIONS, {
61
+ capabilityGate: gate('agent', 'Core chain state'),
62
+ responseFamily: 'record',
63
+ });
64
+ addEntries(catalog, HELIUS_STREAMING_ACTIONS, {
65
+ capabilityGate: gate('agent', 'Streaming and webhook operations'),
66
+ responseFamily: 'record',
67
+ });
68
+ addEntries(catalog, HELIUS_KNOWLEDGE_ACTIONS, {
69
+ authRequirement: 'none',
70
+ capabilityGate: gate('agent', 'Documentation and knowledge'),
71
+ responseFamily: 'document',
72
+ });
73
+ addEntries(catalog, HELIUS_WRITE_ACTIONS, {
74
+ authRequirement: 'signer',
75
+ capabilityGate: gate('agent', 'Transaction sending and staking'),
76
+ mutability: 'write',
77
+ responseFamily: 'mutationReceipt',
78
+ });
79
+ addEntries(catalog, HELIUS_COMPRESSION_ACTIONS, {
80
+ capabilityGate: gate('agent', 'Compression state queries'),
81
+ responseFamily: 'record',
82
+ });
83
+ const developerWalletGate = gate('developer', 'Developer plan or higher');
84
+ const businessStreamingGate = gate('business', 'Business plan or higher');
85
+ const professionalLaserstreamGate = gate('developer', 'Developer plan on devnet', [
86
+ {
87
+ id: 'professional:laserstream-mainnet',
88
+ minimumPlan: 'professional',
89
+ predicate: { kind: 'network', oneOf: ['mainnet-beta'] },
90
+ label: 'Professional plan on mainnet',
91
+ },
92
+ ]);
93
+ const scalarActions = [
94
+ 'getBalance',
95
+ 'getAccountPlan',
96
+ 'getNetworkStatus',
97
+ 'getPriorityFeeEstimate',
98
+ 'getCompressedBalance',
99
+ 'getCompressedBalanceByOwner',
100
+ 'getCompressedTokenAccountBalance',
101
+ 'getIndexerHealth',
102
+ 'getIndexerSlot',
103
+ 'getWithdrawableAmount',
104
+ ];
105
+ for (const action of scalarActions) {
106
+ catalog[action] = makeEntry(action, {
107
+ ...catalog[action],
108
+ responseFamily: 'scalar',
109
+ defaultDetail: 'full',
110
+ handleEligibility: false,
111
+ });
112
+ }
113
+ const mutationActions = [
114
+ 'createWebhook',
115
+ 'updateWebhook',
116
+ 'deleteWebhook',
117
+ 'transferSol',
118
+ 'transferToken',
119
+ 'stakeSOL',
120
+ 'unstakeSOL',
121
+ 'withdrawStake',
122
+ ];
123
+ for (const action of mutationActions) {
124
+ catalog[action] = makeEntry(action, {
125
+ ...catalog[action],
126
+ responseFamily: 'mutationReceipt',
127
+ defaultDetail: 'full',
128
+ handleEligibility: false,
129
+ });
130
+ }
131
+ const listActions = [
132
+ 'getTokenBalances',
133
+ 'getWalletBalances',
134
+ 'getWalletHistory',
135
+ 'getWalletTransfers',
136
+ 'batchWalletIdentity',
137
+ 'getAssetsByOwner',
138
+ 'searchAssets',
139
+ 'getAssetsByGroup',
140
+ 'getNftEditions',
141
+ 'getTokenHolders',
142
+ 'getTokenAccounts',
143
+ 'getProgramAccounts',
144
+ 'getStakeAccounts',
145
+ 'getAllWebhooks',
146
+ 'listHeliusDocTopics',
147
+ 'listSIMDs',
148
+ 'getCompressedAccountsByOwner',
149
+ 'getMultipleCompressedAccounts',
150
+ 'getCompressedMintTokenHolders',
151
+ 'getCompressedTokenAccountsByOwner',
152
+ 'getCompressedTokenAccountsByDelegate',
153
+ 'getCompressedTokenBalancesByOwnerV2',
154
+ ];
155
+ for (const action of listActions) {
156
+ catalog[action] = makeEntry(action, {
157
+ ...catalog[action],
158
+ responseFamily: 'list',
159
+ defaultDetail: 'standard',
160
+ });
161
+ }
162
+ const historyActions = [
163
+ 'parseTransactions',
164
+ 'getTransactionHistory',
165
+ 'getSignaturesForAsset',
166
+ 'getCompressionSignaturesForAccount',
167
+ 'getCompressionSignaturesForAddress',
168
+ 'getCompressionSignaturesForOwner',
169
+ 'getCompressionSignaturesForTokenOwner',
170
+ 'getLatestCompressionSignatures',
171
+ 'getLatestNonVotingSignatures',
172
+ ];
173
+ for (const action of historyActions) {
174
+ catalog[action] = makeEntry(action, {
175
+ ...catalog[action],
176
+ responseFamily: 'history',
177
+ defaultDetail: 'standard',
178
+ });
179
+ }
180
+ const documentActions = [
181
+ 'lookupHeliusDocs',
182
+ 'getHeliusCreditsInfo',
183
+ 'getRateLimitInfo',
184
+ 'getSIMD',
185
+ 'searchSolanaDocs',
186
+ 'readSolanaSourceFile',
187
+ 'fetchHeliusBlog',
188
+ 'getSenderInfo',
189
+ 'getWebhookGuide',
190
+ 'getLatencyComparison',
191
+ 'getEnhancedWebSocketInfo',
192
+ 'getLaserstreamInfo',
193
+ 'getPumpFunGuide',
194
+ ];
195
+ for (const action of documentActions) {
196
+ catalog[action] = makeEntry(action, {
197
+ ...catalog[action],
198
+ responseFamily: 'document',
199
+ defaultDetail: 'summary',
200
+ });
201
+ }
202
+ catalog.recommendStack = makeEntry('recommendStack', {
203
+ responseFamily: 'catalog',
204
+ defaultDetail: 'summary',
205
+ });
206
+ for (const action of ['transactionSubscribe', 'accountSubscribe', 'laserstreamSubscribe']) {
207
+ catalog[action] = makeEntry(action, {
208
+ ...catalog[action],
209
+ responseFamily: 'streamingConfig',
210
+ defaultDetail: 'summary',
211
+ });
212
+ }
213
+ catalog.setHeliusApiKey = makeEntry('setHeliusApiKey', {
214
+ authRequirement: 'none',
215
+ capabilityGate: gate('agent', 'API key configuration'),
216
+ responseFamily: 'record',
217
+ defaultDetail: 'standard',
218
+ handleEligibility: false,
219
+ });
220
+ catalog.generateKeypair = makeEntry('generateKeypair', {
221
+ authRequirement: 'none',
222
+ capabilityGate: gate('agent', 'Local keypair generation'),
223
+ responseFamily: 'record',
224
+ defaultDetail: 'standard',
225
+ handleEligibility: false,
226
+ });
227
+ catalog.getStarted = makeEntry('getStarted', {
228
+ authRequirement: 'none',
229
+ capabilityGate: gate('agent', 'Setup instructions'),
230
+ responseFamily: 'record',
231
+ defaultDetail: 'standard',
232
+ handleEligibility: false,
233
+ });
234
+ catalog.signup = makeEntry('signup', {
235
+ authRequirement: 'signer',
236
+ capabilityGate: gate('agent', 'Signup flow'),
237
+ responseFamily: 'record',
238
+ defaultDetail: 'standard',
239
+ handleEligibility: false,
240
+ });
241
+ catalog.purchaseCredits = makeEntry('purchaseCredits', {
242
+ authRequirement: 'jwt',
243
+ capabilityGate: gate('agent', 'Prepaid credits top-up'),
244
+ responseFamily: 'record',
245
+ defaultDetail: 'standard',
246
+ handleEligibility: false,
247
+ });
248
+ catalog.getAccountStatus = makeEntry('getAccountStatus', {
249
+ authRequirement: 'jwt',
250
+ capabilityGate: gate('agent', 'Authenticated account status'),
251
+ responseFamily: 'record',
252
+ });
253
+ catalog.previewUpgrade = makeEntry('previewUpgrade', {
254
+ authRequirement: 'jwt',
255
+ capabilityGate: gate('agent', 'Upgrade preview'),
256
+ responseFamily: 'record',
257
+ handleEligibility: false,
258
+ });
259
+ catalog.upgradePlan = makeEntry('upgradePlan', {
260
+ authRequirement: 'jwtAndSigner',
261
+ capabilityGate: gate('agent', 'Upgrade checkout'),
262
+ mutability: 'write',
263
+ responseFamily: 'mutationReceipt',
264
+ handleEligibility: false,
265
+ });
266
+ catalog.payRenewal = makeEntry('payRenewal', {
267
+ authRequirement: 'jwtAndSigner',
268
+ capabilityGate: gate('agent', 'Renewal checkout'),
269
+ mutability: 'write',
270
+ responseFamily: 'mutationReceipt',
271
+ handleEligibility: false,
272
+ });
273
+ catalog.compareHeliusPlans = makeEntry('compareHeliusPlans', {
274
+ authRequirement: 'none',
275
+ capabilityGate: gate('agent', 'Plan comparison'),
276
+ responseFamily: 'catalog',
277
+ defaultDetail: 'summary',
278
+ });
279
+ catalog.getHeliusPlanInfo = makeEntry('getHeliusPlanInfo', {
280
+ authRequirement: 'none',
281
+ capabilityGate: gate('agent', 'Plan details'),
282
+ responseFamily: 'catalog',
283
+ defaultDetail: 'summary',
284
+ });
285
+ catalog.getWalletBalances = makeEntry('getWalletBalances', {
286
+ capabilityGate: developerWalletGate,
287
+ responseFamily: 'list',
288
+ defaultDetail: 'standard',
289
+ });
290
+ catalog.getWalletHistory = makeEntry('getWalletHistory', {
291
+ capabilityGate: developerWalletGate,
292
+ responseFamily: 'history',
293
+ defaultDetail: 'standard',
294
+ });
295
+ catalog.getWalletTransfers = makeEntry('getWalletTransfers', {
296
+ capabilityGate: developerWalletGate,
297
+ responseFamily: 'history',
298
+ defaultDetail: 'standard',
299
+ });
300
+ catalog.getWalletIdentity = makeEntry('getWalletIdentity', {
301
+ capabilityGate: developerWalletGate,
302
+ responseFamily: 'record',
303
+ defaultDetail: 'standard',
304
+ handleEligibility: false,
305
+ });
306
+ catalog.batchWalletIdentity = makeEntry('batchWalletIdentity', {
307
+ capabilityGate: developerWalletGate,
308
+ responseFamily: 'list',
309
+ defaultDetail: 'standard',
310
+ });
311
+ catalog.getWalletFundedBy = makeEntry('getWalletFundedBy', {
312
+ capabilityGate: developerWalletGate,
313
+ responseFamily: 'record',
314
+ defaultDetail: 'standard',
315
+ handleEligibility: false,
316
+ });
317
+ catalog.transactionSubscribe = makeEntry('transactionSubscribe', {
318
+ capabilityGate: businessStreamingGate,
319
+ responseFamily: 'streamingConfig',
320
+ defaultDetail: 'summary',
321
+ });
322
+ catalog.accountSubscribe = makeEntry('accountSubscribe', {
323
+ capabilityGate: businessStreamingGate,
324
+ responseFamily: 'streamingConfig',
325
+ defaultDetail: 'summary',
326
+ });
327
+ catalog.laserstreamSubscribe = makeEntry('laserstreamSubscribe', {
328
+ capabilityGate: professionalLaserstreamGate,
329
+ responseFamily: 'streamingConfig',
330
+ defaultDetail: 'summary',
331
+ });
332
+ catalog.getEnhancedWebSocketInfo = makeEntry('getEnhancedWebSocketInfo', {
333
+ authRequirement: 'none',
334
+ capabilityGate: gate('agent', 'Enhanced WebSocket info', [
335
+ {
336
+ id: 'business:enhanced-websockets',
337
+ minimumPlan: 'business',
338
+ predicate: always,
339
+ label: 'Enhanced WebSockets require Business plan or higher',
340
+ },
341
+ ]),
342
+ responseFamily: 'document',
343
+ defaultDetail: 'summary',
344
+ });
345
+ catalog.getLaserstreamInfo = makeEntry('getLaserstreamInfo', {
346
+ authRequirement: 'none',
347
+ capabilityGate: gate('agent', 'Laserstream info', [
348
+ {
349
+ id: 'developer:laserstream-devnet',
350
+ minimumPlan: 'developer',
351
+ predicate: { kind: 'network', oneOf: ['devnet'] },
352
+ label: 'Laserstream on devnet requires Developer plan or higher',
353
+ },
354
+ {
355
+ id: 'professional:laserstream-mainnet-info',
356
+ minimumPlan: 'professional',
357
+ predicate: { kind: 'network', oneOf: ['mainnet-beta'] },
358
+ label: 'Laserstream on mainnet requires Professional plan',
359
+ },
360
+ ]),
361
+ responseFamily: 'document',
362
+ defaultDetail: 'summary',
363
+ });
364
+ catalog.getTransactionHistory = makeEntry('getTransactionHistory', {
365
+ responseFamily: 'history',
366
+ defaultDetail: 'standard',
367
+ continuationModel: 'transactionHistory',
368
+ });
369
+ catalog.getTransfersByAddress = makeEntry('getTransfersByAddress', {
370
+ responseFamily: 'history',
371
+ defaultDetail: 'standard',
372
+ continuationModel: 'transactionHistory',
373
+ });
374
+ for (const action of ACTION_NAMES) {
375
+ if (!catalog[action]) {
376
+ throw new Error(`Missing action catalog entry for ${action}`);
377
+ }
378
+ }
379
+ export const ACTION_CATALOG = catalog;
380
+ export function getActionCatalogEntry(action) {
381
+ return ACTION_CATALOG[action];
382
+ }
383
+ export function getActionsForTool(tool) {
384
+ return (Object.values(ACTION_CATALOG)
385
+ .filter((entry) => entry.publicTool === tool)
386
+ .map((entry) => entry.action)
387
+ .sort());
388
+ }
@@ -0,0 +1,5 @@
1
+ export type RouterContext = {
2
+ sessionKey: string;
3
+ network: 'mainnet-beta' | 'devnet';
4
+ };
5
+ export declare function getRouterContext(): RouterContext;
@@ -0,0 +1,10 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { getNetwork } from '../utils/helius.js';
3
+ const SESSION_KEY = randomUUID();
4
+ export function getRouterContext() {
5
+ const network = getNetwork();
6
+ return {
7
+ sessionKey: SESSION_KEY,
8
+ network: network === 'devnet' ? 'devnet' : 'mainnet-beta',
9
+ };
10
+ }
@@ -0,0 +1,4 @@
1
+ import type { RoutedPublicToolName } from './action-groups.js';
2
+ import { type RouterResponse } from './responses.js';
3
+ export declare function dispatchRoutedTool(publicTool: RoutedPublicToolName, params: Record<string, unknown>, extra: unknown): Promise<RouterResponse>;
4
+ export declare function expandStoredResult(params: Record<string, unknown>, extra: unknown): Promise<RouterResponse>;