@solana/kora 0.2.0-beta.1 → 0.2.0-beta.3

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.
@@ -2,116 +2,110 @@ import { Instruction } from '@solana/kit';
2
2
  /**
3
3
  * Request Types
4
4
  */
5
- /**
6
- * Parameters for creating a transfer transaction.
7
- * @deprecated Use `getPaymentInstruction` instead for fee payment flows.
8
- */
9
- export interface TransferTransactionRequest {
10
- /** Amount to transfer in the token's smallest unit (e.g., lamports for SOL) */
11
- amount: number;
12
- /** Mint address of the token to transfer */
13
- token: string;
14
- /** Public key of the source wallet (not token account) */
15
- source: string;
16
- /** Public key of the destination wallet (not token account) */
17
- destination: string;
18
- /** Optional signer key to select a specific Kora signer */
19
- signer_key?: string;
20
- }
21
5
  /**
22
6
  * Parameters for signing a transaction.
23
7
  */
24
8
  export interface SignTransactionRequest {
25
- /** Base64-encoded transaction to sign */
26
- transaction: string;
27
- /** Optional signer address for the transaction */
28
- signer_key?: string;
29
9
  /** Optional signer verification during transaction simulation (defaults to false) */
30
10
  sig_verify?: boolean;
11
+ /** Optional signer address for the transaction */
12
+ signer_key?: string;
13
+ /** Base64-encoded transaction to sign */
14
+ transaction: string;
15
+ /** Optional user ID for usage tracking (required when pricing is free and usage tracking is enabled) */
16
+ user_id?: string;
31
17
  }
32
18
  /**
33
19
  * Parameters for signing and sending a transaction.
34
20
  */
35
21
  export interface SignAndSendTransactionRequest {
36
- /** Base64-encoded transaction to sign and send */
37
- transaction: string;
38
- /** Optional signer address for the transaction */
39
- signer_key?: string;
40
22
  /** Optional signer verification during transaction simulation (defaults to false) */
41
23
  sig_verify?: boolean;
24
+ /** Optional signer address for the transaction */
25
+ signer_key?: string;
26
+ /** Base64-encoded transaction to sign and send */
27
+ transaction: string;
28
+ /** Optional user ID for usage tracking (required when pricing is free and usage tracking is enabled) */
29
+ user_id?: string;
42
30
  }
43
31
  /**
44
32
  * Parameters for signing a bundle of transactions.
45
33
  */
46
34
  export interface SignBundleRequest {
47
- /** Array of base64-encoded transactions to sign */
48
- transactions: string[];
49
- /** Optional signer address for the transactions */
50
- signer_key?: string;
51
35
  /** Optional signer verification during transaction simulation (defaults to false) */
52
36
  sig_verify?: boolean;
37
+ /** Optional indices of transactions to sign (defaults to all if not specified) */
38
+ sign_only_indices?: number[];
39
+ /** Optional signer address for the transactions */
40
+ signer_key?: string;
41
+ /** Array of base64-encoded transactions to sign */
42
+ transactions: string[];
43
+ /** Optional user ID for usage tracking (required when pricing is free and usage tracking is enabled) */
44
+ user_id?: string;
53
45
  }
54
46
  /**
55
47
  * Parameters for signing and sending a bundle of transactions via Jito.
56
48
  */
57
49
  export interface SignAndSendBundleRequest {
58
- /** Array of base64-encoded transactions to sign and send */
59
- transactions: string[];
60
- /** Optional signer address for the transactions */
61
- signer_key?: string;
62
50
  /** Optional signer verification during transaction simulation (defaults to false) */
63
51
  sig_verify?: boolean;
52
+ /** Optional indices of transactions to sign (defaults to all if not specified) */
53
+ sign_only_indices?: number[];
54
+ /** Optional signer address for the transactions */
55
+ signer_key?: string;
56
+ /** Array of base64-encoded transactions to sign and send */
57
+ transactions: string[];
58
+ /** Optional user ID for usage tracking (required when pricing is free and usage tracking is enabled) */
59
+ user_id?: string;
64
60
  }
65
61
  /**
66
62
  * Parameters for estimating transaction fees.
67
63
  */
