Update MPT Generator use case page

This commit is contained in:
Maria Shodunke
2025-11-25 15:21:52 +00:00
parent a71a3fca10
commit f290941300
9 changed files with 50 additions and 24 deletions

View File

@@ -4,7 +4,7 @@
<title>MPT Generator</title>
<link href='https://fonts.googleapis.com/css?family=Work Sans' rel='stylesheet'>
<link href="modular-tutorials.css" rel="stylesheet">
<script src='https://unpkg.com/xrpl@4.1.0/build/xrpl-latest.js'></script>
<script src='https://unpkg.com/xrpl@4.4.3/build/xrpl-latest.js'></script>
<script src='mpt-generator.js'></script>
<script>
@@ -229,4 +229,4 @@
</form>
</body>
</html>
</html>

View File

@@ -83,7 +83,7 @@ async function sendTransaction() {
const my_wallet = xrpl.Wallet.fromSeed(seedField.value)
const client = new xrpl.Client(net)
await client.connect()
const metadataHexString = xrpl.convertStringToHex(metadataTextArea.value)
const metadataHexString = xrpl.encodeMPTokenMetadata(JSON.parse(metadataTextArea.value))
const transactionJson = {
"TransactionType": "MPTokenIssuanceCreate",
"Account": accountField.value,
@@ -108,4 +108,4 @@ async function sendTransaction() {
function gatherMptInfo() {
let mptInfo = accountNameField.value + "\n" + accountField.value + "\n" + seedField.value + "\n" + mptIssuanceIdField.value
resultField.value = mptInfo
}
}