mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-19 19:25:51 +00:00
[JA] update generate-step for consistency w/ EN
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
|
{% if faucet_url is undefined %}
|
||||||
|
{% set faucet_url = "https://faucet.altnet.rippletest.net/accounts" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{{ start_step("Generate") }}
|
{{ start_step("Generate") }}
|
||||||
<button id="generate-creds-button" class="btn btn-primary">資格情報を作成する</button>
|
<button id="generate-creds-button" class="btn btn-primary">暗号鍵を作成する</button>
|
||||||
<div id='loader-0' style="display: none;"><img class='throbber' src="assets/img/xrp-loader-96.png"> Generating Keys...</div>
|
<div id='loader-0' style="display: none;"><img class='throbber' src="assets/img/xrp-loader-96.png">暗号鍵を作成しています…</div>
|
||||||
<div id='address'></div>
|
<div id='address'></div>
|
||||||
<div id='secret'></div>
|
<div id='secret'></div>
|
||||||
<div id='balance'></div>
|
<div id='balance'></div>
|
||||||
@@ -16,29 +20,28 @@ $(document).ready( () => {
|
|||||||
$("#balance").html("")
|
$("#balance").html("")
|
||||||
$("#populate-creds-status").html("")
|
$("#populate-creds-status").html("")
|
||||||
|
|
||||||
$("#loader-0").show()
|
$("#loader-generate").show()
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "https://faucet.altnet.rippletest.net/accounts",
|
url: "{{faucet_url}}",
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
$("#loader-0").hide()
|
$("#loader-generate").hide()
|
||||||
$("#address").hide().html("<strong>Address:</strong> " +
|
$("#address").hide().html("<strong>アドレス:</strong> " +
|
||||||
'<span id="test-net-faucet-address">' +
|
'<span id="use-address">' +
|
||||||
data.account.address
|
data.account.address
|
||||||
+ "</span>").show()
|
+ "</span>").show()
|
||||||
$("#secret").hide().html('<strong>Secret:</strong> ' +
|
$("#secret").hide().html('<strong>シード:</strong> ' +
|
||||||
'<span id="test-net-faucet-secret">' +
|
'<span id="use-secret">' +
|
||||||
data.account.secret +
|
data.account.secret +
|
||||||
"</span>").show()
|
"</span>").show()
|
||||||
$("#balance").hide().html('<strong>Balance:</strong> ' +
|
$("#balance").hide().html('<strong>残高:</strong> ' +
|
||||||
Number(data.balance).toLocaleString('en') +
|
Number(data.balance).toLocaleString('en') +
|
||||||
' XRP').show()
|
' XRP').show()
|
||||||
|
|
||||||
// Automatically populate examples with these credentials...
|
// Automatically populate examples with these credentials...
|
||||||
// Set sender address
|
// Set sender address
|
||||||
let generated_addr = ""
|
|
||||||
$("code span:contains('"+EXAMPLE_ADDR+"')").each( function() {
|
$("code span:contains('"+EXAMPLE_ADDR+"')").each( function() {
|
||||||
let eltext = $(this).text()
|
let eltext = $(this).text()
|
||||||
$(this).text( eltext.replace(EXAMPLE_ADDR, data.account.address) )
|
$(this).text( eltext.replace(EXAMPLE_ADDR, data.account.address) )
|
||||||
@@ -50,25 +53,22 @@ $(document).ready( () => {
|
|||||||
$(this).text( eltext.replace(EXAMPLE_SECRET, data.account.secret) )
|
$(this).text( eltext.replace(EXAMPLE_SECRET, data.account.secret) )
|
||||||
})
|
})
|
||||||
|
|
||||||
$("#populate-creds-status").text("Populated this page's examples with these credentials.")
|
$("#populate-creds-status").text("このページの例にこのアドレスとシードを入力しました。")
|
||||||
|
|
||||||
complete_step("Generate")
|
complete_step("Generate")
|
||||||
|
|
||||||
},
|
},
|
||||||
error: function() {
|
error: function() {
|
||||||
$("#loader-0").hide();
|
$("#loader-generate").hide();
|
||||||
alert("There was an error with the Ripple Test Net, please try again.");
|
alert("Testnet Faucetにエラーが発生しました。もう一度試してください。");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const EXAMPLE_ADDR = "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
|
const EXAMPLE_ADDR = "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
|
||||||
const EXAMPLE_SECRET = "s████████████████████████████"
|
const EXAMPLE_SECRET = "s████████████████████████████"
|
||||||
$("#populate-creds-button").click( () => {
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
**注意:** Rippleは[XRP Ledger Testnet](parallel-networks.html)をテストの目的でのみ運用しており、Test Netの状態とすべての残高を定期的にリセットしています。予防措置として、Test Netと本番で同じアドレスを使用**しない**ことをお勧めします。
|
**注意:** Rippleは[TestnetとDevnet](parallel-networks.html)をテストの目的でのみ運用しており、その状態とすべての残高を定期的にリセットしています。予防措置として、Testnet、DevnetとMainnetで同じアドレスを使用**しない**ことをお勧めします。
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ txJSON = doPrepare()
|
|||||||
// Wipe existing results
|
// Wipe existing results
|
||||||
$("#prepare-output").html("")
|
$("#prepare-output").html("")
|
||||||
|
|
||||||
const sender = $("#test-net-faucet-address").text() || "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
|
const sender = $("#use-address").text() || "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
|
||||||
const preparedTx = await api.prepareTransaction({
|
const preparedTx = await api.prepareTransaction({
|
||||||
"TransactionType": "Payment",
|
"TransactionType": "Payment",
|
||||||
"Account": sender,
|
"Account": sender,
|
||||||
@@ -191,7 +191,7 @@ title="Complete all previous steps first" disabled>サンプルトランザク
|
|||||||
$("#sign-output").html("")
|
$("#sign-output").html("")
|
||||||
|
|
||||||
const preparedTxJSON = $("#prepared-tx-json").text()
|
const preparedTxJSON = $("#prepared-tx-json").text()
|
||||||
const secret = $("#test-net-faucet-secret").text()
|
const secret = $("#use-secret").text()
|
||||||
|
|
||||||
if (!secret) {
|
if (!secret) {
|
||||||
alert("Can't sign transaction without a real secret. Generate credentials first.")
|
alert("Can't sign transaction without a real secret. Generate credentials first.")
|
||||||
|
|||||||
Reference in New Issue
Block a user