@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.esm.js
CHANGED
|
@@ -1219,20 +1219,25 @@ class TransactionInstruction {
|
|
|
1219
1219
|
// For backward compatibility; an unfortunate consequence of being
|
|
1220
1220
|
// forced to over-export types by the documentation generator.
|
|
1221
1221
|
// See https://github.com/solana-labs/solana/pull/25820
|
|
1222
|
+
|
|
1222
1223
|
/**
|
|
1223
1224
|
* Blockhash-based transactions have a lifetime that are defined by
|
|
1224
1225
|
* the blockhash they include. Any transaction whose blockhash is
|
|
1225
1226
|
* too old will be rejected.
|
|
1226
1227
|
*/
|
|
1228
|
+
|
|
1227
1229
|
/**
|
|
1228
1230
|
* Use these options to construct a durable nonce transaction.
|
|
1229
1231
|
*/
|
|
1232
|
+
|
|
1230
1233
|
/**
|
|
1231
1234
|
* Nonce information to be used to build an offline Transaction.
|
|
1232
1235
|
*/
|
|
1236
|
+
|
|
1233
1237
|
/**
|
|
1234
1238
|
* @internal
|
|
1235
1239
|
*/
|
|
1240
|
+
|
|
1236
1241
|
/**
|
|
1237
1242
|
* Transaction class
|
|
1238
1243
|
*/
|
|
@@ -4450,6 +4455,7 @@ function versionedMessageFromResponse(version, response) {
|
|
|
4450
4455
|
*/
|
|
4451
4456
|
|
|
4452
4457
|
// Deprecated as of v1.5.5
|
|
4458
|
+
|
|
4453
4459
|
/**
|
|
4454
4460
|
* A subset of Commitment levels, which are at least optimistically confirmed
|
|
4455
4461
|
* <pre>
|
|
@@ -4457,6 +4463,7 @@ function versionedMessageFromResponse(version, response) {
|
|
|
4457
4463
|
* 'finalized': Query the most recent block which has been finalized by the cluster
|
|
4458
4464
|
* </pre>
|
|
4459
4465
|
*/
|
|
4466
|
+
|
|
4460
4467
|
/**
|
|
4461
4468
|
* Filter for largest accounts query
|
|
4462
4469
|
* <pre>
|
|
@@ -4464,70 +4471,92 @@ function versionedMessageFromResponse(version, response) {
|
|
|
4464
4471
|
* 'nonCirculating': Return the largest accounts that are not part of the circulating supply
|
|
4465
4472
|
* </pre>
|
|
4466
4473
|
*/
|
|
4474
|
+
|
|
4467
4475
|
/**
|
|
4468
4476
|
* Configuration object for changing `getAccountInfo` query behavior
|
|
4469
4477
|
*/
|
|
4478
|
+
|
|
4470
4479
|
/**
|
|
4471
4480
|
* Configuration object for changing `getBalance` query behavior
|
|
4472
4481
|
*/
|
|
4482
|
+
|
|
4473
4483
|
/**
|
|
4474
4484
|
* Configuration object for changing `getBlock` query behavior
|
|
4475
4485
|
*/
|
|
4486
|
+
|
|
4476
4487
|
/**
|
|
4477
4488
|
* Configuration object for changing `getBlock` query behavior
|
|
4478
4489
|
*/
|
|
4490
|
+
|
|
4479
4491
|
/**
|
|
4480
4492
|
* Configuration object for changing `getStakeMinimumDelegation` query behavior
|
|
4481
4493
|
*/
|
|
4494
|
+
|
|
4482
4495
|
/**
|
|
4483
4496
|
* Configuration object for changing `getBlockHeight` query behavior
|
|
4484
4497
|
*/
|
|
4498
|
+
|
|
4485
4499
|
/**
|
|
4486
4500
|
* Configuration object for changing `getEpochInfo` query behavior
|
|
4487
4501
|
*/
|
|
4502
|
+
|
|
4488
4503
|
/**
|
|
4489
4504
|
* Configuration object for changing `getInflationReward` query behavior
|
|
4490
4505
|
*/
|
|
4506
|
+
|
|
4491
4507
|
/**
|
|
4492
4508
|
* Configuration object for changing `getLatestBlockhash` query behavior
|
|
4493
4509
|
*/
|
|
4510
|
+
|
|
4494
4511
|
/**
|
|
4495
4512
|
* Configuration object for changing `isBlockhashValid` query behavior
|
|
4496
4513
|
*/
|
|
4514
|
+
|
|
4497
4515
|
/**
|
|
4498
4516
|
* Configuration object for changing `getSlot` query behavior
|
|
4499
4517
|
*/
|
|
4518
|
+
|
|
4500
4519
|
/**
|
|
4501
4520
|
* Configuration object for changing `getSlotLeader` query behavior
|
|
4502
4521
|
*/
|
|
4522
|
+
|
|
4503
4523
|
/**
|
|
4504
4524
|
* Configuration object for changing `getTransaction` query behavior
|
|
4505
4525
|
*/
|
|
4526
|
+
|
|
4506
4527
|
/**
|
|
4507
4528
|
* Configuration object for changing `getTransaction` query behavior
|
|
4508
4529
|
*/
|
|
4530
|
+
|
|
4509
4531
|
/**
|
|
4510
4532
|
* Configuration object for changing `getLargestAccounts` query behavior
|
|
4511
4533
|
*/
|
|
4534
|
+
|
|
4512
4535
|
/**
|
|
4513
4536
|
* Configuration object for changing `getSupply` request behavior
|
|
4514
4537
|
*/
|
|
4538
|
+
|
|
4515
4539
|
/**
|
|
4516
4540
|
* Configuration object for changing query behavior
|
|
4517
4541
|
*/
|
|
4542
|
+
|
|
4518
4543
|
/**
|
|
4519
4544
|
* Information describing a cluster node
|
|
4520
4545
|
*/
|
|
4546
|
+
|
|
4521
4547
|
/**
|
|
4522
4548
|
* Information describing a vote account
|
|
4523
4549
|
*/
|
|
4550
|
+
|
|
4524
4551
|
/**
|
|
4525
4552
|
* A collection of cluster vote accounts
|
|
4526
4553
|
*/
|
|
4554
|
+
|
|
4527
4555
|
/**
|
|
4528
4556
|
* Network Inflation
|
|
4529
4557
|
* (see https://docs.solana.com/implemented-proposals/ed_overview)
|
|
4530
4558
|
*/
|
|
4559
|
+
|
|
4531
4560
|
const GetInflationGovernorResult = type({
|
|
4532
4561
|
foundation: number(),
|
|
4533
4562
|
foundationTerm: number(),
|
|
@@ -6278,7 +6307,9 @@ class Connection {
|
|
|
6278
6307
|
return res.result;
|
|
6279
6308
|
}
|
|
6280
6309
|
|
|
6281
|
-
/** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
|
|
6310
|
+
/** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */
|
|
6311
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
6312
|
+
|
|
6282
6313
|
// eslint-disable-next-line no-dupe-class-members
|
|
6283
6314
|
async confirmTransaction(strategy, commitment) {
|
|
6284
6315
|
let rawSignature;
|
|
@@ -7073,21 +7104,28 @@ class Connection {
|
|
|
7073
7104
|
/**
|
|
7074
7105
|
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
7075
7106
|
* setting the `maxSupportedTransactionVersion` property.
|
|
7076
|
-
*/
|
|
7107
|
+
*/
|
|
7108
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7109
|
+
|
|
7077
7110
|
/**
|
|
7078
7111
|
* @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by
|
|
7079
7112
|
* setting the `maxSupportedTransactionVersion` property.
|
|
7080
7113
|
*/
|
|
7081
7114
|
// eslint-disable-next-line no-dupe-class-members
|
|
7115
|
+
|
|
7082
7116
|
/**
|
|
7083
7117
|
* Fetch a processed block from the cluster.
|
|
7084
7118
|
*/
|
|
7085
7119
|
// eslint-disable-next-line no-dupe-class-members
|
|
7120
|
+
|
|
7086
7121
|
// eslint-disable-next-line no-dupe-class-members
|
|
7122
|
+
|
|
7087
7123
|
// eslint-disable-next-line no-dupe-class-members
|
|
7124
|
+
|
|
7088
7125
|
/**
|
|
7089
7126
|
* Fetch a processed block from the cluster.
|
|
7090
|
-
*/
|
|
7127
|
+
*/
|
|
7128
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7091
7129
|
async getBlock(slot, rawConfig) {
|
|
7092
7130
|
const {
|
|
7093
7131
|
commitment,
|
|
@@ -7226,10 +7264,13 @@ class Connection {
|
|
|
7226
7264
|
|
|
7227
7265
|
/**
|
|
7228
7266
|
* Fetch a confirmed or finalized transaction from the cluster.
|
|
7229
|
-
*/
|
|
7267
|
+
*/
|
|
7268
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7269
|
+
|
|
7230
7270
|
/**
|
|
7231
7271
|
* Fetch a confirmed or finalized transaction from the cluster.
|
|
7232
|
-
*/
|
|
7272
|
+
*/
|
|
7273
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7233
7274
|
async getTransaction(signature, rawConfig) {
|
|
7234
7275
|
const {
|
|
7235
7276
|
commitment,
|
|
@@ -7308,12 +7349,15 @@ class Connection {
|
|
|
7308
7349
|
* Fetch transaction details for a batch of confirmed transactions.
|
|
7309
7350
|
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
7310
7351
|
* VersionedTransactionResponse}.
|
|
7311
|
-
*/
|
|
7352
|
+
*/
|
|
7353
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7354
|
+
|
|
7312
7355
|
/**
|
|
7313
7356
|
* Fetch transaction details for a batch of confirmed transactions.
|
|
7314
7357
|
* Similar to {@link getParsedTransactions} but returns a {@link
|
|
7315
7358
|
* VersionedTransactionResponse}.
|
|
7316
|
-
*/
|
|
7359
|
+
*/
|
|
7360
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7317
7361
|
async getTransactions(signatures, commitmentOrConfig) {
|
|
7318
7362
|
const {
|
|
7319
7363
|
commitment,
|
|
@@ -7739,10 +7783,13 @@ class Connection {
|
|
|
7739
7783
|
|
|
7740
7784
|
/**
|
|
7741
7785
|
* Simulate a transaction
|
|
7742
|
-
*/
|
|
7786
|
+
*/
|
|
7787
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7788
|
+
|
|
7743
7789
|
/**
|
|
7744
7790
|
* Simulate a transaction
|
|
7745
|
-
*/
|
|
7791
|
+
*/
|
|
7792
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7746
7793
|
async simulateTransaction(transactionOrMessage, configOrSigners, includeAccounts) {
|
|
7747
7794
|
if ('message' in transactionOrMessage) {
|
|
7748
7795
|
const versionedTx = transactionOrMessage;
|
|
@@ -7794,7 +7841,6 @@ class Connection {
|
|
|
7794
7841
|
if (!transaction.signature) {
|
|
7795
7842
|
throw new Error('!signature'); // should never happen
|
|
7796
7843
|
}
|
|
7797
|
-
|
|
7798
7844
|
const signature = transaction.signature.toString('base64');
|
|
7799
7845
|
if (!this._blockhashInfo.simulatedSignatures.includes(signature) && !this._blockhashInfo.transactionSignatures.includes(signature)) {
|
|
7800
7846
|
// The signature of this transaction has not been seen before with the
|
|
@@ -7855,10 +7901,13 @@ class Connection {
|
|
|
7855
7901
|
|
|
7856
7902
|
/**
|
|
7857
7903
|
* Send a signed transaction
|
|
7858
|
-
*/
|
|
7904
|
+
*/
|
|
7905
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7906
|
+
|
|
7859
7907
|
/**
|
|
7860
7908
|
* Sign and send a transaction
|
|
7861
|
-
*/
|
|
7909
|
+
*/
|
|
7910
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7862
7911
|
async sendTransaction(transaction, signersOrOptions, options) {
|
|
7863
7912
|
if ('version' in transaction) {
|
|
7864
7913
|
if (signersOrOptions && Array.isArray(signersOrOptions)) {
|
|
@@ -7883,7 +7932,6 @@ class Connection {
|
|
|
7883
7932
|
if (!transaction.signature) {
|
|
7884
7933
|
throw new Error('!signature'); // should never happen
|
|
7885
7934
|
}
|
|
7886
|
-
|
|
7887
7935
|
const signature = transaction.signature.toString('base64');
|
|
7888
7936
|
if (!this._blockhashInfo.transactionSignatures.includes(signature)) {
|
|
7889
7937
|
// The signature of this transaction has not been seen before with the
|
|
@@ -8267,7 +8315,6 @@ class Connection {
|
|
|
8267
8315
|
args) {
|
|
8268
8316
|
const clientSubscriptionId = this._nextClientSubscriptionId++;
|
|
8269
8317
|
const hash = fastStableStringify$1([subscriptionConfig.method, args], true /* isArrayProp */);
|
|
8270
|
-
|
|
8271
8318
|
const existingSubscription = this._subscriptionsByHash[hash];
|
|
8272
8319
|
if (existingSubscription === undefined) {
|
|
8273
8320
|
this._subscriptionsByHash[hash] = {
|
|
@@ -8350,7 +8397,6 @@ class Connection {
|
|
|
8350
8397
|
'base64' /* encoding */, filters ? {
|
|
8351
8398
|
filters: filters
|
|
8352
8399
|
} : undefined /* extra */);
|
|
8353
|
-
|
|
8354
8400
|
return this._makeSubscription({
|
|
8355
8401
|
callback,
|
|
8356
8402
|
method: 'programSubscribe',
|
|
@@ -8375,7 +8421,6 @@ class Connection {
|
|
|
8375
8421
|
mentions: [filter.toString()]
|
|
8376
8422
|
} : filter], commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
8377
8423
|
);
|
|
8378
|
-
|
|
8379
8424
|
return this._makeSubscription({
|
|
8380
8425
|
callback,
|
|
8381
8426
|
method: 'logsSubscribe',
|
|
@@ -8556,7 +8601,6 @@ class Connection {
|
|
|
8556
8601
|
onSignature(signature, callback, commitment) {
|
|
8557
8602
|
const args = this._buildArgs([signature], commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
8558
8603
|
);
|
|
8559
|
-
|
|
8560
8604
|
const clientSubscriptionId = this._makeSubscription({
|
|
8561
8605
|
callback: (notification, context) => {
|
|
8562
8606
|
if (notification.type === 'status') {
|
|
@@ -8595,7 +8639,6 @@ class Connection {
|
|
|
8595
8639
|
...options,
|
|
8596
8640
|
commitment: options && options.commitment || this._commitment || 'finalized' // Apply connection/server default.
|
|
8597
8641
|
};
|
|
8598
|
-
|
|
8599
8642
|
const args = this._buildArgs([signature], commitment, undefined /* encoding */, extra);
|
|
8600
8643
|
const clientSubscriptionId = this._makeSubscription({
|
|
8601
8644
|
callback: (notification, context) => {
|
|
@@ -10862,7 +10905,9 @@ function clusterApiUrl(cluster, tls) {
|
|
|
10862
10905
|
/**
|
|
10863
10906
|
* @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`
|
|
10864
10907
|
* is no longer supported and will be removed in a future version.
|
|
10865
|
-
*/
|
|
10908
|
+
*/
|
|
10909
|
+
// eslint-disable-next-line no-redeclare
|
|
10910
|
+
|
|
10866
10911
|
// eslint-disable-next-line no-redeclare
|
|
10867
10912
|
async function sendAndConfirmRawTransaction(connection, rawTransaction, confirmationStrategyOrConfirmOptions, maybeConfirmOptions) {
|
|
10868
10913
|
let confirmationStrategy;
|