mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-27 07:05:51 +00:00
Corrected points raised.
This commit is contained in:
@@ -11,10 +11,10 @@ blurb: これらのライブラリを使用して、お好みのプログラミ
|
||||
|
||||
| 言語 | ライブラリ名 | Get Started | APIリファレンス | ソースコード |
|
||||
|----------|--------------|-------------|---------------|-------------|
|
||||
| **Python** | `xrpl-py` | [Get Started Using Python](get-started-using-python.html) | [API Reference](https://xrpl-py.readthedocs.io/) | [Repo](https://github.com/XRPLF/xrpl-py) |
|
||||
| **JavaScript** / **TypeScript** | `xrpl.js` | [Get Started](get-started-using-javascript.html) | [API Reference](https://js.xrpl.org/) | [Repo](https://github.com/XRPLF/xrpl.js) |
|
||||
| **C++** | `rippled` Signing Library | [Get Started](https://github.com/ripple/rippled/tree/develop/Builds/linux#signing-library) | | (Part of [`rippled`](https://github.com/ripple/rippled/)) |
|
||||
| **Java** | `xrpl4j` | [Get Started Using Java](get-started-using-java.html) | [API Reference](https://javadoc.io/doc/org.xrpl/) | [Repo](https://github.com/XRPLF/xrpl4j) |
|
||||
| **Ruby** | `xrbp` | | [API Reference](https://www.rubydoc.info/gems/xrbp) | [Repo](https://github.com/DevNullProd/xrbp) |
|
||||
| **Python** | `xrpl-py` | [Pythonを使ってみよう](get-started-using-python.html) | [API リファレンス](https://xrpl-py.readthedocs.io/) | [リポジトリ](https://github.com/XRPLF/xrpl-py) |
|
||||
| **JavaScript** / **TypeScript** | `xrpl.js` | [JavaScriptを使ってみよう](get-started-using-javascript.html) | [API リファレンス](https://js.xrpl.org/) | [リポジトリ](https://github.com/XRPLF/xrpl.js) |
|
||||
| **C++** | `rippled` 署名ライブラリ | [署名ライブラリを使ってみよう](https://github.com/XRPLF/rippled/tree/develop/Builds/linux#signing-library) | | ([`rippled`](https://github.com/XRPLF/rippled/))の一部 |
|
||||
| **Java** | `xrpl4j` | [Javaを使ってみよう](get-started-using-java.html) | [API リファレンス](https://javadoc.io/doc/org.xrpl/) | [リポジトリ](https://github.com/XRPLF/xrpl4j) |
|
||||
| **Ruby** | `xrbp` | | [API リファレンス](https://www.rubydoc.info/gems/xrbp) | [リポジトリ](https://github.com/DevNullProd/xrbp) |
|
||||
|
||||
**ヒント:** ここに掲載されていないクライアントライブラリを追加するには、[このページの変更を提案]({{target.github_forkurl}}/edit/{{target.github_branch}}/content/{{currentpage.md}})してください!
|
||||
|
||||
@@ -106,12 +106,12 @@ Connecting to 127.0.0.1:5005
|
||||
|
||||
| `項目` | 型 | 説明 |
|
||||
|:----------|:-------|:--------------------------------------------------------|
|
||||
| `message` | String | コマンドに応答して実行されたアクションを示す、可読性の高いメッセージ。 |
|
||||
| `message` | 文字列 | コマンドに応答して実行されたアクションを示す、可読性の高いメッセージ。 |
|
||||
|
||||
|
||||
### 起こり得るエラー
|
||||
|
||||
- Any of the [汎用エラー][].
|
||||
- いずれかの[汎用エラータイプ][]。
|
||||
- `internal` - コピーが実行されていない時にコピーの状態チェックをするといったような無効な操作の場合。
|
||||
- `notEnabled` - サーバが[履歴シャード](history-sharding.html)を保存するように環境設定されていない場合。
|
||||
- `invalidParams` - 1つ以上の項目が誤って定義されている、もしくは、1つ以上の必須項目が抜けている。
|
||||
|
||||
@@ -57,8 +57,6 @@ const xrpl = require("xrpl");
|
||||
|
||||
[分散型取引所](decentralized-exchange.html)の状態を調べる時のように、完了見込みの多数のトランザクション結果が保留中であるため、現時点のオープンレジャーを使用したい場合があります。また、完了したトランザクション結果を取り込んだ検証済みのレジャーを使用したい場合もあります。
|
||||
|
||||
When making API requests with xrpl.js 2.0 using `Client.request()`, you should explicitly [specify what ledger to use](basic-data-types.html#specifying-ledgers). For example, to look up trust lines using the latest _validated ledger_:
|
||||
|
||||
xrpl.js 2.0が`Client.request()`を使用してAPIリクエストをする際、明確に[使用するレジャー番号を指定する](basic-data-types.html#specifying-ledgers)必要があります。例えば、最新の_検証済みレジャー_を使用してトラストラインを調べるためには:
|
||||
|
||||
**ripple-lib 1.x:**
|
||||
@@ -106,13 +104,11 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively, you can use the `sign` method of a wallet to sign a transaction and then use `submitAndWait(tx_blob)` to submit it. This can be useful for building [reliable transaction submission](reliable-transaction-submission.html) that can recover from power outages and other disasters. (The library does not handle disaster recovery on its own.)
|
||||
もしくは、トランザクション署名のためにwalletの`sign`メソッドを、送信のために`submitAndWait(tx_blob)`を使用することができます。
|
||||
停電やその他災害から復旧させる[信頼できるトランザクションの送信](reliable-transaction-submission.html)のビルドに便利です。(ライブラリは単独でディザスタリカバリに対処しません。)
|
||||
|
||||
### LastLedgerSequenceのコントロール
|
||||
|
||||
In ripple-lib 1.x, you could specify a `instructions.maxLedgerVersionOffset` when preparing a transaction to define the `LastLedgerSequence` parameter of the prepared transaction as being some number of ledgers _after_ the latest validated one at the time. In 2.0, you can do this by looking up the latest validated ledger index, then specifying the `LastLedgerSequence` explicitly before auto-filling the transaction.
|
||||
ripple-lib 1.xでは、トランザクションを準備し、準備済みトランザクションの`LastLedgerSequence`パラメータを、その時点で最新の検証済みレジャー番号 _以降_ のレジャー番号を指定する際、`instructions.maxLedgerVersionOffset`を利用できました。2.0では、最新の検証済みレジャー番号を調べ、トランザクションのオートフィル前に`LastLedgerSequence`を明確に指定することが可能です。
|
||||
|
||||
**xrpl.js 2.0:**
|
||||
@@ -144,7 +140,6 @@ const prepared = await client.autofill({
|
||||
|
||||
## キーおよびウォレット
|
||||
|
||||
xrpl.js 2.0 introduces a new [`Wallet` class](https://js.xrpl.org/classes/Wallet.html) for managing [cryptographic keys](cryptographic-keys.html) and signing transactions. This replaces functions that took seed or secret values in ripple-lib 1.x, and handles various address encoding and generation tasks as well.
|
||||
xrpl.js 2.0は、[暗号鍵](cryptographic-keys.html)の管理およびトランザクションの署名のために、新しい[`Wallet`クラス](https://js.xrpl.org/classes/Wallet.html)を採用します。
|
||||
これは、ripple-lib 1.xにおいてシードや秘密鍵を取得していた機能に代わるもので、多様なアドレス符号化やタスク生成も処理します。
|
||||
|
||||
@@ -260,7 +255,7 @@ ripple-lib 1.xでは、全てのメソッドとプロパティは、`RippleAPI`
|
||||
| RippleAPIインスタンスメソッド/プロパティ | xrpl.jsメソッド/プロパティ | 注記 |
|
||||
|-------------------|----------------|---|
|
||||
| `new ripple.RippleAPI({server: url})` | [`new xrpl.Client(url)`](https://js.xrpl.org/classes/Client.html#constructor) | 複数のサーバに接続するには`xrpl.BroadcastClient([url1, url2, ..])` を使用してください。 |
|
||||
| `request(command, options)` | [`Client.request(options)`](https://js.xrpl.org/classes/Client.html#request) | <ul><li>WebSocket API との一貫性を保つために `command` フィールドを `options` オブジェクトに移動しました。</li><li>1.x では、このメソッドの戻り値 (Promise がリゾルブしたとき) は `result` オブジェクトのみでした。現在は、[WebSocket response format](response-formatting.html) 全体が返されます。同様の値を得るには、戻り値の `result` フィールドを読み取ってください。 |
|
||||
| `request(command, options)` | [`Client.request(options)`](https://js.xrpl.org/classes/Client.html#request) | <ul><li>WebSocket API との一貫性を保つために `command` フィールドを `options` オブジェクトに移動しました。</li><li>1.x では、このメソッドの戻り値 (Promise がリゾルブしたとき) は `result` オブジェクトのみでした。現在は、[WebSocket 応答フォーマット](response-formatting.html) 全体が返されます。同様の値を得るには、戻り値の `result` フィールドを読み取ってください。 |
|
||||
| `hasNextPage()` | [`xrpl.hasNextPage(response)`](https://js.xrpl.org/modules.html#hasNextPage) | こちらもご覧ください。 [`Client.requestNextPage()`](https://js.xrpl.org/classes/Client.html#requestNextPage) および [`Client.requestAll()`](https://js.xrpl.org/classes/Client.html#requestAll) |
|
||||
| `requestNextPage()` | [`Client.requestNextPage()`](https://js.xrpl.org/classes/Client.html#requestNextPage) | |
|
||||
| `computeBinaryTransactionHash()` | [`xrpl.hashes.hashTx()`](https://js.xrpl.org/modules.html#hashes) | |
|
||||
@@ -286,7 +281,7 @@ ripple-lib 1.xでは、全てのメソッドとプロパティは、`RippleAPI`
|
||||
| `getAccountInfo(address, options)` | (削除済み - 注記カラムを参照) | 代わりに [`Client.request()`](https://js.xrpl.org/classes/Client.html#request) を使って [account_info メソッド][] を呼び出してください。**警告:** `getAccountInfo()` とは異なり、`account_info` は [検証されていない最終結果](#validated-results) を返すことがあります。 |
|
||||
| `getAccountObjects(address, options)` | (削除済み - 注記カラムを参照) | 代わりに [`Client.request()`](https://js.xrpl.org/classes/Client.html#request) を使って [account_objects メソッド][] を呼び出してください。**警告:** `getAccountObjects()` とは異なり、`account_objects` は [検証されていない最終結果](#validated-results) を返すことがあります。 |
|
||||
| `getPaymentChannel()` | (削除済み - 注記カラムを参照) | 代わりに [`Client.request()`](https://js.xrpl.org/classes/Client.html#request) を使って [ledger_entry method](ledger_entry.html#get-paychannel-object) を呼び出してください。**警告:** `getPaymentChannel()`とは異なり、`ledger_entry` は [検証されていない最終結果](#validated-results)を返す可能性があります。|
|
||||
| `getLedger()` | (削除済み - 注記カラムを参照) | `Client.request()`](https://js.xrpl.org/classes/Client.html#request) を使って、正確に [ledger メソッド][] を呼び出してください。**Warning:** `getLedger()`とは異なり、`ledger` は [検証されていない最終的なレジャー](#validated-results)を返すことがあります。 |
|
||||
| `getLedger()` | (削除済み - 注記カラムを参照) | `Client.request()`](https://js.xrpl.org/classes/Client.html#request) を使って、正確に [ledger メソッド][] を呼び出してください。**渓谷:** `getLedger()`とは異なり、`ledger` は [検証されていない最終的なレジャー](#validated-results)を返すことがあります。 |
|
||||
| `parseAccountFlags()` | [`xrpl.parseAccountRootFlags()`](https://js.xrpl.org/modules.html#parseAccountRootFlags) | 現在は、モジュールの静的メソッドです。 |
|
||||
| `prepareTransaction()` | [`Client.autofill()`](https://js.xrpl.org/classes/Client.html#autofill) | 詳しくは、[トランザクション送信](#transaction-submission)を参照してください。 |
|
||||
| `preparePayment()` | (削除済み - 注記カラムを参照) | [Paymenトランザクション][] を構築し、代わりに [`Client.autofill()`](https://js.xrpl.org/classes/Client.html#autofill) を使用します。 |
|
||||
|
||||
@@ -2626,7 +2626,7 @@ pages:
|
||||
targets:
|
||||
- en
|
||||
|
||||
- md: references/xrpljs2-migration-guide.md.md
|
||||
- md: references/xrpljs2-migration-guide.ja.md
|
||||
targets:
|
||||
- ja
|
||||
|
||||
|
||||
Reference in New Issue
Block a user