Skip to content

Commit

Permalink
update wording Rosetta pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jessiemongeon1 committed Nov 3, 2023
1 parent 49debbb commit c2cfb48
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
5 changes: 2 additions & 3 deletions docs/developer-docs/integrations/rosetta/hotkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Create the public DER file:
### Hex representation

The generated DER files are in a binary format not intended to be readable by humans.
But we can get a hex representation of both keys:
But you can get a hex representation of both keys:


### Private key
Expand All @@ -73,8 +73,7 @@ a7a8aade2468c1de0d6630d9f1a69a0c2717
302a300506032b6570032100e092ad13628d5544e8f7a725db4d85816bf9
72dc0fedfd5db353bbdcf67af951
```

We need to keep only the last 32 bytes of the public key:
You need to keep only the last 32 bytes of the public key:

`xxd -s 12 -c 32 -p public.der`

Expand Down
10 changes: 5 additions & 5 deletions docs/developer-docs/integrations/rosetta/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This documentation might help if you want to deploy a token on the IC that aims
## Set up a Rosetta node

You can set up a Rosetta API-compliant node to interact with the Internet Computer and exchange Internet Computer Protocol (ICP) tokens.
To keep the instructions simple, we use a Docker image to create the integration with the Rosetta API.
To keep the instructions simple,you can use a Docker image to create the integration with the Rosetta API.
You can also build and run the binary using the source code.

If you don’t already have [Docker](https://docs.docker.com/get-docker/) on your computer, download and install the latest version.
Expand Down Expand Up @@ -134,8 +134,8 @@ docker run \
```

- #### Is the Rosetta node versioned?
Yes, we regularly publish new versions on [DockerHub](https://hub.docker.com/r/dfinity/rosetta-api/tags).
We recommend using a specific version in production settings, e.g., `dfinity/rosetta-api:v1.7.0`
Yes, new versions are regularly published on [DockerHub](https://hub.docker.com/r/dfinity/rosetta-api/tags).
It is recommended to use a specific version in production settings, e.g., `dfinity/rosetta-api:v1.7.0`
You can query the version of a running rosetta node using the `/network/options` endpoint.

```console
Expand Down Expand Up @@ -203,15 +203,15 @@ Failed calls always have `500` response status code, with a JSON payload contain
You can find all possible Rosetta error codes and their text descriptions in the [`/network/options`](https://www.rosetta-api.org/docs/NetworkApi.html#networkoptions) call result.

- #### How do I send Mint or Burn transactions?
Mint is a privileged operation; we don’t support Burn through Rosetta API calls at the moment.
Mint is a privileged operation; it does not support Burn through Rosetta API calls at the moment.

- #### What happens if the same signed transaction is submitted multiple times?
The ledger rejects duplicate transactions.
Only the first transaction will make it to the chain; the [`/construction/submit`](https://www.rosetta-api.org/docs/ConstructionApi.html#constructionsubmit) call will fail for the duplicates.

- #### How to sign a transaction without calling Rosetta API?
The JavaScript SDK contains an [implementation](https://github.com/dfinity/rosetta-client/blob/master/lib/construction_combine.js) of the offline signing logic.
This functionality is unstable because it is coupled with internal implementation details, so we strongly advise you to call [`/construction/combine`](https://www.rosetta-api.org/docs/ConstructionApi.html#constructioncombine) to sign transactions if possible.
This functionality is unstable because it is coupled with internal implementation details, so it is strongly advised you to call [`/construction/combine`](https://www.rosetta-api.org/docs/ConstructionApi.html#constructioncombine) to sign transactions if possible.

- #### How to configure the ingress time period?
In the `/construction/payloads` call, you can add one or all of the `ingress_start` / `ingress_end` fields to specify the ingress time period.
Expand Down
6 changes: 3 additions & 3 deletions docs/developer-docs/integrations/rosetta/staking-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

This guide will walk you through the process of creating a neuron using the Internet Computer implementation of the [Rosetta API](https://rosetta-api.org). We will transfer funds to the governance canister, create a neuron, and configure the newly created neuron.
This guide will walk you through the process of creating a neuron using the Internet Computer implementation of the [Rosetta API](https://rosetta-api.org). You will transfer funds to the governance canister, create a neuron, and configure the newly created neuron.

From the Internet Computer point of view, creating a neuron is a multi-step operation that includes the following actions:

Expand Down Expand Up @@ -89,7 +89,7 @@ curl -0 -X POST http://localhost:8080/construction/derive \
:::info
We set `account_type` to `neuron` in the request metadata to tell the Rosetta node that we want to get the account for staking. The `neuron_index` parameter is an arbitrary 64-bit unsigned integer that the caller chooses to identify the neuron. A single user can control multiple neurons and differentiate them by specifying different values of `neuron_index`. `neuron_index` is optional and is equal to 0 by default.
Set `account_type` to `neuron` in the request metadata to tell the Rosetta node that you want to get the account for staking. The `neuron_index` parameter is an arbitrary 64-bit unsigned integer that the caller chooses to identify the neuron. A single user can control multiple neurons and differentiate them by specifying different values of `neuron_index`. `neuron_index` is optional and is equal to 0 by default.
:::
Expand Down Expand Up @@ -271,7 +271,7 @@ The `payloads` field of the response contains the list of payloads that need to
:::info
According to the Rosetta API specification ([Flow of Operations](https://www.rosetta-api.org/docs/construction_api_introduction.html#flow-of-operations)), the client should call `/construction/preprocess` and `/construction/metadata` before calling `/construction/payloads` because there might be some metadata that needs to be attached to the payloads request. Currently, there is no need to do it for the ICP Rosetta node implementation, so we skipped these unnecessary steps.
According to the Rosetta API specification ([Flow of Operations](https://www.rosetta-api.org/docs/construction_api_introduction.html#flow-of-operations)), the client should call `/construction/preprocess` and `/construction/metadata` before calling `/construction/payloads` because there might be some metadata that needs to be attached to the payloads request. Currently, there is no need to do it for the ICP Rosetta node implementation, so these unnecessary steps were skipped.
:::
Expand Down

0 comments on commit c2cfb48

Please sign in to comment.