Agent documentation index: llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Skip to main content

TypeScript + Viem

These guides walk through Flare Smart Accounts flows with Viem and the xrpl library on Coston2 network. Each guide includes a runnable script from the flare-viem-starter repository.

Start with State Lookup to derive your personal account address from an XRPL wallet, then follow the custom-instruction or cross-chain guides depending on your integration.

Getting Started

Read the on-chain smart-account state before sending XRPL payments.

Custom Instructions

Mint FXRP and dispatch user operations through XRPL memo opcodes (0xFE, 0xFF), recover when a direct mint fails (0xE0), and fast-forward a stuck memo-instruction nonce (0xE1).

Cross-Chain

Bridge FXRP between Flare and Sepolia with LayerZero OFT adapters, combining mint or redeem with a cross-chain transfer in one flow.

Protocol reference

For opcode layouts and failure handling without code, see Custom Instruction, Memo Field Custom Instruction, and Custom Instruction Comparison.