@solana/web3.js 1.63.2 → 1.64.1

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.
@@ -4422,6 +4422,28 @@ const GetBlockRpcResult = jsonRpcResult(nullable(type({
4422
4422
  blockTime: nullable(number()),
4423
4423
  blockHeight: nullable(number())
4424
4424
  })));
4425
+ /**
4426
+ * Expected parsed JSON RPC response for the "getBlock" message
4427
+ */
4428
+
4429
+ const GetParsedBlockRpcResult = jsonRpcResult(nullable(type({
4430
+ blockhash: string(),
4431
+ previousBlockhash: string(),
4432
+ parentSlot: number(),
4433
+ transactions: array(type({
4434
+ transaction: ParsedConfirmedTransactionResult,
4435
+ meta: nullable(ParsedConfirmedTransactionMetaResult),
4436
+ version: optional(TransactionVersionStruct)
4437
+ })),
4438
+ rewards: optional(array(type({
4439
+ pubkey: string(),
4440
+ lamports: number(),
4441
+ postBalance: nullable(number()),
4442
+ rewardType: nullable(string())
4443
+ }))),
4444
+ blockTime: nullable(number()),
4445
+ blockHeight: nullable(number())
4446
+ })));
4425
4447
  /**
4426
4448
  * Expected JSON RPC response for the "getConfirmedBlock" message
4427
4449
  *
@@ -4556,7 +4578,7 @@ const LogsNotificationResult = type({
4556
4578
 
4557
4579
  /** @internal */
4558
4580
  const COMMON_HTTP_HEADERS = {
4559
- 'solana-client': `js/${(_process$env$npm_pack = "1.63.2") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
4581
+ 'solana-client': `js/${(_process$env$npm_pack = "1.64.1") !== null && _process$env$npm_pack !== void 0 ? _process$env$npm_pack : 'UNKNOWN'}`
4560
4582
  };
4561
4583
  /**
4562
4584
  * A connection to a fullnode JSON RPC endpoint
@@ -5761,6 +5783,28 @@ class Connection {
5761
5783
  }))
5762
5784
  };
5763
5785
  }
5786
+ /**
5787
+ * Fetch parsed transaction details for a confirmed or finalized block
5788
+ */
5789
+
5790
+
5791
+ async getParsedBlock(slot, rawConfig) {
5792
+ const {
5793
+ commitment,
5794
+ config
5795
+ } = extractCommitmentFromConfig(rawConfig);
5796
+
5797
+ const args = this._buildArgsAtLeastConfirmed([slot], commitment, 'jsonParsed', config);
5798
+
5799
+ const unsafeRes = await this._rpcRequest('getBlock', args);
5800
+ const res = create(unsafeRes, GetParsedBlockRpcResult);
5801
+
5802
+ if ('error' in res) {
5803
+ throw new SolanaJSONRPCError(res.error, 'failed to get block');
5804
+ }
5805
+
5806
+ return res.result;
5807
+ }
5764
5808
  /*
5765
5809
  * Returns the current block height of the node
5766
5810
  */