Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JSON-RPC API to Condor rc2 #1473

Merged
merged 17 commits into from
Jun 26, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ slug: /transactions-and-transaction-lifecycle

# Transactions and the Transaction Lifecycle

## Transactionss {#execution-semantics-transactions}
## Transactions {#execution-semantics-transactions}

A [transaction](./glossary/T.md#transaction) is a data structure containing Wasm and the requester's signature(s). Additionally, the transaction header contains additional metadata about the transaction itself. A transactions’s structure is as follows:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ casper-client transfer -v \
A transfer on a Casper network is only executed after it has been included in a finalized block.

```bash
casper-client get-deploy
casper-client get-deploy \
--node-address [NODE_SERVER_ADDRESS] [DEPLOY_HASH]
```

Expand All @@ -187,7 +187,7 @@ Transfer addresses use a `transfer-` string prefix.
**Example Query:**

```bash
casper-client get-deploy
casper-client get-deploy \
--node-address https://rpc.testnet.casperlabs.io
1f17a0bdeaaf71abd03492c854cdf97f746432751721ce555e95b9cefe641e3c
```
Expand Down
4 changes: 2 additions & 2 deletions source/docs/casper/developers/json-rpc/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The following document expands on custom error codes provided by `casper-json-rpc` crate.

## Error Codes {#codes}
## Error Codes

|Code |Error |Description |
|--------|-----------------------------|-------------------------------------------------------|
Expand All @@ -25,7 +25,7 @@ The following document expands on custom error codes provided by `casper-json-rp
| -32603 | InternalError | Internal JSON-RPC error. |
| -32700 | ParseError | Invalid JSON was received by the server. |

## Invalid `Params` {#invalid-params}
## Invalid `Params`

The `casper-json-rpc` no longer ignores invalid `params` fields. `Params` fields to be omitted should be an empty Array '[]', an empty Object '{}' or absent.

Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/developers/json-rpc/guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A compliant Casper JSON-RPC SDK implementation must support all the endpoints an

## Consistency

A Casper JSON-RPC SDK must be consistent in terminology, language, and functionality relative to the Casper platform's architecture and design. Use actual terms such as Account and Deploy, not similar terms such as wallet or transaction.
A Casper JSON-RPC SDK must be consistent in terminology, language, and functionality relative to the Casper platform's architecture and design. Use actual terms such as Account and AddressableEntity, not similar terms such as wallet.

Care should be taken to maintain a universal language and not obscure the domain concepts of the Casper platform, which could confuse users of the SDK. The goal is to not make it difficult for users of an SDK to understand the documentation of the Casper platform. Further, they should be able to communicate effectively with technical support personnel who understand the terminology of the Casper platform and not the variant terminology of an SDK.

Expand Down
16 changes: 8 additions & 8 deletions source/docs/casper/developers/json-rpc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ title: Overview

# Interacting with the Casper JSON-RPC API

Casper uses a custom JSON-RPC implementation known as `casper-json-rpc` that is compliant with the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification). If you are on this page, you are an advanced user wishing to interact directly with a Casper node's JSON-RPC API. You may use [Postman](https://www.postman.com/) or write code to interact with the Casper JSON-RPC API, which is fully compatible with the JSON-RPC 2.0 Specification.
Casper uses a custom JSON-RPC implementation called `casper-json-rpc` that complies with the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification).

Casper nodes provide the RPC schema on port `8888`, followed by `rpc-schema`:
The [Casper Sidecar](../../operators/setup/casper-sidecar.md) service offers a JSON-RPC API server for clients to interact with a Casper node. The Sidecar acts as a JSON bridge between subscribers and a Casper node's binary port, producing faster responses and reducing the load placed on the node. For more details on how the JSON-RPC API works, see the [JSON-RPC README](https://github.com/casper-network/casper-sidecar/blob/feat-2.0/json_rpc/README.md) in the Sidecar repository. The Sidecar usually runs on the same machine as the node process, and you need to find the port on which to access the Sidecar.

```sh
<HOST:8888>/rpc-schema
```

To see an example, navigate to a node's RPC schema using a browser.
You can find the latest RPC schema in the Sidecar's [GitHub repository](https://github.com/casper-network/casper-sidecar/blob/feat-2.0/resources/test/rpc_schema.json). <!--TODO when feat-2.0 merges to dev, update this link.-->

The Casper client subcommand `list-rpcs` provides all currently supported RPCs. Here is an example of running the Casper client to list RPCs:
The Casper client subcommand `list-rpcs` also provides all currently supported RPCs. Here is an example of running the Casper client to list RPCs:

```sh
casper-client list-rpcs --node-address <HOST:PORT>
```

You may use [Postman](https://www.postman.com/) or write code to interact with the Casper JSON-RPC API, which is fully compatible with the JSON-RPC 2.0 Specification.



## Table of Contents

|Page |Description |
Expand Down
Loading
Loading