@solana/web3.js 1.93.3 → 1.94.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 +40 -20
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +40 -20
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +40 -20
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +20 -17
- package/lib/index.esm.js +40 -20
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +40 -20
- 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 +40 -20
- package/lib/index.native.js.map +1 -1
- package/package.json +1 -1
- package/src/connection.ts +65 -19
package/lib/index.iife.js
CHANGED
|
@@ -17429,6 +17429,16 @@ var solanaWeb3 = (function (exports) {
|
|
|
17429
17429
|
'solana-core': string(),
|
|
17430
17430
|
'feature-set': optional(number())
|
|
17431
17431
|
});
|
|
17432
|
+
const ParsedInstructionStruct = type({
|
|
17433
|
+
program: string(),
|
|
17434
|
+
programId: PublicKeyFromString,
|
|
17435
|
+
parsed: unknown()
|
|
17436
|
+
});
|
|
17437
|
+
const PartiallyDecodedInstructionStruct = type({
|
|
17438
|
+
programId: PublicKeyFromString,
|
|
17439
|
+
accounts: array(PublicKeyFromString),
|
|
17440
|
+
data: string()
|
|
17441
|
+
});
|
|
17432
17442
|
const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(type({
|
|
17433
17443
|
err: nullable(union([type({}), string()])),
|
|
17434
17444
|
logs: nullable(array(string())),
|
|
@@ -17443,13 +17453,17 @@ var solanaWeb3 = (function (exports) {
|
|
|
17443
17453
|
returnData: optional(nullable(type({
|
|
17444
17454
|
programId: string(),
|
|
17445
17455
|
data: tuple([string(), literal('base64')])
|
|
17446
|
-
})))
|
|
17456
|
+
}))),
|
|
17457
|
+
innerInstructions: optional(nullable(array(type({
|
|
17458
|
+
index: number(),
|
|
17459
|
+
instructions: array(union([ParsedInstructionStruct, PartiallyDecodedInstructionStruct]))
|
|
17460
|
+
}))))
|
|
17447
17461
|
}));
|
|
17448
17462
|
|
|
17449
17463
|
/**
|
|
17450
17464
|
* Metadata for a parsed confirmed transaction on the ledger
|
|
17451
17465
|
*
|
|
17452
|
-
* @deprecated Deprecated since
|
|
17466
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionMeta} instead.
|
|
17453
17467
|
*/
|
|
17454
17468
|
|
|
17455
17469
|
/**
|
|
@@ -17479,7 +17493,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
17479
17493
|
/**
|
|
17480
17494
|
* A confirmed transaction on the ledger
|
|
17481
17495
|
*
|
|
17482
|
-
* @deprecated Deprecated since
|
|
17496
|
+
* @deprecated Deprecated since RPC v1.8.0.
|
|
17483
17497
|
*/
|
|
17484
17498
|
|
|
17485
17499
|
/**
|
|
@@ -17509,7 +17523,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
17509
17523
|
/**
|
|
17510
17524
|
* A parsed and confirmed transaction on the ledger
|
|
17511
17525
|
*
|
|
17512
|
-
* @deprecated Deprecated since
|
|
17526
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.
|
|
17513
17527
|
*/
|
|
17514
17528
|
|
|
17515
17529
|
/**
|
|
@@ -17555,7 +17569,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
17555
17569
|
/**
|
|
17556
17570
|
* A confirmed block on the ledger
|
|
17557
17571
|
*
|
|
17558
|
-
* @deprecated Deprecated since
|
|
17572
|
+
* @deprecated Deprecated since RPC v1.8.0.
|
|
17559
17573
|
*/
|
|
17560
17574
|
|
|
17561
17575
|
/**
|
|
@@ -18257,7 +18271,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
18257
18271
|
/**
|
|
18258
18272
|
* Expected JSON RPC response for the "getConfirmedBlock" message
|
|
18259
18273
|
*
|
|
18260
|
-
* @deprecated Deprecated since
|
|
18274
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetBlockRpcResult} instead.
|
|
18261
18275
|
*/
|
|
18262
18276
|
const GetConfirmedBlockRpcResult = jsonRpcResult(nullable(type({
|
|
18263
18277
|
blockhash: string(),
|
|
@@ -18307,7 +18321,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
18307
18321
|
/**
|
|
18308
18322
|
* Expected JSON RPC response for the "getRecentBlockhash" message
|
|
18309
18323
|
*
|
|
18310
|
-
* @deprecated Deprecated since
|
|
18324
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link GetLatestBlockhashRpcResult} instead.
|
|
18311
18325
|
*/
|
|
18312
18326
|
const GetRecentBlockhashAndContextRpcResult = jsonRpcResultAndContext(type({
|
|
18313
18327
|
blockhash: string(),
|
|
@@ -18995,6 +19009,8 @@ var solanaWeb3 = (function (exports) {
|
|
|
18995
19009
|
|
|
18996
19010
|
/**
|
|
18997
19011
|
* Returns epoch activation information for a stake account that has been delegated
|
|
19012
|
+
*
|
|
19013
|
+
* @deprecated Deprecated since RPC v1.18; will be removed in a future version.
|
|
18998
19014
|
*/
|
|
18999
19015
|
async getStakeActivation(publicKey, commitmentOrConfig, epoch) {
|
|
19000
19016
|
const {
|
|
@@ -19566,7 +19582,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19566
19582
|
/**
|
|
19567
19583
|
* Fetch the current total currency supply of the cluster in lamports
|
|
19568
19584
|
*
|
|
19569
|
-
* @deprecated Deprecated since v1.2.8. Please use {@link getSupply} instead.
|
|
19585
|
+
* @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.
|
|
19570
19586
|
*/
|
|
19571
19587
|
async getTotalSupply(commitment) {
|
|
19572
19588
|
const result = await this.getSupply({
|
|
@@ -19683,7 +19699,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19683
19699
|
* Fetch a recent blockhash from the cluster, return with context
|
|
19684
19700
|
* @return {Promise<RpcResponseAndContext<{blockhash: Blockhash, feeCalculator: FeeCalculator}>>}
|
|
19685
19701
|
*
|
|
19686
|
-
* @deprecated Deprecated since
|
|
19702
|
+
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.
|
|
19687
19703
|
*/
|
|
19688
19704
|
async getRecentBlockhashAndContext(commitment) {
|
|
19689
19705
|
const args = this._buildArgs([], commitment);
|
|
@@ -19711,7 +19727,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19711
19727
|
/**
|
|
19712
19728
|
* Fetch the fee calculator for a recent blockhash from the cluster, return with context
|
|
19713
19729
|
*
|
|
19714
|
-
* @deprecated Deprecated since
|
|
19730
|
+
* @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.
|
|
19715
19731
|
*/
|
|
19716
19732
|
async getFeeCalculatorForBlockhash(blockhash, commitment) {
|
|
19717
19733
|
const args = this._buildArgs([blockhash], commitment);
|
|
@@ -19764,7 +19780,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
19764
19780
|
* Fetch a recent blockhash from the cluster
|
|
19765
19781
|
* @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}
|
|
19766
19782
|
*
|
|
19767
|
-
* @deprecated Deprecated since
|
|
19783
|
+
* @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.
|
|
19768
19784
|
*/
|
|
19769
19785
|
async getRecentBlockhash(commitment) {
|
|
19770
19786
|
try {
|
|
@@ -20146,7 +20162,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20146
20162
|
* Fetch a list of Transactions and transaction statuses from the cluster
|
|
20147
20163
|
* for a confirmed block.
|
|
20148
20164
|
*
|
|
20149
|
-
* @deprecated Deprecated since v1.
|
|
20165
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.
|
|
20150
20166
|
*/
|
|
20151
20167
|
async getConfirmedBlock(slot, commitment) {
|
|
20152
20168
|
const args = this._buildArgsAtLeastConfirmed([slot], commitment);
|
|
@@ -20225,7 +20241,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20225
20241
|
/**
|
|
20226
20242
|
* Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards
|
|
20227
20243
|
*
|
|
20228
|
-
* @deprecated Deprecated since
|
|
20244
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.
|
|
20229
20245
|
*/
|
|
20230
20246
|
async getConfirmedBlockSignatures(slot, commitment) {
|
|
20231
20247
|
const args = this._buildArgsAtLeastConfirmed([slot], commitment, undefined, {
|
|
@@ -20247,7 +20263,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20247
20263
|
/**
|
|
20248
20264
|
* Fetch a transaction details for a confirmed transaction
|
|
20249
20265
|
*
|
|
20250
|
-
* @deprecated Deprecated since
|
|
20266
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.
|
|
20251
20267
|
*/
|
|
20252
20268
|
async getConfirmedTransaction(signature, commitment) {
|
|
20253
20269
|
const args = this._buildArgsAtLeastConfirmed([signature], commitment);
|
|
@@ -20269,7 +20285,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20269
20285
|
/**
|
|
20270
20286
|
* Fetch parsed transaction details for a confirmed transaction
|
|
20271
20287
|
*
|
|
20272
|
-
* @deprecated Deprecated since
|
|
20288
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.
|
|
20273
20289
|
*/
|
|
20274
20290
|
async getParsedConfirmedTransaction(signature, commitment) {
|
|
20275
20291
|
const args = this._buildArgsAtLeastConfirmed([signature], commitment, 'jsonParsed');
|
|
@@ -20284,7 +20300,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20284
20300
|
/**
|
|
20285
20301
|
* Fetch parsed transaction details for a batch of confirmed transactions
|
|
20286
20302
|
*
|
|
20287
|
-
* @deprecated Deprecated since
|
|
20303
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.
|
|
20288
20304
|
*/
|
|
20289
20305
|
async getParsedConfirmedTransactions(signatures, commitment) {
|
|
20290
20306
|
const batch = signatures.map(signature => {
|
|
@@ -20309,7 +20325,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20309
20325
|
* Fetch a list of all the confirmed signatures for transactions involving an address
|
|
20310
20326
|
* within a specified slot range. Max range allowed is 10,000 slots.
|
|
20311
20327
|
*
|
|
20312
|
-
* @deprecated Deprecated since v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.
|
|
20328
|
+
* @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.
|
|
20313
20329
|
*
|
|
20314
20330
|
* @param address queried address
|
|
20315
20331
|
* @param startSlot start slot, inclusive
|
|
@@ -20363,9 +20379,7 @@ var solanaWeb3 = (function (exports) {
|
|
|
20363
20379
|
* Returns confirmed signatures for transactions involving an
|
|
20364
20380
|
* address backwards in time from the provided signature or most recent confirmed block
|
|
20365
20381
|
*
|
|
20366
|
-
*
|
|
20367
|
-
* @param address queried address
|
|
20368
|
-
* @param options
|
|
20382
|
+
* @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.
|
|
20369
20383
|
*/
|
|
20370
20384
|
async getConfirmedSignaturesForAddress2(address, options, commitment) {
|
|
20371
20385
|
const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, undefined, options);
|
|
@@ -20556,6 +20570,9 @@ var solanaWeb3 = (function (exports) {
|
|
|
20556
20570
|
if (!('commitment' in config)) {
|
|
20557
20571
|
config.commitment = this.commitment;
|
|
20558
20572
|
}
|
|
20573
|
+
if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {
|
|
20574
|
+
config.innerInstructions = configOrSigners.innerInstructions;
|
|
20575
|
+
}
|
|
20559
20576
|
const args = [encodedTransaction, config];
|
|
20560
20577
|
const unsafeRes = await this._rpcRequest('simulateTransaction', args);
|
|
20561
20578
|
const res = create(unsafeRes, SimulatedTransactionResponseStruct);
|
|
@@ -20627,6 +20644,9 @@ var solanaWeb3 = (function (exports) {
|
|
|
20627
20644
|
if (signers) {
|
|
20628
20645
|
config.sigVerify = true;
|
|
20629
20646
|
}
|
|
20647
|
+
if (configOrSigners && typeof configOrSigners === 'object' && 'innerInstructions' in configOrSigners) {
|
|
20648
|
+
config.innerInstructions = configOrSigners.innerInstructions;
|
|
20649
|
+
}
|
|
20630
20650
|
const args = [encodedTransaction, config];
|
|
20631
20651
|
const unsafeRes = await this._rpcRequest('simulateTransaction', args);
|
|
20632
20652
|
const res = create(unsafeRes, SimulatedTransactionResponseStruct);
|