68
64
  export interface EstimateTransactionFeeRequest {
69
- /** Base64-encoded transaction to estimate fees for */
70
- transaction: string;
71
65
  /** Mint address of the token to calculate fees in */
72
- fee_token: string;
66
+ fee_token?: string;
67
+ /** Optional signer verification during transaction simulation (defaults to false) */
68
+ sig_verify?: boolean;
73
69
  /** Optional signer address for the transaction */
74
70
  signer_key?: string;
71
+ /** Base64-encoded transaction to estimate fees for */
72
+ transaction: string;
73
+ }
74
+ /**
75
+ * Parameters for estimating bundle fees.
76
+ */
77
+ export interface EstimateBundleFeeRequest {
78
+ /** Mint address of the token to calculate fees in */
79
+ fee_token?: string;
75
80
  /** Optional signer verification during transaction simulation (defaults to false) */
76
81
  sig_verify?: boolean;
82
+ /** Optional indices of transactions to estimate fees for (defaults to all if not specified) */
83
+ sign_only_indices?: number[];
84
+ /** Optional signer address for the transactions */
85
+ signer_key?: string;
86
+ /** Array of base64-encoded transactions to estimate fees for */
87
+ transactions: string[];
77
88
  }
78
89
  /**
79
90
  * Parameters for getting a payment instruction.
80
91
  */
81
92
  export interface GetPaymentInstructionRequest {
82
- /** Base64-encoded transaction to estimate fees for */
83
- transaction: string;
84
93
  /** Mint address of the token to calculate fees in */
85
94
  fee_token: string;
95
+ /** Optional signer verification during transaction simulation (defaults to false) */
96
+ sig_verify?: boolean;
97
+ /** Optional signer address for the transaction */
98
+ signer_key?: string;
86
99
  /** The wallet owner (not token account) that will be making the token payment */
87
100
  source_wallet: string;
88
101
  /** The token program id to use for the payment (defaults to TOKEN_PROGRAM_ID) */
89
102
  token_program_id?: string;
90
- /** Optional signer address for the transaction */
91
- signer_key?: string;
92
- /** Optional signer verification during transaction simulation (defaults to false) */
93
- sig_verify?: boolean;
103
+ /** Base64-encoded transaction to estimate fees for */
104
+ transaction: string;
94
105
  }
95
106
  /**
96
107
  * Response Types
97
108
  */
98
- /**
99
- * Response from creating a transfer transaction.
100
- * The transaction is unsigned.
101
- * @deprecated Use `getPaymentInstruction` instead for fee payment flows.
102
- */
103
- export interface TransferTransactionResponse {
104
- /** Base64-encoded unsigned transaction */
105
- transaction: string;
106
- /** Base64-encoded unsigned message */
107
- message: string;
108
- /** Recent blockhash used in the transaction */
109
- blockhash: string;
110
- /** Public key of the Kora signer (fee payer) */
111
- signer_pubkey: string;
112
- /** Parsed instructions from the transaction message */
113
- instructions: Instruction[];
114
- }
115
109
  /**
116
110
  * Response from signing a transaction.
117
111
  */
@@ -145,12 +139,12 @@ export interface SignBundleResponse {
145
139
  * Response from signing and sending a bundle of transactions via Jito.
146
140
  */
147
141
  export interface SignAndSendBundleResponse {
142
+ /** UUID of the submitted Jito bundle */
143
+ bundle_uuid: string;
148
144
  /** Array of base64-encoded signed transactions */
149
145
  signed_transactions: string[];
150
146
  /** Public key of the signer used to sign the transactions */
151
147
  signer_pubkey: string;
152
- /** UUID of the submitted Jito bundle */
153
- bundle_uuid: string;
154
148
  }
155
149
  /**
156
150
  * Response containing the latest blockhash.
@@ -182,20 +176,35 @@ export interface EstimateTransactionFeeResponse {
182
176
  /**
183
177
  * Transaction fee in the requested token (in decimals value of the token, e.g. 10^6 for USDC)
184
178
  */
185
- fee_in_token: number;
179
+ fee_in_token?: number;
180
+ /** Public key of the payment destination */
181
+ payment_address: string;
186
182
  /** Public key of the signer used to estimate the fee */
187
183
  signer_pubkey: string;
184
+ }
185
+ /**
186
+ * Response containing estimated bundle fees.
187
+ */
188
+ export interface EstimateBundleFeeResponse {
189
+ /** Total bundle fee in lamports across all transactions */
190
+ fee_in_lamports: number;
191
+ /**
192
+ * Total bundle fee in the requested token (in decimals value of the token, e.g. 10^6 for USDC)
193
+ */
194
+ fee_in_token?: number;
188
195
  /** Public key of the payment destination */
189
196
  payment_address: string;
197
+ /** Public key of the signer used to estimate the fee */
198
+ signer_pubkey: string;
190
199
  }
