Get started with Grat by setting up a local relay and sponsoring a testnet transaction.Documentation Index
Fetch the complete documentation index at: https://grat.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Docker installed and running.
- Node.js 20+ and a package manager (npm, yarn, or pnpm).
Start the Relay
To sponsor transactions, you need a running Grat Relay.
The relay will automatically fund its internal channel accounts using the Stellar Friendbot when running in testnet mode.
Option A: One-Click Cloud Deploy (Recommended)
Deploy a private relay to Render in minutes. This provides an instant HTTPS endpoint for your web apps.Option B: Local Docker
If you prefer to run it locally:Sponsor your first Transaction
Create a file named
sponsor.ts and add the following code. This script builds a simple XLM payment on the testnet and sends it to the Grat relay for sponsorship.Verify it Worked
Copy the transaction hash from your console and search for it on Stellar Expert (Testnet). You will see that the transaction was successful and that a fee-bump envelope was used to pay the network fee.