Merge pull request #1220 from amarantha-k/xrpl-1191

Clarify that you can generate keys in any normal way
This commit is contained in:
Rome Reginelli
2022-05-19 16:52:54 -07:00
committed by GitHub
7 changed files with 52 additions and 42 deletions

View File

@@ -1,3 +1,3 @@
The most secure way to sign a transaction is to do it locally with a [client library](client-libraries.html). Alternatively, if you run your own `rippled` node you can sign the transaction using the [sign method](sign.html), but this must be done through a trusted and encrypted connection, or through a local (same-machine) connection.
The most secure way to sign a transaction is to [sign locally with a client library](set-up-secure-signing.html#local-signing-example). Alternatively, if you run your own `rippled` node you can sign the transaction using the [sign method](sign.html), but this must be done through a trusted and encrypted connection, or through a local (same-machine) connection.
In all cases, note the signed transaction's identifying hash for later.

View File

@@ -130,7 +130,7 @@ SetRegularKeyトランザクションでレギュラーキーペアを初めて
### トランザクションの署名
{% include '_snippets/tutorial-sign-step.md' %}
{% include '_snippets/tutorial-sign-step.ja.md' %}
<!--{#_ #}-->
要求フィールドに以下の値を指定します。
@@ -409,7 +409,7 @@ rippled submit 1200052280000000240000000468400000000000000A73210384CA3C528F10C75
### トランザクションの署名
{% include '_snippets/tutorial-sign-step.md' %}
{% include '_snippets/tutorial-sign-step.ja.md' %}
<!--{#_ #}-->
要求フィールドに以下の値を指定します。

View File

@@ -22,49 +22,24 @@ This tutorial walks through the steps required to assign a regular key pair to y
## 1. Generate a Key Pair
Use the [wallet_propose method][] to generate the key pair that you'll assign to your account as a regular key pair.
Generate a key pair that you'll assign to your account as a regular key pair.
### Request Format
This key pair is the same data type as a master key pair, so you can generate it the same way: you can use the client library of your choice or use the [wallet_propose method][] of a server you operate. This might look as follows:
An example of the request format:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
_WebSocket_
```json
// Request:
{
"command": "wallet_propose"
}
```
*JSON-RPC*
// Response:
```json
{
"method": "wallet_propose"
}
```
*Commandline*
```sh
#Syntax: wallet_propose
rippled wallet_propose
```
<!-- MULTICODE_BLOCK_END -->
### Response Format
An example of a successful response:
<!-- MULTICODE_BLOCK_START -->
*WebSocket*
```json
{
"result": {
"account_id": "rsprUqu6BHAffAeG4HpSdjBNvnA6gdnZV7",
@@ -80,9 +55,17 @@ An example of a successful response:
}
```
*JSON-RPC*
_JSON-RPC_
```json
// Request:
{
"method": "wallet_propose"
}
// Response:
{
"result": {
"account_id": "rsprUqu6BHAffAeG4HpSdjBNvnA6gdnZV7",
@@ -97,9 +80,11 @@ An example of a successful response:
}
```
*Commandline*
_Commandline_
```sh
$ rippled wallet_propose
```json
{
"result" : {
"account_id" : "rsprUqu6BHAffAeG4HpSdjBNvnA6gdnZV7",
@@ -114,9 +99,34 @@ An example of a successful response:
}
```
_Python_
```py
keypair = xrpl.wallet.Wallet.create()
print("seed:", keypair.seed)
print("classic address:", keypair.classic_address)
```
_JavaScript_
```js
const keypair = new xrpl.Wallet()
console.log("seed:", keypair.seed)
console.log("classic address:", keypair.classicAddress)
```
_Java_
```java
WalletFactory walletFactory = DefaultWalletFactory.getInstance();
Wallet keypair = walletFactory.randomWallet(true).wallet();
System.out.println(keypair);
System.out.println(keypair.privateKey().get());
```
<!-- MULTICODE_BLOCK_END -->
In the next step, you'll use the `account_id` from this response to assign the key pair as a regular key pair to your account. Also, save the `master_seed` value somewhere securely. (Everything else, you can forget about.)
In the next step, you'll use the address from this response (`account_id` in the API response) to assign the key pair as a regular key pair to your account. Also, save the seed value from this key pair (`master_seed` in the API response) somewhere securely; you'll use that key to sign transactions later. (Everything else, you can forget about.)
## 2. Assign the Key Pair to Your Account as a Regular Key Pair

View File

@@ -29,7 +29,7 @@ XRP Ledgerでは、アカウントはその後のトランザクションには
### トランザクションの署名
{% include '_snippets/tutorial-sign-step.md' %}
{% include '_snippets/tutorial-sign-step.ja.md' %}
<!--{#_ #}-->
要求フィールドに以下の値を指定します。

View File

@@ -63,7 +63,7 @@ Checkを取り消す例を以下に示します。
## {{cancel_n.next()}}.CheckCancelトランザクションの署名
{% include '_snippets/tutorial-sign-step.md' %} <!--#{ fix md highlighting_ #}-->
{% include '_snippets/tutorial-sign-step.ja.md' %} <!--#{ fix md highlighting_ #}-->
### 要求の例

View File

@@ -60,7 +60,7 @@ Checkを変動金額で換金するためのトランザクションを準備す
## {{cash_flex_n.next()}}.CheckCashトランザクションの署名
{% include '_snippets/tutorial-sign-step.md' %} <!--#{ fix md highlighting_ #}-->
{% include '_snippets/tutorial-sign-step.ja.md' %} <!--#{ fix md highlighting_ #}-->
### 要求の例

View File

@@ -68,7 +68,7 @@ Checkの額と、Checkを現金化できる当事者を決定します。[CheckC
## {{send_n.next()}}.CheckCreateトランザクションへの署名
{% include '_snippets/tutorial-sign-step.md' %}
{% include '_snippets/tutorial-sign-step.ja.md' %}
<!--{#_ #}-->
### 要求の例