Skip to content

Commit

Permalink
remove some mentioning of gateway (MystenLabs#5243)
Browse files Browse the repository at this point in the history
* remove some mentioning of gateway

* run generate-json-rpc-sepc
  • Loading branch information
longbowlu authored Oct 14, 2022
1 parent 64cf096 commit cf35a13
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/sui-json-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub struct JsonRpcServerBuilder {
pub fn sui_rpc_doc() -> Project {
Project::new(
"Sui JSON-RPC",
"Sui JSON-RPC API for interaction with the Sui network gateway.",
"Sui JSON-RPC API for interaction with Sui Full node.",
"Mysten Labs",
"https://mystenlabs.com",
"build@mystenlabs.com",
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-open-rpc/spec/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openrpc": "1.2.6",
"info": {
"title": "Sui JSON-RPC",
"description": "Sui JSON-RPC API for interaction with the Sui network gateway.",
"description": "Sui JSON-RPC API for interaction with Sui Full node.",
"contact": {
"name": "Mysten Labs",
"url": "https://mystenlabs.com",
Expand Down
4 changes: 2 additions & 2 deletions doc/src/build/devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We are hosting a public Devnet for the community to experiment with Sui and prov

The Sui Devnet network currently consists of:

* Four validator nodes operated by Mysten Labs. Clients send transactions and read requests via this endpoint: gateway.devnet.sui.io:443 using [JSON-RPC](../build/json-rpc.md)
* Four validator nodes operated by Mysten Labs. Clients send transactions and read requests via this endpoint: fullnode.devnet.sui.io:443 using [JSON-RPC](../build/json-rpc.md)
* A public network [Sui Explorer](https://explorer.devnet.sui.io) for browsing transaction history.
* A [Discord channel](https://discordapp.com/channels/916379725201563759/971488439931392130) for requesting test coins that can be used to pay for gas on the test network. These coins have no financial value and will disappear each time we reset the network.

Expand Down Expand Up @@ -62,7 +62,7 @@ The Sui client prompts you for the RPC server URL; press 'Enter' and it defaults
If you previously installed a Sui client with a local network, modify your existing `client.yaml` to change the RPC endpoint with the following command:
```shell
$ sui client switch --rpc https://gateway.devnet.sui.io:443
$ sui client switch --rpc https://fullnode.devnet.sui.io:443
```
> **Tip:** If you run into issues, reset the Sui configuration by removing its directory, by default located at `~/.sui/sui_config`. Then reinstall [Sui binaries](../build/install.md#binaries).
Expand Down
8 changes: 4 additions & 4 deletions doc/src/build/rust-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ use sui_sdk::SuiClient;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let sui = SuiClient::new_rpc_client("https://gateway.devnet.sui.io:443", None).await?;
let sui = SuiClient::new_rpc_client("https://fullnode.devnet.sui.io:443", None).await?;
let address = SuiAddress::from_str("0xec11cad080d0496a53bafcea629fcbcfff2a9866")?;
let objects = sui.read_api().get_objects_owned_by_address(address).await?;
println!("{:?}", objects);
Ok(())
}
```

You can verify the result with the [Sui Explorer](https://explorer.devnet.sui.io/) if you are using the Sui Devnet Gateway.
You can verify the result with the [Sui Explorer](https://explorer.devnet.sui.io/) if you are using the Sui Devnet Full node.

### Example 2 - Create and execute transaction

Expand All @@ -71,7 +71,7 @@ use sui_sdk::{

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let sui = SuiClient::new_rpc_client("https://gateway.devnet.sui.io:443", None).await?;
let sui = SuiClient::new_rpc_client("https://fullnode.devnet.sui.io:443", None).await?;
// Load keystore from ~/.sui/sui_config/sui.keystore
let keystore_path = match dirs::home_dir() {
Some(v) => v.join(".sui").join("sui_config").join("sui.keystore"),
Expand Down Expand Up @@ -115,7 +115,7 @@ use sui_sdk::SuiClient;

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let sui = SuiClient::new_rpc_client("https://gateway.devnet.sui.io:443", Some("ws://127.0.0.1:9001")).await?;
let sui = SuiClient::new_rpc_client("https://fullnode.devnet.sui.io:443", Some("ws://127.0.0.1:9001")).await?;
let mut subscribe_all = sui.event_api().subscribe_event(SuiEventFilter::All(vec![])).await?;
loop {
println!("{:?}", subscribe_all.next().await);
Expand Down

0 comments on commit cf35a13

Please sign in to comment.