@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.browser.esm.js
CHANGED
|
@@ -1215,20 +1215,25 @@ class TransactionInstruction {
|
|
|
1215
1215
|
// For backward compatibility; an unfortunate consequence of being
|
|
1216
1216
|
// forced to over-export types by the documentation generator.
|
|
1217
1217
|
// See https://github.com/solana-labs/solana/pull/25820
|
|
1218
|
+
|
|
1218
1219
|
/**
|
|
1219
1220
|
* Blockhash-based transactions have a lifetime that are defined by
|
|
1220
1221
|
* the blockhash they include. Any transaction whose blockhash is
|
|
1221
1222
|
* too old will be rejected.
|
|
1222
1223
|
*/
|
|
1224
|
+
|
|
1223
1225
|
/**
|
|
1224
1226
|
* Use these options to construct a durable nonce transaction.
|
|
1225
1227
|
*/
|
|
1228
|
+
|
|
1226
1229
|
/**
|
|
1227
1230
|
* Nonce information to be used to build an offline Transaction.
|
|
1228
1231
|
*/
|
|
1232
|
+
|
|
1229
1233
|
/**
|
|
1230
1234
|
* @internal
|
|
1231
1235
|
*/
|
|
1236
|
+
|
|
1232
1237
|
/**
|
|
1233
1238
|
* Transaction class
|
|
1234
1239
|
*/
|
|
@@ -3780,6 +3785,7 @@ function versionedMessageFromResponse(version, response) {
|
|
|
3780
3785
|
*/
|
|
3781
3786
|
|
|
3782
3787
|
// Deprecated as of v1.5.5
|
|
3788
|
+
|
|
3783
3789
|
/**
|
|
3784
3790
|
* A subset of Commitment levels, which are at least optimistically confirmed
|
|
3785
3791
|
* <pre>
|
|
@@ -3787,6 +3793,7 @@ function versionedMessageFromResponse(version, response) {
|
|
|
3787
3793
|
* 'finalized': Query the most recent block which has been finalized by the cluster
|
|
3788
3794
|
* </pre>
|
|
3789
3795
|
*/
|
|
3796
|
+
|
|
3790
3797
|
/**
|
|
3791
3798
|
* Filter for largest accounts query
|
|
3792
3799
|
* <pre>
|
|
@@ -3794,70 +3801,92 @@ function versionedMessageFromResponse(version, response) {
|
|
|
3794
3801
|
* 'nonCirculating': Return the largest accounts that are not part of the circulating supply
|
|
3795
3802
|
* </pre>
|
|
3796
3803
|
*/
|
|
3804
|
+
|
|
3797
3805
|
/**
|
|
3798
3806
|
* Configuration object for changing `getAccountInfo` query behavior
|
|
3799
3807
|
*/
|
|
3808
|
+
|
|
3800
3809
|
/**
|
|
3801
3810
|
* Configuration object for changing `getBalance` query behavior
|
|
3802
3811
|
*/
|
|
3812
|
+
|
|
3803
3813
|
/**
|
|
3804
3814
|
* Configuration object for changing `getBlock` query behavior
|
|
3805
3815
|
*/
|
|
3816
|
+
|
|
3806
3817
|
/**
|
|
3807
3818
|
* Configuration object for changing `getBlock` query behavior
|
|
3808
3819
|
*/
|
|
3820
|
+
|
|
3809
3821
|
/**
|
|
3810
3822
|
* Configuration object for changing `getStakeMinimumDelegation` query behavior
|
|
3811
3823
|
*/
|
|
3824
|
+
|
|
3812
3825
|
/**
|
|
3813
3826
|
* Configuration object for changing `getBlockHeight` query behavior
|
|
3814
3827
|
*/
|
|
3828
|
+
|
|
3815
3829
|
/**
|
|
3816
3830
|
* Configuration object for changing `getEpochInfo` query behavior
|
|
3817
3831
|
*/
|
|
3832
|
+
|
|
3818
3833
|
/**
|
|
3819
3834
|
* Configuration object for changing `getInflationReward` query behavior
|
|
3820
3835
|
*/
|
|
3836
|
+
|
|
3821
3837
|
/**
|
|
3822
3838
|
* Configuration object for changing `getLatestBlockhash` query behavior
|
|
3823
3839
|
*/
|
|
3840
|
+
|
|
3824
3841
|
/**
|
|
3825
3842
|
* Configuration object for changing `isBlockhashValid` query behavior
|
|
3826
3843
|
*/
|
|
3844
|
+
|
|
3827
3845
|
/**
|
|
3828
3846
|
* Configuration object for changing `getSlot` query behavior
|
|
3829
3847
|
*/
|
|
3848
|
+
|
|
3830
3849
|
/**
|
|
3831
3850
|
* Configuration object for changing `getSlotLeader` query behavior
|
|
3832
3851
|
*/
|
|
3852
|
+
|
|
3833
3853
|
/**
|
|
3834
3854
|
* Configuration object for changing `getTransaction` query behavior
|
|
3835
3855
|
*/
|
|
3856
|
+
|
|
3836
3857
|
/**
|
|
3837
3858
|
* Configuration object for changing `getTransaction` query behavior
|
|
3838
3859
|
*/
|
|
3860
|
+
|
|
3839
3861
|
/**
|
|
3840
3862
|
* Configuration object for changing `getLargestAccounts` query behavior
|
|
3841
3863
|
*/
|
|
3864
|
+
|
|
3842
3865
|
/**
|
|
3843
3866
|
* Configuration object for changing `getSupply` request behavior
|
|
3844
3867
|
*/
|
|
3868
|
+
|
|
3845
3869
|
/**
|
|
3846
3870
|
* Configuration object for changing query behavior
|
|
3847
3871
|
*/
|
|
3872
|
+
|
|
3848
3873
|
/**
|
|
3849
3874
|
* Information describing a cluster node
|
|
3850
3875
|
*/
|
|
3876
|
+
|
|
3851
3877
|
/**
|
|
3852
3878
|
* Information describing a vote account
|
|
3853
3879
|
*/
|
|
3880
|
+
|
|
3854
3881
|
/**
|
|
3855
3882
|
* A collection of cluster vote accounts
|
|
3856
3883
|
*/
|
|
3884
|
+
|
|
3857
3885
|
/**
|
|
3858
3886
|
* Network Inflation
|
|
3859
3887
|
* (see https://docs.solana.com/implemented-proposals/ed_overview)
|
|
3860
3888
|
*/
|
|
3889
|
+
|
|
3861
3890
|
const GetInflationGovernorResult = type({
|
|
3862
3891
|
foundation: number(),
|
|
3863
3892
|
foundationTerm: number(),
|
|
@@ -5585,7 +5614,9 @@ class Connection {
|
|
|
5585
5614
|
return res.result;
|
|
5586
5615
|
}
|
|
5587
5616
|
|
|
5588
|
-
/** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
|
|
5617
|
+
/** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
|
|
5618
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
5619
|
+
|
|
5589
5620
|
// eslint-disable-next-line no-dupe-class-members
|
|
5590
5621
|
async confirmTransaction(strategy, commitment) {
|
|
5591
5622
|
let rawSignature;
|
|
@@ -6380,21 +6411,28 @@ class Connection {
|
|
|
6380
6411
|
/**
|
|
6381
6412
|
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
6382
6413
|
* setting the `maxSupportedTransactionVersion` property.
|
|
6383
|
-
*/
|
|
6414
|
+
*/
|
|
6415
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6416
|
+
|
|
6384
6417
|
/**
|
|
6385
6418
|
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
6386
6419
|
* setting the `maxSupportedTransactionVersion` property.
|
|
6387
6420
|
*/
|
|
6388
6421
|
// eslint-disable-next-line no-dupe-class-members
|
|
6422
|
+
|
|
6389
6423
|
/**
|
|
6390
6424
|
* Fetch a processed block from the cluster.
|
|
6391
6425
|
*/
|
|
6392
6426
|
// eslint-disable-next-line no-dupe-class-members
|
|
6427
|
+
|
|
6393
6428
|
// eslint-disable-next-line no-dupe-class-members
|
|
6429
|
+
|
|
6394
6430
|
// eslint-disable-next-line no-dupe-class-members
|
|
6431
|
+
|
|
6395
6432
|
/**
|
|
6396
6433
|
* Fetch a processed block from the cluster.
|
|
6397
|
-
*/
|
|
6434
|
+
*/
|
|
6435
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6398
6436
|
async getBlock(slot, rawConfig) {
|
|
6399
6437
|
const {
|
|
6400
6438
|
commitment,
|
|
@@ -6533,10 +6571,13 @@ class Connection {
|
|
|
6533
6571
|
|
|
6534
6572
|
/**
|
|
6535
6573
|
* Fetch a confirmed or finalized transaction from the cluster.
|
|
6536
|
-
*/
|
|
6574
|
+
*/
|
|
6575
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6576
|
+
|
|
6537
6577
|
/**
|
|
6538
6578
|
* Fetch a confirmed or finalized transaction from the cluster.
|
|
6539
|
-
*/
|
|
6579
|
+
*/
|
|
6580
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6540
6581
|
async getTransaction(signature, rawConfig) {
|
|
6541
6582
|
const {
|
|
6542
6583
|
commitment,
|
|
@@ -6615,12 +6656,15 @@ class Connection {
|
|
|
6615
6656
|
* Fetch transaction details for a batch of confirmed transactions.
|
|
6616
6657
|
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
6617
6658
|
* VersionedTransactionResponse}.
|
|
6618
|
-
*/
|
|
6659
|
+
*/
|
|
6660
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6661
|
+
|
|
6619
6662
|
/**
|
|
6620
6663
|
* Fetch transaction details for a batch of confirmed transactions.
|
|
6621
6664
|
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
6622
6665
|
* VersionedTransactionResponse}.
|
|
6623
|
-
*/
|
|
6666
|
+
*/
|
|
6667
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6624
6668
|
async getTransactions(signatures, commitmentOrConfig) {
|
|
6625
6669
|
const {
|
|
6626
6670
|
commitment,
|
|
@@ -7046,10 +7090,13 @@ class Connection {
|
|
|
7046
7090
|
|
|
7047
7091
|
/**
|
|
7048
7092
|
* Simulate a transaction
|
|
7049
|
-
*/
|
|
7093
|
+
*/
|
|
7094
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7095
|
+
|
|
7050
7096
|
/**
|
|
7051
7097
|
* Simulate a transaction
|
|
7052
|
-
*/
|
|
7098
|
+
*/
|
|
7099
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7053
7100
|
async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {
|
|
7054
7101
|
if ('message' in transactionOrMessage) {
|
|
7055
7102
|
const versionedTx = transactionOrMessage;
|
|
@@ -7101,7 +7148,6 @@ class Connection {
|
|
|
7101
7148
|
if (!transaction.signature) {
|
|
7102
7149
|
throw new Error('!signature'); // should never happen
|
|
7103
7150
|
}
|
|
7104
|
-
|
|
7105
7151
|
const signature = transaction.signature.toString('base64');
|
|
7106
7152
|
if (!this._blockhashInfo.simulatedSignatures.includes(signature) && !this._blockhashInfo.transactionSignatures.includes(signature)) {
|
|
7107
7153
|
// The signature of this transaction has not been seen before with the
|
|
@@ -7162,10 +7208,13 @@ class Connection {
|
|
|
7162
7208
|
|
|
7163
7209
|
/**
|
|
7164
7210
|
* Send a signed transaction
|
|
7165
|
-
*/
|
|
7211
|
+
*/
|
|
7212
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7213
|
+
|
|
7166
7214
|
/**
|
|
7167
7215
|
* Sign and send a transaction
|
|
7168
|
-
*/
|
|
7216
|
+
*/
|
|
7217
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7169
7218
|
async sendTransaction(transaction, signersOrOptions, options) {
|
|
7170
7219
|
if ('version' in transaction) {
|
|
7171
7220
|
if (signersOrOptions && Array.isArray(signersOrOptions)) {
|
|
@@ -7190,7 +7239,6 @@ class Connection {
|
|
|
7190
7239
|
if (!transaction.signature) {
|
|
7191
7240
|
throw new Error('!signature'); // should never happen
|
|
7192
7241
|
}
|
|
7193
|
-
|
|
7194
7242
|
const signature = transaction.signature.toString('base64');
|
|
7195
7243
|
if (!this._blockhashInfo.transactionSignatures.includes(signature)) {
|
|
7196
7244
|
// The signature of this transaction has not been seen before with the
|
|
@@ -7574,7 +7622,6 @@ class Connection {
|
|
|
7574
7622
|
args) {
|
|
7575
7623
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
7576
7624
|
const hash = fastStableStringify$1([subscriptionConfig.method, args], true /* isArrayProp */);
|
|
7577
|
-
|
|
7578
7625
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
7579
7626
|
if (existingSubscription === undefined) {
|
|
7580
7627
|
this._subscriptionsByHash[hash] = {
|
|
@@ -7657,7 +7704,6 @@ class Connection {
|
|
|
7657
7704
|
'base64' /* encoding */, filters ? {
|
|
7658
7705
|
filters: filters
|
|
7659
7706
|
} : undefined /* extra */);
|
|
7660
|
-
|
|
7661
7707
|
return this._makeSubscription({
|
|
7662
7708
|
callback,
|
|
7663
7709
|
method: 'programSubscribe',
|
|
@@ -7682,7 +7728,6 @@ class Connection {
|
|
|
7682
7728
|
mentions: [filter.toString()]
|
|
7683
7729
|
} : filter], commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
7684
7730
|
);
|
|
7685
|
-
|
|
7686
7731
|
return this._makeSubscription({
|
|
7687
7732
|
callback,
|
|
7688
7733
|
method: 'logsSubscribe',
|
|
@@ -7863,7 +7908,6 @@ class Connection {
|
|
|
7863
7908
|
onSignature(signature, callback, commitment) {
|
|
7864
7909
|
const args = this._buildArgs([signature], commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
7865
7910
|
);
|
|
7866
|
-
|
|
7867
7911
|
const clientSubscriptionId = this._makeSubscription({
|
|
7868
7912
|
callback: (notification, context) => {
|
|
7869
7913
|
if (notification.type === 'status') {
|
|
@@ -7902,7 +7946,6 @@ class Connection {
|
|
|
7902
7946
|
...options,
|
|
7903
7947
|
commitment: options && options.commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
7904
7948
|
};
|
|
7905
|
-
|
|
7906
7949
|
const args = this._buildArgs([signature], commitment, undefined /* encoding */, extra);
|
|
7907
7950
|
const clientSubscriptionId = this._makeSubscription({
|
|
7908
7951
|
callback: (notification, context) => {
|
|
@@ -10169,7 +10212,9 @@ function clusterApiUrl(cluster, tls) {
|
|
|
10169
10212
|
/**
|
|
10170
10213
|
* @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`
|
|
10171
10214
|
* is no longer supported and will be removed in a future version.
|
|
10172
|
-
*/
|
|
10215
|
+
*/
|
|
10216
|
+
// eslint-disable-next-line no-redeclare
|
|
10217
|
+
|
|
10173
10218
|
// eslint-disable-next-line no-redeclare
|
|
10174
10219
|
async function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {
|
|
10175
10220
|
let confirmationStrategy;
|