Add missing fields to JSON-RPC docs (#27964)

* Add docs for computeUnitsConsumed field

* Add confirmationStatus to getSignaturesForAddress response docs

* Make field-type formatting consistent
This commit is contained in:
Tyera Eulberg 2022-09-21 11:59:30 -06:00 committed by GitHub
parent 5d7130623f
commit fa0550da32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 49 additions and 46 deletions

View File

@ -452,6 +452,7 @@ The result field will be an object with the following fields:
- `returnData: <object|undefined>` - the most-recent return data generated by an instruction in the transaction, with the following fields:
- `programId: <string>`, the program that generated the return data, as base-58 encoded Pubkey
- `data: <[string, encoding]>`, the return data itself, as base-64 encoded binary data
- `computeUnitsConsumed: <u64|undefined>`, number of [compute units](developing/programming-model/runtime.md#compute-budget) consumed by the transaction
- `version: <"legacy"|number|undefined>` - Transaction version. Undefined if `maxSupportedTransactionVersion` is not set in request params.
- `signatures: <array>` - present if "signatures" are requested for transaction details; an array of signatures strings, corresponding to the transaction order in the block
- `rewards: <array|undefined>` - block-level rewards, present if rewards are requested; an array of JSON objects containing:
@ -2201,6 +2202,7 @@ from newest to oldest transaction:
- `err: <object|null>` - Error if transaction failed, null if transaction succeeded. [TransactionError definitions](https://github.com/solana-labs/solana/blob/c0c60386544ec9a9ec7119229f37386d9f070523/sdk/src/transaction/error.rs#L13)
- `memo: <string|null>` - Memo associated with the transaction, null if no memo is present
- `blockTime: <i64|null>` - estimated production time, as Unix timestamp (seconds since the Unix epoch) of when transaction was processed. null if not available.
- `confirmationStatus: <string|null>` - The transaction's cluster confirmation status; either `processed`, `confirmed`, or `finalized`. See [Commitment](jsonrpc-api.md#configuring-state-commitment) for more on optimistic confirmation.
#### Example:
@ -3059,6 +3061,7 @@ Returns transaction details for a confirmed transaction
- `returnData: <object|undefined>` - the most-recent return data generated by an instruction in the transaction, with the following fields:
- `programId: <string>`, the program that generated the return data, as base-58 encoded Pubkey
- `data: <[string, encoding]>`, the return data itself, as base-64 encoded binary data
- `computeUnitsConsumed: <u64|undefined>`, number of [compute units](developing/programming-model/runtime.md#compute-budget) consumed by the transaction
- `version: <"legacy"|number|undefined>` - Transaction version. Undefined if `maxSupportedTransactionVersion` is not set in request params.
#### Example: