From f3d474f1e7489b7074f84aa7f0a44918d25d7cc3 Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Wed, 17 Mar 2021 22:12:40 -0600 Subject: [PATCH] Update docs --- docs/src/developing/clients/jsonrpc-api.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/src/developing/clients/jsonrpc-api.md b/docs/src/developing/clients/jsonrpc-api.md index c82ed1911bccb6..83fab7dfe4b9d3 100644 --- a/docs/src/developing/clients/jsonrpc-api.md +++ b/docs/src/developing/clients/jsonrpc-api.md @@ -460,6 +460,8 @@ Returns identity and transaction information about a confirmed block in the ledg - `` - (optional) Configuration object containing the following optional fields: - (optional) `encoding: ` - encoding for each returned Transaction, either "json", "jsonParsed", "base58" (*slow*), "base64". If parameter not provided, the default encoding is "json". "jsonParsed" encoding attempts to use program-specific instruction parsers to return more human-readable and explicit data in the `transaction.message.instructions` list. If "jsonParsed" is requested but a parser cannot be found, the instruction falls back to regular JSON encoding (`accounts`, `data`, and `programIdIndex` fields). + - (optional) `transactionDetails: ` - level of transaction detail to return, either "all", "signatures", or "none". If parameter not provided, the default detail level is "all". + - (optional) `noRewards: bool` - whether to skip returning rewards for epoch-boundary blocks. If parameter not provided, the default returns rewards. #### Results: @@ -470,7 +472,7 @@ The result field will be an object with the following fields: - `blockhash: ` - the blockhash of this block, as base-58 encoded string - `previousBlockhash: ` - the blockhash of this block's parent, as base-58 encoded string; if the parent block is not available due to ledger cleanup, this field will return "11111111111111111111111111111111" - `parentSlot: ` - the slot index of this block's parent - - `transactions: ` - an array of JSON objects containing: + - `transactions: ` - present if "all" transaction details are requested; an array of JSON objects containing: - `transaction: ` - [Transaction](#transaction-structure) object, either in JSON format or encoded binary data, depending on encoding parameter - `meta: ` - transaction status metadata object, containing `null` or: - `err: ` - Error if transaction failed, null if transaction succeeded. [TransactionError definitions](https://github.com/solana-labs/solana/blob/master/sdk/src/transaction.rs#L24) @@ -484,7 +486,8 @@ The result field will be an object with the following fields: - DEPRECATED: `status: ` - Transaction status - `"Ok": ` - Transaction was successful - `"Err": ` - Transaction failed with TransactionError - - `rewards: ` - an array of JSON objects containing: + - `signatures: ` - present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the block + - `rewards: ` - present if rewards are not suppressed; an array of JSON objects containing: - `pubkey: ` - The public key, as base-58 encoded string, of the account that received the reward - `lamports: `- number of reward lamports credited or debited by the account, as a i64 - `postBalance: ` - account balance in lamports after the reward was applied @@ -496,7 +499,7 @@ The result field will be an object with the following fields: Request: ```bash curl http://localhost:8899 -X POST -H "Content-Type: application/json" -d ' - {"jsonrpc": "2.0","id":1,"method":"getConfirmedBlock","params":[430, {"encoding": "json"}]} + {"jsonrpc": "2.0","id":1,"method":"getConfirmedBlock","params":[430, {"encoding": "json","transactionDetails":"all","noRewards":true}]} ' ``` @@ -509,7 +512,6 @@ Result: "blockhash": "3Eq21vXNB5s86c62bVuUfTeaMif1N2kUqRPBmGRJhyTA", "parentSlot": 429, "previousBlockhash": "mfcyqEXB3DnHXki6KjjmZck6YjmZLvpAByy2fj4nh6B", - "rewards": [], "transactions": [ { "meta": {