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