191
200
  /**
192
201
  * Response containing the payer signer and payment destination.
193
202
  */
194
203
  export interface GetPayerSignerResponse {
195
- /** Public key of the payer signer */
196
- signer_address: string;
197
204
  /** Public key of the payment destination */
198
205
  payment_address: string;
206
+ /** Public key of the payer signer */
207
+ signer_address: string;
199
208
  }
200
209
  /**
201
210
  * Response containing a payment instruction.
@@ -203,14 +212,14 @@ export interface GetPayerSignerResponse {
203
212
  export interface GetPaymentInstructionResponse {
204
213
  /** Base64-encoded original transaction */
205
214
  original_transaction: string;
206
- /** Base64-encoded payment instruction */
207
- payment_instruction: Instruction;
215
+ /** Public key of the payment destination */
216
+ payment_address: string;
208
217
  /** Payment amount in the requested token */
209
218
  payment_amount: number;
219
+ /** Base64-encoded payment instruction */
220
+ payment_instruction: Instruction;
210
221
  /** Mint address of the token used for payment */
211
222
  payment_token: string;
212
- /** Public key of the payment destination */
213
- payment_address: string;
214
223
  /** Public key of the payer signer */
215
224
  signer_address: string;
216
225
  }
@@ -222,24 +231,24 @@ export type PriceSource = 'Jupiter' | 'Mock';
222
231
  * Validation configuration for the Kora server.
223
232
  */
224
233
  export interface ValidationConfig {
225
- /** Maximum allowed transaction value in lamports */
226
- max_allowed_lamports: number;
227
- /** Maximum number of signatures allowed per transaction */
228
- max_signatures: number;
229
- /** Price oracle source for token conversions */
230
- price_source: PriceSource;
231
234
  /** List of allowed Solana program IDs */
232
235
  allowed_programs: string[];
233
- /** List of allowed token mint addresses for fee payment */
234
- allowed_tokens: string[];
235
236
  /** List of SPL tokens accepted for paid transactions */
236
237
  allowed_spl_paid_tokens: string[];
238
+ /** List of allowed token mint addresses for fee payment */
239
+ allowed_tokens: string[];
237
240
  /** List of blocked account addresses */
238
241
  disallowed_accounts: string[];
239
242
  /** Policy controlling fee payer permissions */
240
243
  fee_payer_policy: FeePayerPolicy;
244
+ /** Maximum allowed transaction value in lamports */
245
+ max_allowed_lamports: number;
246
+ /** Maximum number of signatures allowed per transaction */
247
+ max_signatures: number;
241
248
  /** Pricing model configuration */
242
249
  price: PriceConfig;
250
+ /** Price oracle source for token conversions */
251
+ price_source: PriceSource;
243
252
  /** Token2022 configuration */
244
253
  token2022: Token2022Config;
245
254
  }
