@solana/web3.js 1.88.0 → 1.89.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 +64 -19
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +64 -19
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +64 -19
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.esm.js +64 -19
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +64 -19
- package/lib/index.iife.js.map +1 -1
- package/lib/index.native.js +64 -19
- package/lib/index.native.js.map +1 -1
- package/package.json +3 -3
package/lib/index.native.js
CHANGED
|
@@ -1243,20 +1243,25 @@ class TransactionInstruction {
|
|
|
1243
1243
|
// For backward compatibility; an unfortunate consequence of being
|
|
1244
1244
|
// forced to over-export types by the documentation generator.
|
|
1245
1245
|
// See https://github.com/solana-labs/solana/pull/25820
|
|
1246
|
+
|
|
1246
1247
|
/**
|
|
1247
1248
|
* Blockhash-based transactions have a lifetime that are defined by
|
|
1248
1249
|
* the blockhash they include. Any transaction whose blockhash is
|
|
1249
1250
|
* too old will be rejected.
|
|
1250
1251
|
*/
|
|
1252
|
+
|
|
1251
1253
|
/**
|
|
1252
1254
|
* Use these options to construct a durable nonce transaction.
|
|
1253
1255
|
*/
|
|
1256
|
+
|
|
1254
1257
|
/**
|
|
1255
1258
|
* Nonce information to be used to build an offline Transaction.
|
|
1256
1259
|
*/
|
|
1260
|
+
|
|
1257
1261
|
/**
|
|
1258
1262
|
* @internal
|
|
1259
1263
|
*/
|
|
1264
|
+
|
|
1260
1265
|
/**
|
|
1261
1266
|
* Transaction class
|
|
1262
1267
|
*/
|
|
@@ -3808,6 +3813,7 @@ function versionedMessageFromResponse(version, response) {
|
|
|
3808
3813
|
*/
|
|
3809
3814
|
|
|
3810
3815
|
// Deprecated as of v1.5.5
|
|
3816
|
+
|
|
3811
3817
|
/**
|
|
3812
3818
|
* A subset of Commitment levels, which are at least optimistically confirmed
|
|
3813
3819
|
* <pre>
|
|
@@ -3815,6 +3821,7 @@ function versionedMessageFromResponse(version, response) {
|
|
|
3815
3821
|
* 'finalized': Query the most recent block which has been finalized by the cluster
|
|
3816
3822
|
* </pre>
|
|
3817
3823
|
*/
|
|
3824
|
+
|
|
3818
3825
|
/**
|
|
3819
3826
|
* Filter for largest accounts query
|
|
3820
3827
|
* <pre>
|
|
@@ -3822,70 +3829,92 @@ function versionedMessageFromResponse(version, response) {
|
|
|
3822
3829
|
* 'nonCirculating': Return the largest accounts that are not part of the circulating supply
|
|
3823
3830
|
* </pre>
|
|
3824
3831
|
*/
|
|
3832
|
+
|
|
3825
3833
|
/**
|
|
3826
3834
|
* Configuration object for changing `getAccountInfo` query behavior
|
|
3827
3835
|
*/
|
|
3836
|
+
|
|
3828
3837
|
/**
|
|
3829
3838
|
* Configuration object for changing `getBalance` query behavior
|
|
3830
3839
|
*/
|
|
3840
|
+
|
|
3831
3841
|
/**
|
|
3832
3842
|
* Configuration object for changing `getBlock` query behavior
|
|
3833
3843
|
*/
|
|
3844
|
+
|
|
3834
3845
|
/**
|
|
3835
3846
|
* Configuration object for changing `getBlock` query behavior
|
|
3836
3847
|
*/
|
|
3848
|
+
|
|
3837
3849
|
/**
|
|
3838
3850
|
* Configuration object for changing `getStakeMinimumDelegation` query behavior
|
|
3839
3851
|
*/
|
|
3852
|
+
|
|
3840
3853
|
/**
|
|
3841
3854
|
* Configuration object for changing `getBlockHeight` query behavior
|
|
3842
3855
|
*/
|
|
3856
|
+
|
|
3843
3857
|
/**
|
|
3844
3858
|
* Configuration object for changing `getEpochInfo` query behavior
|
|
3845
3859
|
*/
|
|
3860
|
+
|
|
3846
3861
|
/**
|
|
3847
3862
|
* Configuration object for changing `getInflationReward` query behavior
|
|
3848
3863
|
*/
|
|
3864
|
+
|
|
3849
3865
|
/**
|
|
3850
3866
|
* Configuration object for changing `getLatestBlockhash` query behavior
|
|
3851
3867
|
*/
|
|
3868
|
+
|
|
3852
3869
|
/**
|
|
3853
3870
|
* Configuration object for changing `isBlockhashValid` query behavior
|
|
3854
3871
|
*/
|
|
3872
|
+
|
|
3855
3873
|
/**
|
|
3856
3874
|
* Configuration object for changing `getSlot` query behavior
|
|
3857
3875
|
*/
|
|
3876
|
+
|
|
3858
3877
|
/**
|
|
3859
3878
|
* Configuration object for changing `getSlotLeader` query behavior
|
|
3860
3879
|
*/
|
|
3880
|
+
|
|
3861
3881
|
/**
|
|
3862
3882
|
* Configuration object for changing `getTransaction` query behavior
|
|
3863
3883
|
*/
|
|
3884
|
+
|
|
3864
3885
|
/**
|
|
3865
3886
|
* Configuration object for changing `getTransaction` query behavior
|
|
3866
3887
|
*/
|
|
3888
|
+
|
|
3867
3889
|
/**
|
|
3868
3890
|
* Configuration object for changing `getLargestAccounts` query behavior
|
|
3869
3891
|
*/
|
|
3892
|
+
|
|
3870
3893
|
/**
|
|
3871
3894
|
* Configuration object for changing `getSupply` request behavior
|
|
3872
3895
|
*/
|
|
3896
|
+
|
|
3873
3897
|
/**
|
|
3874
3898
|
* Configuration object for changing query behavior
|
|
3875
3899
|
*/
|
|
3900
|
+
|
|
3876
3901
|
/**
|
|
3877
3902
|
* Information describing a cluster node
|
|
3878
3903
|
*/
|
|
3904
|
+
|
|
3879
3905
|
/**
|
|
3880
3906
|
* Information describing a vote account
|
|
3881
3907
|
*/
|
|
3908
|
+
|
|
3882
3909
|
/**
|
|
3883
3910
|
* A collection of cluster vote accounts
|
|
3884
3911
|
*/
|
|
3912
|
+
|
|
3885
3913
|
/**
|
|
3886
3914
|
* Network Inflation
|
|
3887
3915
|
* (see https://docs.solana.com/implemented-proposals/ed_overview)
|
|
3888
3916
|
*/
|
|
3917
|
+
|
|
3889
3918
|
const GetInflationGovernorResult = superstruct.type({
|
|
3890
3919
|
foundation: superstruct.number(),
|
|
3891
3920
|
foundationTerm: superstruct.number(),
|
|
@@ -5613,7 +5642,9 @@ class Connection {
|
|
|
5613
5642
|
return res.result;
|
|
5614
5643
|
}
|
|
5615
5644
|
|
|
5616
|
-
/** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
|
|
5645
|
+
/** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
|
|
5646
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
5647
|
+
|
|
5617
5648
|
// eslint-disable-next-line no-dupe-class-members
|
|
5618
5649
|
async confirmTransaction(strategy, commitment) {
|
|
5619
5650
|
let rawSignature;
|
|
@@ -6408,21 +6439,28 @@ class Connection {
|
|
|
6408
6439
|
/**
|
|
6409
6440
|
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
6410
6441
|
* setting the `maxSupportedTransactionVersion` property.
|
|
6411
|
-
*/
|
|
6442
|
+
*/
|
|
6443
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6444
|
+
|
|
6412
6445
|
/**
|
|
6413
6446
|
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
6414
6447
|
* setting the `maxSupportedTransactionVersion` property.
|
|
6415
6448
|
*/
|
|
6416
6449
|
// eslint-disable-next-line no-dupe-class-members
|
|
6450
|
+
|
|
6417
6451
|
/**
|
|
6418
6452
|
* Fetch a processed block from the cluster.
|
|
6419
6453
|
*/
|
|
6420
6454
|
// eslint-disable-next-line no-dupe-class-members
|
|
6455
|
+
|
|
6421
6456
|
// eslint-disable-next-line no-dupe-class-members
|
|
6457
|
+
|
|
6422
6458
|
// eslint-disable-next-line no-dupe-class-members
|
|
6459
|
+
|
|
6423
6460
|
/**
|
|
6424
6461
|
* Fetch a processed block from the cluster.
|
|
6425
|
-
*/
|
|
6462
|
+
*/
|
|
6463
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6426
6464
|
async getBlock(slot, rawConfig) {
|
|
6427
6465
|
const {
|
|
6428
6466
|
commitment,
|
|
@@ -6561,10 +6599,13 @@ class Connection {
|
|
|
6561
6599
|
|
|
6562
6600
|
/**
|
|
6563
6601
|
* Fetch a confirmed or finalized transaction from the cluster.
|
|
6564
|
-
*/
|
|
6602
|
+
*/
|
|
6603
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6604
|
+
|
|
6565
6605
|
/**
|
|
6566
6606
|
* Fetch a confirmed or finalized transaction from the cluster.
|
|
6567
|
-
*/
|
|
6607
|
+
*/
|
|
6608
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6568
6609
|
async getTransaction(signature, rawConfig) {
|
|
6569
6610
|
const {
|
|
6570
6611
|
commitment,
|
|
@@ -6643,12 +6684,15 @@ class Connection {
|
|
|
6643
6684
|
* Fetch transaction details for a batch of confirmed transactions.
|
|
6644
6685
|
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
6645
6686
|
* VersionedTransactionResponse}.
|
|
6646
|
-
*/
|
|
6687
|
+
*/
|
|
6688
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6689
|
+
|
|
6647
6690
|
/**
|
|
6648
6691
|
* Fetch transaction details for a batch of confirmed transactions.
|
|
6649
6692
|
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
6650
6693
|
* VersionedTransactionResponse}.
|
|
6651
|
-
*/
|
|
6694
|
+
*/
|
|
6695
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6652
6696
|
async getTransactions(signatures, commitmentOrConfig) {
|
|
6653
6697
|
const {
|
|
6654
6698
|
commitment,
|
|
@@ -7074,10 +7118,13 @@ class Connection {
|
|
|
7074
7118
|
|
|
7075
7119
|
/**
|
|
7076
7120
|
* Simulate a transaction
|
|
7077
|
-
*/
|
|
7121
|
+
*/
|
|
7122
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7123
|
+
|
|
7078
7124
|
/**
|
|
7079
7125
|
* Simulate a transaction
|
|
7080
|
-
*/
|
|
7126
|
+
*/
|
|
7127
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7081
7128
|
async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {
|
|
7082
7129
|
if ('message' in transactionOrMessage) {
|
|
7083
7130
|
const versionedTx = transactionOrMessage;
|
|
@@ -7129,7 +7176,6 @@ class Connection {
|
|
|
7129
7176
|
if (!transaction.signature) {
|
|
7130
7177
|
throw new Error('!signature'); // should never happen
|
|
7131
7178
|
}
|
|
7132
|
-
|
|
7133
7179
|
const signature = transaction.signature.toString('base64');
|
|
7134
7180
|
if (!this._blockhashInfo.simulatedSignatures.includes(signature) && !this._blockhashInfo.transactionSignatures.includes(signature)) {
|
|
7135
7181
|
// The signature of this transaction has not been seen before with the
|
|
@@ -7190,10 +7236,13 @@ class Connection {
|
|
|
7190
7236
|
|
|
7191
7237
|
/**
|
|
7192
7238
|
* Send a signed transaction
|
|
7193
|
-
*/
|
|
7239
|
+
*/
|
|
7240
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7241
|
+
|
|
7194
7242
|
/**
|
|
7195
7243
|
* Sign and send a transaction
|
|
7196
|
-
*/
|
|
7244
|
+
*/
|
|
7245
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7197
7246
|
async sendTransaction(transaction, signersOrOptions, options) {
|
|
7198
7247
|
if ('version' in transaction) {
|
|
7199
7248
|
if (signersOrOptions && Array.isArray(signersOrOptions)) {
|
|
@@ -7218,7 +7267,6 @@ class Connection {
|
|
|
7218
7267
|
if (!transaction.signature) {
|
|
7219
7268
|
throw new Error('!signature'); // should never happen
|
|
7220
7269
|
}
|
|
7221
|
-
|
|
7222
7270
|
const signature = transaction.signature.toString('base64');
|
|
7223
7271
|
if (!this._blockhashInfo.transactionSignatures.includes(signature)) {
|
|
7224
7272
|
// The signature of this transaction has not been seen before with the
|
|
@@ -7602,7 +7650,6 @@ class Connection {
|
|
|
7602
7650
|
args) {
|
|
7603
7651
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
7604
7652
|
const hash = fastStableStringify$1([subscriptionConfig.method, args], true /* isArrayProp */);
|
|
7605
|
-
|
|
7606
7653
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
7607
7654
|
if (existingSubscription === undefined) {
|
|
7608
7655
|
this._subscriptionsByHash[hash] = {
|
|
@@ -7685,7 +7732,6 @@ class Connection {
|
|
|
7685
7732
|
'base64' /* encoding */, filters ? {
|
|
7686
7733
|
filters: filters
|
|
7687
7734
|
} : undefined /* extra */);
|
|
7688
|
-
|
|
7689
7735
|
return this._makeSubscription({
|
|
7690
7736
|
callback,
|
|
7691
7737
|
method: 'programSubscribe',
|
|
@@ -7710,7 +7756,6 @@ class Connection {
|
|
|
7710
7756
|
mentions: [filter.toString()]
|
|
7711
7757
|
} : filter], commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
7712
7758
|
);
|
|
7713
|
-
|
|
7714
7759
|
return this._makeSubscription({
|
|
7715
7760
|
callback,
|
|
7716
7761
|
method: 'logsSubscribe',
|
|
@@ -7891,7 +7936,6 @@ class Connection {
|
|
|
7891
7936
|
onSignature(signature, callback, commitment) {
|
|
7892
7937
|
const args = this._buildArgs([signature], commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
7893
7938
|
);
|
|
7894
|
-
|
|
7895
7939
|
const clientSubscriptionId = this._makeSubscription({
|
|
7896
7940
|
callback: (notification, context) => {
|
|
7897
7941
|
if (notification.type === 'status') {
|
|
@@ -7930,7 +7974,6 @@ class Connection {
|
|
|
7930
7974
|
...options,
|
|
7931
7975
|
commitment: options && options.commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
7932
7976
|
};
|
|
7933
|
-
|
|
7934
7977
|
const args = this._buildArgs([signature], commitment, undefined /* encoding */, extra);
|
|
7935
7978
|
const clientSubscriptionId = this._makeSubscription({
|
|
7936
7979
|
callback: (notification, context) => {
|
|
@@ -10197,7 +10240,9 @@ function clusterApiUrl(cluster, tls) {
|
|
|
10197
10240
|
/**
|
|
10198
10241
|
* @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`
|
|
10199
10242
|
* is no longer supported and will be removed in a future version.
|
|
10200
|
-
*/
|
|
10243
|
+
*/
|
|
10244
|
+
// eslint-disable-next-line no-redeclare
|
|
10245
|
+
|
|
10201
10246
|
// eslint-disable-next-line no-redeclare
|
|
10202
10247
|
async function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {
|
|
10203
10248
|
let confirmationStrategy;
|