@solana/web3.js 1.63.1 → 1.65.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.iife.js CHANGED
@@ -8368,7 +8368,8 @@ var solanaWeb3 = (function (exports) {
8368
8368
  return new PublicKey(key.toBuffer());
8369
8369
  }
8370
8370
  /**
8371
- * Default public key value. (All zeros)
8371
+ * Default public key value. The base58-encoded string representation is all ones (as seen below)
8372
+ * The underlying BN number is 32 bytes that are all zeros
8372
8373
  */
8373
8374
 
8374
8375
 
@@ -18050,6 +18051,28 @@ var solanaWeb3 = (function (exports) {
18050
18051
  blockTime: nullable(number()),
18051
18052
  blockHeight: nullable(number())
18052
18053
  })));
18054
+ /**
18055
+ * Expected parsed JSON RPC response for the "getBlock" message
18056
+ */
18057
+
18058
+ const GetParsedBlockRpcResult = jsonRpcResult(nullable(type({
18059
+ blockhash: string(),
18060
+ previousBlockhash: string(),
18061
+ parentSlot: number(),
18062
+ transactions: array(type({
18063
+ transaction: ParsedConfirmedTransactionResult,
18064
+ meta: nullable(ParsedConfirmedTransactionMetaResult),
18065
+ version: optional(TransactionVersionStruct)
18066
+ })),
18067
+ rewards: optional(array(type({
18068
+ pubkey: string(),
18069
+ lamports: number(),
18070
+ postBalance: nullable(number()),
18071
+ rewardType: nullable(string())
18072
+ }))),
18073
+ blockTime: nullable(number()),
18074
+ blockHeight: nullable(number())
18075
+ })));
18053
18076
  /**
18054
18077
  * Expected JSON RPC response for the "getConfirmedBlock" message
18055
18078
  *
@@ -19389,6 +19412,28 @@ var solanaWeb3 = (function (exports) {
19389
19412
  }))
19390
19413
  };
19391
19414
  }
19415
+ /**
19416
+ * Fetch parsed transaction details for a confirmed or finalized block
19417
+ */
19418
+
19419
+
19420
+ async getParsedBlock(slot, rawConfig) {
19421
+ const {
19422
+ commitment,
19423
+ config
19424
+ } = extractCommitmentFromConfig(rawConfig);
19425
+
19426
+ const args = this._buildArgsAtLeastConfirmed([slot], commitment, 'jsonParsed', config);
19427
+
19428
+ const unsafeRes = await this._rpcRequest('getBlock', args);
19429
+ const res = create(unsafeRes, GetParsedBlockRpcResult);
19430
+
19431
+ if ('error' in res) {
19432
+ throw new SolanaJSONRPCError(res.error, 'failed to get block');
19433
+ }
19434
+
19435
+ return res.result;
19436
+ }
19392
19437
  /*
19393
19438
  * Returns the current block height of the node
19394
19439
  */