Add create AMM tutorial

Add an interactive tutorial for creating an automated market maker,
updated with the latest changes from the Ripple Open Source site.
This commit is contained in:
mDuo13
2023-09-07 15:54:13 -07:00
parent c156999f7d
commit 7b94d3edee
5 changed files with 530 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// In browsers, use a <script> tag. In Node.js, uncomment the following line:
// const xrpl = require('xrpl')
const WS_URL = 'wss://amm.devnet.rippletest.net:51233/'
const EXPLORER = 'amm-devnet.xrpl.org' // Optional, for linking
async function main() {
// Define the network client
const client = new xrpl.Client(WS_URL)
await client.connect()
// ... custom code goes here
// Disconnect when done (If you omit this, Node.js won't end the process)
await client.disconnect()
}
main()