@solana/web3.js 1.93.2 → 1.93.4
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 +44 -27
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +44 -27
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +44 -27
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +55 -21
- package/lib/index.esm.js +44 -27
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +44 -27
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +44 -27
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +91 -23
package/lib/index.iife.js
CHANGED
|
@@ -17449,7 +17449,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
17449
17449
|
/**
|
|
17450
17450
|
* Metadata for a parsed confirmed transaction on the ledger
|
|
17451
17451
|
*
|
|
17452
|
-
* @deprecated Deprecated since
|
|
17452
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionMeta} instead.
|
|
17453
17453
|
*/
|
|
17454
17454
|
|
|
17455
17455
|
/**
|
|
@@ -17479,7 +17479,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
17479
17479
|
/**
|
|
17480
17480
|
* A confirmed transaction on the ledger
|
|
17481
17481
|
*
|
|
17482
|
-
* @deprecated Deprecated since
|
|
17482
|
+
* @deprecated Deprecated since RPC v1.8.0.
|
|
17483
17483
|
*/
|
|
17484
17484
|
|
|
17485
17485
|
/**
|
|
@@ -17509,7 +17509,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
17509
17509
|
/**
|
|
17510
17510
|
* A parsed and confirmed transaction on the ledger
|
|
17511
17511
|
*
|
|
17512
|
-
* @deprecated Deprecated since
|
|
17512
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.
|
|
17513
17513
|
*/
|
|
17514
17514
|
|
|
17515
17515
|
/**
|
|
@@ -17555,7 +17555,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
17555
17555
|
/**
|
|
17556
17556
|
* A confirmed block on the ledger
|
|
17557
17557
|
*
|
|
17558
|
-
* @deprecated Deprecated since
|
|
17558
|
+
* @deprecated Deprecated since RPC v1.8.0.
|
|
17559
17559
|
*/
|
|
17560
17560
|
|
|
17561
17561
|
/**
|
|
@@ -18257,7 +18257,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
18257
18257
|
/**
|
|
18258
18258
|
* Expected JSON RPC response for the "getConfirmedBlock" message
|
|
18259
18259
|
*
|
|
18260
|
-
* @deprecated Deprecated since
|
|
18260
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetBlockRpcResult} instead.
|
|
18261
18261
|
*/
|
|
18262
18262
|
const GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({
|
|
18263
18263
|
blockhash: string(),
|
|
@@ -18307,7 +18307,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
18307
18307
|
/**
|
|
18308
18308
|
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
18309
18309
|
*
|
|
18310
|
-
* @deprecated Deprecated since
|
|
18310
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
18311
18311
|
*/
|
|
18312
18312
|
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(type({
|
|
18313
18313
|
blockhash: string(),
|
|
@@ -18995,6 +18995,8 @@ var solanaWeb3 = (function (exports) {
|
|
|
18995
18995
|
|
|
18996
18996
|
/**
|
|
18997
18997
|
* Returns epoch activation information for a stake account that has been delegated
|
|
18998
|
+
*
|
|
18999
|
+
* @deprecated Deprecated since RPC v1.18; will be removed in a future version.
|
|
18998
19000
|
*/
|
|
18999
19001
|
async getStakeActivation(publicKey, commitmentOrConfig, epoch) {
|
|
19000
19002
|
const {
|
|
@@ -19566,7 +19568,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19566
19568
|
/**
|
|
19567
19569
|
* Fetch the current total currency supply of the cluster in lamports
|
|
19568
19570
|
*
|
|
19569
|
-
* @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.
|
|
19571
|
+
* @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.
|
|
19570
19572
|
*/
|
|
19571
19573
|
async getTotalSupply(commitment) {
|
|
19572
19574
|
const result = await this.getSupply({
|
|
@@ -19683,7 +19685,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19683
19685
|
* Fetch a recent blockhash from the cluster, return with context
|
|
19684
19686
|
* @return {Promise<RpcResponseAndContext<{blockhash: Blockhash, feeCalculator: FeeCalculator}>>}
|
|
19685
19687
|
*
|
|
19686
|
-
* @deprecated Deprecated since
|
|
19688
|
+
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
19687
19689
|
*/
|
|
19688
19690
|
async getRecentBlockhashAndContext(commitment) {
|
|
19689
19691
|
const args = this._buildArgs([], commitment);
|
|
@@ -19711,7 +19713,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19711
19713
|
/**
|
|
19712
19714
|
* Fetch the fee calculator for a recent blockhash from the cluster, return with context
|
|
19713
19715
|
*
|
|
19714
|
-
* @deprecated Deprecated since
|
|
19716
|
+
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.
|
|
19715
19717
|
*/
|
|
19716
19718
|
async getFeeCalculatorForBlockhash(blockhash, commitment) {
|
|
19717
19719
|
const args = this._buildArgs([blockhash], commitment);
|
|
@@ -19764,7 +19766,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19764
19766
|
* Fetch a recent blockhash from the cluster
|
|
19765
19767
|
* @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}
|
|
19766
19768
|
*
|
|
19767
|
-
* @deprecated Deprecated since
|
|
19769
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.
|
|
19768
19770
|
*/
|
|
19769
19771
|
async getRecentBlockhash(commitment) {
|
|
19770
19772
|
try {
|
|
@@ -20146,7 +20148,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20146
20148
|
* Fetch a list of Transactions and transaction statuses from the cluster
|
|
20147
20149
|
* for a confirmed block.
|
|
20148
20150
|
*
|
|
20149
|
-
* @deprecated Deprecated since v1.
|
|
20151
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.
|
|
20150
20152
|
*/
|
|
20151
20153
|
async getConfirmedBlock(slot, commitment) {
|
|
20152
20154
|
const args = this._buildArgsAtLeastConfirmed([slot], commitment);
|
|
@@ -20225,7 +20227,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20225
20227
|
/**
|
|
20226
20228
|
* Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards
|
|
20227
20229
|
*
|
|
20228
|
-
* @deprecated Deprecated since
|
|
20230
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.
|
|
20229
20231
|
*/
|
|
20230
20232
|
async getConfirmedBlockSignatures(slot, commitment) {
|
|
20231
20233
|
const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {
|
|
@@ -20247,7 +20249,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20247
20249
|
/**
|
|
20248
20250
|
* Fetch a transaction details for a confirmed transaction
|
|
20249
20251
|
*
|
|
20250
|
-
* @deprecated Deprecated since
|
|
20252
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.
|
|
20251
20253
|
*/
|
|
20252
20254
|
async getConfirmedTransaction(signature, commitment) {
|
|
20253
20255
|
const args = this._buildArgsAtLeastConfirmed([signature], commitment);
|
|
@@ -20269,7 +20271,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20269
20271
|
/**
|
|
20270
20272
|
* Fetch parsed transaction details for a confirmed transaction
|
|
20271
20273
|
*
|
|
20272
|
-
* @deprecated Deprecated since
|
|
20274
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.
|
|
20273
20275
|
*/
|
|
20274
20276
|
async getParsedConfirmedTransaction(signature, commitment) {
|
|
20275
20277
|
const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');
|
|
@@ -20284,7 +20286,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20284
20286
|
/**
|
|
20285
20287
|
* Fetch parsed transaction details for a batch of confirmed transactions
|
|
20286
20288
|
*
|
|
20287
|
-
* @deprecated Deprecated since
|
|
20289
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.
|
|
20288
20290
|
*/
|
|
20289
20291
|
async getParsedConfirmedTransactions(signatures, commitment) {
|
|
20290
20292
|
const batch = signatures.map(signature => {
|
|
@@ -20309,7 +20311,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20309
20311
|
* Fetch a list of all the confirmed signatures for transactions involving an address
|
|
20310
20312
|
* within a specified slot range. Max range allowed is 10,000 slots.
|
|
20311
20313
|
*
|
|
20312
|
-
* @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.
|
|
20314
|
+
* @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.
|
|
20313
20315
|
*
|
|
20314
20316
|
* @param address queried address
|
|
20315
20317
|
* @param startSlot start slot, inclusive
|
|
@@ -20363,9 +20365,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20363
20365
|
* Returns confirmed signatures for transactions involving an
|
|
20364
20366
|
* address backwards in time from the provided signature or most recent confirmed block
|
|
20365
20367
|
*
|
|
20366
|
-
*
|
|
20367
|
-
* @param address queried address
|
|
20368
|
-
* @param options
|
|
20368
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.
|
|
20369
20369
|
*/
|
|
20370
20370
|
async getConfirmedSignaturesForAddress2(address, options, commitment) {
|
|
20371
20371
|
const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);
|
|
@@ -21108,13 +21108,22 @@ var solanaWeb3 = (function (exports) {
|
|
|
21108
21108
|
*
|
|
21109
21109
|
* @param publicKey Public key of the account to monitor
|
|
21110
21110
|
* @param callback Function to invoke whenever the account is changed
|
|
21111
|
-
* @param
|
|
21111
|
+
* @param config
|
|
21112
21112
|
* @return subscription id
|
|
21113
21113
|
*/
|
|
21114
|
-
|
|
21114
|
+
|
|
21115
|
+
/** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */
|
|
21116
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21117
|
+
|
|
21118
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21119
|
+
onAccountChange(publicKey, callback, commitmentOrConfig) {
|
|
21120
|
+
const {
|
|
21121
|
+
commitment,
|
|
21122
|
+
config
|
|
21123
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
21115
21124
|
const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',
|
|
21116
21125
|
// Apply connection/server default.
|
|
21117
|
-
'base64');
|
|
21126
|
+
'base64', config);
|
|
21118
21127
|
return this._makeSubscription({
|
|
21119
21128
|
callback,
|
|
21120
21129
|
method: 'accountSubscribe',
|
|
@@ -21151,15 +21160,23 @@ var solanaWeb3 = (function (exports) {
|
|
|
21151
21160
|
*
|
|
21152
21161
|
* @param programId Public key of the program to monitor
|
|
21153
21162
|
* @param callback Function to invoke whenever the account is changed
|
|
21154
|
-
* @param
|
|
21155
|
-
* @param filters The program account filters to pass into the RPC method
|
|
21163
|
+
* @param config
|
|
21156
21164
|
* @return subscription id
|
|
21157
21165
|
*/
|
|
21158
|
-
|
|
21166
|
+
|
|
21167
|
+
/** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */
|
|
21168
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21169
|
+
|
|
21170
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
21171
|
+
onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {
|
|
21172
|
+
const {
|
|
21173
|
+
commitment,
|
|
21174
|
+
config
|
|
21175
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
21159
21176
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
21160
21177
|
// Apply connection/server default.
|
|
21161
|
-
'base64' /* encoding */,
|
|
21162
|
-
filters:
|
|
21178
|
+
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
21179
|
+
filters: maybeFilters
|
|
21163
21180
|
} : undefined /* extra */);
|
|
21164
21181
|
return this._makeSubscription({
|
|
21165
21182
|
callback,
|