{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-snippet"]},"type":"markdown"},"seo":{"title":"Get Started","siteUrl":"https://opensource.ripple.com/","meta":[{"name":"google-site-verification","content":"bLwyBi1imklcIuQxZ7JeI_kRF5Mg7yfr6arpEQV2nsE"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]},"description":"Install simpleXRPL, construct a connector, initialize the client, discover your accounts, and send your first XRP Ledger payment."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"get-started","__idx":0},"children":["Get Started"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This tutorial takes you through the basics of sending your first operation on the XRP Ledger with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["simpleXRPL"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"goals","__idx":1},"children":["Goals"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By the end of this tutorial, you will be able to:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Construct a connector."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Initialize a client."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Discover your accounts."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Transfer XRP between accounts."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To complete this tutorial, you should:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have some familiarity with writing code in TypeScript."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Have ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Node.js version 20.19"]}," or later."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"source-code","__idx":3},"children":["Source Code"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can find the complete source code for this tutorial's examples in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/ripple/opensource.ripple.com/tree/main/_code-samples/simplexrpl/"},"children":["code samples section of this website's repository"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"steps","__idx":4},"children":["Steps"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"1-install-dependencies","__idx":5},"children":["1. Install dependencies"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"npm install simplexrpl\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"2-construct-a-connector","__idx":6},"children":["2. Construct a connector"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A connector is a signing backend that determines how operations are executed and signed. This guide uses local signing with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LocalSigner"]}," constructor. This self-custody connector manages accounts and signs locally, making it ideal for testing and development."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/simplexrpl/getStarted.ts","language":"ts","header":{"controls":{"copy":{}}},"lang":"ts","source":"// This Get Started sample walks through the basics of using simpleXRPL.\n\nimport { LocalSigner, SimpleXRPL } from 'simplexrpl'\n\n// --- Construct a connector ---\n// The LocalSigner constructor is a self-custody option that signs locally.\n// Intended for testing and development.\nconst signer = LocalSigner.fromEnv()"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For production you'd construct a custodian connector instead and pass it to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["init"]}," in place of (or alongside) the local one. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/connectors"},"children":["Connectors"]}," for how to build each one; every vertical operation then works the same regardless of which connector owns the account."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"3-initialize-the-client","__idx":7},"children":["3. Initialize the client"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializing an account binds connectors to a network and builds the account index."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/simplexrpl/getStarted.ts","language":"ts","header":{"controls":{"copy":{}}},"lang":"ts","source":"// --- Initialize the client ---\nconst client = await SimpleXRPL.init({\n  xrpldUrl: 'wss://s.altnet.rippletest.net:51233',\n  faucetUrl: 'https://faucet.altnet.rippletest.net/accounts',\n  signers: [signer],\n})"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signers[0]"]}," is the default ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["primary"]}," account used for operations if not specified."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If you don't set a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["signer"]},", the client is read-only and you will receive a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NoSignerError"]}," when attempting write operations."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"4-discover-your-accounts","__idx":8},"children":["4. Discover your accounts"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Connectors discover their accounts at initialization, and the client merges them into a single index keyed by XRPL account address. List them, resolve the primary, and read on-chain state."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/simplexrpl/getStarted.ts","language":"ts","header":{"controls":{"copy":{}}},"lang":"ts","source":"// --- Discover your accounts ---\n// Connectors discover their accounts at init; the client merges them into one\n// index keyed by XRPL address.\nfor (const [address, account] of client.accounts) {\n  console.log(`${address}: ${account.signer.kind}`)\n}\n\n// Get the primary account used to submit vertical operations.\n// No args returns the primary account.\nconst primary = client.resolveAccount()\nconsole.log(`primary: ${primary.address}`)\n\n// Read an account's on-chain state. No args retrieves the primary account.\nconst state = await client.account.retrieve()\nconsole.log(`balance (XRP): ${state.data.xrpBalance} | sequence: ${state.data.sequence}`)"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"5-transfer-xrp","__idx":9},"children":["5. Transfer XRP"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Operations are grouped into domain-specific verticals reached off the client. This guide sends XRP from the primary address to another. For a full list of vertical operations, see: ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/verticals"},"children":["Verticals"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"file":"/_code-samples/simplexrpl/getStarted.ts","language":"ts","header":{"controls":{"copy":{}}},"lang":"ts","source":"// --- Send an XRP transfer ---\nconst result = await client.xrp.transfer({\n  to: 'rDestination00000000000000000000000',\n  amount: '10',\n})\nconsole.log(`submitted: ${result.txHash}`)\n\nawait client.disconnect()\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also","__idx":10},"children":["See Also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["References"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/connectors/local#localsignerfromenv"},"children":["LocalSigner.fromEnv()"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/client#simplexrplinit"},"children":["SimpleXRPL.init()"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/verticals/account/retrieve"},"children":["account.retrieve()"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/simplexrpl/references/verticals/xrp/transfer"},"children":["xrp.transfer()"]}]}]}]}]}]},"headings":[{"value":"Get Started","id":"get-started","depth":1},{"value":"Goals","id":"goals","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Source Code","id":"source-code","depth":2},{"value":"Steps","id":"steps","depth":2},{"value":"1. Install dependencies","id":"1-install-dependencies","depth":3},{"value":"2. Construct a connector","id":"2-construct-a-connector","depth":3},{"value":"3. Initialize the client","id":"3-initialize-the-client","depth":3},{"value":"4. Discover your accounts","id":"4-discover-your-accounts","depth":3},{"value":"5. Transfer XRP","id":"5-transfer-xrp","depth":3},{"value":"See Also","id":"see-also","depth":2}],"frontmatter":{"seo":{"description":"Install simpleXRPL, construct a connector, initialize the client, discover your accounts, and send your first XRP Ledger payment.","title":"Get Started"},"labels":["simpleXRPL","SDK"]},"editPage":{"to":"https://github.com/ripple/opensource.ripple.com/tree/main/docs/simpleXRPL/get-started.md"},"lastModified":"2026-07-30T22:30:51.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/simplexrpl/get-started","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}