@@ -247,10 +256,10 @@ export interface ValidationConfig {
247
256
  * Blocked extensions for Token2022.
248
257
  */
249
258
  export interface Token2022Config {
250
- /** List of blocked mint extensions */
251
- blocked_mint_extensions: string[];
252
259
  /** List of blocked account extensions */
253
260
  blocked_account_extensions: string[];
261
+ /** List of blocked mint extensions */
262
+ blocked_mint_extensions: string[];
254
263
  }
255
264
  /**
256
265
  * Pricing model for transaction fees.
@@ -260,12 +269,12 @@ export interface Token2022Config {
260
269
  * - `free`: No additional fees charged
261
270
  */
262
271
  export type PriceModel = {
263
- type: 'margin';
264
- margin: number;
265
- } | {
266
- type: 'fixed';
267
272
  amount: number;
268
273
  token: string;
274
+ type: 'fixed';
275
+ } | {
276
+ margin: number;
277
+ type: 'margin';
269
278
  } | {
270
279
  type: 'free';
271
280
  };
@@ -274,52 +283,54 @@ export type PriceConfig = PriceModel;
274
283
  * Enabled status for methods for the Kora server.
275
284
  */
276
285
  export interface EnabledMethods {
277
- /** Whether the liveness method is enabled */
278
- liveness: boolean;
286
+ /** Whether the estimate_bundle_fee method is enabled (requires bundle.enabled = true) */
287
+ estimate_bundle_fee: boolean;
279
288
  /** Whether the estimate_transaction_fee method is enabled */
280
289
  estimate_transaction_fee: boolean;
281
- /** Whether the get_supported_tokens method is enabled */
282
- get_supported_tokens: boolean;
283
- /** Whether the get_payer_signer method is enabled */
284
- get_payer_signer: boolean;
285
- /** Whether the sign_transaction method is enabled */
286
- sign_transaction: boolean;
287
- /** Whether the sign_and_send_transaction method is enabled */
288
- sign_and_send_transaction: boolean;
289
- /** Whether the transfer_transaction method is enabled */
290
- transfer_transaction: boolean;
291
290
  /** Whether the get_blockhash method is enabled */
292
291
  get_blockhash: boolean;
293
292
  /** Whether the get_config method is enabled */
294
293
  get_config: boolean;
294
+ /** Whether the get_payer_signer method is enabled */
295
+ get_payer_signer: boolean;
296
+ /** Whether the get_supported_tokens method is enabled */
297
+ get_supported_tokens: boolean;
295
298
  /** Whether the get_version method is enabled */
296
299
  get_version: boolean;
300
+ /** Whether the liveness method is enabled */
301
+ liveness: boolean;
297
302
  /** Whether the sign_and_send_bundle method is enabled (requires bundle.enabled = true) */
298
303
  sign_and_send_bundle: boolean;
304
+ /** Whether the sign_and_send_transaction method is enabled */
305
+ sign_and_send_transaction: boolean;
299
306
  /** Whether the sign_bundle method is enabled (requires bundle.enabled = true) */
300
307
  sign_bundle: boolean;
308
+ /** Whether the sign_transaction method is enabled */
309
+ sign_transaction: boolean;
310
+ /** Whether the transfer_transaction method is enabled */
311
+ transfer_transaction: boolean;
301
312
  }
302
313
  /**
303
314
  * Kora server configuration.
304
315
  */
305
316
  export interface Config {
317
+ /** Enabled methods */
318
+ enabled_methods: EnabledMethods;
306
319
  /** Array of public keys of the fee payer accounts (signer pool) */
307
320
  fee_payers: string[];
308
321
  /** Validation rules and constraints */
309
322
  validation_config: ValidationConfig;
310
- /** Enabled methods */
311
- enabled_methods: EnabledMethods;
312
323
  }
313
324
  /**
314
325
  * Nonce instruction policy
315
326
  */
316
327
  export interface NonceInstructionPolicy {
317
- /** Allow fee payer to initialize nonce accounts */
318
- allow_initialize: boolean;
319
328
  /** Allow fee payer to advance nonce accounts */
320
329
  allow_advance: boolean;
321
330
  /** Allow fee payer to authorize nonce accounts */
322
331
  allow_authorize: boolean;
332
+ /** Allow fee payer to initialize nonce accounts */
333
+ allow_initialize: boolean;
323
334
  /** Allow fee payer to withdraw from nonce accounts */
324
335
  allow_withdraw: boolean;
325
336
  }
@@ -327,14 +338,14 @@ export interface NonceInstructionPolicy {
327
338
  * System instruction policy
328
339
  */
329
340
  export interface SystemInstructionPolicy {
330
- /** Allow fee payer to be the sender in System Transfer/TransferWithSeed */
331
- allow_transfer: boolean;
341
+ /** Allow fee payer to be the account in System Allocate/AllocateWithSeed */
342
+ allow_allocate: boolean;
332
343
  /** Allow fee payer to be the authority in System Assign/AssignWithSeed */
333
344
  allow_assign: boolean;
334
345
  /** Allow fee payer to be the payer in System CreateAccount/CreateAccountWithSeed */
335
346
  allow_create_account: boolean;
336
- /** Allow fee payer to be the account in System Allocate/AllocateWithSeed */
337
- allow_allocate: boolean;
347
+ /** Allow fee payer to be the sender in System Transfer/TransferWithSeed */
348
+ allow_transfer: boolean;
338
349
  /** Nested policy for nonce account operations */
339
350
  nonce: NonceInstructionPolicy;
340
351
  }
@@ -342,68 +353,68 @@ export interface SystemInstructionPolicy {
342
353
  * SPL Token instruction policy
343
354
  */
344
355
  export interface SplTokenInstructionPolicy {
345
- /** Allow fee payer to be source in SPL token transfers */
346
- allow_transfer: boolean;
356
+ /** Allow fee payer to approve SPL token delegates */
357
+ allow_approve: boolean;
347
358
  /** Allow fee payer to burn SPL tokens */
348
359
  allow_burn: boolean;
349
360
  /** Allow fee payer to close SPL token accounts */
350
361
  allow_close_account: boolean;
351
- /** Allow fee payer to approve SPL token delegates */
352
- allow_approve: boolean;
353
- /** Allow fee payer to revoke SPL token delegates */
354
- allow_revoke: boolean;
355
- /** Allow fee payer to set authority on SPL token accounts */
356
- allow_set_authority: boolean;
357
- /** Allow fee payer to mint SPL tokens */
358
- allow_mint_to: boolean;
359
- /** Allow fee payer to initialize SPL token mints */
360
- allow_initialize_mint: boolean;
362
+ /** Allow fee payer to freeze SPL token accounts */
363
+ allow_freeze_account: boolean;
361
364
  /** Allow fee payer to initialize SPL token accounts */
362
365
  allow_initialize_account: boolean;
366
+ /** Allow fee payer to initialize SPL token mints */
367
+ allow_initialize_mint: boolean;
363
368
  /** Allow fee payer to initialize SPL multisig accounts */
364
369
  allow_initialize_multisig: boolean;
365
- /** Allow fee payer to freeze SPL token accounts */
366
- allow_freeze_account: boolean;
370
+ /** Allow fee payer to mint SPL tokens */
371
+ allow_mint_to: boolean;
372
+ /** Allow fee payer to revoke SPL token delegates */
373
+ allow_revoke: boolean;
374
+ /** Allow fee payer to set authority on SPL token accounts */
375
+ allow_set_authority: boolean;
367
376
  /** Allow fee payer to thaw SPL token accounts */
368
377
  allow_thaw_account: boolean;
378
+ /** Allow fee payer to be source in SPL token transfers */
379
+ allow_transfer: boolean;
369
380
  }
370
381
  /**
371
382
  * Token2022 instruction policy
372
383
  */
373
384
  export interface Token2022InstructionPolicy {
374
- /** Allow fee payer to be source in Token2022 transfers */
375
- allow_transfer: boolean;
385
+ /** Allow fee payer to approve Token2022 delegates */
386
+ allow_approve: boolean;
376
387
  /** Allow fee payer to burn Token2022 tokens */
377
388
  allow_burn: boolean;
378
389
  /** Allow fee payer to close Token2022 accounts */
379
390
  allow_close_account: boolean;
380
- /** Allow fee payer to approve Token2022 delegates */
381
- allow_approve: boolean;
382
- /** Allow fee payer to revoke Token2022 delegates */
383
- allow_revoke: boolean;
384
- /** Allow fee payer to set authority on Token2022 accounts */
385
- allow_set_authority: boolean;
386
- /** Allow fee payer to mint Token2022 tokens */
387
- allow_mint_to: boolean;
388
- /** Allow fee payer to initialize Token2022 mints */
389
- allow_initialize_mint: boolean;
391
+ /** Allow fee payer to freeze Token2022 accounts */
392
+ allow_freeze_account: boolean;
390
393
  /** Allow fee payer to initialize Token2022 accounts */
391
394
  allow_initialize_account: boolean;
395
+ /** Allow fee payer to initialize Token2022 mints */
396
+ allow_initialize_mint: boolean;
392
397
  /** Allow fee payer to initialize Token2022 multisig accounts */
393
398
  allow_initialize_multisig: boolean;
394
- /** Allow fee payer to freeze Token2022 accounts */
395
- allow_freeze_account: boolean;
399
+ /** Allow fee payer to mint Token2022 tokens */
400
+ allow_mint_to: boolean;
401
+ /** Allow fee payer to revoke Token2022 delegates */
402
+ allow_revoke: boolean;
403
+ /** Allow fee payer to set authority on Token2022 accounts */
404
+ allow_set_authority: boolean;
396
405
  /** Allow fee payer to thaw Token2022 accounts */
397
406
  allow_thaw_account: boolean;
407
+ /** Allow fee payer to be source in Token2022 transfers */
408
+ allow_transfer: boolean;
398
409
  }
399
410
  /**
400
411
  * Policy controlling what actions the fee payer can perform.
401
412
  */
402
413
  export interface FeePayerPolicy {
403
- /** System program instruction policies */
404
- system: SystemInstructionPolicy;
405
414
  /** SPL Token program instruction policies */
406
415
  spl_token: SplTokenInstructionPolicy;
416
+ /** System program instruction policies */
417
+ system: SystemInstructionPolicy;
407
418
  /** Token2022 program instruction policies */
408
419
  token_2022: Token2022InstructionPolicy;
409
420
  }
@@ -424,10 +435,10 @@ export interface RpcError {
424
435
  * @typeParam T - Type of the params object
425
436
  */
426
437
  export interface RpcRequest<T> {
427
- /** JSON-RPC version */
428
- jsonrpc: '2.0';
429
438
  /** Request ID */
430
439
  id: number;
440
+ /** JSON-RPC version */
441
+ jsonrpc: '2.0';
431
442
  /** RPC method name */
432
443
  method: string;
433
444
  /** Method parameters */
@@ -439,19 +450,150 @@ export interface RpcRequest<T> {
439
450
  export interface AuthenticationHeaders {
440
451
  /** API key for simple authentication */
441
452
  'x-api-key'?: string;
442
- /** Unix timestamp for HMAC authentication */
443
- 'x-timestamp'?: string;
444
453
  /** HMAC SHA256 signature of timestamp + body */
445
454
  'x-hmac-signature'?: string;
455
+ /** Unix timestamp for HMAC authentication */
456
+ 'x-timestamp'?: string;
446
457
  }
447
458
  /**
448
459
  * Options for initializing a Kora client.
449
460
  */
450
461
  export interface KoraClientOptions {
462
+ /** Optional API key for authentication */
463
+ apiKey?: string;
464
+ /** Optional HMAC secret for signature-based authentication */
465
+ hmacSecret?: string;
451
466
  /** URL of the Kora RPC server */
452
467
  rpcUrl: string;
468
+ }
469
+ /**
470
+ * Plugin Types - Kit-typed responses for the Kora plugin
471
+ */
472
+ import type { Address, Base64EncodedWireTransaction, Blockhash, Instruction as KitInstruction, Signature } from '@solana/kit';
473
+ /** Configuration options for the Kora Kit plugin */
474
+ export interface KoraPluginConfig {
453
475
  /** Optional API key for authentication */
454
476
  apiKey?: string;
477
+ /** Kora RPC endpoint URL */
478
+ endpoint: string;
455
479
  /** Optional HMAC secret for signature-based authentication */
456
480
  hmacSecret?: string;
457
481
  }
482
+ /** Plugin response for getPayerSigner with Kit Address types */
483
+ export interface KitPayerSignerResponse {
484
+ /** Public key of the payment destination */
485
+ payment_address: Address;
486
+ /** Public key of the payer signer */
487
+ signer_address: Address;
488
+ }
489
+ /** Plugin response for getBlockhash with Kit Blockhash type */
490
+ export interface KitBlockhashResponse {
491
+ /** Base58-encoded blockhash */
492
+ blockhash: Blockhash;
493
+ }
494
+ /** Plugin response for getSupportedTokens with Kit Address types */
495
+ export interface KitSupportedTokensResponse {
496
+ /** Array of supported token mint addresses */
497
+ tokens: Address[];
498
+ }
499
+ /** Plugin response for estimateTransactionFee with Kit Address types */
500
+ export interface KitEstimateFeeResponse {
501
+ /** Transaction fee in lamports */
502
+ fee_in_lamports: number;
503
+ /** Transaction fee in the requested token */
504
+ fee_in_token?: number;
505
+ /** Public key of the payment destination */
506
+ payment_address: Address;
507
+ /** Public key of the signer used to estimate the fee */
508
+ signer_pubkey: Address;
509
+ }
510
+ /** Plugin response for signTransaction with Kit types */
511
+ export interface KitSignTransactionResponse {
512
+ /** Base64-encoded signed transaction */
513
+ signed_transaction: Base64EncodedWireTransaction;
514
+ /** Public key of the signer used to sign the transaction */
515
+ signer_pubkey: Address;
516
+ }
517
+ /** Plugin response for signAndSendTransaction with Kit types */
518
+ export interface KitSignAndSendTransactionResponse {
519
+ /** Transaction signature */
520
+ signature: Signature;
521
+ /** Base64-encoded signed transaction */
522
+ signed_transaction: Base64EncodedWireTransaction;
523
+ /** Public key of the signer used to send the transaction */
524
+ signer_pubkey: Address;
525
+ }
526
+ /** Plugin response for getPaymentInstruction with Kit types */
527
+ export interface KitPaymentInstructionResponse {
528
+ /** Base64-encoded original transaction */
529
+ original_transaction: Base64EncodedWireTransaction;
530
+ /** Public key of the payment destination */
531
+ payment_address: Address;
532
+ /** Payment amount in the requested token */
533
+ payment_amount: number;
534
+ /** Payment instruction */
535
+ payment_instruction: KitInstruction;
536
+ /** Mint address of the token used for payment */
537
+ payment_token: Address;
538
+ /** Public key of the payer signer */
539
+ signer_address: Address;
540
+ }
541
+ /** Plugin response for getConfig with Kit Address types */
542
+ export interface KitConfigResponse {
543
+ /** Enabled methods */
544
+ enabled_methods: EnabledMethods;
545
+ /** Array of public keys of the fee payer accounts (signer pool) */
546
+ fee_payers: Address[];
547
+ /** Validation rules and constraints */
548
+ validation_config: KitValidationConfig;
549
+ }
550
+ /** Plugin response for estimateBundleFee with Kit types */
551
+ export interface KitEstimateBundleFeeResponse {
552
+ /** Total bundle fee in lamports across all transactions */
553
+ fee_in_lamports: number;
554
+ /** Total bundle fee in the requested token */
555
+ fee_in_token?: number;
556
+ /** Public key of the payment destination */
557
+ payment_address: Address;
558
+ /** Public key of the signer used to estimate the fee */
559
+ signer_pubkey: Address;
560
+ }
561
+ /** Plugin response for signBundle with Kit types */
562
+ export interface KitSignBundleResponse {
563
+ /** Array of base64-encoded signed transactions */
564
+ signed_transactions: Base64EncodedWireTransaction[];
565
+ /** Public key of the signer used to sign the transactions */
566
+ signer_pubkey: Address;
567
+ }
568
+ /** Plugin response for signAndSendBundle with Kit types */
569
+ export interface KitSignAndSendBundleResponse {
570
+ /** UUID of the submitted Jito bundle */
571
+ bundle_uuid: string;
572
+ /** Array of base64-encoded signed transactions */
573
+ signed_transactions: Base64EncodedWireTransaction[];
574
+ /** Public key of the signer used to sign the transactions */
575
+ signer_pubkey: Address;
576
+ }
577
+ /** Plugin validation config with Kit Address types */
578
+ export interface KitValidationConfig {
579
+ /** List of allowed Solana program IDs */
580
+ allowed_programs: Address[];
581
+ /** List of SPL tokens accepted for paid transactions */
582
+ allowed_spl_paid_tokens: Address[];
583
+ /** List of allowed token mint addresses for fee payment */
584
+ allowed_tokens: Address[];
585
+ /** List of blocked account addresses */
586
+ disallowed_accounts: Address[];
587
+ /** Policy controlling fee payer permissions */
588
+ fee_payer_policy: FeePayerPolicy;
589
+ /** Maximum allowed transaction value in lamports */
590
+ max_allowed_lamports: number;
591
+ /** Maximum number of signatures allowed per transaction */
592
+ max_signatures: number;
593
+ /** Pricing model configuration */
594
+ price: PriceConfig;
595
+ /** Price oracle source for token conversions */
596
+ price_source: PriceSource;
597
+ /** Token2022 configuration */
598
+ token2022: Token2022Config;
599
+ }
@@ -25,7 +25,7 @@ export function getInstructionsFromBase64Message(message) {
25
25
  const decompiledMessage = deserializeBase64Message(message);
26
26
  return decompiledMessage.instructions;
27
27
  }
28
- catch (error) {
28
+ catch {
29
29
  // Silently handle parsing errors and return empty array
30
30
  return [];
31
31
  }