diff --git a/_code-samples/build-a-browser-wallet/js/index.js b/_code-samples/build-a-browser-wallet/js/index.js index 20da9aa087..9fb9d21519 100644 --- a/_code-samples/build-a-browser-wallet/js/index.js +++ b/_code-samples/build-a-browser-wallet/js/index.js @@ -36,21 +36,25 @@ txHistoryButton.addEventListener('click', () => { }); // Fetch the wallet details - getWalletDetails({ client }) - .then(({ account_data, accountReserves, xAddress, address }) => { - walletElement.querySelector('.wallet_address').textContent = `Wallet Address: ${account_data.Account}`; - walletElement.querySelector('.wallet_balance').textContent = `Wallet Balance: ${dropsToXrp(account_data.Balance)} XRP`; - walletElement.querySelector('.wallet_reserve').textContent = `Wallet Reserve: ${accountReserves} XRP`; - walletElement.querySelector('.wallet_xaddress').textContent = `X-Address: ${xAddress}`; + let wallet_details + try { + wallet_details = await getWalletDetails({ client }) + } catch(error) { + alert(`Error loading wallet: ${error}.\n\nMake sure you set the SEED in your .env file.`) + return + } + const { account_data, accountReserve, xAddress, address } = wallet_details; + walletElement.querySelector('.wallet_address').textContent = `Wallet Address: ${account_data.Account}`; + walletElement.querySelector('.wallet_balance').textContent = `Wallet Balance: ${dropsToXrp(account_data.Balance)} XRP`; + walletElement.querySelector('.wallet_reserve').textContent = `Wallet Reserve: ${accountReserve} XRP`; + walletElement.querySelector('.wallet_xaddress').textContent = `X-Address: ${xAddress}`; - // Redirect on View More link click - walletElement.querySelector('#view_more_button').addEventListener('click', () => { - window.open(`https://${process.env.EXPLORER_NETWORK}.xrpl.org/accounts/${address}`, '_blank'); - }); - }) - .finally(() => { - walletLoadingDiv.style.display = 'none'; - }); + // Redirect on View More link click + walletElement.querySelector('#view_more_button').addEventListener('click', () => { + window.open(`https://${process.env.EXPLORER_NETWORK}.xrpl.org/accounts/${address}`, '_blank'); + }); + + walletLoadingDiv.style.display = 'none'; // Fetch the latest ledger details diff --git a/_code-samples/build-a-browser-wallet/js/package.json b/_code-samples/build-a-browser-wallet/js/package.json index 2aa8251a56..4e4c420efd 100644 --- a/_code-samples/build-a-browser-wallet/js/package.json +++ b/_code-samples/build-a-browser-wallet/js/package.json @@ -5,14 +5,12 @@ "dev": "vite" }, "devDependencies": { - "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "crypto-browserify": "^3.12.0", "events": "^3.3.0", "https-browserify": "^1.0.0", - "rollup-plugin-polyfill-node": "^0.12.0", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", - "vite": "^4.5.5" + "vite": "^4.5.9" }, "dependencies": { "dotenv": "^16.0.3", diff --git a/_code-samples/build-a-browser-wallet/js/src/helpers/get-wallet-details.js b/_code-samples/build-a-browser-wallet/js/src/helpers/get-wallet-details.js index 70dd37ccbb..d3d389612c 100644 --- a/_code-samples/build-a-browser-wallet/js/src/helpers/get-wallet-details.js +++ b/_code-samples/build-a-browser-wallet/js/src/helpers/get-wallet-details.js @@ -1,44 +1,39 @@ -import { Client, Wallet, classicAddressToXAddress } from 'xrpl'; +import { Wallet, classicAddressToXAddress } from 'xrpl'; export default async function getWalletDetails({ client }) { - try { - const wallet = Wallet.fromSeed(process.env.SEED); // Convert the seed to a wallet : https://xrpl.org/cryptographic-keys.html + const wallet = Wallet.fromSeed(process.env.SEED); - // Get the wallet details: https://xrpl.org/account_info.html - const { - result: { account_data }, - } = await client.request({ - command: 'account_info', - account: wallet.address, - ledger_index: 'validated', - }); + // Get the wallet details + const { + result: { account_data }, + } = await client.request({ + command: 'account_info', + account: wallet.address, + ledger_index: 'validated', + }); - const ownerCount = account_data.OwnerCount || 0; + const ownerCount = account_data.OwnerCount || 0; - // Get the reserve base and increment - const { - result: { - info: { - validated_ledger: { reserve_base_xrp, reserve_inc_xrp }, - }, + // Get the reserve base and increment + const { + result: { + info: { + validated_ledger: { reserve_base_xrp, reserve_inc_xrp }, }, - } = await client.request({ - command: 'server_info', - }); + }, + } = await client.request({ + command: 'server_info', + }); - // Calculate the reserves by multiplying the owner count by the increment and adding the base reserve to it. - const accountReserves = ownerCount * reserve_inc_xrp + reserve_base_xrp; + // Calculate the total reserve amount + const accountReserve = ownerCount * reserve_inc_xrp + reserve_base_xrp; - console.log('Got wallet details!'); + console.log('Got wallet details!'); - return { - account_data, - accountReserves, - xAddress: classicAddressToXAddress(wallet.address, false, false), // Learn more: https://xrpaddress.info/ - address: wallet.address - }; - } catch (error) { - console.log('Error getting wallet details', error); - return error; - } + return { + account_data, + accountReserve, + xAddress: classicAddressToXAddress(wallet.address, false, false), + address: wallet.address + }; } diff --git a/_code-samples/build-a-browser-wallet/js/src/helpers/submit-transaction.js b/_code-samples/build-a-browser-wallet/js/src/helpers/submit-transaction.js index babca1d598..0bdd4292be 100644 --- a/_code-samples/build-a-browser-wallet/js/src/helpers/submit-transaction.js +++ b/_code-samples/build-a-browser-wallet/js/src/helpers/submit-transaction.js @@ -3,10 +3,10 @@ import { Wallet } from 'xrpl'; export default async function submitTransaction({ client, tx }) { try { // Create a wallet using the seed - const wallet = await Wallet.fromSeed(process.env.SEED); + const wallet = Wallet.fromSeed(process.env.SEED); tx.Account = wallet.address; - // Sign and submit the transaction : https://xrpl.org/send-xrp.html#send-xrp + // Sign and submit the transaction const response = await client.submit(tx, { wallet }); console.log(response); diff --git a/_code-samples/build-a-browser-wallet/js/src/send-xrp/send-xrp.js b/_code-samples/build-a-browser-wallet/js/src/send-xrp/send-xrp.js index 833e055a43..ed34dbaa8a 100644 --- a/_code-samples/build-a-browser-wallet/js/src/send-xrp/send-xrp.js +++ b/_code-samples/build-a-browser-wallet/js/src/send-xrp/send-xrp.js @@ -7,14 +7,15 @@ import submitTransaction from '../helpers/submit-transaction'; // Optional: Render the XRPL logo renderXrplLogo(); -const client = new Client(process.env.CLIENT); // Get the client from the environment variables + // Get the client from the environment variables +const client = new Client(process.env.CLIENT); // Self-invoking function to connect to the client (async () => { try { - await client.connect(); // Connect to the client + await client.connect(); - const wallet = Wallet.fromSeed(process.env.SEED); // Convert the seed to a wallet : https://xrpl.org/cryptographic-keys.html + const wallet = Wallet.fromSeed(process.env.SEED); // Subscribe to account transaction stream await client.request({ @@ -23,8 +24,10 @@ const client = new Client(process.env.CLIENT); // Get the client from the enviro }); // Fetch the wallet details and show the available balance - await getWalletDetails({ client }).then(({ accountReserves, account_data }) => { - availableBalanceElement.textContent = `Available Balance: ${dropsToXrp(account_data.Balance) - accountReserves} XRP`; + await getWalletDetails({ client }).then(( + { accountReserve, account_data }) => { + const bal = dropsToXrp(account_data.Balance) - accountReserve; + availableBalanceElement.textContent = `Available Balance: ${bal} XRP`; }); } catch (error) { @@ -58,9 +61,10 @@ txHistoryButton.addEventListener('click', () => { // Update the account balance on successful transaction client.on('transaction', (response) => { - if (response.validated && response.transaction.TransactionType === 'Payment') { - getWalletDetails({ client }).then(({ accountReserves, account_data }) => { - availableBalanceElement.textContent = `Available Balance: ${dropsToXrp(account_data.Balance) - accountReserves} XRP`; + if (response.validated && response.tx_json.TransactionType === 'Payment') { + getWalletDetails({ client }).then(({ accountReserve, account_data }) => { + const bal = dropsToXrp(account_data.Balance) - accountReserve; + availableBalanceElement.textContent = `Available Balance: ${bal} XRP`; }); } }); @@ -113,23 +117,25 @@ submitTxBtn.addEventListener('click', async () => { submitTxBtn.disabled = true; submitTxBtn.textContent = 'Submitting...'; - // Create the transaction object: https://xrpl.org/transaction-common-fields.html + // Create the transaction object const txJson = { TransactionType: 'Payment', - Amount: xrpToDrops(amount.value), // Convert XRP to drops: https://xrpl.org/basic-data-types.html#specifying-currency-amounts + Amount: xrpToDrops(amount.value), Destination: destinationAddress.value, }; // Get the destination tag if it exists if (destinationTag?.value !== '') { - txJson.DestinationTag = destinationTag.value; + txJson.DestinationTag = parseInt(destinationTag.value); } + console.log("Sending...", txJson); // Submit the transaction to the ledger const { result } = await submitTransaction({ client, tx: txJson }); - const txResult = result?.meta?.TransactionResult || result?.engine_result || ''; // Response format: https://xrpl.org/transaction-results.html + const txResult = result?.meta?.TransactionResult || result?.engine_result || ''; - // Check if the transaction was successful or not and show the appropriate message to the user + // Check if the transaction was successful or not + // and show the appropriate message to the user if (txResult === 'tesSUCCESS') { alert('Transaction submitted successfully!'); } else { @@ -138,8 +144,10 @@ submitTxBtn.addEventListener('click', async () => { } catch (error) { alert('Error submitting transaction, Please try again.'); console.error(error); + submitTxBtn.disabled = false; } finally { - // Re-enable the submit button after the transaction is submitted so the user can submit another transaction + // Re-enable the submit button after the transaction is submitted + // so the user can submit another transaction submitTxBtn.disabled = false; submitTxBtn.textContent = 'Submit Transaction'; } diff --git a/_code-samples/build-a-browser-wallet/js/src/transaction-history/transaction-history.js b/_code-samples/build-a-browser-wallet/js/src/transaction-history/transaction-history.js index 71e065302e..c1c8d933dd 100644 --- a/_code-samples/build-a-browser-wallet/js/src/transaction-history/transaction-history.js +++ b/_code-samples/build-a-browser-wallet/js/src/transaction-history/transaction-history.js @@ -102,13 +102,13 @@ async function fetchTxHistory() { // Add the transactions to the table const values = transactions.map((transaction) => { - const { meta, tx } = transaction; + const { hash, meta, tx_json } = transaction; return { - Account: tx.Account, - Destination: tx.Destination, - Fee: tx.Fee, - Hash: tx.hash, - TransactionType: tx.TransactionType, + Account: tx_json.Account, + Destination: tx_json.Destination, + Fee: tx_json.Fee, + Hash: hash, + TransactionType: tx_json.TransactionType, result: meta?.TransactionResult, delivered: meta?.delivered_amount }; diff --git a/_code-samples/build-a-browser-wallet/js/vite.config.js b/_code-samples/build-a-browser-wallet/js/vite.config.js index acd81f15a5..1620d491df 100644 --- a/_code-samples/build-a-browser-wallet/js/vite.config.js +++ b/_code-samples/build-a-browser-wallet/js/vite.config.js @@ -1,25 +1,11 @@ import { defineConfig, loadEnv } from 'vite'; -import polyfillNode from 'rollup-plugin-polyfill-node'; - const viteConfig = ({ mode }) => { process.env = { ...process.env, ...loadEnv(mode, '', '') }; return defineConfig({ define: { 'process.env': process.env, }, - optimizeDeps: { - esbuildOptions: { - define: { - global: 'globalThis', - }, - }, - }, - build: { - rollupOptions: { - plugins: [polyfillNode()], - }, - }, resolve: { alias: { ws: 'xrpl/dist/npm/client/WSWrapper', diff --git a/_code-samples/build-a-browser-wallet/js/yarn.lock b/_code-samples/build-a-browser-wallet/js/yarn.lock index 6a190fc82b..d5993cfa9d 100644 --- a/_code-samples/build-a-browser-wallet/js/yarn.lock +++ b/_code-samples/build-a-browser-wallet/js/yarn.lock @@ -2,11 +2,6 @@ # yarn lockfile v1 -"@esbuild-plugins/node-globals-polyfill@^0.2.3": - version "0.2.3" - resolved "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz" - integrity sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw== - "@esbuild/android-arm64@0.18.20": version "0.18.20" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" @@ -24,7 +19,7 @@ "@esbuild/darwin-arm64@0.18.20": version "0.18.20" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== "@esbuild/darwin-x64@0.18.20": @@ -117,72 +112,44 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== -"@jridgewell/sourcemap-codec@^1.4.13": - version "1.4.14" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@noble/curves@^1.0.0", "@noble/curves@~1.3.0": - version "1.3.0" - resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz" - integrity sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA== +"@noble/curves@^1.0.0", "@noble/curves@~1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff" + integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ== dependencies: - "@noble/hashes" "1.3.3" + "@noble/hashes" "1.7.1" -"@noble/hashes@1.3.3", "@noble/hashes@^1.0.0", "@noble/hashes@~1.3.2": - version "1.3.3" - resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz" - integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== +"@noble/hashes@1.7.1", "@noble/hashes@^1.0.0", "@noble/hashes@~1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f" + integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ== -"@rollup/plugin-inject@^5.0.1": - version "5.0.3" - resolved "https://registry.npmjs.org/@rollup/plugin-inject/-/plugin-inject-5.0.3.tgz" - integrity sha512-411QlbL+z2yXpRWFXSmw/teQRMkXcAAC8aYTemc15gwJRpvEVDQwoe+N/HTFD8RFG8+88Bme9DK2V9CVm7hJdA== - dependencies: - "@rollup/pluginutils" "^5.0.1" - estree-walker "^2.0.2" - magic-string "^0.27.0" - -"@rollup/pluginutils@^5.0.1": - version "5.0.2" - resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz" - integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== - dependencies: - "@types/estree" "^1.0.0" - estree-walker "^2.0.2" - picomatch "^2.3.1" - -"@scure/base@^1.1.3", "@scure/base@~1.1.4": - version "1.1.5" - resolved "https://registry.npmjs.org/@scure/base/-/base-1.1.5.tgz" - integrity sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ== +"@scure/base@^1.1.3", "@scure/base@~1.2.2", "@scure/base@~1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.4.tgz#002eb571a35d69bdb4c214d0995dff76a8dcd2a9" + integrity sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ== "@scure/bip32@^1.3.1": - version "1.3.3" - resolved "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz" - integrity sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ== + version "1.6.2" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.2.tgz#093caa94961619927659ed0e711a6e4bf35bffd0" + integrity sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw== dependencies: - "@noble/curves" "~1.3.0" - "@noble/hashes" "~1.3.2" - "@scure/base" "~1.1.4" + "@noble/curves" "~1.8.1" + "@noble/hashes" "~1.7.1" + "@scure/base" "~1.2.2" "@scure/bip39@^1.2.1": - version "1.2.2" - resolved "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz" - integrity sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA== + version "1.5.4" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.4.tgz#07fd920423aa671be4540d59bdd344cc1461db51" + integrity sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA== dependencies: - "@noble/hashes" "~1.3.2" - "@scure/base" "~1.1.4" + "@noble/hashes" "~1.7.1" + "@scure/base" "~1.2.4" -"@types/estree@^1.0.0": - version "1.0.0" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@xrplf/isomorphic@^1.0.0": - version "1.0.0" - resolved "https://registry.npmjs.org/@xrplf/isomorphic/-/isomorphic-1.0.0.tgz" - integrity sha512-IyMsxyjkJK8YWq566KyuFuh/PUiLzQ02RbUO5qa+vEQb6zIAR9MzFwN7wBmBy7wmKkjligcdNDMG5EaBRH8FxQ== +"@xrplf/isomorphic@^1.0.0", "@xrplf/isomorphic@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@xrplf/isomorphic/-/isomorphic-1.0.1.tgz#d7676e0ec0e55a39f37ddc1f3cc30eeab52e0739" + integrity sha512-0bIpgx8PDjYdrLFeC3csF305QQ1L7sxaWnL5y71mCvhenZzJgku9QsA+9QCXBC1eNYtxWO/xR91zrXJy2T/ixg== dependencies: "@noble/hashes" "^1.0.0" eventemitter3 "5.0.1" @@ -190,45 +157,44 @@ "@xrplf/secret-numbers@^1.0.0": version "1.0.0" - resolved "https://registry.npmjs.org/@xrplf/secret-numbers/-/secret-numbers-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/@xrplf/secret-numbers/-/secret-numbers-1.0.0.tgz#cc19ff84236cc2737b38f2e42a29924f2b8ffc0e" integrity sha512-qsCLGyqe1zaq9j7PZJopK+iGTGRbk6akkg6iZXJJgxKwck0C5x5Gnwlb1HKYGOwPKyrXWpV6a2YmcpNpUFctGg== dependencies: "@xrplf/isomorphic" "^1.0.0" ripple-keypairs "^2.0.0" -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== +asn1.js@^4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== dependencies: bn.js "^4.0.0" inherits "^2.0.1" minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" bignumber.js@^9.0.0: - version "9.1.1" - resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + version "4.12.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.1.tgz#215741fe3c9dba2d7e12c001d0cfdbae43975ba7" + integrity sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg== -bn.js@^5.0.0, bn.js@^5.2.1: +bn.js@^5.2.1: version "5.2.1" - resolved "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" - resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browserify-aes@^1.0.0, browserify-aes@^1.0.4: +browserify-aes@^1.0.4, browserify-aes@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== dependencies: buffer-xor "^1.0.3" @@ -238,9 +204,9 @@ browserify-aes@^1.0.0, browserify-aes@^1.0.4: inherits "^2.0.1" safe-buffer "^5.0.1" -browserify-cipher@^1.0.0: +browserify-cipher@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== dependencies: browserify-aes "^1.0.4" @@ -249,7 +215,7 @@ browserify-cipher@^1.0.0: browserify-des@^1.0.0: version "1.0.2" - resolved "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== dependencies: cipher-base "^1.0.1" @@ -258,49 +224,56 @@ browserify-des@^1.0.0: safe-buffer "^5.1.2" browserify-rsa@^4.0.0, browserify-rsa@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + version "4.1.1" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.1.tgz#06e530907fe2949dc21fc3c2e2302e10b1437238" + integrity sha512-YBjSAiTqM04ZVei6sXighu679a3SqWORA3qZTEqZImnlkDIFtKc6pNutpjyZ8RJTjQtuYfeetkxM11GwoYXMIQ== dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" + bn.js "^5.2.1" + randombytes "^2.1.0" + safe-buffer "^5.2.1" -browserify-sign@^4.0.0: - version "4.2.2" - resolved "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.2.tgz" - integrity sha512-1rudGyeYY42Dk6texmv7c4VcQ0EsvVbLwZkA+AQB7SxvXxmcD93jcHie8bzecJ+ChDlmAm2Qyu0+Ccg5uhZXCg== +browserify-sign@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.3.tgz#7afe4c01ec7ee59a89a558a4b75bd85ae62d4208" + integrity sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw== dependencies: bn.js "^5.2.1" browserify-rsa "^4.1.0" create-hash "^1.2.0" create-hmac "^1.1.7" - elliptic "^6.5.4" + elliptic "^6.5.5" + hash-base "~3.0" inherits "^2.0.4" - parse-asn1 "^5.1.6" - readable-stream "^3.6.2" + parse-asn1 "^5.1.7" + readable-stream "^2.3.8" safe-buffer "^5.2.1" buffer-xor@^1.0.3: version "1.0.3" - resolved "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== builtin-status-codes@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" integrity sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ== cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + version "1.0.6" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.6.tgz#8fe672437d01cd6c4561af5334e0cc50ff1955f7" + integrity sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw== dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" + inherits "^2.0.4" + safe-buffer "^5.2.1" -create-ecdh@^4.0.0: +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +create-ecdh@^4.0.4: version "4.0.4" - resolved "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== dependencies: bn.js "^4.1.0" @@ -308,7 +281,7 @@ create-ecdh@^4.0.0: create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" - resolved "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== dependencies: cipher-base "^1.0.1" @@ -317,9 +290,9 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: +create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" - resolved "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== dependencies: cipher-base "^1.0.3" @@ -329,41 +302,35 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-fetch@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz" - integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== - dependencies: - node-fetch "^2.6.12" - crypto-browserify@^3.12.0: - version "3.12.0" - resolved "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + version "3.12.1" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.1.tgz#bb8921bec9acc81633379aa8f52d69b0b69e0dac" + integrity sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ== dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" + browserify-cipher "^1.0.1" + browserify-sign "^4.2.3" + create-ecdh "^4.0.4" + create-hash "^1.2.0" + create-hmac "^1.1.7" + diffie-hellman "^5.0.3" + hash-base "~3.0.4" + inherits "^2.0.4" + pbkdf2 "^3.1.2" + public-encrypt "^4.0.3" + randombytes "^2.1.0" + randomfill "^1.0.4" des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + version "1.1.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.1.0.tgz#1d37f5766f3bbff4ee9638e871a8768c173b81da" + integrity sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg== dependencies: inherits "^2.0.1" minimalistic-assert "^1.0.0" -diffie-hellman@^5.0.0: +diffie-hellman@^5.0.3: version "5.0.3" - resolved "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== dependencies: bn.js "^4.1.0" @@ -371,14 +338,14 @@ diffie-hellman@^5.0.0: randombytes "^2.0.0" dotenv@^16.0.3: - version "16.0.3" - resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz" - integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ== + version "16.4.7" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" + integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== -elliptic@^6.5.3, elliptic@^6.5.4: - version "6.6.0" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210" - integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA== +elliptic@^6.5.3, elliptic@^6.5.5: + version "6.6.1" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.1.tgz#3b8ffb02670bf69e382c7f65bf524c97c5405c06" + integrity sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g== dependencies: bn.js "^4.11.9" brorand "^1.1.0" @@ -390,7 +357,7 @@ elliptic@^6.5.3, elliptic@^6.5.4: esbuild@^0.18.10: version "0.18.20" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== optionalDependencies: "@esbuild/android-arm" "0.18.20" @@ -416,46 +383,49 @@ esbuild@^0.18.10: "@esbuild/win32-ia32" "0.18.20" "@esbuild/win32-x64" "0.18.20" -estree-walker@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz" - integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== - eventemitter3@5.0.1, eventemitter3@^5.0.1: version "5.0.1" - resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== events@^3.3.0: version "3.3.0" - resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" - resolved "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== dependencies: md5.js "^1.3.4" safe-buffer "^5.1.1" fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== hash-base@^3.0.0: version "3.1.0" - resolved "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== dependencies: inherits "^2.0.4" readable-stream "^3.6.0" safe-buffer "^5.2.0" +hash-base@~3.0, hash-base@~3.0.4: + version "3.0.5" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.5.tgz#52480e285395cf7fba17dc4c9e47acdc7f248a8a" + integrity sha512-vXm0l45VbcHEVlTCzs8M+s0VeYsB2lnlAaThoLKGXr3bE/VWDOelNUnycUPEhKEaXARL2TEFjBOyUiM6+55KBg== + dependencies: + inherits "^2.0.4" + safe-buffer "^5.2.1" + hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" - resolved "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== dependencies: inherits "^2.0.3" @@ -463,7 +433,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: hmac-drbg@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== dependencies: hash.js "^1.0.3" @@ -472,24 +442,22 @@ hmac-drbg@^1.0.1: https-browserify@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== -inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.4: +inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, inherits@~2.0.4: version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -magic-string@^0.27.0: - version "0.27.0" - resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz" - integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.4.13" +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== md5.js@^1.3.4: version "1.3.5" - resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== dependencies: hash-base "^3.0.0" @@ -498,7 +466,7 @@ md5.js@^1.3.4: miller-rabin@^4.0.0: version "4.0.1" - resolved "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== dependencies: bn.js "^4.0.0" @@ -506,40 +474,34 @@ miller-rabin@^4.0.0: minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== minimalistic-crypto-utils@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -nanoid@^3.3.7: - version "3.3.7" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +nanoid@^3.3.8: + version "3.3.8" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== -node-fetch@^2.6.12: - version "2.7.0" - resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" - integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== +parse-asn1@^5.0.0, parse-asn1@^5.1.7: + version "5.1.7" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.7.tgz#73cdaaa822125f9647165625eb45f8a051d2df06" + integrity sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg== dependencies: - whatwg-url "^5.0.0" + asn1.js "^4.10.1" + browserify-aes "^1.2.0" + evp_bytestokey "^1.0.3" + hash-base "~3.0" + pbkdf2 "^3.1.2" + safe-buffer "^5.2.1" -parse-asn1@^5.0.0, parse-asn1@^5.1.6: - version "5.1.6" - resolved "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -pbkdf2@^3.0.3: +pbkdf2@^3.1.2: version "3.1.2" - resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== dependencies: create-hash "^1.1.2" @@ -548,28 +510,28 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +picocolors@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== postcss@^8.4.27: - version "8.4.33" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz" - integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg== + version "8.5.1" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.5.1.tgz#e2272a1f8a807fafa413218245630b5db10a3214" + integrity sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ== dependencies: - nanoid "^3.3.7" - picocolors "^1.0.0" - source-map-js "^1.0.2" + nanoid "^3.3.8" + picocolors "^1.1.1" + source-map-js "^1.2.1" -public-encrypt@^4.0.0: +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +public-encrypt@^4.0.3: version "4.0.3" - resolved "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== dependencies: bn.js "^4.1.0" @@ -579,24 +541,37 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" - resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: +randomfill@^1.0.4: version "1.0.4" - resolved "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== dependencies: randombytes "^2.0.5" safe-buffer "^5.1.0" -readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: +readable-stream@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.5.0, readable-stream@^3.6.0: version "3.6.2" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" @@ -605,7 +580,7 @@ readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" - resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== dependencies: hash-base "^3.0.0" @@ -613,37 +588,30 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: ripple-address-codec@^5.0.0: version "5.0.0" - resolved "https://registry.npmjs.org/ripple-address-codec/-/ripple-address-codec-5.0.0.tgz" + resolved "https://registry.yarnpkg.com/ripple-address-codec/-/ripple-address-codec-5.0.0.tgz#97059f7bba6f9ed7a52843de8aa427723fb529f6" integrity sha512-de7osLRH/pt5HX2xw2TRJtbdLLWHu0RXirpQaEeCnWKY5DYHykh3ETSkofvm0aX0LJiV7kwkegJxQkmbO94gWw== dependencies: "@scure/base" "^1.1.3" "@xrplf/isomorphic" "^1.0.0" -ripple-binary-codec@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ripple-binary-codec/-/ripple-binary-codec-2.0.0.tgz" - integrity sha512-zakENc9A5dlW85uzrmQHrJehymhL59ftggboRNrjxFDJdlNJ6DSE210P3ys/9kL0oVtOzFnTrOPFfxHZeOsA/Q== +ripple-binary-codec@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/ripple-binary-codec/-/ripple-binary-codec-2.2.0.tgz#c296b62c0638b0f02ea8a34b51f707140c1687b9" + integrity sha512-93fvAW3oXux4NY5Xf79dUIOhud5DmyEcC5RrTYdl0BPaYOGXC/txCQl9FnwIVZGkVMtZFLcFwJfmH1zFgfRyKA== dependencies: - "@xrplf/isomorphic" "^1.0.0" + "@xrplf/isomorphic" "^1.0.1" bignumber.js "^9.0.0" ripple-address-codec "^5.0.0" ripple-keypairs@^2.0.0: version "2.0.0" - resolved "https://registry.npmjs.org/ripple-keypairs/-/ripple-keypairs-2.0.0.tgz" + resolved "https://registry.yarnpkg.com/ripple-keypairs/-/ripple-keypairs-2.0.0.tgz#4a1a8142e9a58c07e61b3cc6cfe7317db718d289" integrity sha512-b5rfL2EZiffmklqZk1W+dvSy97v3V/C7936WxCCgDynaGPp7GE6R2XO7EU9O2LlM/z95rj870IylYnOQs+1Rag== dependencies: "@noble/curves" "^1.0.0" "@xrplf/isomorphic" "^1.0.0" ripple-address-codec "^5.0.0" -rollup-plugin-polyfill-node@^0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/rollup-plugin-polyfill-node/-/rollup-plugin-polyfill-node-0.12.0.tgz" - integrity sha512-PWEVfDxLEKt8JX1nZ0NkUAgXpkZMTb85rO/Ru9AQ69wYW8VUCfDgP4CGRXXWYni5wDF0vIeR1UoF3Jmw/Lt3Ug== - dependencies: - "@rollup/plugin-inject" "^5.0.1" - rollup@^3.27.1: version "3.29.5" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.5.tgz#8a2e477a758b520fb78daf04bca4c522c1da8a54" @@ -653,30 +621,30 @@ rollup@^3.27.1: safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safer-buffer@^2.1.0: - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" - resolved "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== dependencies: inherits "^2.0.1" safe-buffer "^5.0.1" -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== stream-browserify@^3.0.0: version "3.0.0" - resolved "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== dependencies: inherits "~2.0.4" @@ -684,7 +652,7 @@ stream-browserify@^3.0.0: stream-http@^3.2.0: version "3.2.0" - resolved "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.2.0.tgz#1872dfcf24cb15752677e40e5c3f9cc1926028b5" integrity sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A== dependencies: builtin-status-codes "^3.0.0" @@ -694,25 +662,27 @@ stream-http@^3.2.0: string_decoder@^1.1.1: version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" -util-deprecate@^1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -vite@^4.5.5: - version "4.5.5" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.5.tgz#639b9feca5c0a3bfe3c60cb630ef28bf219d742e" - integrity sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ== +vite@^4.5.9: + version "4.5.9" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.5.9.tgz#f4dfd4c4295743b50c3e3f90df798d70de699e4f" + integrity sha512-qK9W4xjgD3gXbC0NmdNFFnVFLMWSNiR3swj957yutwzzN16xF/E7nmtAyp1rT9hviDroQANjE4HK3H4WqWdFtw== dependencies: esbuild "^0.18.10" postcss "^8.4.27" @@ -720,41 +690,27 @@ vite@^4.5.5: optionalDependencies: fsevents "~2.3.2" -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - ws@^8.13.0: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== -xrpl@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/xrpl/-/xrpl-3.0.0.tgz" - integrity sha512-QC+dNx3tvMEn9IrxcXFFa0rWwvBwACkGFNKl+W2miMGYnlgSiIsnjdqwtG2WRs0Pyxs5dd9nBTQHyQ1BPxZ78A== +xrpl@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/xrpl/-/xrpl-4.1.0.tgz#3afc1e97544c678f8ada73f9757eee7a35e05740" + integrity sha512-H/+BCEnFLyQOBUC6h4nMKg7I9AuxHe4kj9ZwQHX2zoL9n/ZOERc6B2U079pogI84zCbYdUWIn4DkoIYvjO/hpg== dependencies: "@scure/bip32" "^1.3.1" "@scure/bip39" "^1.2.1" - "@xrplf/isomorphic" "^1.0.0" + "@xrplf/isomorphic" "^1.0.1" "@xrplf/secret-numbers" "^1.0.0" bignumber.js "^9.0.0" - cross-fetch "^4.0.0" eventemitter3 "^5.0.1" ripple-address-codec "^5.0.0" - ripple-binary-codec "^2.0.0" + ripple-binary-codec "^2.2.0" ripple-keypairs "^2.0.0" xtend@^4.0.2: version "4.0.2" - resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== diff --git a/blog/2025/rippled-2.4.0.md b/blog/2025/rippled-2.4.0.md new file mode 100644 index 0000000000..7cbd687886 --- /dev/null +++ b/blog/2025/rippled-2.4.0.md @@ -0,0 +1,126 @@ +--- +category: 2025 +date: 2025-03-03 +seo: + title: Introducing XRP Ledger version 2.4.0 + description: rippled version 2.4.0 is now available. This version introduces new features and stability fixes. +labels: + - rippled Release Notes +markdown: + editPage: + hide: true +--- +# Introducing XRP Ledger version 2.4.0 + +Version 2.4.0 of `rippled`, the reference server implementation of the XRP Ledger protocol, is now available. This release includes 8 new amendments, including Multi-Purpose Tokens (MPTs), Credentials, Clawback support for AMMs, and the ability to make offers as part of minting NFTs. Additionally, this release includes important fixes for stability, so server operators are encouraged to upgrade as soon as possible. + +## Additional Announcement + +New UNL pub keys will be published on ... + +## Action Required + +If you run an XRP Ledger server, upgrade to version 2.3.0 as soon as possible to ensure service continuity. + +Additionally, new amendments are now open for voting according to the XRP Ledger's [amendment process](../../docs/concepts/networks-and-servers/amendments.md), which enables protocol changes following two weeks of >80% support from trusted validators. The exact time that protocol changes take effect depends on the voting decisions of the decentralized network. + +## Install / Upgrade + +On supported platforms, see the [instructions on installing or updating `rippled`](../../docs/infrastructure/installation/index.md). + +| Package | SHA-256 | +|:--------|:--------| +| [RPM for Red Hat / CentOS (x86-64)](https://repos.ripple.com/repos/rippled-rpm/stable/rippled-2.3.0-1.el7.x86_64.rpm) | `fb74f401e5ba121bbc37e6188aa064488ad78ffef549a1e19bc8b71316d08031` | +| [DEB for Ubuntu / Debian (x86-64)](https://repos.ripple.com/repos/rippled-deb/pool/stable/rippled_2.3.0-1_amd64.deb) | `5d616d53218b47a2f0803c1d37d410f72d19b57cdb9cabdf77b1cf0134cce3ca` | +| [Portable Builds (Linux x86-64)](https://github.com/XRPLF/rippled-portable-builds) | (Use signature verification) | + +For other platforms, please [build from source](https://github.com/XRPLF/rippled/blob/master/BUILD.md). The most recent commit in the git log should be the change setting the version: + +```text +commit f64cf9187affd69650907d0d92e097eb29693945 +Author: Elliot Lee +Date: Mon Nov 25 12:27:17 2024 -0800 + + Set version to 2.3.0 +``` + + +## Full Changelog + +### Amendments + +The following amendments are open for voting with this release: + + +- **XLS-46 DynamicNFT** - Adds the ability to update the URI of `NFToken` objects. ([#5048](https://github.com/XRPLF/rippled/pull/5048)) **TODO: doc update `NFToken` object** +- **XLS-80 Permissioned Domains** - Adds Permissioned Domains, which act as part of broader systems on the XRP Ledger to restrict access to satisfy compliance rules. ([#5161](https://github.com/XRPLF/rippled/pull/5161)) **TODO: move docs from opensource** +- **XLS-77 Deep Freeze** - Adds the ability to deep freeze trust lines, enabling token issuers to block the transfer of assets for holders who have been deep frozen. ([#5187](https://github.com/XRPLF/rippled/pull/5187)) **TODO: move docs from opensource** +- **fixFrozenLPTokenTransfer** - Prohibits the transfer of LP tokens when the associated liquidity pool contains at least one frozen asset. ([#5227](https://github.com/XRPLF/rippled/pull/5227)) +- **fixInvalidTxFlags** - Adds transaction flag checking for `CredentialCreate`, `CredentialAccept`, and `CredentialDelete` transactions. ([#5250](https://github.com/XRPLF/rippled/pull/5250)) + + +### New Features + +- Added the ability to specify MPTs when defining assets in transactions. ([#5200](https://github.com/XRPLF/rippled/pull/5200)) +- Refactored `LedgerEntry.cpp` to make it easier to read. Also added a `state` alias for `ripple_state` in the `ledger_entry` API method. ([#5199](https://github.com/XRPLF/rippled/pull/5199)) +- Improved UNL security by enabling validators to set a minimum number of UNL publishers to agree on validators. ([#5112](https://github.com/XRPLF/rippled/pull/5112)) +- Added a new `simulate` API method to execute dry runs of transactions and see the simulated metadata. ([#5069](https://github.com/XRPLF/rippled/pull/5069), [#5265](https://github.com/XRPLF/rippled/pull/5265)) +- Updated the XRPL Foundation UNL keys. ([#5289](https://github.com/XRPLF/rippled/pull/5289)) +- Added support to filter ledger entry types by their canonical names in the `ledger`, `ledger_data`, and `account_objects` API methods. ([#5271](https://github.com/XRPLF/rippled/pull/5271)) +- Added detailed logging for each validation and proposal received from the network. ([#5291](https://github.com/XRPLF/rippled/pull/5291)) +- Improved git commit hash lookups when checking the version of a `rippled` debug build. Also added git commit hash info when using the `server_info` API method on an admin connection. ([#5225](https://github.com/XRPLF/rippled/pull/5225)) + + +### Bug fixes + +- Fixed an issue with overlapping data types in the `Expected` class. ([#5218](https://github.com/XRPLF/rippled/pull/5218)) +- Fixed an issue that prevented `rippled` from building on Windows with VS2022. ([#5197](https://github.com/XRPLF/rippled/pull/5197)) +- Fixed `server_definitions` prefixes. ([#5231](https://github.com/XRPLF/rippled/pull/5231)) +- Added missing dependency installations for generic MasOS runners. ([#5233](https://github.com/XRPLF/rippled/pull/5233)) +- Updated deprecated Github actions. ([#5241](https://github.com/XRPLF/rippled/pull/5241)) +- Fixed a failing assert scenario when submitting the `connect` admin RPC. ([#5235](https://github.com/XRPLF/rippled/pull/5235)) +- Fixed the levelization script to ignore single-line comments during dependency analysis. ([#5194](https://github.com/XRPLF/rippled/pull/5194)) +- Fixed the assert name used in `PermissionedDomainDelete`. ([#5245](https://github.com/XRPLF/rippled/pull/5245)) +- Fixed MacOS unit tests. ([#5196](https://github.com/XRPLF/rippled/pull/5196)) +- Fixed an issue with validators not accurately reflecting amendment votes. Also added debug logging of amendment votes. ([#5173](https://github.com/XRPLF/rippled/pull/5173)) +- Fixed a potential issue with double-charging fees. ([#5269](https://github.com/XRPLF/rippled/pull/5269)) + +### Other Improvements + +- Added unit tests for `AccountID` handling. ([#5174](https://github.com/XRPLF/rippled/pull/5174)) +- Added enforced levelization in `libxrpl` with CMake. ([#5199](https://github.com/XRPLF/rippled/pull/5111)) +- Updated `libxrpl` and all submodules to use the same compiler options. ([#5228](https://github.com/XRPLF/rippled/pull/5228)) +- Added Antithesis instrumentation. ([#5042](https://github.com/XRPLF/rippled/pull/5042), [#5213](https://github.com/XRPLF/rippled/pull/5213)) +- Added `rpcName` to the `LEDGER_ENTRY` macro to help prevent future bugs. ([#5202](https://github.com/XRPLF/rippled/pull/5202)) +- Updated the contribution guidelines to introduce a new workflow that avoids code freezes. Also added scripts that can be used by maintainers in branch management, and a CI job to check that code is consistent across the three main branches: `master`, `release`, and `develop`. ([#5215](https://github.com/XRPLF/rippled/pull/5215)) +- Added unit tests to check for caching issues fixed in `rippled 2.3.0`. ([#5242](https://github.com/XRPLF/rippled/pull/5242)) +- Cleaned up the API changelog. ([#5207](https://github.com/XRPLF/rippled/pull/5207)) +- Improved logs readability. ([#5251](https://github.com/XRPLF/rippled/pull/5251)) +- Updated Visual Studio CI to VS 2022, and added VS Debug builds. ([#5240](https://github.com/XRPLF/rippled/pull/5240)) +- Updated the `secp256k1` library to version 0.6.0. ([#5254](https://github.com/XRPLF/rippled/pull/5254)) +- Changed the `[port_peer]` parameter in `rippled` example config back to `51235`; also added the recommendation to use the default port of `2459` for new deployments. ([#5299](https://github.com/XRPLF/rippled/pull/5299)) +- Improved CI management. ([#5268](https://github.com/XRPLF/rippled/pull/5268)) +- Updated the git commit message rules for contributors. ([#5283](https://github.com/XRPLF/rippled/pull/5283)) +- Fixed unnecessary `setCurrentThreadName` calls. ([#5280](https://github.com/XRPLF/rippled/pull/5280)) +- Added a check to prevent permissioned domains from being created in the event the Permissioned Domains amendement is enabled before the Credentials amendement. ([#5275](https://github.com/XRPLF/rippled/pull/5275)) +- Updated Conan dependencies. ([#5256](https://github.com/XRPLF/rippled/pull/5256)) + + +## Credits + +The following people contributed directly to this release: + +- Ed Hennis +- JoelKatz +- Sophia Xie <106177003+sophiax851@users.noreply.github.com> +- Valentin Balaschenko <13349202+vlntb@users.noreply.github.com> + +@rrmanukyan made their first contribution in #5233 +@kuznetsss made their first contribution in #5252 + + +## Bug Bounties and Responsible Disclosures + +We welcome reviews of the `rippled` code and urge researchers to responsibly disclose any issues they may find. + +To report a bug, please send a detailed report to: diff --git a/blog/sidebars.yaml b/blog/sidebars.yaml index fe8bb3c0f0..b7933c3a64 100644 --- a/blog/sidebars.yaml +++ b/blog/sidebars.yaml @@ -6,6 +6,7 @@ - group: '2025' expanded: false items: + - page: 2025/rippled-2.4.0.md - page: 2025/move-to-the-new-xrpl-foundation-commences.md - page: 2025/rippled-2.3.1.md - page: 2025/devnet-reset.md diff --git a/docs/_snippets/common-links.md b/docs/_snippets/common-links.md index eb8d670f36..f3bf791441 100644 --- a/docs/_snippets/common-links.md +++ b/docs/_snippets/common-links.md @@ -274,6 +274,7 @@ [Specifying Currency Amounts]: /docs/references/protocol/data-types/basic-data-types.md#specifying-currency-amounts [Specifying Ledgers]: /docs/references/protocol/data-types/basic-data-types.md#specifying-ledgers [Specifying Time]: /docs/references/protocol/data-types/basic-data-types.md#specifying-time +[Specifying Without Amounts]: /docs/references/protocol/data-types/currency-formats.md#specifying-without-amounts [SusPay amendment]: /resources/known-amendments.md#suspay [TickSize amendment]: /resources/known-amendments.md#ticksize [Ticket entry]: /docs/references/protocol/ledger-data/ledger-entry-types/ticket.md @@ -402,6 +403,8 @@ [fixCheckThreading amendment]: /resources/known-amendments.md#fixcheckthreading [fixDisallowIncomingV1 amendment]: /resources/known-amendments.md#fixdisallowincomingv1 [fixFillOrKill amendment]: /resources/known-amendments.md#fixfillorkill +[fixFrozenLPTokenTransfer]: /resources/known-amendments.md#fixfrozenlptokentransfer +[fixInvalidTxFlags amendment]: /resources/known-amendments.md#fixinvalidtxflags [fixMasterKeyAsRegularKey amendment]: /resources/known-amendments.md#fixmasterkeyasregularkey [fixNFTokenDirV1 amendment]: /resources/known-amendments.md#fixnftokendirv1 [fixNFTokenPageLinks amendment]: /resources/known-amendments.md#fixnftokenpagelinks diff --git a/docs/concepts/tokens/decentralized-exchange/automated-market-makers.md b/docs/concepts/tokens/decentralized-exchange/automated-market-makers.md index 93346078da..5c731d8393 100644 --- a/docs/concepts/tokens/decentralized-exchange/automated-market-makers.md +++ b/docs/concepts/tokens/decentralized-exchange/automated-market-makers.md @@ -107,6 +107,35 @@ The AMM is designed so that an AMM's asset pool is empty if and only if the AMM LP tokens use a special type of currency code in the 160-bit hexadecimal ["non-standard" format](../../../references/protocol/data-types/currency-formats.md#nonstandard-currency-codes). These codes have the first 8 bits `0x03`. The remainder of the code is a SHA-512 hash, truncated to the first 152 bits, of the two assets' currency codes and their issuers. (The assets are placed in a "canonical order" with the numerically lower currency+issuer pair first.) As a result, the LP tokens for a given asset pair's AMM have a predictable, consistent currency code. +### LP Token Freeze + +If an LP token is associated with a liquidity pool that contains at least one frozen asset, the LP token is also frozen. This means: + +1. The holder can't send the frozen LP token to other accounts. +2. The holder can receive frozen LP tokens, but can't send them out (similar to frozen trust lines). + +Frozen LP tokens affect the following transactions: + +**Payment** + +- An account can no longer send frozen LP tokens through direct payment. + +**OfferCreate** + +- Accounts are prohibited from creating offers that would sell frozen LP tokens. +- Offers that contain frozen LP tokens cannot be consumed on the DEX. + +**CheckCash** + +- Cashing a check fails if it attempts to cash a frozen LP token from the sender. + +**NFTokenCreateOffer** + +- Buyers are prohibited from creating buy offers that use frozen LP tokens. + +**NFTokenAcceptOffer** + +- Buyers can't accept a sell offer if the offer requires the use of frozen LP tokens as payment. ## Trading Fees diff --git a/docs/infrastructure/commandline-usage.md b/docs/infrastructure/commandline-usage.md index 477889190d..b7d9a54b5e 100644 --- a/docs/infrastructure/commandline-usage.md +++ b/docs/infrastructure/commandline-usage.md @@ -30,7 +30,7 @@ The `rippled` executable usually runs as a daemon that powers the XRP Ledger, al - **Other Usage** - Each of the following commands causes the `rippled` executable to print some information, then exit: - **Help** - Use `-h` or `--help` to print a usage statement. - **Unit Tests** - Use `-u` or `--unittest` to run unit tests and print a summary of results. This can be helpful to confirm that you have compiled `rippled` successfully. - - **Version statement** - Use `--version` to have `rippled` print its version number, then exit. + - **Version statement** - Use `--version` to have `rippled` print its version number, Git commit hash, and Git build branch. ## Generic Options diff --git a/docs/infrastructure/configuration/configure-validator-list-threshold.md b/docs/infrastructure/configuration/configure-validator-list-threshold.md new file mode 100644 index 0000000000..4d80b3b531 --- /dev/null +++ b/docs/infrastructure/configuration/configure-validator-list-threshold.md @@ -0,0 +1,40 @@ +--- +seo: + description: Set the minimum number of UNL publisher lists a validator must be on for your server to use it. +labels: + - Core Server + - Blockchain +--- +# Configure Validator List Threshold + +A `rippled` server uses validators that meet a minimum intersection threshold between UNL publishers. This means a server only uses validators that exist on a number of validator lists, as defined by the server owner. {% badge href="https://github.com/XRPLF/rippled/releases/tag/2.4.0" %}New in: rippled 2.4.0{% /badge %} + +By default, the minimum threshold is calculated as follows: + +- floor(`validator_list_keys` / 2) + 1 +- If there are only 1 or 2 `validator_list_keys`, the threshold is `1`. + + +## Modify the Validators File + +1. Edit the `validators.txt` file. The recommended installation places this file at: + ``` + /etc/opt/ripple/validators.txt + ``` + +2. Add the following stanza and a valid threshold number. + + ``` + [validator_list_threshold] + 0 + ``` + +Be sure to save the changes and restart your server. + +{% admonition type="info" name="Note" %}If this value is `0` or isn't set, the threshold will be calculated using the default method. The value also can't be larger than the number of `validator_list_keys`.{% /admonition %} + +## See Also + +- [validators method][] + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/http-websocket-apis/admin-api-methods/status-and-debugging-methods/validators.md b/docs/references/http-websocket-apis/admin-api-methods/status-and-debugging-methods/validators.md index 77e5ae0fec..703920f2e3 100644 --- a/docs/references/http-websocket-apis/admin-api-methods/status-and-debugging-methods/validators.md +++ b/docs/references/http-websocket-apis/admin-api-methods/status-and-debugging-methods/validators.md @@ -186,7 +186,8 @@ An example of a successful response: "validator_list": { "count": 1, "expiration": "2022-Jun-01 00:00:00.000000000 UTC", - "status": "active" + "status": "active", + "validator_list_threshold": 1 } }, "status": "success", @@ -327,7 +328,8 @@ An example of a successful response: "validator_list": { "count": 1, "expiration": "2022-Jun-01 00:00:00.000000000 UTC", - "status": "active" + "status": "active", + "validator_list_threshold": 1 } } } @@ -467,7 +469,8 @@ Connecting to 127.0.0.1:5005 "validator_list": { "count": 1, "expiration": "2022-Jun-01 00:00:00.000000000 UTC", - "status": "active" + "status": "active", + "validator_list_threshold": 1 } } } @@ -485,7 +488,8 @@ The response follows the [standard format][], with a successful result containin | `signing_keys` | Object | Mapping from master public key to current ephemeral public key for all currently-trusted validators. Excludes validators that don't use an ephemeral signing key. | | `trusted_validator_keys` | Array | Array of master public keys of all currently trusted validators. | | `validation_quorum` | Number | Minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations. | -| `validator_list_expires` | String | The human readable time when the current validator list expires. There are two special cases: the string `unknown` if the server has not yet loaded a published validator list, or the string `never` if the server uses a static validator list. | +| `validator_list.expiration` | String | The human readable time when the current validator list expires. There are two special cases: the string `unknown` if the server has not yet loaded a published validator list, or the string `never` if the server uses a static validator list. | +| `validator_list.validator_list_threshold` | Number | The threshold number of UNL publisher lists a validator must be one for the server to use it. {% badge href="https://github.com/XRPLF/rippled/releases/tag/2.4.0" %}New in: rippled 2.4.0{% /badge %} | Each member of the `publisher_lists` array is a **Publisher List** object with the following fields: diff --git a/docs/references/http-websocket-apis/public-api-methods/account-methods/account_objects.md b/docs/references/http-websocket-apis/public-api-methods/account-methods/account_objects.md index 0f458195e5..dbf3c5dd1c 100644 --- a/docs/references/http-websocket-apis/public-api-methods/account-methods/account_objects.md +++ b/docs/references/http-websocket-apis/public-api-methods/account-methods/account_objects.md @@ -84,7 +84,23 @@ The request includes the following parameters: | `ledger_index` | [Ledger Index][] | No | The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) | | `limit` | Number | No | The maximum number of objects to include in the results. Must be within the inclusive range `10` to `400` on non-admin connections. The default is `200`. | | `marker` | [Marker][] | No | Value from a previous paginated response. Resume retrieving data where that response left off. | -| `type` | String | No | Filter results by a ledger entry type. The valid types are: `bridge`, `check`, `deposit_preauth`, `escrow`, `nft_offer`, `nft_page`, `offer`, `payment_channel`, `signer_list`, `state` (trust line), and `ticket`. | +| `type` | String | No | Filter results to a specific type of ledger entry. This field accepts canonical ledger entry names (case insensitive) or short names. | + +Valid `type` field values are: + +| Canonical Name | Short Name | +| ---------------- | ----------------- | +| `Bridge` | `bridge` | +| `Check` | `check` | +| `DepositPreauth` | `deposit_preauth` | +| `Escrow` | `escrow` | +| `NFTokenOffer` | `nft_offer` | +| `NFTokenPage` | `nft_page` | +| `Offer` | `offer` | +| `PayChannel` | `payment_channel` | +| `RippleState` | `state` | +| `SignerList` | `signer_list` | +| `Ticket` | `ticket` | {% admonition type="info" name="Note" %}The commandline interface to the `account_objects` command doesn't accept the `type` field. Use the [json method][] to send the JSON-RPC format request on the commandline instead.{% /admonition %} diff --git a/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md b/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md index 78481c5ce6..8b2aafa4e2 100644 --- a/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md +++ b/docs/references/http-websocket-apis/public-api-methods/account-methods/account_tx.md @@ -80,7 +80,6 @@ The request includes the following parameters: | `limit` | Integer | _(Optional)_ Default varies. Limit the number of transactions to retrieve. The server is not required to honor this value. | | `marker` | [Marker][] | Value from a previous paginated response. Resume retrieving data where that response left off. This value is stable even if there is a change in the server's range of available ledgers. | -- You must use at least one of the following fields in your request: `ledger_index`, `ledger_hash`, `ledger_index_min`, or `ledger_index_max`. - [API v2]: If you specify either `ledger_index` or `ledger_hash`, including `ledger_index_min` and `ledger_index_max` returns an `invalidParams` error. @@ -440,8 +439,6 @@ The response follows the [standard format][], with a successful result containin | `ledger_index_max` | Integer - [Ledger Index][] | The ledger index of the most recent ledger actually searched for transactions. | | `limit` | Integer | The `limit` value used in the request. (This may differ from the actual limit value enforced by the server.) | | `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. | -| `meta` | Object (JSON) | (JSON mode) The transaction results metadata in JSON. | -| `meta_blob` | String (Binary) | (Binary mode) The transaction results metadata as a hex string. | | `transactions` | Array | Array of transactions matching the request's criteria, as explained below. | | `validated` | Boolean | If included and set to `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. | @@ -457,6 +454,8 @@ Each transaction object includes the following fields, depending on whether it w | `ledger_index` | Integer | The [ledger index][] of the ledger version that included this transaction. | | `tx_json` | Object (JSON) | (JSON mode) JSON object defining the transaction. | | `tx_blob` | String (Binary) | (Binary mode) A unique hex string defining the transaction. | +| `meta` | Object (JSON) | (JSON mode) The transaction results metadata in JSON. | +| `meta_blob` | String (Binary) | (Binary mode) The transaction results metadata as a hex string. | | `validated` | Boolean | Whether or not the transaction is included in a validated ledger. Any transaction not yet in a validated ledger is subject to change. | {% /tab %} @@ -470,7 +469,6 @@ Each transaction object includes the following fields, depending on whether it w | `ledger_index_max` | Integer - [Ledger Index][] | The ledger index of the most recent ledger actually searched for transactions. | | `limit` | Integer | The `limit` value used in the request. (This may differ from the actual limit value enforced by the server.) | | `marker` | [Marker][] | Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. | -| `meta` | Object (JSON) or String (Binary) | If `binary` is `true`, then this is a hex string of the transaction results metadata. Otherwise, the transaction results metadata is included in JSON format. | | `transactions` | Array | Array of transactions matching the request's criteria, as explained below. | | `validated` | Boolean | If included and set to `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. | @@ -483,6 +481,7 @@ Each transaction object includes the following fields, depending on whether it w | `ledger_index` | Integer | The [ledger index][] of the ledger version that included this transaction. | | `tx` | Object | (JSON mode) JSON object defining the transaction. | | `tx_blob` | String | (Binary mode) Hex string representing the transaction. | +| `meta` | Object (JSON) or String (Binary) | If `binary` is `true`, then this is a hex string of the transaction results metadata. Otherwise, the transaction results metadata is included in JSON format. | | `validated` | Boolean | Whether or not the transaction is included in a validated ledger. Any transaction not yet in a validated ledger is subject to change. | {% /tab %} diff --git a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_data.md b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_data.md index 86130d2950..9a580b393e 100644 --- a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_data.md +++ b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_data.md @@ -59,10 +59,33 @@ A request can include the following fields: | `binary` | Boolean | No | If `true`, return ledger entries as hexadecimal strings instead of JSON. The default is `false`. | | `limit` | Number | No | Limit the number of ledger entries to retrieve. The server may return fewer than this number of entries. Cannot be more than 2048 (when requesting binary) or 256 (when requesting JSON). Positive values outside this range are replaced with the closest valid option. The default is the maximum. | | `marker` | [Marker][] | No | Value from a previous paginated response. Resume retrieving data where that response left off. | -| `type` | String | No | Filter results to a specific type of ledger entry. The valid types are: `account`, `amendments`, `amm`, `check`, `deposit_preauth`, `directory`, `escrow`, `fee`, `hashes`, `nft_offer`, `offer`, `payment_channel`, `signer_list`, `state` (trust line), and `ticket`. | +| `type` | String | No | Filter results to a specific type of ledger entry. This field accepts canonical ledger entry names (case insensitive) or short names. | + +Valid `type` field values are: + +| Canonical Name | Short Name | +| ----------------- | ----------------- | +| `AccountRoot` | `account` | +| `Amendments` | `amendments` | +| `AMM` | `amm` | +| `Check` | `check` | +| `DepositPreauth` | `deposit_preauth` | +| `DirectoryNode` | `directory` | +| `Escrow` | `escrow` | +| `FeeSettings` | `fee` | +| `LedgerHashes` | `hashes` | +| `MPToken` | `mptoken` | +| `MPTokenIssuance` | `mpt_issuance` | +| `NFTokenOffer ` | `nft_offer` | +| `Offer` | `offer` | +| `PayChannel` | `payment_channel` | +| `RippleState` | `state` | +| `SignerList` | `signer_list` | +| `Ticket` | `ticket` | The `ledger` field is deprecated and may be removed without further notice. + ## Response Format An example of a successful response: diff --git a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md index 4051e9e111..b66434b9db 100644 --- a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md +++ b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md @@ -38,16 +38,16 @@ In addition to the general fields above, you must specify *exactly 1* of the fol - [Get AccountRoot Entry](#get-accountroot-entry) - [Get AMM Entry](#get-amm-entry) - [Get Bridge Entry](#get-bridge-entry) - - [Get Credential Entry](#get-credential-object) - - [Get DirectoryNode Entry](#get-directorynode-object) - - [Get Offer Entry](#get-offer-object) - - [Get Oracle Entry](#get-oracle-object) - - [Get RippleState Entry](#get-ripplestate-object) - - [Get Check Entry](#get-check-object) - - [Get Escrow Entry](#get-escrow-object) - - [Get PayChannel Entry](#get-paychannel-object) - - [Get DepositPreauth Entry](#get-depositpreauth-object) - - [Get Ticket Entry](#get-ticket-object) + - [Get Credential Entry](#get-credential-entry) + - [Get DirectoryNode Entry](#get-directorynode-entry) + - [Get Offer Entry](#get-offer-entry) + - [Get Oracle Entry](#get-oracle-entry) + - [Get RippleState Entry](#get-ripplestate-entry) + - [Get Check Entry](#get-check-entry) + - [Get Escrow Entry](#get-escrow-entry) + - [Get PayChannel Entry](#get-paychannel-entry) + - [Get DepositPreauth Entry](#get-depositpreauth-entry) + - [Get Ticket Entry](#get-ticket-entry) - [Get NFT Page](#get-nft-page) - [Get MPT Issuance Object](#get-mpt-issuance-object) - [Get MPToken Object](#get-mptoken-object) @@ -528,9 +528,11 @@ Retrieve a [RippleState entry][], which tracks a (non-XRP) currency balance betw | Field | Type | Description | |:------------------------|:---------------------------|:----------------------| +| `state` | Object | Alias to `ripple_state`. | | `ripple_state` | Object | Object specifying the RippleState (trust line) object to retrieve. The `accounts` and `currency` sub-fields are required to uniquely specify the RippleState entry to retrieve. | | `ripple_state.accounts` | Array | _(Required if `ripple_state` is specified)_ 2-length array of account [Address][]es, defining the two accounts linked by this RippleState entry. | | `ripple_state.currency` | String | _(Required if `ripple_state` is specified)_ [Currency Code][] of the RippleState entry to retrieve. | +| `state` | Object | Alias to `ripple_state`. | {% tabs %} diff --git a/docs/references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md b/docs/references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md index 94fc1a6dd1..4f9ac003d6 100644 --- a/docs/references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md +++ b/docs/references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md @@ -85,6 +85,9 @@ The `info` object may have some arrangement of the following fields: | `build_version` | String | The version number of the running `rippled` server. | | `closed_ledger` | Object | _(May be omitted)_ Information on the most recently closed ledger that has not been validated by consensus. If the most recently validated ledger is available, the response omits this field and includes `validated_ledger` instead. The member fields are the same as the `validated_ledger` field. | | `complete_ledgers` | String | Range expression indicating the sequence numbers of the ledger versions the local `rippled` has in its database. This may be a disjoint sequence such as `24900901-24900984,24901116-24901158`. If the server does not have any complete ledgers (for example, it recently started syncing with the network), this is the string `empty`. | +| `git` | Object | _(Admin only)_ The Git details of your `rippled` build. | +| `git.branch` | String | _(Admin only)_ The Git branch used to build your version of `rippled`. | +| `git.hash` | String | _(Admin only)_ The Git hash of the commit used to build your version of `rippled`. | | `hostid` | String | On an admin request, returns the hostname of the server running the `rippled` instance; otherwise, returns a single [RFC-1751][] word based on the [node public key](../../../../concepts/networks-and-servers/peer-protocol.md#node-key-pair). | | `io_latency_ms` | Number | Amount of time spent waiting for I/O operations, in milliseconds. If this number is not very, very low, then the `rippled` server is probably having serious load issues. | | `jq_trans_overflow` | String - Number | The number of times (since starting up) that this server has had over 250 transactions waiting to be processed at once. A large number here may mean that your server is unable to handle the transaction load of the XRP Ledger network. For detailed recommendations of future-proof server specifications, see [Capacity Planning](../../../../infrastructure/installation/capacity-planning.md). | diff --git a/docs/references/http-websocket-apis/public-api-methods/transaction-methods/simulate.md b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/simulate.md new file mode 100644 index 0000000000..49fe492683 --- /dev/null +++ b/docs/references/http-websocket-apis/public-api-methods/transaction-methods/simulate.md @@ -0,0 +1,193 @@ +--- +seo: + description: Execute a dry run of any transaction type to preview results and metadata. +labels: + - Transaction Sending +--- +# simulate +[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/rpc/handlers/Simulate.cpp "Source") + +The `simulate` method executes a dry run of _any_ transaction type, enabling you to preview the results and metadata of a transaction without committing them to the XRP Ledger. Since this command never submits a transaction to the network, it doesn't incur any fees. + +{% admonition type="warning" name="Caution" %} +The `simulate` method isn't guaranteed to be the same when you actually submit a transaction because the ledger state--which affects how a transaction is processed--can change between the transaction simulation and submission. +{% /admonition %} + + +## Request Format + +An example of the request format: + +{% tabs %} + +{% tab label="WebSocket" %} +```json +{ + "id": 2, + "command": "simulate", + "tx_json" : { + "TransactionType" : "Payment", + "Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Amount" : { + "currency" : "USD", + "value" : "1", + "issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" + } + } +} +``` +{% /tab %} + +{% tab label="JSON-RPC" %} +```json +{ + "method": "simulate", + "params": { + "tx_json" : { + "TransactionType" : "Payment", + "Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Amount" : { + "currency" : "USD", + "value" : "1", + "issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" + } + } + } +} +``` +{% /tab %} + +{% /tabs %} + +{% try-it method="simulate" /%} + +The request includes the following parameters: + +| Field | Type | Required? | Description | +| --------- | ------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `tx_blob` | String | Yes | The transaction to simulate, in [binary format](https://xrpl.org/docs/references/protocol/binary-format). If you include this field, do not also include `tx_json`. | +| `tx_json` | Object | Yes | The transaction to simulate, in JSON format. If you include this field, do not also include `tx_blob`. | +| `binary` | Boolean | No | The default value is `false`, which returns data and metadata in JSON format. If `true`, returns data and metadata in binary format, serialized to a hexadecimal string. | + +- The simulated transaction must be unsigned. +- The server autofills `Fee`, `Sequence`, `SigningPubKey`, and `NetworkID` fields. + + +## Response Format + +An example of a successful response: + +```json +{ + "id": 2, + "result": { + "applied": false, + "engine_result": "tesSUCCESS", + "engine_result_code": 0, + "engine_result_message": "The simulated transaction would have been applied.", + "ledger_index": 3, + "meta": { + "AffectedNodes": [ + { + "ModifiedNode": { + "FinalFields": { + "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "AccountTxnID": "4D5D90890F8D49519E4151938601EF3D0B30B16CD6A519D9C99102C9FA77F7E0", + "Balance": "75159663", + "Flags": 9043968, + "OwnerCount": 5, + "Sequence": 361, + "TransferRate": 1004999999 + }, + "LedgerEntryType": "AccountRoot", + "LedgerIndex": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8", + "PreviousFields": { + "AccountTxnID": "2B44EBE00728D04658E597A85EC4F71D20503B31ABBF556764AD8F7A80BA72F6", + "Balance": "75169663", + "Sequence": 360 + }, + "PreviousTxnID": "2B44EBE00728D04658E597A85EC4F71D20503B31ABBF556764AD8F7A80BA72F6", + "PreviousTxnLgrSeq": 18555460 + } + }, + { + "ModifiedNode": { + "FinalFields": { + "Balance": { + "currency": "USD", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "12.0301" + }, + "Flags": 65536, + "HighLimit": { + "currency": "USD", + "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "value": "0" + }, + "HighNode": "0", + "LowLimit": { + "currency": "USD", + "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "value": "100" + }, + "LowNode": "0" + }, + "LedgerEntryType": "RippleState", + "LedgerIndex": "96D2F43BA7AE7193EC59E5E7DDB26A9D786AB1F7C580E030E7D2FF5233DA01E9", + "PreviousFields": { + "Balance": { + "currency": "USD", + "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji", + "value": "11.0301" + } + }, + "PreviousTxnID": "7FFE02667225DFE39594663DEDC823FAF188AC5F036A9C2CA3259FB5379C82B4", + "PreviousTxnLgrSeq": 9787698 + } + } + ], + "TransactionIndex": 0, + "TransactionResult": "tesSUCCESS", + "delivered_amount": { + "currency": "USD", + "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "value": "1" + } + }, + "tx_json": { + "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "DeliverMax": { + "currency": "USD", + "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "value": "1" + }, + "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Fee": "10", + "Sequence": 360, + "TransactionType": "Payment" + } + }, + "status": "success", + "type": "response" +} +``` + +The response follows the [standard format][], with a successful result containing the following fields: + +| Field | Type | Description | +| -------------- | ------ | ----------- | +| `tx_json` | Object | The transaction that was simulated, including auto-filled values. Included if `binary` was `false`. | +| `tx_blob` | String | The serialized transaction that was simulated, including auto-filled values. Included if `binary` was `true`. | +| `ledger_index` | [Ledger Index](https://xrpl.org/docs/references/protocol/data-types/basic-data-types#ledger-index) | The ledger index of the ledger that would have included this transaction. | +| `meta` | Object | Transaction metadata, which describes the results of the transaction. Not included if the transaction fails with a code that means it wouldn’t be included in the ledger (such as a non-TEC code). Included if `binary` was `false`. | +| `meta_blob` | String | Transaction metadata, which describes the results of the transaction. Not included if the transaction fails with a code that means it wouldn’t be included in the ledger (such as a non-TEC code). Included if `binary` was `true`. | + + +## Possible Errors + +* `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing. +* `transactionSigned` - The transaction was signed. The simulated transaction must be unsigned. + +{% raw-partial file="/docs/_snippets/common-links.md" /%} \ No newline at end of file diff --git a/docs/references/protocol/data-types/basic-data-types.md b/docs/references/protocol/data-types/basic-data-types.md index 40c6297b54..f28b6023e1 100644 --- a/docs/references/protocol/data-types/basic-data-types.md +++ b/docs/references/protocol/data-types/basic-data-types.md @@ -108,7 +108,7 @@ Reporting Mode does not record ledger data until it has been validated. If you m ## Specifying Currency Amounts -There are two kinds of currencies in the XRP Ledger: XRP and tokens. These two types of currencies are specified in different formats, with different precision and rounding behavior. +There are three kinds of currencies in the XRP Ledger: XRP, tokens, and MPTs. These three types of currencies are specified in different formats, with different precision and rounding behavior. Some fields, such as the destination `Amount` of a [Payment transaction][], can be either type. Some fields only accept XRP specifically, such as the `Fee` field ([transaction cost](../../../concepts/transactions/transaction-cost.md)). @@ -129,6 +129,16 @@ XRP is specified as a string containing an integer number of "drops" of XRP, whe "issuer": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" } ``` + +- **MPT** - Use `Amount` to specify the value of an MPT. Assuming an `AssetScale` of *1*, you would specify a value of 13.1 units of an MPT as follows: + + ``` + "Amount": { + "mpt_issuance_id": + "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47", + "value": "131" + } + ``` For more information, see [Currency Formats](currency-formats.md). diff --git a/docs/references/protocol/data-types/currency-formats.md b/docs/references/protocol/data-types/currency-formats.md index 7082493d44..e87954761d 100644 --- a/docs/references/protocol/data-types/currency-formats.md +++ b/docs/references/protocol/data-types/currency-formats.md @@ -6,29 +6,32 @@ seo: label: - XRP - Tokens + - MPTs --- # Currency Formats -The XRP Ledger has two kinds of digital asset: XRP and [tokens](../../../concepts/tokens/index.md). Both types have high precision, although their formats are different. +The XRP Ledger has three kinds of digital asset: XRP, [tokens](../../../concepts/tokens/index.md), and [Multi-purpose Tokens (MPTs)](../../../concepts/tokens/fungible-tokens/multi-purpose-tokens.md). All three types have high precision, although their formats are different. + +_(Requires the [MPToken amendment][] {% not-enabled /%})_ ## Comparison -The following table summarizes some of the differences between XRP and tokens in the XRP Ledger: +The following table summarizes some of the differences XRP, tokens, and MPTs in the XRP Ledger: -| XRP | Tokens | -|:---------------------------------------------------------|:------------------| -| Has no issuer. | Always issued by an XRP Ledger account. | -| Specified as a string. | Specified as an object. | -| Tracked in [accounts](../ledger-data/ledger-entry-types/accountroot.md). | Tracked in [trust lines](../ledger-data/ledger-entry-types/ripplestate.md). | -| Can never be created; can only be destroyed. | Can be issued or redeemed freely. | -| Minimum value: `0`. (Cannot be negative.) | Minimum value: `-9999999999999999e80`. Minimum nonzero absolute value: `1000000000000000e-96`. -| Maximum value `100000000000` (1011) XRP. That's `100000000000000000` (1017) "drops". | Maximum value `9999999999999999e80`. | +| XRP | Tokens | MPTs | +|:---------------------------------------------------------|:------------------|:---------------------| +| Has no issuer. | Always issued by an XRP Ledger account. | Always issued by an XRP Ledger account. | +| Specified as a string. | Specified as an object. | Specified as an object. | +| Tracked in [accounts](../ledger-data/ledger-entry-types/accountroot.md). | Tracked in [trust lines](../ledger-data/ledger-entry-types/ripplestate.md). | Tracked in holder's account. | +| Can never be created; can only be destroyed. | Can be issued or redeemed freely. | Can be issued or redeemed freely. | +| Minimum value: `0`. (Cannot be negative.) | Minimum value: `-9999999999999999e80`. Minimum nonzero absolute value: `1000000000000000e-96`. | Minimum value: `0`. (Cannot be negative.) | +| Maximum value `100000000000` (1011) XRP. That's `100000000000000000` (1017) "drops". | Maximum value `9999999999999999e80`. | Maximum value `0x7FFFFFFFFFFFFFFF`. | | Precise to the nearest "drop" (0.000001 XRP) | 15 decimal digits of precision. | -| Can't be [frozen](../../../concepts/tokens/fungible-tokens/freezes.md). | The issuer can [freeze](../../../concepts/tokens/fungible-tokens/freezes.md) balances. | -| No transfer fees; XRP-to-XRP payments are always direct. | Can take indirect [paths](../../../concepts/tokens/fungible-tokens/paths.md) with each issuer charging a percentage [transfer fee](../../../concepts/tokens/transfer-fees.md). | -| Can be used in [Payment Channels](../../../concepts/payment-types/payment-channels.md) and [Escrow](../../../concepts/payment-types/escrow.md). | Not compatible with Payment Channels or Escrow. | +| Can't be [frozen](../../../concepts/tokens/fungible-tokens/freezes.md). | The issuer can [freeze](../../../concepts/tokens/fungible-tokens/freezes.md) balances. | The issuer can lock balances individually and globally. | +| No transfer fees; XRP-to-XRP payments are always direct. | Can take indirect [paths](../../../concepts/tokens/fungible-tokens/paths.md) with each issuer charging a percentage [transfer fee](../../../concepts/tokens/transfer-fees.md). | Can charge a transfer fee for secondary sales of the token. | +| Can be used in [Payment Channels](../../../concepts/payment-types/payment-channels.md) and [Escrow](../../../concepts/payment-types/escrow.md). | Not compatible with Payment Channels or Escrow. | Not compatible with Payment Channels or Escrow. | -For more information, see [What is XRP?](../../../introduction/what-is-xrp.md) and [Tokens](../../../concepts/tokens/index.md). +See [What is XRP?](../../../introduction/what-is-xrp.md), [Tokens](../../../concepts/tokens/index.md), and [Multi-purpose Tokens](../../../concepts/tokens/fungible-tokens/multi-purpose-tokens.md). ## Specifying Currency Amounts @@ -36,6 +39,7 @@ Use the appropriate format for the type of currency you want to specify: - [XRP Amounts](#xrp-amounts) - [Token Amounts](#token-amounts) +- [MPT Amounts](#mpt-amounts) ### XRP Amounts @@ -51,7 +55,7 @@ XRP amounts cannot be negative. ### Token Amounts -To specify an amount of a [(fungible) token](../../../concepts/tokens/index.md), use an Amount object. This is a JSON object with three fields: +To specify an amount of a [(fungible) token](../../../concepts/tokens/index.md), use an `Amount` object. Tokens use the `currency`, `value`, and `issuer` fields. | `Field` | Type | Description | |:-----------|:---------------------------|:-----------------------------------| @@ -72,6 +76,25 @@ For example, to represent $153.75 US dollars issued by account `r9cZA1mLK5R5Am25 "issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59" } ``` +### MPT Amounts + +Specify the amount of MPTs using the `value` field. + +| `Field` | Type | Description | +|:-----------|:---------------------------|:-----------------------------------| +| `mpt_issuance_id` | String | Arbitrary unique identifier for a Multi-purpose Token. | +| `value` | [String Number][] | A string representing a positive integer value. Valid values for this field are between 0x0 and 0x7FFFFFFFFFFFFFFF. Use `AssetScale` to enable values as fractions of the MPT value. See [MPT Precision](#mpt-precision). | + +For example, to specify 1 million units of an MPT you would specify: + +```json +{ + "mpt_issuance_id": + "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47", + "value": "1000000" +} +``` + ### Specifying Without Amounts @@ -94,6 +117,13 @@ To describe XRP without an amount, specify it as a JSON object with _only_ a `cu } ``` +To describe an MPT without an amount, specify it as a JSON object with _only_ a `mpt_issuance_id` field. For example: + +```json +{ + "mpt_issuance_id": "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47" +} +``` ## String Numbers @@ -111,6 +141,20 @@ When sending token amounts in the XRP Ledger's peer-to-peer network, servers [se {% admonition type="success" name="Tip" %}For tokens that should not be divisible at all, see [Non-Fungible Tokens (NFTs)](../../../concepts/tokens/nfts/index.md).{% /admonition %} +## MPT Precision + +MPTs are always expressed in whole integers. You can change the `AssetScale` of your MPT to express the basic unit as a fraction of an MPT. The XRP Ledger doesn't use the `AssetScale` on-chain: this is for your convenience in specifying the basic unit. + +For example, to express a value of 13.1 MPT, the MPT would require that the `AssetScale` be set to 1, and the `value` of the MPT set to 131. + +```json + "Amount": { + "mpt_issuance_id": + "0000012FFD9EE5DA93AC614B4DB94D7E0FCE415CA51BED47", + "value": "131" + } +``` + ## Currency Codes [Currency Code]: #currency-codes diff --git a/docs/references/protocol/transactions/types/ammbid.md b/docs/references/protocol/transactions/types/ammbid.md index 386c100601..a883bd52f7 100644 --- a/docs/references/protocol/transactions/types/ammbid.md +++ b/docs/references/protocol/transactions/types/ammbid.md @@ -56,8 +56,8 @@ You bid using the AMM's LP Tokens; the amount of a winning bid is returned to th | Field | JSON Type | [Internal Type][] | Required? | Description | |:---------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `BidMin` | [Currency Amount][] | Amount | No | Pay at least this amount for the slot. Setting this value higher makes it harder for others to outbid you. If omitted, pay the minimum necessary to win the bid. | | `BidMax` | [Currency Amount][] | Amount | No | Pay at most this amount for the slot. If the cost to win the bid is higher than this amount, the transaction fails. If omitted, pay as much as necessary to win the bid. | | `AuthAccounts` | Array | STArray | No | A list of up to 4 additional accounts that you allow to trade at the discounted fee. This cannot include the address of the transaction sender. Each of these objects should be an [Auth Account object](#auth-account-objects). | diff --git a/docs/references/protocol/transactions/types/ammclawback.md b/docs/references/protocol/transactions/types/ammclawback.md index a6f19a5409..a8d9880c17 100644 --- a/docs/references/protocol/transactions/types/ammclawback.md +++ b/docs/references/protocol/transactions/types/ammclawback.md @@ -39,8 +39,8 @@ Clawback is disabled by default. To use clawback, you must send an [AccountSet t | Field | JSON Type | [Internal Type][] | Required | Description | |:-------------------|:----------|:------------------|:---------|:------------------| | `Account` | String | AccountID | Yes | The issuer of the asset being clawed back. Only the issuer can submit this transaction. | -| `Asset` | Object | STIssue | Yes | Specifies the asset that the issuer wants to claw back from the AMM pool. In JSON, this is an object with `currency` and `issuer` fields. The `issuer` field must match with `Account`. | -| `Asset2` | Object | STIssue | Yes | Specifies the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | Specifies the asset that the issuer wants to claw back from the AMM pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). The `issuer` field must match with `Account`. | +| `Asset2` | Object | STIssue | Yes | Specifies the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `Amount` | [Currency Amount](https://xrpl.org/docs/references/protocol/data-types/basic-data-types#specifying-currency-amounts) | Amount | No | The maximum amount to claw back from the AMM account. The `currency` and `issuer` subfields should match the `Asset` subfields. If this field isn't specified, or the `value` subfield exceeds the holder's available tokens in the AMM, all of the holder's tokens are clawed back. | | `Holder` | String | AccountID | Yes | The account holding the asset to be clawed back. | diff --git a/docs/references/protocol/transactions/types/ammdelete.md b/docs/references/protocol/transactions/types/ammdelete.md index 4eb0486056..d75fbb4325 100644 --- a/docs/references/protocol/transactions/types/ammdelete.md +++ b/docs/references/protocol/transactions/types/ammdelete.md @@ -39,8 +39,8 @@ Normally, an [AMMWithdraw transaction][] automatically deletes an AMM and all as | Field | JSON Type | [Internal Type][] | Required? | Description | |:---------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | ## Error Cases diff --git a/docs/references/protocol/transactions/types/ammdeposit.md b/docs/references/protocol/transactions/types/ammdeposit.md index 9fc4d25b43..7e5c33c281 100644 --- a/docs/references/protocol/transactions/types/ammdeposit.md +++ b/docs/references/protocol/transactions/types/ammdeposit.md @@ -52,8 +52,8 @@ You can't deposit either asset into an AMM if: | Field | JSON Type | [Internal Type][] | Required? | Description | |:--------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `Amount` | [Currency Amount][] | Amount | No | The amount of one asset to deposit to the AMM. If present, this must match the type of one of the assets (tokens or XRP) in the AMM's pool. | | `Amount2` | [Currency Amount][] | Amount | No | The amount of another asset to add to the AMM. If present, this must match the type of the other asset in the AMM's pool and cannot be the same asset as `Amount`. | | `EPrice` | [Currency Amount][] | Amount | No | The maximum effective price, in the deposit asset, to pay for each LP Token received. | diff --git a/docs/references/protocol/transactions/types/ammvote.md b/docs/references/protocol/transactions/types/ammvote.md index 3a00f062fc..6893cec96a 100644 --- a/docs/references/protocol/transactions/types/ammvote.md +++ b/docs/references/protocol/transactions/types/ammvote.md @@ -39,8 +39,8 @@ Vote on the trading fee for an [Automated Market Maker](../../../../concepts/tok | Field | JSON Type | [Internal Type][] | Required? | Description | |:-------------|:----------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `TradingFee` | Number | UInt16 | Yes | The proposed fee to vote for, in units of 1/100,000; a value of 1 is equivalent to 0.001%. The maximum value is 1000, indicating a 1% fee. | ## Error Cases diff --git a/docs/references/protocol/transactions/types/ammwithdraw.md b/docs/references/protocol/transactions/types/ammwithdraw.md index c856778518..33de1cf9d0 100644 --- a/docs/references/protocol/transactions/types/ammwithdraw.md +++ b/docs/references/protocol/transactions/types/ammwithdraw.md @@ -44,8 +44,8 @@ Withdraw assets from an [Automated Market Maker](../../../../concepts/tokens/dec | Field | JSON Type | [Internal Type][] | Required? | Description | |:-------------|:--------------------|:------------------|:----------|:------------| -| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | -| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. In JSON, this is an object with `currency` and `issuer` fields (omit `issuer` for XRP). | +| `Asset` | Object | STIssue | Yes | The definition for one of the assets in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | +| `Asset2` | Object | STIssue | Yes | The definition for the other asset in the AMM's pool. The asset can be XRP, a token, or an MPT (see: [Specifying Without Amounts][]). | | `Amount` | [Currency Amount][] | Amount | No | The amount of one asset to withdraw from the AMM. This must match the type of one of the assets (tokens or XRP) in the AMM's pool. | | `Amount2` | [Currency Amount][] | Amount | No | The amount of another asset to withdraw from the AMM. If present, this must match the type of the other asset in the AMM's pool and cannot be the same type as `Amount`. | | `EPrice` | [Currency Amount][] | Amount | No | The minimum effective price, in LP Token returned, to pay per unit of the asset to withdraw. | diff --git a/docs/references/protocol/transactions/types/credentialaccept.md b/docs/references/protocol/transactions/types/credentialaccept.md index 8228f48e9d..fb6e8ad9ad 100644 --- a/docs/references/protocol/transactions/types/credentialaccept.md +++ b/docs/references/protocol/transactions/types/credentialaccept.md @@ -46,6 +46,7 @@ The combination of `Account`, `Issuer`, and `CredentialType` must match a `Crede | `tecNO_ENTRY` | The credential uniquely identified by the `Account`, `Issuer`, and `CredentialType` fields of the transaction does not exist in the ledger. | | `temDISABLED` | The related amendment is not enabled. | | `temINVALID_ACCOUNT_ID` | The provided `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#special-addresses). | +| `temINVALID_FLAG` | The transaction includes a [Flag](../common-fields.md#flags-field) that does not exist, or includes a contradictory combination of flags. _(Requires the [fixInvalidTxFlags amendment][] {% not-enabled /%})_ | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/credentialcreate.md b/docs/references/protocol/transactions/types/credentialcreate.md index 810968b320..71b9ffdde5 100644 --- a/docs/references/protocol/transactions/types/credentialcreate.md +++ b/docs/references/protocol/transactions/types/credentialcreate.md @@ -48,6 +48,7 @@ Besides errors that can occur for all transactions, CredentialCreate transaction | `tecNO_TARGET` | The account specified in the `Subject` field is not a funded account in the ledger. | | `temDISABLED` | The related amendment is not enabled. | | `temINVALID_ACCOUNT_ID` | The provided `Subject` field is invalid. For example, it contains [ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#special-addresses). | +| `temINVALID_FLAG` | The transaction includes a [Flag](../common-fields.md#flags-field) that does not exist, or includes a contradictory combination of flags. _(Requires the [fixInvalidTxFlags amendment][] {% not-enabled /%})_ | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/credentialdelete.md b/docs/references/protocol/transactions/types/credentialdelete.md index e206162051..950e06558f 100644 --- a/docs/references/protocol/transactions/types/credentialdelete.md +++ b/docs/references/protocol/transactions/types/credentialdelete.md @@ -47,6 +47,7 @@ This transaction looks for a [Credential ledger entry](../../ledger-data/ledger- | `temINVALID_ACCOUNT_ID` | A provided `Subject` or `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#special-addresses). | | `tecNO_PERMISSION` | The sender is neither the issuer nor subject of the credential, and the credential is not expired. | | `tecNO_ENTRY` | The specified credential does not exist in the ledger. | +| `temINVALID_FLAG` | The transaction includes a [Flag](../common-fields.md#flags-field) that does not exist, or includes a contradictory combination of flags. _(Requires the [fixInvalidTxFlags amendment][] {% not-enabled /%})_ | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript.md b/docs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript.md index 31c3a73986..ce99697803 100644 --- a/docs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript.md +++ b/docs/tutorials/javascript/build-apps/build-a-browser-wallet-in-javascript.md @@ -82,8 +82,6 @@ SEED="s████████████████████████ {% code-snippet file="/_code-samples/build-a-browser-wallet/js/vite.config.js" language="js" /%} -This example includes the necessary configuration to make [xrpl.js work with Vite](https://github.com/XRPLF/xrpl.js/blob/main/UNIQUE_SETUPS.md#using-xrpljs-with-vite-react). - 8. Add script to `package.json` In your `package.json` file, add the following section if it's not there already: diff --git a/docs/tutorials/public-servers.md b/docs/tutorials/public-servers.md index 166df4fd21..f5e7bc1248 100644 --- a/docs/tutorials/public-servers.md +++ b/docs/tutorials/public-servers.md @@ -19,7 +19,7 @@ If you don't [run your own `rippled` server](../infrastructure/installation/inde ## Commercial | Operator | [Network][] | JSON-RPC | Notes | |:----------|:------------|:-------------|:---------------------| -| XRP Ledger Foundation full history paid API via [Dhali](https://dhali.io/) | **Mainnet** | `https://run.api.dhali.io/199fd80b-1776-4708-b1a1-4b2bb386435d/` | You must [create a paid API key](https://pay.dhali.io/?uuids=199fd80b-1776-4708-b1a1-4b2bb386435d) and embed it in the request's `Payment-Claim` header. | +| XRP Ledger Foundation full history paid API via [Dhali](https://dhali.io/) | **Mainnet** | `https://xrplcluster.dhali.io/` | You must [create a paid API key](https://pay.dhali.io/?uuids=199fd80b-1776-4708-b1a1-4b2bb386435d) and embed it in the request's `Payment-Claim` header. | | [QuickNode](https://www.quicknode.com/chains/xrpl) | Testnet/Mainnet | N/A | QuickNode provides hosted XRPL RPC mainnet and testnet under their free and paid plans, granting flexible and reliable access to the network. diff --git a/resources/dev-tools/components/websocket-api/data/command-list.json b/resources/dev-tools/components/websocket-api/data/command-list.json index 8a57f20d75..5336bff3c1 100644 --- a/resources/dev-tools/components/websocket-api/data/command-list.json +++ b/resources/dev-tools/components/websocket-api/data/command-list.json @@ -178,6 +178,21 @@ { "group": "Transaction Methods", "methods": [ + { + "name": "simulate", + "description": "Executes a dry run of any transaction type, enabling you to preview the results and metadata of a transaction without committing them to the XRP Ledger.", + "link": "/docs/references/http-websocket-apis/public-api-methods/transaction-methods/simulate", + "body": { + "id": "example_simulate", + "command": "simulate", + "tx_json" : { + "TransactionType" : "Payment", + "Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Amount" : "1000000" + } + } + }, { "name": "submit", "description": "Submits a transaction to the network to be confirmed and included in future ledgers.", diff --git a/resources/known-amendments.md b/resources/known-amendments.md index 6f1fe16c95..f3bc5e5de5 100644 --- a/resources/known-amendments.md +++ b/resources/known-amendments.md @@ -18,6 +18,8 @@ This list is updated manually. For a live view of amendment voting, see the Amen | Name | Introduced | Status | |:----------------------------------|:-----------|:------------------------------| | [DynamicNFT][] | v2.4.0 | {% badge href="https://xrpl.org/blog/2025/rippled-2.4.0" %}Open for Voting: 2025-03-05{% /badge %} | +| [fixFrozenLPTokenTransfer][] | v2.4.0 | {% badge href="https://xrpl.org/blog/2025/rippled-2.4.0" %}Open for Voting: 2025-03-05{% /badge %} | +| [fixInvalidTxFlags][] | v2.4.0 | {% badge href="https://xrpl.org/blog/2025/rippled-2.4.0" %}Open for Voting: 2025-03-05{% /badge %} | | [AMMClawback][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/8672DFD11FCF79F8E8F92E300187E8E533899ED8C8CF5AFB1A9C518195C16261" %}Enabled: 2025-01-30{% /badge %} | | [Credentials][] | v2.3.0 | {% badge href="https://xrpl.org/blog/2024/rippled-2.3.0" %}Open for Voting: 2024-11-26{% /badge %} | | [fixAMMv1_2][] | v2.3.0 | {% badge href="https://livenet.xrpl.org/transactions/71D5031A5BD927BDFE424E51699E69F2784097D615D0852BF20C168BA9B5EA76" %}Enabled: 2025-01-30{% /badge %} | @@ -850,6 +852,24 @@ This amendment enables the payment engine to properly handle this scenario and a This amendment has no effect unless the [FlowCross][] amendment is enabled. +### fixFrozenLPTokenTransfer +[fixFrozenLPTokenTransfer]: #fixfrozenlptokentransfer + +| Amendment | fixFrozenLPTokenTransfer | +|:-------------|:-------------------------| +| Amendment ID | | +| Status | Open for Voting | +| Default Vote (Latest stable release) | No | +| Pre-amendment functionality retired? | No | + +This amendment fixes a loophole that enabled blacklisted accounts to transfer frozen LP tokens through alternative mechanisms, such as such as payments, checks, offers, or NFTs. + +With this amendment enabled, if an LP token is associated with a liquidity pool that contains at least one frozen asset, the LP token is also frozen. This means: + +1. The holder can't send the frozen LP token to other accounts. +2. The holder can receive frozen LP tokens, but can't send them out (similar to frozen trust lines). + + ### fixInnerObjTemplate [fixInnerObjTemplate]: #fixinnerobjtemplate @@ -890,6 +910,18 @@ This amendment standardizes the way inner objects ([Object-type fields in the ca It is believed that this change does not affect transaction processing, but it is possible that there are edge cases where it could cause an improperly formatted transaction to receive a different error. With this amendment, any such transactions would fail with a different result code such as `temMALFORMED`; without this amendment, those transactions would be expected to fail with the code `tefEXCEPTION` instead. +### fixInvalidTxFlags +[fixInvalidTxFlags]: #fixinvalidtxflags + +| Amendment | fixInvalidTxFlags | +|:-------------|:-------------------------| +| Amendment ID | | +| Status | Open for Voting | +| Default Vote (Latest stable release) | No | +| Pre-amendment functionality retired? | No | + +Adds flag checks for `CredentialCreate`, `CredentialAccept`, and `CredentialDelete` transactions. With this amendment enabled, these transactions will return a `temINVALID_FLAG` error if they include a flag that doesn't exist, or a contradictory combination of flags. + ### fixMasterKeyAsRegularKey [fixMasterKeyAsRegularKey]: #fixmasterkeyasregularkey diff --git a/sidebars.yaml b/sidebars.yaml index 3a4903bd0b..62bf3971c5 100644 --- a/sidebars.yaml +++ b/sidebars.yaml @@ -484,6 +484,7 @@ - page: docs/references/http-websocket-apis/public-api-methods/transaction-methods/index.md expanded: false items: + - page: docs/references/http-websocket-apis/public-api-methods/transaction-methods/simulate.md - page: docs/references/http-websocket-apis/public-api-methods/transaction-methods/submit.md - page: docs/references/http-websocket-apis/public-api-methods/transaction-methods/submit_multisigned.md - page: docs/references/http-websocket-apis/public-api-methods/transaction-methods/transaction_entry.md @@ -642,6 +643,7 @@ - page: docs/infrastructure/configuration/peering/use-a-peer-reservation.md - page: docs/infrastructure/configuration/configure-amendment-voting.md - page: docs/infrastructure/configuration/configure-statsd.md + - page: docs/infrastructure/configuration/configure-validator-list-threshold.md - page: docs/infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net.md - page: docs/infrastructure/configuration/configure-grpc.md - page: docs/infrastructure/configuration/enable-public-signing.md