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

Start json-rpc.md deduplication #3960

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions doc/src/build/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,57 +80,6 @@ curl --location --request POST $SUI_RPC_HOST \
This will fetch the latest information on all objects owned by each
address that is managed by this server. This command has no output.

### sui_getOwnedObjects

Return the list of objects owned by an address:
```shell
curl --location --request POST $SUI_RPC_HOST \
--header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc":"2.0", "method":"sui_getOwnedObjects", "params":["{{address}}"], "id":1}' | json_pp
```

You should replace `{{address}}` in the command above with an actual
address value, you can retrieve the list of the addresses created during
genesis from `client.yaml`. Ensure you have run [`sui_syncAccountState`](#sui_syncaccountstate)

The output you see should resemble the following (abbreviated to show only two objects):

```shell
{
"id" : 1,
"jsonrpc" : "2.0",
"result" : {
"objects" : [
{
"digest" : "zpa45U9ANfA9A6iS01NvAoVH0RbYB6a5rjhgh2Hb/GE=",
"objectId" : "0x17b348903b0cfb75fc9ab5426bb69d83d1e756a5",
"version" : 1
},
{
"digest" : "8SPi0h6xVMVNBvGzzF4RfuOoaXISdtiB5aT7+BYDbxg=",
"objectId" : "0x7599d8ea1de4c9616d077f16ca0eb38cdecacc07",
"version" : 1
},
...
]
}
}

```

### GET sui_getObjectInfoRaw

Return the object information for a specified object, for example:

```shell
curl --location --request POST $SUI_RPC_HOST \
--header 'Content-Type: application/json' \
--data-raw '{ "jsonrpc":"2.0", "method":"sui_getObjectInfoRaw", "params":["{{object_id}}"], "id":1}' | json_pp
```

Replace `{{object_id}}` in the command above with an
actual object ID, for example one obtained from [`sui_getOwnedObjects`](#sui_getownedobjects) (without quotes).

### sui_transferObject
#### 1, Create a transaction to transfer a Sui coin from one address to another:
```shell
Expand Down