@solana/web3.js 1.68.1 → 1.70.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.
package/lib/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  /// <reference types="node" />
2
2
  declare module '@solana/web3.js' {
3
3
  import {Buffer} from 'buffer';
4
+ import {Agent} from 'http';
5
+ import {Agent as Agent$1} from 'https';
4
6
  import * as nodeFetch from 'node-fetch';
5
7
 
6
8
  export class Struct {
@@ -26,7 +28,7 @@ declare module '@solana/web3.js' {
26
28
  /**
27
29
  * Value to be converted into public key
28
30
  */
29
- export type PublicKeyInitData =
31
+ type PublicKeyInitData =
30
32
  | number
31
33
  | string
32
34
  | Uint8Array
@@ -35,7 +37,7 @@ declare module '@solana/web3.js' {
35
37
  /**
36
38
  * JSON object representation of PublicKey class
37
39
  */
38
- export type PublicKeyData = {};
40
+ type PublicKeyData = {};
39
41
  /**
40
42
  * A public key
41
43
  */
@@ -159,14 +161,14 @@ declare module '@solana/web3.js' {
159
161
  /**
160
162
  * Blockhash as Base58 string.
161
163
  */
162
- export type Blockhash = string;
164
+ type Blockhash = string;
163
165
 
164
166
  export const BPF_LOADER_DEPRECATED_PROGRAM_ID: PublicKey;
165
167
 
166
168
  /**
167
169
  * Epoch schedule
168
170
  * (see https://docs.solana.com/terminology#epoch)
169
- * Can be retrieved with the {@link connection.getEpochSchedule} method
171
+ * Can be retrieved with the {@link Connection.getEpochSchedule} method
170
172
  */
171
173
  export class EpochSchedule {
172
174
  /** The maximum number of slots in each epoch */
@@ -212,7 +214,7 @@ declare module '@solana/web3.js' {
212
214
  /**
213
215
  * A durable nonce is a 32 byte value encoded as a base58 string.
214
216
  */
215
- export type DurableNonce = string;
217
+ type DurableNonce = string;
216
218
  /**
217
219
  * NonceAccount class
218
220
  */
@@ -236,7 +238,7 @@ declare module '@solana/web3.js' {
236
238
  * private scalar and the last 32 bytes is the public key.
237
239
  * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/
238
240
  */
239
- export type Ed25519SecretKey = Uint8Array;
241
+ type Ed25519SecretKey = Uint8Array;
240
242
  /**
241
243
  * Ed25519 Keypair
242
244
  */
@@ -326,7 +328,7 @@ declare module '@solana/web3.js' {
326
328
  constructor(signature: string);
327
329
  }
328
330
 
329
- export type AccountKeysFromLookups = LoadedAddresses;
331
+ type AccountKeysFromLookups = LoadedAddresses;
330
332
  export class MessageAccountKeys {
331
333
  staticAccountKeys: Array<PublicKey>;
332
334
  accountKeysFromLookups?: AccountKeysFromLookups;
@@ -349,7 +351,7 @@ declare module '@solana/web3.js' {
349
351
  * @property {number[]} accounts
350
352
  * @property {string} data
351
353
  */
352
- export type CompiledInstruction = {
354
+ type CompiledInstruction = {
353
355
  /** Index into the transaction keys array indicating the program account that executes this instruction */
354
356
  programIdIndex: number;
355
357
  /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */
@@ -360,7 +362,7 @@ declare module '@solana/web3.js' {
360
362
  /**
361
363
  * Message constructor arguments
362
364
  */
363
- export type MessageArgs = {
365
+ type MessageArgs = {
364
366
  /** The message header, identifying signed and read-only `accountKeys` */
365
367
  header: MessageHeader;
366
368
  /** All the account keys used by this transaction */
@@ -370,7 +372,7 @@ declare module '@solana/web3.js' {
370
372
  /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */
371
373
  instructions: CompiledInstruction[];
372
374
  };
373
- export type CompileLegacyArgs = {
375
+ type CompileLegacyArgs = {
374
376
  payerKey: PublicKey;
375
377
  instructions: Array<TransactionInstruction>;
376
378
  recentBlockhash: Blockhash;
@@ -403,14 +405,14 @@ declare module '@solana/web3.js' {
403
405
  static from(buffer: Buffer | Uint8Array | Array<number>): Message;
404
406
  }
405
407
 
406
- export type AddressLookupTableState = {
408
+ type AddressLookupTableState = {
407
409
  deactivationSlot: bigint;
408
410
  lastExtendedSlot: number;
409
411
  lastExtendedSlotStartIndex: number;
410
412
  authority?: PublicKey;
411
413
  addresses: Array<PublicKey>;
412
414
  };
413
- export type AddressLookupTableAccountArgs = {
415
+ type AddressLookupTableAccountArgs = {
414
416
  key: PublicKey;
415
417
  state: AddressLookupTableState;
416
418
  };
@@ -422,7 +424,7 @@ declare module '@solana/web3.js' {
422
424
  static deserialize(accountData: Uint8Array): AddressLookupTableState;
423
425
  }
424
426
 
425
- export type CreateLookupTableParams = {
427
+ type CreateLookupTableParams = {
426
428
  /** Account used to derive and control the new address lookup table. */
427
429
  authority: PublicKey;
428
430
  /** Account that will fund the new address lookup table. */
@@ -430,13 +432,13 @@ declare module '@solana/web3.js' {
430
432
  /** A recent slot must be used in the derivation path for each initialized table. */
431
433
  recentSlot: bigint | number;
432
434
  };
433
- export type FreezeLookupTableParams = {
435
+ type FreezeLookupTableParams = {
434
436
  /** Address lookup table account to freeze. */
435
437
  lookupTable: PublicKey;
436
438
  /** Account which is the current authority. */
437
439
  authority: PublicKey;
438
440
  };
439
- export type ExtendLookupTableParams = {
441
+ type ExtendLookupTableParams = {
440
442
  /** Address lookup table account to extend. */
441
443
  lookupTable: PublicKey;
442
444
  /** Account which is the current authority. */
@@ -447,13 +449,13 @@ declare module '@solana/web3.js' {
447
449
  /** List of Public Keys to be added to the lookup table. */
448
450
  addresses: Array<PublicKey>;
449
451
  };
450
- export type DeactivateLookupTableParams = {
452
+ type DeactivateLookupTableParams = {
451
453
  /** Address lookup table account to deactivate. */
452
454
  lookupTable: PublicKey;
453
455
  /** Account which is the current authority. */
454
456
  authority: PublicKey;
455
457
  };
456
- export type CloseLookupTableParams = {
458
+ type CloseLookupTableParams = {
457
459
  /** Address lookup table account to close. */
458
460
  lookupTable: PublicKey;
459
461
  /** Account which is the current authority. */
@@ -464,7 +466,7 @@ declare module '@solana/web3.js' {
464
466
  /**
465
467
  * An enumeration of valid LookupTableInstructionType's
466
468
  */
467
- export type LookupTableInstructionType =
469
+ type LookupTableInstructionType =
468
470
  | 'CreateLookupTable'
469
471
  | 'ExtendLookupTable'
470
472
  | 'CloseLookupTable'
@@ -547,7 +549,7 @@ declare module '@solana/web3.js' {
547
549
  /**
548
550
  * An enumeration of valid ComputeBudgetInstructionType's
549
551
  */
550
- export type ComputeBudgetInstructionType =
552
+ type ComputeBudgetInstructionType =
551
553
  | 'RequestUnits'
552
554
  | 'RequestHeapFrame'
553
555
  | 'SetComputeUnitLimit'
@@ -564,7 +566,7 @@ declare module '@solana/web3.js' {
564
566
  /**
565
567
  * Request heap frame instruction params
566
568
  */
567
- export type RequestHeapFrameParams = {
569
+ type RequestHeapFrameParams = {
568
570
  /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */
569
571
  bytes: number;
570
572
  };
@@ -608,7 +610,7 @@ declare module '@solana/web3.js' {
608
610
  /**
609
611
  * Params for creating an ed25519 instruction using a public key
610
612
  */
611
- export type CreateEd25519InstructionWithPublicKeyParams = {
613
+ type CreateEd25519InstructionWithPublicKeyParams = {
612
614
  publicKey: Uint8Array;
613
615
  message: Uint8Array;
614
616
  signature: Uint8Array;
@@ -617,7 +619,7 @@ declare module '@solana/web3.js' {
617
619
  /**
618
620
  * Params for creating an ed25519 instruction using a private key
619
621
  */
620
- export type CreateEd25519InstructionWithPrivateKeyParams = {
622
+ type CreateEd25519InstructionWithPrivateKeyParams = {
621
623
  privateKey: Uint8Array;
622
624
  message: Uint8Array;
623
625
  instructionIndex?: number;
@@ -647,7 +649,7 @@ declare module '@solana/web3.js' {
647
649
  /**
648
650
  * Params for creating an secp256k1 instruction using a public key
649
651
  */
650
- export type CreateSecp256k1InstructionWithPublicKeyParams = {
652
+ type CreateSecp256k1InstructionWithPublicKeyParams = {
651
653
  publicKey: Buffer | Uint8Array | Array<number>;
652
654
  message: Buffer | Uint8Array | Array<number>;
653
655
  signature: Buffer | Uint8Array | Array<number>;
@@ -657,7 +659,7 @@ declare module '@solana/web3.js' {
657
659
  /**
658
660
  * Params for creating an secp256k1 instruction using an Ethereum address
659
661
  */
660
- export type CreateSecp256k1InstructionWithEthAddressParams = {
662
+ type CreateSecp256k1InstructionWithEthAddressParams = {
661
663
  ethAddress: Buffer | Uint8Array | Array<number> | string;
662
664
  message: Buffer | Uint8Array | Array<number>;
663
665
  signature: Buffer | Uint8Array | Array<number>;
@@ -667,7 +669,7 @@ declare module '@solana/web3.js' {
667
669
  /**
668
670
  * Params for creating an secp256k1 instruction using a private key
669
671
  */
670
- export type CreateSecp256k1InstructionWithPrivateKeyParams = {
672
+ type CreateSecp256k1InstructionWithPrivateKeyParams = {
671
673
  privateKey: Buffer | Uint8Array | Array<number>;
672
674
  message: Buffer | Uint8Array | Array<number>;
673
675
  instructionIndex?: number;
@@ -749,7 +751,7 @@ declare module '@solana/web3.js' {
749
751
  /**
750
752
  * Create stake account transaction params
751
753
  */
752
- export type CreateStakeAccountParams = {
754
+ type CreateStakeAccountParams = {
753
755
  /** Address of the account which will fund creation */
754
756
  fromPubkey: PublicKey;
755
757
  /** Address of the new stake account */
@@ -764,7 +766,7 @@ declare module '@solana/web3.js' {
764
766
  /**
765
767
  * Create stake account with seed transaction params
766
768
  */
767
- export type CreateStakeAccountWithSeedParams = {
769
+ type CreateStakeAccountWithSeedParams = {
768
770
  fromPubkey: PublicKey;
769
771
  stakePubkey: PublicKey;
770
772
  basePubkey: PublicKey;
@@ -776,7 +778,7 @@ declare module '@solana/web3.js' {
776
778
  /**
777
779
  * Initialize stake instruction params
778
780
  */
779
- export type InitializeStakeParams = {
781
+ type InitializeStakeParams = {
780
782
  stakePubkey: PublicKey;
781
783
  authorized: Authorized;
782
784
  lockup?: Lockup;
@@ -784,7 +786,7 @@ declare module '@solana/web3.js' {
784
786
  /**
785
787
  * Delegate stake instruction params
786
788
  */
787
- export type DelegateStakeParams = {
789
+ type DelegateStakeParams = {
788
790
  stakePubkey: PublicKey;
789
791
  authorizedPubkey: PublicKey;
790
792
  votePubkey: PublicKey;
@@ -792,7 +794,7 @@ declare module '@solana/web3.js' {
792
794
  /**
793
795
  * Authorize stake instruction params
794
796
  */
795
- export type AuthorizeStakeParams = {
797
+ type AuthorizeStakeParams = {
796
798
  stakePubkey: PublicKey;
797
799
  authorizedPubkey: PublicKey;
798
800
  newAuthorizedPubkey: PublicKey;
@@ -802,7 +804,7 @@ declare module '@solana/web3.js' {
802
804
  /**
803
805
  * Authorize stake instruction params using a derived key
804
806
  */
805
- export type AuthorizeWithSeedStakeParams = {
807
+ type AuthorizeWithSeedStakeParams = {
806
808
  stakePubkey: PublicKey;
807
809
  authorityBase: PublicKey;
808
810
  authoritySeed: string;
@@ -814,7 +816,7 @@ declare module '@solana/web3.js' {
814
816
  /**
815
817
  * Split stake instruction params
816
818
  */
817
- export type SplitStakeParams = {
819
+ type SplitStakeParams = {
818
820
  stakePubkey: PublicKey;
819
821
  authorizedPubkey: PublicKey;
820
822
  splitStakePubkey: PublicKey;
@@ -823,7 +825,7 @@ declare module '@solana/web3.js' {
823
825
  /**
824
826
  * Split with seed transaction params
825
827
  */
826
- export type SplitStakeWithSeedParams = {
828
+ type SplitStakeWithSeedParams = {
827
829
  stakePubkey: PublicKey;
828
830
  authorizedPubkey: PublicKey;
829
831
  splitStakePubkey: PublicKey;
@@ -834,7 +836,7 @@ declare module '@solana/web3.js' {
834
836
  /**
835
837
  * Withdraw stake instruction params
836
838
  */
837
- export type WithdrawStakeParams = {
839
+ type WithdrawStakeParams = {
838
840
  stakePubkey: PublicKey;
839
841
  authorizedPubkey: PublicKey;
840
842
  toPubkey: PublicKey;
@@ -844,14 +846,14 @@ declare module '@solana/web3.js' {
844
846
  /**
845
847
  * Deactivate stake instruction params
846
848
  */
847
- export type DeactivateStakeParams = {
849
+ type DeactivateStakeParams = {
848
850
  stakePubkey: PublicKey;
849
851
  authorizedPubkey: PublicKey;
850
852
  };
851
853
  /**
852
854
  * Merge stake instruction params
853
855
  */
854
- export type MergeStakeParams = {
856
+ type MergeStakeParams = {
855
857
  stakePubkey: PublicKey;
856
858
  sourceStakePubKey: PublicKey;
857
859
  authorizedPubkey: PublicKey;
@@ -914,7 +916,7 @@ declare module '@solana/web3.js' {
914
916
  /**
915
917
  * An enumeration of valid StakeInstructionType's
916
918
  */
917
- export type StakeInstructionType =
919
+ type StakeInstructionType =
918
920
  | 'Authorize'
919
921
  | 'AuthorizeWithSeed'
920
922
  | 'Deactivate'
@@ -926,7 +928,7 @@ declare module '@solana/web3.js' {
926
928
  /**
927
929
  * Stake authorization type
928
930
  */
929
- export type StakeAuthorizationType = {
931
+ type StakeAuthorizationType = {
930
932
  /** The Stake Authorization index (from solana-stake-program) */
931
933
  index: number;
932
934
  };
@@ -1014,7 +1016,7 @@ declare module '@solana/web3.js' {
1014
1016
  /**
1015
1017
  * Create account system transaction params
1016
1018
  */
1017
- export type CreateAccountParams = {
1019
+ type CreateAccountParams = {
1018
1020
  /** The account that will transfer lamports to the created account */
1019
1021
  fromPubkey: PublicKey;
1020
1022
  /** Public key of the created account */
@@ -1029,7 +1031,7 @@ declare module '@solana/web3.js' {
1029
1031
  /**
1030
1032
  * Transfer system transaction params
1031
1033
  */
1032
- export type TransferParams = {
1034
+ type TransferParams = {
1033
1035
  /** Account that will transfer lamports */
1034
1036
  fromPubkey: PublicKey;
1035
1037
  /** Account that will receive transferred lamports */
@@ -1040,7 +1042,7 @@ declare module '@solana/web3.js' {
1040
1042
  /**
1041
1043
  * Assign system transaction params
1042
1044
  */
1043
- export type AssignParams = {
1045
+ type AssignParams = {
1044
1046
  /** Public key of the account which will be assigned a new owner */
1045
1047
  accountPubkey: PublicKey;
1046
1048
  /** Public key of the program to assign as the owner */
@@ -1049,7 +1051,7 @@ declare module '@solana/web3.js' {
1049
1051
  /**
1050
1052
  * Create account with seed system transaction params
1051
1053
  */
1052
- export type CreateAccountWithSeedParams = {
1054
+ type CreateAccountWithSeedParams = {
1053
1055
  /** The account that will transfer lamports to the created account */
1054
1056
  fromPubkey: PublicKey;
1055
1057
  /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */
@@ -1068,7 +1070,7 @@ declare module '@solana/web3.js' {
1068
1070
  /**
1069
1071
  * Create nonce account system transaction params
1070
1072
  */
1071
- export type CreateNonceAccountParams = {
1073
+ type CreateNonceAccountParams = {
1072
1074
  /** The account that will transfer lamports to the created nonce account */
1073
1075
  fromPubkey: PublicKey;
1074
1076
  /** Public key of the created nonce account */
@@ -1081,7 +1083,7 @@ declare module '@solana/web3.js' {
1081
1083
  /**
1082
1084
  * Create nonce account with seed system transaction params
1083
1085
  */
1084
- export type CreateNonceAccountWithSeedParams = {
1086
+ type CreateNonceAccountWithSeedParams = {
1085
1087
  /** The account that will transfer lamports to the created nonce account */
1086
1088
  fromPubkey: PublicKey;
1087
1089
  /** Public key of the created nonce account */
@@ -1098,7 +1100,7 @@ declare module '@solana/web3.js' {
1098
1100
  /**
1099
1101
  * Initialize nonce account system instruction params
1100
1102
  */
1101
- export type InitializeNonceParams = {
1103
+ type InitializeNonceParams = {
1102
1104
  /** Nonce account which will be initialized */
1103
1105
  noncePubkey: PublicKey;
1104
1106
  /** Public key to set as authority of the initialized nonce account */
@@ -1107,7 +1109,7 @@ declare module '@solana/web3.js' {
1107
1109
  /**
1108
1110
  * Advance nonce account system instruction params
1109
1111
  */
1110
- export type AdvanceNonceParams = {
1112
+ type AdvanceNonceParams = {
1111
1113
  /** Nonce account */
1112
1114
  noncePubkey: PublicKey;
1113
1115
  /** Public key of the nonce authority */
@@ -1116,7 +1118,7 @@ declare module '@solana/web3.js' {
1116
1118
  /**
1117
1119
  * Withdraw nonce account system transaction params
1118
1120
  */
1119
- export type WithdrawNonceParams = {
1121
+ type WithdrawNonceParams = {
1120
1122
  /** Nonce account */
1121
1123
  noncePubkey: PublicKey;
1122
1124
  /** Public key of the nonce authority */
@@ -1129,7 +1131,7 @@ declare module '@solana/web3.js' {
1129
1131
  /**
1130
1132
  * Authorize nonce account system transaction params
1131
1133
  */
1132
- export type AuthorizeNonceParams = {
1134
+ type AuthorizeNonceParams = {
1133
1135
  /** Nonce account */
1134
1136
  noncePubkey: PublicKey;
1135
1137
  /** Public key of the current nonce authority */
@@ -1140,7 +1142,7 @@ declare module '@solana/web3.js' {
1140
1142
  /**
1141
1143
  * Allocate account system transaction params
1142
1144
  */
1143
- export type AllocateParams = {
1145
+ type AllocateParams = {
1144
1146
  /** Account to allocate */
1145
1147
  accountPubkey: PublicKey;
1146
1148
  /** Amount of space in bytes to allocate */
@@ -1149,7 +1151,7 @@ declare module '@solana/web3.js' {
1149
1151
  /**
1150
1152
  * Allocate account with seed system transaction params
1151
1153
  */
1152
- export type AllocateWithSeedParams = {
1154
+ type AllocateWithSeedParams = {
1153
1155
  /** Account to allocate */
1154
1156
  accountPubkey: PublicKey;
1155
1157
  /** Base public key to use to derive the address of the allocated account */
@@ -1164,7 +1166,7 @@ declare module '@solana/web3.js' {
1164
1166
  /**
1165
1167
  * Assign account with seed system transaction params
1166
1168
  */
1167
- export type AssignWithSeedParams = {
1169
+ type AssignWithSeedParams = {
1168
1170
  /** Public key of the account which will be assigned a new owner */
1169
1171
  accountPubkey: PublicKey;
1170
1172
  /** Base public key to use to derive the address of the assigned account */
@@ -1177,7 +1179,7 @@ declare module '@solana/web3.js' {
1177
1179
  /**
1178
1180
  * Transfer with seed system transaction params
1179
1181
  */
1180
- export type TransferWithSeedParams = {
1182
+ type TransferWithSeedParams = {
1181
1183
  /** Account that will transfer lamports */
1182
1184
  fromPubkey: PublicKey;
1183
1185
  /** Base public key to use to derive the funding account address */
@@ -1192,7 +1194,7 @@ declare module '@solana/web3.js' {
1192
1194
  programId: PublicKey;
1193
1195
  };
1194
1196
  /** Decoded transfer system transaction instruction */
1195
- export type DecodedTransferInstruction = {
1197
+ type DecodedTransferInstruction = {
1196
1198
  /** Account that will transfer lamports */
1197
1199
  fromPubkey: PublicKey;
1198
1200
  /** Account that will receive transferred lamports */
@@ -1201,7 +1203,7 @@ declare module '@solana/web3.js' {
1201
1203
  lamports: bigint;
1202
1204
  };
1203
1205
  /** Decoded transferWithSeed system transaction instruction */
1204
- export type DecodedTransferWithSeedInstruction = {
1206
+ type DecodedTransferWithSeedInstruction = {
1205
1207
  /** Account that will transfer lamports */
1206
1208
  fromPubkey: PublicKey;
1207
1209
  /** Base public key to use to derive the funding account address */
@@ -1297,7 +1299,7 @@ declare module '@solana/web3.js' {
1297
1299
  /**
1298
1300
  * An enumeration of valid SystemInstructionType's
1299
1301
  */
1300
- export type SystemInstructionType =
1302
+ type SystemInstructionType =
1301
1303
  | 'AdvanceNonceAccount'
1302
1304
  | 'Allocate'
1303
1305
  | 'AllocateWithSeed'
@@ -1393,7 +1395,7 @@ declare module '@solana/web3.js' {
1393
1395
  /**
1394
1396
  * Create vote account transaction params
1395
1397
  */
1396
- export type CreateVoteAccountParams = {
1398
+ type CreateVoteAccountParams = {
1397
1399
  fromPubkey: PublicKey;
1398
1400
  votePubkey: PublicKey;
1399
1401
  voteInit: VoteInit;
@@ -1402,7 +1404,7 @@ declare module '@solana/web3.js' {
1402
1404
  /**
1403
1405
  * InitializeAccount instruction params
1404
1406
  */
1405
- export type InitializeAccountParams = {
1407
+ type InitializeAccountParams = {
1406
1408
  votePubkey: PublicKey;
1407
1409
  nodePubkey: PublicKey;
1408
1410
  voteInit: VoteInit;
@@ -1410,7 +1412,7 @@ declare module '@solana/web3.js' {
1410
1412
  /**
1411
1413
  * Authorize instruction params
1412
1414
  */
1413
- export type AuthorizeVoteParams = {
1415
+ type AuthorizeVoteParams = {
1414
1416
  votePubkey: PublicKey;
1415
1417
  /** Current vote or withdraw authority, depending on `voteAuthorizationType` */
1416
1418
  authorizedPubkey: PublicKey;
@@ -1420,7 +1422,7 @@ declare module '@solana/web3.js' {
1420
1422
  /**
1421
1423
  * AuthorizeWithSeed instruction params
1422
1424
  */
1423
- export type AuthorizeVoteWithSeedParams = {
1425
+ type AuthorizeVoteWithSeedParams = {
1424
1426
  currentAuthorityDerivedKeyBasePubkey: PublicKey;
1425
1427
  currentAuthorityDerivedKeyOwnerPubkey: PublicKey;
1426
1428
  currentAuthorityDerivedKeySeed: string;
@@ -1431,7 +1433,7 @@ declare module '@solana/web3.js' {
1431
1433
  /**
1432
1434
  * Withdraw from vote account transaction params
1433
1435
  */
1434
- export type WithdrawFromVoteAccountParams = {
1436
+ type WithdrawFromVoteAccountParams = {
1435
1437
  votePubkey: PublicKey;
1436
1438
  authorizedWithdrawerPubkey: PublicKey;
1437
1439
  lamports: number;
@@ -1475,7 +1477,7 @@ declare module '@solana/web3.js' {
1475
1477
  /**
1476
1478
  * An enumeration of valid VoteInstructionType's
1477
1479
  */
1478
- export type VoteInstructionType =
1480
+ type VoteInstructionType =
1479
1481
  | 'Authorize'
1480
1482
  | 'AuthorizeWithSeed'
1481
1483
  | 'InitializeAccount'
@@ -1483,7 +1485,7 @@ declare module '@solana/web3.js' {
1483
1485
  /**
1484
1486
  * VoteAuthorize type
1485
1487
  */
1486
- export type VoteAuthorizationType = {
1488
+ type VoteAuthorizationType = {
1487
1489
  /** The VoteAuthorize index (from solana-vote-program) */
1488
1490
  index: number;
1489
1491
  };
@@ -1555,7 +1557,7 @@ declare module '@solana/web3.js' {
1555
1557
  /**
1556
1558
  * Message constructor arguments
1557
1559
  */
1558
- export type MessageV0Args = {
1560
+ type MessageV0Args = {
1559
1561
  /** The message header, identifying signed and read-only `accountKeys` */
1560
1562
  header: MessageHeader;
1561
1563
  /** The static account keys used by this transaction */
@@ -1567,13 +1569,13 @@ declare module '@solana/web3.js' {
1567
1569
  /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */
1568
1570
  addressTableLookups: MessageAddressTableLookup[];
1569
1571
  };
1570
- export type CompileV0Args = {
1572
+ type CompileV0Args = {
1571
1573
  payerKey: PublicKey;
1572
1574
  instructions: Array<TransactionInstruction>;
1573
1575
  recentBlockhash: Blockhash;
1574
1576
  addressLookupTableAccounts?: Array<AddressLookupTableAccount>;
1575
1577
  };
1576
- export type GetAccountKeysArgs =
1578
+ type GetAccountKeysArgs =
1577
1579
  | {
1578
1580
  accountKeysFromLookups?: AccountKeysFromLookups | null;
1579
1581
  }
@@ -1602,7 +1604,7 @@ declare module '@solana/web3.js' {
1602
1604
  static deserialize(serializedMessage: Uint8Array): MessageV0;
1603
1605
  }
1604
1606
 
1605
- export type VersionedMessage = Message | MessageV0;
1607
+ type VersionedMessage = Message | MessageV0;
1606
1608
  export const VersionedMessage: {
1607
1609
  deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number;
1608
1610
  deserialize: (serializedMessage: Uint8Array) => VersionedMessage;
@@ -1611,7 +1613,7 @@ declare module '@solana/web3.js' {
1611
1613
  /**
1612
1614
  * The message header, identifying signed and read-only account
1613
1615
  */
1614
- export type MessageHeader = {
1616
+ type MessageHeader = {
1615
1617
  /**
1616
1618
  * The number of signatures required for this message to be considered valid. The
1617
1619
  * signatures must match the first `numRequiredSignatures` of `accountKeys`.
@@ -1625,7 +1627,7 @@ declare module '@solana/web3.js' {
1625
1627
  /**
1626
1628
  * An address table lookup used to load additional accounts
1627
1629
  */
1628
- export type MessageAddressTableLookup = {
1630
+ type MessageAddressTableLookup = {
1629
1631
  accountKey: PublicKey;
1630
1632
  writableIndexes: Array<number>;
1631
1633
  readonlyIndexes: Array<number>;
@@ -1637,7 +1639,7 @@ declare module '@solana/web3.js' {
1637
1639
  * @property {number[]} accountKeyIndexes
1638
1640
  * @property {Uint8Array} data
1639
1641
  */
1640
- export type MessageCompiledInstruction = {
1642
+ type MessageCompiledInstruction = {
1641
1643
  /** Index into the transaction keys array indicating the program account that executes this instruction */
1642
1644
  programIdIndex: number;
1643
1645
  /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */
@@ -1649,7 +1651,7 @@ declare module '@solana/web3.js' {
1649
1651
  /**
1650
1652
  * Transaction signature as base-58 encoded string
1651
1653
  */
1652
- export type TransactionSignature = string;
1654
+ type TransactionSignature = string;
1653
1655
  export const enum TransactionStatus {
1654
1656
  BLOCKHEIGHT_EXCEEDED = 0,
1655
1657
  PROCESSED = 1,
@@ -1659,7 +1661,7 @@ declare module '@solana/web3.js' {
1659
1661
  /**
1660
1662
  * Account metadata used to define instructions
1661
1663
  */
1662
- export type AccountMeta = {
1664
+ type AccountMeta = {
1663
1665
  /** An account's public key */
1664
1666
  pubkey: PublicKey;
1665
1667
  /** True if an instruction requires a transaction signature matching `pubkey` */
@@ -1670,7 +1672,7 @@ declare module '@solana/web3.js' {
1670
1672
  /**
1671
1673
  * List of TransactionInstruction object fields that may be initialized at construction
1672
1674
  */
1673
- export type TransactionInstructionCtorFields = {
1675
+ type TransactionInstructionCtorFields = {
1674
1676
  keys: Array<AccountMeta>;
1675
1677
  programId: PublicKey;
1676
1678
  data?: Buffer;
@@ -1678,7 +1680,7 @@ declare module '@solana/web3.js' {
1678
1680
  /**
1679
1681
  * Configuration object for Transaction.serialize()
1680
1682
  */
1681
- export type SerializeConfig = {
1683
+ type SerializeConfig = {
1682
1684
  /** Require all transaction signatures be present (default: true) */
1683
1685
  requireAllSignatures?: boolean;
1684
1686
  /** Verify provided signatures (default: true) */
@@ -1706,14 +1708,14 @@ declare module '@solana/web3.js' {
1706
1708
  /**
1707
1709
  * Pair of signature and corresponding public key
1708
1710
  */
1709
- export type SignaturePubkeyPair = {
1711
+ type SignaturePubkeyPair = {
1710
1712
  signature: Buffer | null;
1711
1713
  publicKey: PublicKey;
1712
1714
  };
1713
1715
  /**
1714
1716
  * List of Transaction object fields that may be initialized at construction
1715
1717
  */
1716
- export type TransactionCtorFields_DEPRECATED = {
1718
+ type TransactionCtorFields_DEPRECATED = {
1717
1719
  /** Optional nonce information used for offline nonce'd transactions */
1718
1720
  nonceInfo?: NonceInformation | null;
1719
1721
  /** The transaction fee payer */
@@ -1723,13 +1725,13 @@ declare module '@solana/web3.js' {
1723
1725
  /** A recent blockhash */
1724
1726
  recentBlockhash?: Blockhash;
1725
1727
  };
1726
- export type TransactionCtorFields = TransactionCtorFields_DEPRECATED;
1728
+ type TransactionCtorFields = TransactionCtorFields_DEPRECATED;
1727
1729
  /**
1728
1730
  * Blockhash-based transactions have a lifetime that are defined by
1729
1731
  * the blockhash they include. Any transaction whose blockhash is
1730
1732
  * too old will be rejected.
1731
1733
  */
1732
- export type TransactionBlockhashCtor = {
1734
+ type TransactionBlockhashCtor = {
1733
1735
  /** The transaction fee payer */
1734
1736
  feePayer?: PublicKey | null;
1735
1737
  /** One or more signatures */
@@ -1742,7 +1744,7 @@ declare module '@solana/web3.js' {
1742
1744
  /**
1743
1745
  * Use these options to construct a durable nonce transaction.
1744
1746
  */
1745
- export type TransactionNonceCtor = {
1747
+ type TransactionNonceCtor = {
1746
1748
  /** The transaction fee payer */
1747
1749
  feePayer?: PublicKey | null;
1748
1750
  minContextSlot: number;
@@ -1753,7 +1755,7 @@ declare module '@solana/web3.js' {
1753
1755
  /**
1754
1756
  * Nonce information to be used to build an offline Transaction.
1755
1757
  */
1756
- export type NonceInformation = {
1758
+ type NonceInformation = {
1757
1759
  /** The current blockhash stored in the nonce */
1758
1760
  nonce: Blockhash;
1759
1761
  /** AdvanceNonceAccount Instruction */
@@ -1886,12 +1888,12 @@ declare module '@solana/web3.js' {
1886
1888
  static populate(message: Message, signatures?: Array<string>): Transaction;
1887
1889
  }
1888
1890
 
1889
- export type TransactionMessageArgs = {
1891
+ type TransactionMessageArgs = {
1890
1892
  payerKey: PublicKey;
1891
1893
  instructions: Array<TransactionInstruction>;
1892
1894
  recentBlockhash: Blockhash;
1893
1895
  };
1894
- export type DecompileArgs =
1896
+ type DecompileArgs =
1895
1897
  | {
1896
1898
  accountKeysFromLookups: AccountKeysFromLookups;
1897
1899
  }
@@ -1913,7 +1915,7 @@ declare module '@solana/web3.js' {
1913
1915
  ): MessageV0;
1914
1916
  }
1915
1917
 
1916
- export type TransactionVersion = 'legacy' | 0;
1918
+ type TransactionVersion = 'legacy' | 0;
1917
1919
  /**
1918
1920
  * Versioned transaction class
1919
1921
  */
@@ -1928,8 +1930,8 @@ declare module '@solana/web3.js' {
1928
1930
  addSignature(publicKey: PublicKey, signature: Uint8Array): void;
1929
1931
  }
1930
1932
 
1931
- export type ClientSubscriptionId = number;
1932
- export type TokenAccountsFilter =
1933
+ type ClientSubscriptionId = number;
1934
+ type TokenAccountsFilter =
1933
1935
  | {
1934
1936
  mint: PublicKey;
1935
1937
  }
@@ -1939,13 +1941,13 @@ declare module '@solana/web3.js' {
1939
1941
  /**
1940
1942
  * Extra contextual information for RPC responses
1941
1943
  */
1942
- export type Context = {
1944
+ type Context = {
1943
1945
  slot: number;
1944
1946
  };
1945
1947
  /**
1946
1948
  * Options for sending transactions
1947
1949
  */
1948
- export type SendOptions = {
1950
+ type SendOptions = {
1949
1951
  /** disable transaction verification step */
1950
1952
  skipPreflight?: boolean;
1951
1953
  /** preflight commitment level */
@@ -1958,7 +1960,7 @@ declare module '@solana/web3.js' {
1958
1960
  /**
1959
1961
  * Options for confirming transactions
1960
1962
  */
1961
- export type ConfirmOptions = {
1963
+ type ConfirmOptions = {
1962
1964
  /** disable transaction verification step */
1963
1965
  skipPreflight?: boolean;
1964
1966
  /** desired commitment level */
@@ -1973,7 +1975,7 @@ declare module '@solana/web3.js' {
1973
1975
  /**
1974
1976
  * Options for getConfirmedSignaturesForAddress2
1975
1977
  */
1976
- export type ConfirmedSignaturesForAddress2Options = {
1978
+ type ConfirmedSignaturesForAddress2Options = {
1977
1979
  /**
1978
1980
  * Start searching backwards from this transaction signature.
1979
1981
  * @remark If not provided the search starts from the highest max confirmed block.
@@ -1987,7 +1989,7 @@ declare module '@solana/web3.js' {
1987
1989
  /**
1988
1990
  * Options for getSignaturesForAddress
1989
1991
  */
1990
- export type SignaturesForAddressOptions = {
1992
+ type SignaturesForAddressOptions = {
1991
1993
  /**
1992
1994
  * Start searching backwards from this transaction signature.
1993
1995
  * @remark If not provided the search starts from the highest max confirmed block.
@@ -2003,13 +2005,13 @@ declare module '@solana/web3.js' {
2003
2005
  /**
2004
2006
  * RPC Response with extra contextual information
2005
2007
  */
2006
- export type RpcResponseAndContext<T> = {
2008
+ type RpcResponseAndContext<T> = {
2007
2009
  /** response context */
2008
2010
  context: Context;
2009
2011
  /** response value */
2010
2012
  value: T;
2011
2013
  };
2012
- export type BlockhashWithExpiryBlockHeight = Readonly<{
2014
+ type BlockhashWithExpiryBlockHeight = Readonly<{
2013
2015
  blockhash: Blockhash;
2014
2016
  lastValidBlockHeight: number;
2015
2017
  }>;
@@ -2017,30 +2019,37 @@ declare module '@solana/web3.js' {
2017
2019
  * A strategy for confirming transactions that uses the last valid
2018
2020
  * block height for a given blockhash to check for transaction expiration.
2019
2021
  */
2020
- export type BlockheightBasedTransactionConfirmationStrategy = {
2021
- signature: TransactionSignature;
2022
- } & BlockhashWithExpiryBlockHeight;
2022
+ type BlockheightBasedTransactionConfirmationStrategy =
2023
+ BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;
2023
2024
  /**
2024
2025
  * A strategy for confirming durable nonce transactions.
2025
2026
  */
2026
- export type DurableNonceTransactionConfirmationStrategy = {
2027
- /**
2028
- * The lowest slot at which to fetch the nonce value from the
2029
- * nonce account. This should be no lower than the slot at
2030
- * which the last-known value of the nonce was fetched.
2031
- */
2032
- minContextSlot: number;
2033
- /**
2034
- * The account where the current value of the nonce is stored.
2035
- */
2036
- nonceAccountPubkey: PublicKey;
2037
- /**
2038
- * The nonce value that was used to sign the transaction
2039
- * for which confirmation is being sought.
2040
- */
2041
- nonceValue: DurableNonce;
2027
+ type DurableNonceTransactionConfirmationStrategy =
2028
+ BaseTransactionConfirmationStrategy & {
2029
+ /**
2030
+ * The lowest slot at which to fetch the nonce value from the
2031
+ * nonce account. This should be no lower than the slot at
2032
+ * which the last-known value of the nonce was fetched.
2033
+ */
2034
+ minContextSlot: number;
2035
+ /**
2036
+ * The account where the current value of the nonce is stored.
2037
+ */
2038
+ nonceAccountPubkey: PublicKey;
2039
+ /**
2040
+ * The nonce value that was used to sign the transaction
2041
+ * for which confirmation is being sought.
2042
+ */
2043
+ nonceValue: DurableNonce;
2044
+ };
2045
+ /**
2046
+ * Properties shared by all transaction confirmation strategies
2047
+ */
2048
+ type BaseTransactionConfirmationStrategy = Readonly<{
2049
+ /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */
2050
+ abortSignal?: AbortSignal;
2042
2051
  signature: TransactionSignature;
2043
- };
2052
+ }>;
2044
2053
  /**
2045
2054
  * The level of commitment desired when querying state
2046
2055
  * <pre>
@@ -2049,7 +2058,7 @@ declare module '@solana/web3.js' {
2049
2058
  * 'finalized': Query the most recent block which has been finalized by the cluster
2050
2059
  * </pre>
2051
2060
  */
2052
- export type Commitment =
2061
+ type Commitment =
2053
2062
  | 'processed'
2054
2063
  | 'confirmed'
2055
2064
  | 'finalized'
@@ -2065,7 +2074,7 @@ declare module '@solana/web3.js' {
2065
2074
  * 'finalized': Query the most recent block which has been finalized by the cluster
2066
2075
  * </pre>
2067
2076
  */
2068
- export type Finality = 'confirmed' | 'finalized';
2077
+ type Finality = 'confirmed' | 'finalized';
2069
2078
  /**
2070
2079
  * Filter for largest accounts query
2071
2080
  * <pre>
@@ -2073,11 +2082,11 @@ declare module '@solana/web3.js' {
2073
2082
  * 'nonCirculating': Return the largest accounts that are not part of the circulating supply
2074
2083
  * </pre>
2075
2084
  */
2076
- export type LargestAccountsFilter = 'circulating' | 'nonCirculating';
2085
+ type LargestAccountsFilter = 'circulating' | 'nonCirculating';
2077
2086
  /**
2078
2087
  * Configuration object for changing `getAccountInfo` query behavior
2079
2088
  */
2080
- export type GetAccountInfoConfig = {
2089
+ type GetAccountInfoConfig = {
2081
2090
  /** The level of commitment desired */
2082
2091
  commitment?: Commitment;
2083
2092
  /** The minimum slot that the request can be evaluated at */
@@ -2088,7 +2097,7 @@ declare module '@solana/web3.js' {
2088
2097
  /**
2089
2098
  * Configuration object for changing `getBalance` query behavior
2090
2099
  */
2091
- export type GetBalanceConfig = {
2100
+ type GetBalanceConfig = {
2092
2101
  /** The level of commitment desired */
2093
2102
  commitment?: Commitment;
2094
2103
  /** The minimum slot that the request can be evaluated at */
@@ -2097,7 +2106,7 @@ declare module '@solana/web3.js' {
2097
2106
  /**
2098
2107
  * Configuration object for changing `getBlock` query behavior
2099
2108
  */
2100
- export type GetBlockConfig = {
2109
+ type GetBlockConfig = {
2101
2110
  /** The level of finality desired */
2102
2111
  commitment?: Finality;
2103
2112
  /**
@@ -2116,7 +2125,7 @@ declare module '@solana/web3.js' {
2116
2125
  /**
2117
2126
  * Configuration object for changing `getBlock` query behavior
2118
2127
  */
2119
- export type GetVersionedBlockConfig = {
2128
+ type GetVersionedBlockConfig = {
2120
2129
  /** The level of finality desired */
2121
2130
  commitment?: Finality;
2122
2131
  /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */
@@ -2137,14 +2146,14 @@ declare module '@solana/web3.js' {
2137
2146
  /**
2138
2147
  * Configuration object for changing `getStakeMinimumDelegation` query behavior
2139
2148
  */
2140
- export type GetStakeMinimumDelegationConfig = {
2149
+ type GetStakeMinimumDelegationConfig = {
2141
2150
  /** The level of commitment desired */
2142
2151
  commitment?: Commitment;
2143
2152
  };
2144
2153
  /**
2145
2154
  * Configuration object for changing `getBlockHeight` query behavior
2146
2155
  */
2147
- export type GetBlockHeightConfig = {
2156
+ type GetBlockHeightConfig = {
2148
2157
  /** The level of commitment desired */
2149
2158
  commitment?: Commitment;
2150
2159
  /** The minimum slot that the request can be evaluated at */
@@ -2153,7 +2162,7 @@ declare module '@solana/web3.js' {
2153
2162
  /**
2154
2163
  * Configuration object for changing `getEpochInfo` query behavior
2155
2164
  */
2156
- export type GetEpochInfoConfig = {
2165
+ type GetEpochInfoConfig = {
2157
2166
  /** The level of commitment desired */
2158
2167
  commitment?: Commitment;
2159
2168
  /** The minimum slot that the request can be evaluated at */
@@ -2162,7 +2171,7 @@ declare module '@solana/web3.js' {
2162
2171
  /**
2163
2172
  * Configuration object for changing `getInflationReward` query behavior
2164
2173
  */
2165
- export type GetInflationRewardConfig = {
2174
+ type GetInflationRewardConfig = {
2166
2175
  /** The level of commitment desired */
2167
2176
  commitment?: Commitment;
2168
2177
  /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */
@@ -2173,7 +2182,7 @@ declare module '@solana/web3.js' {
2173
2182
  /**
2174
2183
  * Configuration object for changing `getLatestBlockhash` query behavior
2175
2184
  */
2176
- export type GetLatestBlockhashConfig = {
2185
+ type GetLatestBlockhashConfig = {
2177
2186
  /** The level of commitment desired */
2178
2187
  commitment?: Commitment;
2179
2188
  /** The minimum slot that the request can be evaluated at */
@@ -2182,7 +2191,7 @@ declare module '@solana/web3.js' {
2182
2191
  /**
2183
2192
  * Configuration object for changing `getSlot` query behavior
2184
2193
  */
2185
- export type GetSlotConfig = {
2194
+ type GetSlotConfig = {
2186
2195
  /** The level of commitment desired */
2187
2196
  commitment?: Commitment;
2188
2197
  /** The minimum slot that the request can be evaluated at */
@@ -2191,7 +2200,7 @@ declare module '@solana/web3.js' {
2191
2200
  /**
2192
2201
  * Configuration object for changing `getSlotLeader` query behavior
2193
2202
  */
2194
- export type GetSlotLeaderConfig = {
2203
+ type GetSlotLeaderConfig = {
2195
2204
  /** The level of commitment desired */
2196
2205
  commitment?: Commitment;
2197
2206
  /** The minimum slot that the request can be evaluated at */
@@ -2200,14 +2209,14 @@ declare module '@solana/web3.js' {
2200
2209
  /**
2201
2210
  * Configuration object for changing `getTransaction` query behavior
2202
2211
  */
2203
- export type GetTransactionConfig = {
2212
+ type GetTransactionConfig = {
2204
2213
  /** The level of finality desired */
2205
2214
  commitment?: Finality;
2206
2215
  };
2207
2216
  /**
2208
2217
  * Configuration object for changing `getTransaction` query behavior
2209
2218
  */
2210
- export type GetVersionedTransactionConfig = {
2219
+ type GetVersionedTransactionConfig = {
2211
2220
  /** The level of finality desired */
2212
2221
  commitment?: Finality;
2213
2222
  /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */
@@ -2216,7 +2225,7 @@ declare module '@solana/web3.js' {
2216
2225
  /**
2217
2226
  * Configuration object for changing `getLargestAccounts` query behavior
2218
2227
  */
2219
- export type GetLargestAccountsConfig = {
2228
+ type GetLargestAccountsConfig = {
2220
2229
  /** The level of commitment desired */
2221
2230
  commitment?: Commitment;
2222
2231
  /** Filter largest accounts by whether they are part of the circulating supply */
@@ -2225,7 +2234,7 @@ declare module '@solana/web3.js' {
2225
2234
  /**
2226
2235
  * Configuration object for changing `getSupply` request behavior
2227
2236
  */
2228
- export type GetSupplyConfig = {
2237
+ type GetSupplyConfig = {
2229
2238
  /** The level of commitment desired */
2230
2239
  commitment?: Commitment;
2231
2240
  /** Exclude non circulating accounts list from response */
@@ -2234,14 +2243,14 @@ declare module '@solana/web3.js' {
2234
2243
  /**
2235
2244
  * Configuration object for changing query behavior
2236
2245
  */
2237
- export type SignatureStatusConfig = {
2246
+ type SignatureStatusConfig = {
2238
2247
  /** enable searching status history, not needed for recent transactions */
2239
2248
  searchTransactionHistory: boolean;
2240
2249
  };
2241
2250
  /**
2242
2251
  * Information describing a cluster node
2243
2252
  */
2244
- export type ContactInfo = {
2253
+ type ContactInfo = {
2245
2254
  /** Identity public key of the node */
2246
2255
  pubkey: string;
2247
2256
  /** Gossip network address for the node */
@@ -2256,7 +2265,7 @@ declare module '@solana/web3.js' {
2256
2265
  /**
2257
2266
  * Information describing a vote account
2258
2267
  */
2259
- export type VoteAccountInfo = {
2268
+ type VoteAccountInfo = {
2260
2269
  /** Public key of the vote account */
2261
2270
  votePubkey: string;
2262
2271
  /** Identity public key of the node voting with this account */
@@ -2275,7 +2284,7 @@ declare module '@solana/web3.js' {
2275
2284
  /**
2276
2285
  * A collection of cluster vote accounts
2277
2286
  */
2278
- export type VoteAccountStatus = {
2287
+ type VoteAccountStatus = {
2279
2288
  /** Active vote accounts */
2280
2289
  current: Array<VoteAccountInfo>;
2281
2290
  /** Inactive vote accounts */
@@ -2285,7 +2294,7 @@ declare module '@solana/web3.js' {
2285
2294
  * Network Inflation
2286
2295
  * (see https://docs.solana.com/implemented-proposals/ed_overview)
2287
2296
  */
2288
- export type InflationGovernor = {
2297
+ type InflationGovernor = {
2289
2298
  foundation: number;
2290
2299
  foundationTerm: number;
2291
2300
  initial: number;
@@ -2295,7 +2304,7 @@ declare module '@solana/web3.js' {
2295
2304
  /**
2296
2305
  * The inflation reward for an epoch
2297
2306
  */
2298
- export type InflationReward = {
2307
+ type InflationReward = {
2299
2308
  /** epoch for which the reward occurs */
2300
2309
  epoch: number;
2301
2310
  /** the slot in which the rewards are effective */
@@ -2308,7 +2317,7 @@ declare module '@solana/web3.js' {
2308
2317
  /**
2309
2318
  * Information about the current epoch
2310
2319
  */
2311
- export type EpochInfo = {
2320
+ type EpochInfo = {
2312
2321
  epoch: number;
2313
2322
  slotIndex: number;
2314
2323
  slotsInEpoch: number;
@@ -2320,18 +2329,18 @@ declare module '@solana/web3.js' {
2320
2329
  * Leader schedule
2321
2330
  * (see https://docs.solana.com/terminology#leader-schedule)
2322
2331
  */
2323
- export type LeaderSchedule = {
2332
+ type LeaderSchedule = {
2324
2333
  [address: string]: number[];
2325
2334
  };
2326
2335
  /**
2327
2336
  * Version info for a node
2328
2337
  */
2329
- export type Version = {
2338
+ type Version = {
2330
2339
  /** Version of solana-core */
2331
2340
  'solana-core': string;
2332
2341
  'feature-set'?: number;
2333
2342
  };
2334
- export type SimulatedTransactionAccountInfo = {
2343
+ type SimulatedTransactionAccountInfo = {
2335
2344
  /** `true` if this account's data contains a loaded program */
2336
2345
  executable: boolean;
2337
2346
  /** Identifier of the program that owns the account */
@@ -2343,12 +2352,12 @@ declare module '@solana/web3.js' {
2343
2352
  /** Optional rent epoch info for account */
2344
2353
  rentEpoch?: number;
2345
2354
  };
2346
- export type TransactionReturnDataEncoding = 'base64';
2347
- export type TransactionReturnData = {
2355
+ type TransactionReturnDataEncoding = 'base64';
2356
+ type TransactionReturnData = {
2348
2357
  programId: string;
2349
2358
  data: [string, TransactionReturnDataEncoding];
2350
2359
  };
2351
- export type SimulateTransactionConfig = {
2360
+ type SimulateTransactionConfig = {
2352
2361
  /** Optional parameter used to enable signature verification before simulation */
2353
2362
  sigVerify?: boolean;
2354
2363
  /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */
@@ -2363,18 +2372,18 @@ declare module '@solana/web3.js' {
2363
2372
  /** Optional parameter used to specify the minimum block slot that can be used for simulation */
2364
2373
  minContextSlot?: number;
2365
2374
  };
2366
- export type SimulatedTransactionResponse = {
2375
+ type SimulatedTransactionResponse = {
2367
2376
  err: TransactionError | string | null;
2368
2377
  logs: Array<string> | null;
2369
2378
  accounts?: (SimulatedTransactionAccountInfo | null)[] | null;
2370
2379
  unitsConsumed?: number;
2371
2380
  returnData?: TransactionReturnData | null;
2372
2381
  };
2373
- export type ParsedInnerInstruction = {
2382
+ type ParsedInnerInstruction = {
2374
2383
  index: number;
2375
2384
  instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];
2376
2385
  };
2377
- export type TokenBalance = {
2386
+ type TokenBalance = {
2378
2387
  accountIndex: number;
2379
2388
  mint: string;
2380
2389
  owner?: string;
@@ -2385,18 +2394,18 @@ declare module '@solana/web3.js' {
2385
2394
  *
2386
2395
  * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionMeta} instead.
2387
2396
  */
2388
- export type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;
2397
+ type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;
2389
2398
  /**
2390
2399
  * Collection of addresses loaded by a transaction using address table lookups
2391
2400
  */
2392
- export type LoadedAddresses = {
2401
+ type LoadedAddresses = {
2393
2402
  writable: Array<PublicKey>;
2394
2403
  readonly: Array<PublicKey>;
2395
2404
  };
2396
2405
  /**
2397
2406
  * Metadata for a parsed transaction on the ledger
2398
2407
  */
2399
- export type ParsedTransactionMeta = {
2408
+ type ParsedTransactionMeta = {
2400
2409
  /** The fee charged for processing the transaction */
2401
2410
  fee: number;
2402
2411
  /** An array of cross program invoked parsed instructions */
@@ -2418,14 +2427,14 @@ declare module '@solana/web3.js' {
2418
2427
  /** The compute units consumed after processing the transaction */
2419
2428
  computeUnitsConsumed?: number;
2420
2429
  };
2421
- export type CompiledInnerInstruction = {
2430
+ type CompiledInnerInstruction = {
2422
2431
  index: number;
2423
2432
  instructions: CompiledInstruction[];
2424
2433
  };
2425
2434
  /**
2426
2435
  * Metadata for a confirmed transaction on the ledger
2427
2436
  */
2428
- export type ConfirmedTransactionMeta = {
2437
+ type ConfirmedTransactionMeta = {
2429
2438
  /** The fee charged for processing the transaction */
2430
2439
  fee: number;
2431
2440
  /** An array of cross program invoked instructions */
@@ -2450,7 +2459,7 @@ declare module '@solana/web3.js' {
2450
2459
  /**
2451
2460
  * A processed transaction from the RPC API
2452
2461
  */
2453
- export type TransactionResponse = {
2462
+ type TransactionResponse = {
2454
2463
  /** The slot during which the transaction was processed */
2455
2464
  slot: number;
2456
2465
  /** The transaction */
@@ -2468,7 +2477,7 @@ declare module '@solana/web3.js' {
2468
2477
  /**
2469
2478
  * A processed transaction from the RPC API
2470
2479
  */
2471
- export type VersionedTransactionResponse = {
2480
+ type VersionedTransactionResponse = {
2472
2481
  /** The slot during which the transaction was processed */
2473
2482
  slot: number;
2474
2483
  /** The transaction */
@@ -2490,7 +2499,7 @@ declare module '@solana/web3.js' {
2490
2499
  *
2491
2500
  * @deprecated Deprecated since Solana v1.8.0.
2492
2501
  */
2493
- export type ConfirmedTransaction = {
2502
+ type ConfirmedTransaction = {
2494
2503
  /** The slot during which the transaction was processed */
2495
2504
  slot: number;
2496
2505
  /** The details of the transaction */
@@ -2503,7 +2512,7 @@ declare module '@solana/web3.js' {
2503
2512
  /**
2504
2513
  * A partially decoded transaction instruction
2505
2514
  */
2506
- export type PartiallyDecodedInstruction = {
2515
+ type PartiallyDecodedInstruction = {
2507
2516
  /** Program id called by this instruction */
2508
2517
  programId: PublicKey;
2509
2518
  /** Public keys of accounts passed to this instruction */
@@ -2514,7 +2523,7 @@ declare module '@solana/web3.js' {
2514
2523
  /**
2515
2524
  * A parsed transaction message account
2516
2525
  */
2517
- export type ParsedMessageAccount = {
2526
+ type ParsedMessageAccount = {
2518
2527
  /** Public key of the account */
2519
2528
  pubkey: PublicKey;
2520
2529
  /** Indicates if the account signed the transaction */
@@ -2527,7 +2536,7 @@ declare module '@solana/web3.js' {
2527
2536
  /**
2528
2537
  * A parsed transaction instruction
2529
2538
  */
2530
- export type ParsedInstruction = {
2539
+ type ParsedInstruction = {
2531
2540
  /** Name of the program for this instruction */
2532
2541
  program: string;
2533
2542
  /** ID of the program for this instruction */
@@ -2538,7 +2547,7 @@ declare module '@solana/web3.js' {
2538
2547
  /**
2539
2548
  * A parsed address table lookup
2540
2549
  */
2541
- export type ParsedAddressTableLookup = {
2550
+ type ParsedAddressTableLookup = {
2542
2551
  /** Address lookup table account key */
2543
2552
  accountKey: PublicKey;
2544
2553
  /** Parsed instruction info */
@@ -2549,7 +2558,7 @@ declare module '@solana/web3.js' {
2549
2558
  /**
2550
2559
  * A parsed transaction message
2551
2560
  */
2552
- export type ParsedMessage = {
2561
+ type ParsedMessage = {
2553
2562
  /** Accounts used in the instructions */
2554
2563
  accountKeys: ParsedMessageAccount[];
2555
2564
  /** The atomically executed instructions for the transaction */
@@ -2562,7 +2571,7 @@ declare module '@solana/web3.js' {
2562
2571
  /**
2563
2572
  * A parsed transaction
2564
2573
  */
2565
- export type ParsedTransaction = {
2574
+ type ParsedTransaction = {
2566
2575
  /** Signatures for the transaction */
2567
2576
  signatures: Array<string>;
2568
2577
  /** Message of the transaction */
@@ -2573,11 +2582,11 @@ declare module '@solana/web3.js' {
2573
2582
  *
2574
2583
  * @deprecated Deprecated since Solana v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.
2575
2584
  */
2576
- export type ParsedConfirmedTransaction = ParsedTransactionWithMeta;
2585
+ type ParsedConfirmedTransaction = ParsedTransactionWithMeta;
2577
2586
  /**
2578
2587
  * A parsed transaction on the ledger with meta
2579
2588
  */
2580
- export type ParsedTransactionWithMeta = {
2589
+ type ParsedTransactionWithMeta = {
2581
2590
  /** The slot during which the transaction was processed */
2582
2591
  slot: number;
2583
2592
  /** The details of the transaction */
@@ -2592,7 +2601,7 @@ declare module '@solana/web3.js' {
2592
2601
  /**
2593
2602
  * A processed block fetched from the RPC API
2594
2603
  */
2595
- export type BlockResponse = {
2604
+ type BlockResponse = {
2596
2605
  /** Blockhash of this block */
2597
2606
  blockhash: Blockhash;
2598
2607
  /** Blockhash of this block's parent */
@@ -2630,15 +2639,15 @@ declare module '@solana/web3.js' {
2630
2639
  /**
2631
2640
  * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`
2632
2641
  */
2633
- export type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;
2642
+ type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;
2634
2643
  /**
2635
2644
  * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`
2636
2645
  */
2637
- export type NoneModeBlockResponse = VersionedNoneModeBlockResponse;
2646
+ type NoneModeBlockResponse = VersionedNoneModeBlockResponse;
2638
2647
  /**
2639
2648
  * A block with parsed transactions
2640
2649
  */
2641
- export type ParsedBlockResponse = {
2650
+ type ParsedBlockResponse = {
2642
2651
  /** Blockhash of this block */
2643
2652
  blockhash: Blockhash;
2644
2653
  /** Blockhash of this block's parent */
@@ -2673,7 +2682,7 @@ declare module '@solana/web3.js' {
2673
2682
  /**
2674
2683
  * A block with parsed transactions where the `transactionDetails` mode is `accounts`
2675
2684
  */
2676
- export type ParsedAccountsModeBlockResponse = Omit<
2685
+ type ParsedAccountsModeBlockResponse = Omit<
2677
2686
  ParsedBlockResponse,
2678
2687
  'transactions'
2679
2688
  > & {
@@ -2691,14 +2700,11 @@ declare module '@solana/web3.js' {
2691
2700
  /**
2692
2701
  * A block with parsed transactions where the `transactionDetails` mode is `none`
2693
2702
  */
2694
- export type ParsedNoneModeBlockResponse = Omit<
2695
- ParsedBlockResponse,
2696
- 'transactions'
2697
- >;
2703
+ type ParsedNoneModeBlockResponse = Omit<ParsedBlockResponse, 'transactions'>;
2698
2704
  /**
2699
2705
  * A processed block fetched from the RPC API
2700
2706
  */
2701
- export type VersionedBlockResponse = {
2707
+ type VersionedBlockResponse = {
2702
2708
  /** Blockhash of this block */
2703
2709
  blockhash: Blockhash;
2704
2710
  /** Blockhash of this block's parent */
@@ -2736,7 +2742,7 @@ declare module '@solana/web3.js' {
2736
2742
  /**
2737
2743
  * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`
2738
2744
  */
2739
- export type VersionedAccountsModeBlockResponse = Omit<
2745
+ type VersionedAccountsModeBlockResponse = Omit<
2740
2746
  VersionedBlockResponse,
2741
2747
  'transactions'
2742
2748
  > & {
@@ -2754,7 +2760,7 @@ declare module '@solana/web3.js' {
2754
2760
  /**
2755
2761
  * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`
2756
2762
  */
2757
- export type VersionedNoneModeBlockResponse = Omit<
2763
+ type VersionedNoneModeBlockResponse = Omit<
2758
2764
  VersionedBlockResponse,
2759
2765
  'transactions'
2760
2766
  >;
@@ -2763,7 +2769,7 @@ declare module '@solana/web3.js' {
2763
2769
  *
2764
2770
  * @deprecated Deprecated since Solana v1.8.0.
2765
2771
  */
2766
- export type ConfirmedBlock = {
2772
+ type ConfirmedBlock = {
2767
2773
  /** Blockhash of this block */
2768
2774
  blockhash: Blockhash;
2769
2775
  /** Blockhash of this block's parent */
@@ -2788,7 +2794,7 @@ declare module '@solana/web3.js' {
2788
2794
  /**
2789
2795
  * A Block on the ledger with signatures only
2790
2796
  */
2791
- export type BlockSignatures = {
2797
+ type BlockSignatures = {
2792
2798
  /** Blockhash of this block */
2793
2799
  blockhash: Blockhash;
2794
2800
  /** Blockhash of this block's parent */
@@ -2803,7 +2809,7 @@ declare module '@solana/web3.js' {
2803
2809
  /**
2804
2810
  * recent block production information
2805
2811
  */
2806
- export type BlockProduction = Readonly<{
2812
+ type BlockProduction = Readonly<{
2807
2813
  /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */
2808
2814
  byIdentity: Readonly<Record<string, ReadonlyArray<number>>>;
2809
2815
  /** Block production slot range */
@@ -2814,7 +2820,7 @@ declare module '@solana/web3.js' {
2814
2820
  lastSlot: number;
2815
2821
  }>;
2816
2822
  }>;
2817
- export type GetBlockProductionConfig = {
2823
+ type GetBlockProductionConfig = {
2818
2824
  /** Optional commitment level */
2819
2825
  commitment?: Commitment;
2820
2826
  /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */
@@ -2830,7 +2836,7 @@ declare module '@solana/web3.js' {
2830
2836
  /**
2831
2837
  * A performance sample
2832
2838
  */
2833
- export type PerfSample = {
2839
+ type PerfSample = {
2834
2840
  /** Slot number of sample */
2835
2841
  slot: number;
2836
2842
  /** Number of transactions in a sample window */
@@ -2843,7 +2849,7 @@ declare module '@solana/web3.js' {
2843
2849
  /**
2844
2850
  * Supply
2845
2851
  */
2846
- export type Supply = {
2852
+ type Supply = {
2847
2853
  /** Total supply in lamports */
2848
2854
  total: number;
2849
2855
  /** Circulating supply in lamports */
@@ -2857,7 +2863,7 @@ declare module '@solana/web3.js' {
2857
2863
  * Token amount object which returns a token amount in different formats
2858
2864
  * for various client use cases.
2859
2865
  */
2860
- export type TokenAmount = {
2866
+ type TokenAmount = {
2861
2867
  /** Raw amount of tokens as string ignoring decimals */
2862
2868
  amount: string;
2863
2869
  /** Number of decimals configured for token's mint */
@@ -2870,7 +2876,7 @@ declare module '@solana/web3.js' {
2870
2876
  /**
2871
2877
  * Token address and balance.
2872
2878
  */
2873
- export type TokenAccountBalancePair = {
2879
+ type TokenAccountBalancePair = {
2874
2880
  /** Address of the token account */
2875
2881
  address: PublicKey;
2876
2882
  /** Raw amount of tokens as string ignoring decimals */
@@ -2885,7 +2891,7 @@ declare module '@solana/web3.js' {
2885
2891
  /**
2886
2892
  * Pair of an account address and its balance
2887
2893
  */
2888
- export type AccountBalancePair = {
2894
+ type AccountBalancePair = {
2889
2895
  address: PublicKey;
2890
2896
  lamports: number;
2891
2897
  };
@@ -2903,7 +2909,7 @@ declare module '@solana/web3.js' {
2903
2909
  * - `"frozen"`: the connected node has validated this block.
2904
2910
  * - `"dead"`: the connected node failed to validate this block.
2905
2911
  */
2906
- export type SlotUpdate =
2912
+ type SlotUpdate =
2907
2913
  | {
2908
2914
  type: 'firstShredReceived';
2909
2915
  slot: number;
@@ -2950,7 +2956,7 @@ declare module '@solana/web3.js' {
2950
2956
  /**
2951
2957
  * Information about the latest slot being processed by a node
2952
2958
  */
2953
- export type SlotInfo = {
2959
+ type SlotInfo = {
2954
2960
  /** Currently processing slot */
2955
2961
  slot: number;
2956
2962
  /** Parent of the current slot */
@@ -2961,7 +2967,7 @@ declare module '@solana/web3.js' {
2961
2967
  /**
2962
2968
  * Parsed account data
2963
2969
  */
2964
- export type ParsedAccountData = {
2970
+ type ParsedAccountData = {
2965
2971
  /** Name of the program that owns this account */
2966
2972
  program: string;
2967
2973
  /** Parsed account data */
@@ -2972,7 +2978,7 @@ declare module '@solana/web3.js' {
2972
2978
  /**
2973
2979
  * Stake Activation data
2974
2980
  */
2975
- export type StakeActivationData = {
2981
+ type StakeActivationData = {
2976
2982
  /** the stake account's activation state */
2977
2983
  state: 'active' | 'inactive' | 'activating' | 'deactivating';
2978
2984
  /** stake active during the epoch */
@@ -2983,7 +2989,7 @@ declare module '@solana/web3.js' {
2983
2989
  /**
2984
2990
  * Data slice argument for getProgramAccounts
2985
2991
  */
2986
- export type DataSlice = {
2992
+ type DataSlice = {
2987
2993
  /** offset of data slice */
2988
2994
  offset: number;
2989
2995
  /** length of data slice */
@@ -2992,7 +2998,7 @@ declare module '@solana/web3.js' {
2992
2998
  /**
2993
2999
  * Memory comparison filter for getProgramAccounts
2994
3000
  */
2995
- export type MemcmpFilter = {
3001
+ type MemcmpFilter = {
2996
3002
  memcmp: {
2997
3003
  /** offset into program account data to start comparison */
2998
3004
  offset: number;
@@ -3003,18 +3009,18 @@ declare module '@solana/web3.js' {
3003
3009
  /**
3004
3010
  * Data size comparison filter for getProgramAccounts
3005
3011
  */
3006
- export type DataSizeFilter = {
3012
+ type DataSizeFilter = {
3007
3013
  /** Size of data for program account data length comparison */
3008
3014
  dataSize: number;
3009
3015
  };
3010
3016
  /**
3011
3017
  * A filter object for getProgramAccounts
3012
3018
  */
3013
- export type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;
3019
+ type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;
3014
3020
  /**
3015
3021
  * Configuration object for getProgramAccounts requests
3016
3022
  */
3017
- export type GetProgramAccountsConfig = {
3023
+ type GetProgramAccountsConfig = {
3018
3024
  /** Optional commitment level */
3019
3025
  commitment?: Commitment;
3020
3026
  /** Optional encoding for account data (default base64)
@@ -3031,7 +3037,7 @@ declare module '@solana/web3.js' {
3031
3037
  /**
3032
3038
  * Configuration object for getParsedProgramAccounts
3033
3039
  */
3034
- export type GetParsedProgramAccountsConfig = {
3040
+ type GetParsedProgramAccountsConfig = {
3035
3041
  /** Optional commitment level */
3036
3042
  commitment?: Commitment;
3037
3043
  /** Optional array of filters to apply to accounts */
@@ -3042,7 +3048,7 @@ declare module '@solana/web3.js' {
3042
3048
  /**
3043
3049
  * Configuration object for getMultipleAccounts
3044
3050
  */
3045
- export type GetMultipleAccountsConfig = {
3051
+ type GetMultipleAccountsConfig = {
3046
3052
  /** Optional commitment level */
3047
3053
  commitment?: Commitment;
3048
3054
  /** The minimum slot that the request can be evaluated at */
@@ -3053,7 +3059,7 @@ declare module '@solana/web3.js' {
3053
3059
  /**
3054
3060
  * Configuration object for `getStakeActivation`
3055
3061
  */
3056
- export type GetStakeActivationConfig = {
3062
+ type GetStakeActivationConfig = {
3057
3063
  /** Optional commitment level */
3058
3064
  commitment?: Commitment;
3059
3065
  /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */
@@ -3064,7 +3070,7 @@ declare module '@solana/web3.js' {
3064
3070
  /**
3065
3071
  * Configuration object for `getStakeActivation`
3066
3072
  */
3067
- export type GetTokenAccountsByOwnerConfig = {
3073
+ type GetTokenAccountsByOwnerConfig = {
3068
3074
  /** Optional commitment level */
3069
3075
  commitment?: Commitment;
3070
3076
  /** The minimum slot that the request can be evaluated at */
@@ -3073,7 +3079,7 @@ declare module '@solana/web3.js' {
3073
3079
  /**
3074
3080
  * Configuration object for `getStakeActivation`
3075
3081
  */
3076
- export type GetTransactionCountConfig = {
3082
+ type GetTransactionCountConfig = {
3077
3083
  /** Optional commitment level */
3078
3084
  commitment?: Commitment;
3079
3085
  /** The minimum slot that the request can be evaluated at */
@@ -3082,7 +3088,7 @@ declare module '@solana/web3.js' {
3082
3088
  /**
3083
3089
  * Configuration object for `getNonce`
3084
3090
  */
3085
- export type GetNonceConfig = {
3091
+ type GetNonceConfig = {
3086
3092
  /** Optional commitment level */
3087
3093
  commitment?: Commitment;
3088
3094
  /** The minimum slot that the request can be evaluated at */
@@ -3091,7 +3097,7 @@ declare module '@solana/web3.js' {
3091
3097
  /**
3092
3098
  * Configuration object for `getNonceAndContext`
3093
3099
  */
3094
- export type GetNonceAndContextConfig = {
3100
+ type GetNonceAndContextConfig = {
3095
3101
  /** Optional commitment level */
3096
3102
  commitment?: Commitment;
3097
3103
  /** The minimum slot that the request can be evaluated at */
@@ -3100,7 +3106,7 @@ declare module '@solana/web3.js' {
3100
3106
  /**
3101
3107
  * Information describing an account
3102
3108
  */
3103
- export type AccountInfo<T> = {
3109
+ type AccountInfo<T> = {
3104
3110
  /** `true` if this account's data contains a loaded program */
3105
3111
  executable: boolean;
3106
3112
  /** Identifier of the program that owns the account */
@@ -3115,74 +3121,74 @@ declare module '@solana/web3.js' {
3115
3121
  /**
3116
3122
  * Account information identified by pubkey
3117
3123
  */
3118
- export type KeyedAccountInfo = {
3124
+ type KeyedAccountInfo = {
3119
3125
  accountId: PublicKey;
3120
3126
  accountInfo: AccountInfo<Buffer>;
3121
3127
  };
3122
3128
  /**
3123
3129
  * Callback function for account change notifications
3124
3130
  */
3125
- export type AccountChangeCallback = (
3131
+ type AccountChangeCallback = (
3126
3132
  accountInfo: AccountInfo<Buffer>,
3127
3133
  context: Context,
3128
3134
  ) => void;
3129
3135
  /**
3130
3136
  * Callback function for program account change notifications
3131
3137
  */
3132
- export type ProgramAccountChangeCallback = (
3138
+ type ProgramAccountChangeCallback = (
3133
3139
  keyedAccountInfo: KeyedAccountInfo,
3134
3140
  context: Context,
3135
3141
  ) => void;
3136
3142
  /**
3137
3143
  * Callback function for slot change notifications
3138
3144
  */
3139
- export type SlotChangeCallback = (slotInfo: SlotInfo) => void;
3145
+ type SlotChangeCallback = (slotInfo: SlotInfo) => void;
3140
3146
  /**
3141
3147
  * Callback function for slot update notifications
3142
3148
  */
3143
- export type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;
3149
+ type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;
3144
3150
  /**
3145
3151
  * Callback function for signature status notifications
3146
3152
  */
3147
- export type SignatureResultCallback = (
3153
+ type SignatureResultCallback = (
3148
3154
  signatureResult: SignatureResult,
3149
3155
  context: Context,
3150
3156
  ) => void;
3151
3157
  /**
3152
3158
  * Signature status notification with transaction result
3153
3159
  */
3154
- export type SignatureStatusNotification = {
3160
+ type SignatureStatusNotification = {
3155
3161
  type: 'status';
3156
3162
  result: SignatureResult;
3157
3163
  };
3158
3164
  /**
3159
3165
  * Signature received notification
3160
3166
  */
3161
- export type SignatureReceivedNotification = {
3167
+ type SignatureReceivedNotification = {
3162
3168
  type: 'received';
3163
3169
  };
3164
3170
  /**
3165
3171
  * Callback function for signature notifications
3166
3172
  */
3167
- export type SignatureSubscriptionCallback = (
3173
+ type SignatureSubscriptionCallback = (
3168
3174
  notification: SignatureStatusNotification | SignatureReceivedNotification,
3169
3175
  context: Context,
3170
3176
  ) => void;
3171
3177
  /**
3172
3178
  * Signature subscription options
3173
3179
  */
3174
- export type SignatureSubscriptionOptions = {
3180
+ type SignatureSubscriptionOptions = {
3175
3181
  commitment?: Commitment;
3176
3182
  enableReceivedNotification?: boolean;
3177
3183
  };
3178
3184
  /**
3179
3185
  * Callback function for root change notifications
3180
3186
  */
3181
- export type RootChangeCallback = (root: number) => void;
3187
+ type RootChangeCallback = (root: number) => void;
3182
3188
  /**
3183
3189
  * Logs result.
3184
3190
  */
3185
- export type Logs = {
3191
+ type Logs = {
3186
3192
  err: TransactionError | null;
3187
3193
  logs: string[];
3188
3194
  signature: string;
@@ -3190,21 +3196,21 @@ declare module '@solana/web3.js' {
3190
3196
  /**
3191
3197
  * Filter for log subscriptions.
3192
3198
  */
3193
- export type LogsFilter = PublicKey | 'all' | 'allWithVotes';
3199
+ type LogsFilter = PublicKey | 'all' | 'allWithVotes';
3194
3200
  /**
3195
3201
  * Callback function for log notifications.
3196
3202
  */
3197
- export type LogsCallback = (logs: Logs, ctx: Context) => void;
3203
+ type LogsCallback = (logs: Logs, ctx: Context) => void;
3198
3204
  /**
3199
3205
  * Signature result
3200
3206
  */
3201
- export type SignatureResult = {
3207
+ type SignatureResult = {
3202
3208
  err: TransactionError | null;
3203
3209
  };
3204
3210
  /**
3205
3211
  * Transaction error
3206
3212
  */
3207
- export type TransactionError = {} | string;
3213
+ type TransactionError = {} | string;
3208
3214
  /**
3209
3215
  * Transaction confirmation status
3210
3216
  * <pre>
@@ -3213,14 +3219,11 @@ declare module '@solana/web3.js' {
3213
3219
  * 'finalized': Transaction landed in a block which has been finalized by the cluster
3214
3220
  * </pre>
3215
3221
  */
3216
- export type TransactionConfirmationStatus =
3217
- | 'processed'
3218
- | 'confirmed'
3219
- | 'finalized';
3222
+ type TransactionConfirmationStatus = 'processed' | 'confirmed' | 'finalized';
3220
3223
  /**
3221
3224
  * Signature status
3222
3225
  */
3223
- export type SignatureStatus = {
3226
+ type SignatureStatus = {
3224
3227
  /** when the transaction was processed */
3225
3228
  slot: number;
3226
3229
  /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */
@@ -3233,7 +3236,7 @@ declare module '@solana/web3.js' {
3233
3236
  /**
3234
3237
  * A confirmed signature with its status
3235
3238
  */
3236
- export type ConfirmedSignatureInfo = {
3239
+ type ConfirmedSignatureInfo = {
3237
3240
  /** the transaction signature */
3238
3241
  signature: string;
3239
3242
  /** when the transaction was processed */
@@ -3250,7 +3253,7 @@ declare module '@solana/web3.js' {
3250
3253
  /**
3251
3254
  * An object defining headers to be passed to the RPC server
3252
3255
  */
3253
- export type HttpHeaders = {
3256
+ type HttpHeaders = {
3254
3257
  [header: string]: string;
3255
3258
  } & {
3256
3259
  'solana-client'?: never;
@@ -3258,11 +3261,11 @@ declare module '@solana/web3.js' {
3258
3261
  /**
3259
3262
  * The type of the JavaScript `fetch()` API
3260
3263
  */
3261
- export type FetchFn = typeof export_default;
3264
+ type FetchFn = typeof export_default;
3262
3265
  /**
3263
3266
  * A callback used to augment the outgoing HTTP request
3264
3267
  */
3265
- export type FetchMiddleware = (
3268
+ type FetchMiddleware = (
3266
3269
  info: Parameters<FetchFn>[0],
3267
3270
  init: Parameters<FetchFn>[1],
3268
3271
  fetch: (...a: Parameters<FetchFn>) => void,
@@ -3270,7 +3273,13 @@ declare module '@solana/web3.js' {
3270
3273
  /**
3271
3274
  * Configuration for instantiating a Connection
3272
3275
  */
3273
- export type ConnectionConfig = {
3276
+ type ConnectionConfig = {
3277
+ /**
3278
+ * An `http.Agent` that will be used to manage socket connections (eg. to implement connection
3279
+ * persistence). Set this to `false` to create a connection that uses no agent. This applies to
3280
+ * Node environments only.
3281
+ */
3282
+ httpAgent?: Agent | Agent$1 | false;
3274
3283
  /** Optional commitment level */
3275
3284
  commitment?: Commitment;
3276
3285
  /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */
@@ -3496,6 +3505,7 @@ declare module '@solana/web3.js' {
3496
3505
  strategy: TransactionSignature,
3497
3506
  commitment?: Commitment,
3498
3507
  ): Promise<RpcResponseAndContext<SignatureResult>>;
3508
+ private getCancellationPromise;
3499
3509
  private getTransactionConfirmationPromise;
3500
3510
  private confirmTransactionUsingBlockHeightExceedanceStrategy;
3501
3511
  private confirmTransactionUsingDurableNonceStrategy;
@@ -4178,7 +4188,7 @@ declare module '@solana/web3.js' {
4178
4188
  readonly JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015;
4179
4189
  readonly JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016;
4180
4190
  };
4181
- export type SolanaJSONRPCErrorCodeEnum =
4191
+ type SolanaJSONRPCErrorCodeEnum =
4182
4192
  typeof SolanaJSONRPCErrorCode[keyof typeof SolanaJSONRPCErrorCode];
4183
4193
  export class SolanaJSONRPCError extends Error {
4184
4194
  code: SolanaJSONRPCErrorCodeEnum | unknown;
@@ -4235,7 +4245,7 @@ declare module '@solana/web3.js' {
4235
4245
  /**
4236
4246
  * Info used to identity validators.
4237
4247
  */
4238
- export type Info = {
4248
+ type Info = {
4239
4249
  /** validator name */
4240
4250
  name: string;
4241
4251
  /** optional, validator website */
@@ -4277,28 +4287,28 @@ declare module '@solana/web3.js' {
4277
4287
  }
4278
4288
 
4279
4289
  export const VOTE_PROGRAM_ID: PublicKey;
4280
- export type Lockout = {
4290
+ type Lockout = {
4281
4291
  slot: number;
4282
4292
  confirmationCount: number;
4283
4293
  };
4284
4294
  /**
4285
4295
  * History of how many credits earned by the end of each epoch
4286
4296
  */
4287
- export type EpochCredits = Readonly<{
4297
+ type EpochCredits = Readonly<{
4288
4298
  epoch: number;
4289
4299
  credits: number;
4290
4300
  prevCredits: number;
4291
4301
  }>;
4292
- export type AuthorizedVoter = Readonly<{
4302
+ type AuthorizedVoter = Readonly<{
4293
4303
  epoch: number;
4294
4304
  authorizedVoter: PublicKey;
4295
4305
  }>;
4296
- export type PriorVoter = Readonly<{
4306
+ type PriorVoter = Readonly<{
4297
4307
  authorizedPubkey: PublicKey;
4298
4308
  epochOfLastAuthorizedSwitch: number;
4299
4309
  targetEpoch: number;
4300
4310
  }>;
4301
- export type BlockTimestamp = Readonly<{
4311
+ type BlockTimestamp = Readonly<{
4302
4312
  slot: number;
4303
4313
  timestamp: number;
4304
4314
  }>;
@@ -4336,7 +4346,7 @@ declare module '@solana/web3.js' {
4336
4346
  export const SYSVAR_SLOT_HISTORY_PUBKEY: PublicKey;
4337
4347
  export const SYSVAR_STAKE_HISTORY_PUBKEY: PublicKey;
4338
4348
 
4339
- export type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';
4349
+ type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';
4340
4350
  /**
4341
4351
  * Retrieves the RPC API URL for the specified cluster
4342
4352
  */
@@ -4384,7 +4394,10 @@ declare module '@solana/web3.js' {
4384
4394
  connection: Connection,
4385
4395
  transaction: Transaction,
4386
4396
  signers: Array<Signer>,
4387
- options?: ConfirmOptions,
4397
+ options?: ConfirmOptions &
4398
+ Readonly<{
4399
+ abortSignal?: AbortSignal;
4400
+ }>,
4388
4401
  ): Promise<TransactionSignature>;
4389
4402
 
4390
4403
  /**