@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.browser.esm.js
CHANGED
|
@@ -4087,7 +4087,7 @@ const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
|
|
|
4087
4087
|
/**
|
|
4088
4088
|
* Metadata for a parsed confirmed transaction on the ledger
|
|
4089
4089
|
*
|
|
4090
|
-
* @deprecated Deprecated since
|
|
4090
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionMeta} instead.
|
|
4091
4091
|
*/
|
|
4092
4092
|
|
|
4093
4093
|
/**
|
|
@@ -4117,7 +4117,7 @@ const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
|
|
|
4117
4117
|
/**
|
|
4118
4118
|
* A confirmed transaction on the ledger
|
|
4119
4119
|
*
|
|
4120
|
-
* @deprecated Deprecated since
|
|
4120
|
+
* @deprecated Deprecated since RPC v1.8.0.
|
|
4121
4121
|
*/
|
|
4122
4122
|
|
|
4123
4123
|
/**
|
|
@@ -4147,7 +4147,7 @@ const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
|
|
|
4147
4147
|
/**
|
|
4148
4148
|
* A parsed and confirmed transaction on the ledger
|
|
4149
4149
|
*
|
|
4150
|
-
* @deprecated Deprecated since
|
|
4150
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.
|
|
4151
4151
|
*/
|
|
4152
4152
|
|
|
4153
4153
|
/**
|
|
@@ -4193,7 +4193,7 @@ const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
|
|
|
4193
4193
|
/**
|
|
4194
4194
|
* A confirmed block on the ledger
|
|
4195
4195
|
*
|
|
4196
|
-
* @deprecated Deprecated since
|
|
4196
|
+
* @deprecated Deprecated since RPC v1.8.0.
|
|
4197
4197
|
*/
|
|
4198
4198
|
|
|
4199
4199
|
/**
|
|
@@ -4895,7 +4895,7 @@ const GetParsedNoneModeBlockRpcResult = jsonRpcResult(nullable(type({
|
|
|
4895
4895
|
/**
|
|
4896
4896
|
* Expected JSON RPC response for the "getConfirmedBlock" message
|
|
4897
4897
|
*
|
|
4898
|
-
* @deprecated Deprecated since
|
|
4898
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetBlockRpcResult} instead.
|
|
4899
4899
|
*/
|
|
4900
4900
|
const GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({
|
|
4901
4901
|
blockhash: string(),
|
|
@@ -4945,7 +4945,7 @@ const GetParsedTransactionRpcResult = jsonRpcResult(nullable(type({
|
|
|
4945
4945
|
/**
|
|
4946
4946
|
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
4947
4947
|
*
|
|
4948
|
-
* @deprecated Deprecated since
|
|
4948
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
4949
4949
|
*/
|
|
4950
4950
|
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(type({
|
|
4951
4951
|
blockhash: string(),
|
|
@@ -5633,6 +5633,8 @@ class Connection {
|
|
|
5633
5633
|
|
|
5634
5634
|
/**
|
|
5635
5635
|
* Returns epoch activation information for a stake account that has been delegated
|
|
5636
|
+
*
|
|
5637
|
+
* @deprecated Deprecated since RPC v1.18; will be removed in a future version.
|
|
5636
5638
|
*/
|
|
5637
5639
|
async getStakeActivation(publicKey, commitmentOrConfig, epoch) {
|
|
5638
5640
|
const {
|
|
@@ -6204,7 +6206,7 @@ class Connection {
|
|
|
6204
6206
|
/**
|
|
6205
6207
|
* Fetch the current total currency supply of the cluster in lamports
|
|
6206
6208
|
*
|
|
6207
|
-
* @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.
|
|
6209
|
+
* @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.
|
|
6208
6210
|
*/
|
|
6209
6211
|
async getTotalSupply(commitment) {
|
|
6210
6212
|
const result = await this.getSupply({
|
|
@@ -6321,7 +6323,7 @@ class Connection {
|
|
|
6321
6323
|
* Fetch a recent blockhash from the cluster, return with context
|
|
6322
6324
|
* @return {Promise<RpcResponseAndContext<{blockhash: Blockhash, feeCalculator: FeeCalculator}>>}
|
|
6323
6325
|
*
|
|
6324
|
-
* @deprecated Deprecated since
|
|
6326
|
+
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
6325
6327
|
*/
|
|
6326
6328
|
async getRecentBlockhashAndContext(commitment) {
|
|
6327
6329
|
const args = this._buildArgs([], commitment);
|
|
@@ -6349,7 +6351,7 @@ class Connection {
|
|
|
6349
6351
|
/**
|
|
6350
6352
|
* Fetch the fee calculator for a recent blockhash from the cluster, return with context
|
|
6351
6353
|
*
|
|
6352
|
-
* @deprecated Deprecated since
|
|
6354
|
+
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.
|
|
6353
6355
|
*/
|
|
6354
6356
|
async getFeeCalculatorForBlockhash(blockhash, commitment) {
|
|
6355
6357
|
const args = this._buildArgs([blockhash], commitment);
|
|
@@ -6402,7 +6404,7 @@ class Connection {
|
|
|
6402
6404
|
* Fetch a recent blockhash from the cluster
|
|
6403
6405
|
* @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}
|
|
6404
6406
|
*
|
|
6405
|
-
* @deprecated Deprecated since
|
|
6407
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.
|
|
6406
6408
|
*/
|
|
6407
6409
|
async getRecentBlockhash(commitment) {
|
|
6408
6410
|
try {
|
|
@@ -6784,7 +6786,7 @@ class Connection {
|
|
|
6784
6786
|
* Fetch a list of Transactions and transaction statuses from the cluster
|
|
6785
6787
|
* for a confirmed block.
|
|
6786
6788
|
*
|
|
6787
|
-
* @deprecated Deprecated since v1.
|
|
6789
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.
|
|
6788
6790
|
*/
|
|
6789
6791
|
async getConfirmedBlock(slot, commitment) {
|
|
6790
6792
|
const args = this._buildArgsAtLeastConfirmed([slot], commitment);
|
|
@@ -6863,7 +6865,7 @@ class Connection {
|
|
|
6863
6865
|
/**
|
|
6864
6866
|
* Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards
|
|
6865
6867
|
*
|
|
6866
|
-
* @deprecated Deprecated since
|
|
6868
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.
|
|
6867
6869
|
*/
|
|
6868
6870
|
async getConfirmedBlockSignatures(slot, commitment) {
|
|
6869
6871
|
const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {
|
|
@@ -6885,7 +6887,7 @@ class Connection {
|
|
|
6885
6887
|
/**
|
|
6886
6888
|
* Fetch a transaction details for a confirmed transaction
|
|
6887
6889
|
*
|
|
6888
|
-
* @deprecated Deprecated since
|
|
6890
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.
|
|
6889
6891
|
*/
|
|
6890
6892
|
async getConfirmedTransaction(signature, commitment) {
|
|
6891
6893
|
const args = this._buildArgsAtLeastConfirmed([signature], commitment);
|
|
@@ -6907,7 +6909,7 @@ class Connection {
|
|
|
6907
6909
|
/**
|
|
6908
6910
|
* Fetch parsed transaction details for a confirmed transaction
|
|
6909
6911
|
*
|
|
6910
|
-
* @deprecated Deprecated since
|
|
6912
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.
|
|
6911
6913
|
*/
|
|
6912
6914
|
async getParsedConfirmedTransaction(signature, commitment) {
|
|
6913
6915
|
const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');
|
|
@@ -6922,7 +6924,7 @@ class Connection {
|
|
|
6922
6924
|
/**
|
|
6923
6925
|
* Fetch parsed transaction details for a batch of confirmed transactions
|
|
6924
6926
|
*
|
|
6925
|
-
* @deprecated Deprecated since
|
|
6927
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.
|
|
6926
6928
|
*/
|
|
6927
6929
|
async getParsedConfirmedTransactions(signatures, commitment) {
|
|
6928
6930
|
const batch = signatures.map(signature => {
|
|
@@ -6947,7 +6949,7 @@ class Connection {
|
|
|
6947
6949
|
* Fetch a list of all the confirmed signatures for transactions involving an address
|
|
6948
6950
|
* within a specified slot range. Max range allowed is 10,000 slots.
|
|
6949
6951
|
*
|
|
6950
|
-
* @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.
|
|
6952
|
+
* @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.
|
|
6951
6953
|
*
|
|
6952
6954
|
* @param address queried address
|
|
6953
6955
|
* @param startSlot start slot, inclusive
|
|
@@ -7001,9 +7003,7 @@ class Connection {
|
|
|
7001
7003
|
* Returns confirmed signatures for transactions involving an
|
|
7002
7004
|
* address backwards in time from the provided signature or most recent confirmed block
|
|
7003
7005
|
*
|
|
7004
|
-
*
|
|
7005
|
-
* @param address queried address
|
|
7006
|
-
* @param options
|
|
7006
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.
|
|
7007
7007
|
*/
|
|
7008
7008
|
async getConfirmedSignaturesForAddress2(address, options, commitment) {
|
|
7009
7009
|
const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);
|
|
@@ -7746,13 +7746,22 @@ class Connection {
|
|
|
7746
7746
|
*
|
|
7747
7747
|
* @param publicKey Public key of the account to monitor
|
|
7748
7748
|
* @param callback Function to invoke whenever the account is changed
|
|
7749
|
-
* @param
|
|
7749
|
+
* @param config
|
|
7750
7750
|
* @return subscription id
|
|
7751
7751
|
*/
|
|
7752
|
-
|
|
7752
|
+
|
|
7753
|
+
/** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */
|
|
7754
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7755
|
+
|
|
7756
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7757
|
+
onAccountChange(publicKey, callback, commitmentOrConfig) {
|
|
7758
|
+
const {
|
|
7759
|
+
commitment,
|
|
7760
|
+
config
|
|
7761
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
7753
7762
|
const args = this._buildArgs([publicKey.toBase58()], commitment || this._commitment || 'finalized',
|
|
7754
7763
|
// Apply connection/server default.
|
|
7755
|
-
'base64');
|
|
7764
|
+
'base64', config);
|
|
7756
7765
|
return this._makeSubscription({
|
|
7757
7766
|
callback,
|
|
7758
7767
|
method: 'accountSubscribe',
|
|
@@ -7789,15 +7798,23 @@ class Connection {
|
|
|
7789
7798
|
*
|
|
7790
7799
|
* @param programId Public key of the program to monitor
|
|
7791
7800
|
* @param callback Function to invoke whenever the account is changed
|
|
7792
|
-
* @param
|
|
7793
|
-
* @param filters The program account filters to pass into the RPC method
|
|
7801
|
+
* @param config
|
|
7794
7802
|
* @return subscription id
|
|
7795
7803
|
*/
|
|
7796
|
-
|
|
7804
|
+
|
|
7805
|
+
/** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */
|
|
7806
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7807
|
+
|
|
7808
|
+
// eslint-disable-next-line no-dupe-class-members
|
|
7809
|
+
onProgramAccountChange(programId, callback, commitmentOrConfig, maybeFilters) {
|
|
7810
|
+
const {
|
|
7811
|
+
commitment,
|
|
7812
|
+
config
|
|
7813
|
+
} = extractCommitmentFromConfig(commitmentOrConfig);
|
|
7797
7814
|
const args = this._buildArgs([programId.toBase58()], commitment || this._commitment || 'finalized',
|
|
7798
7815
|
// Apply connection/server default.
|
|
7799
|
-
'base64' /* encoding */,
|
|
7800
|
-
filters:
|
|
7816
|
+
'base64' /* encoding */, config ? config : maybeFilters ? {
|
|
7817
|
+
filters: maybeFilters
|
|
7801
7818
|
} : undefined /* extra */);
|
|
7802
7819
|
return this._makeSubscription({
|
|
7803
7820
|
callback,
|