Skip to main content
This page takes you from nothing to a closed testnet account in four steps. Every transaction is checked with the published verifier before it is signed, which is the pattern a production integration keeps. Everything here runs on testnet with throwaway accounts funded by Friendbot, so no real funds are involved. You need Node.js 22 or later.

Get an API key

Create a key on the API keys page: sign in with a Stellar wallet, choose testnet as the network, and copy the key when it is shown. It is shown once. Then export it in your shell:
Keep the key on a server. See Authentication for the sign-in options and Limits for what one key allows.

Install

Create a project with this package.json. These are the versions the documentation is written against; @lumenwipe/verify needs exactly the @stellar/stellar-sdk version shown. Upgrade @lumenwipe/verify together with @lumenwipe/sdk: the API can start building a close that an older verifier refuses, and each release’s changelog names the shapes it added.
package.json

Make a first read

Create a testnet account with Friendbot, then read it through the API:
The answer is the account as the API reads it: balance, sub-entries, signers and thresholds. The same read with the SDK:
read.mjs

Close a testnet account

This script funds two throwaway accounts, adds a data entry to the first so there is something to remove, then closes it into the second. It plans the close, answers the one decision it can answer on its own (acknowledging a destination it controls), and runs the close with runClose: fetch, verify, sign, submit, repeat until the account is merged. It ends by reading what the destination received from the ledger.
close.mjs
The verifier is given the account read and the script’s own inputs: the destination it chose, no memo, and no transfers or conversions. Any transaction that does something else is refused before it is signed, and the script stops. A real account usually needs more: decisions about its assets, conversions, protocol exits, liquidity pool shares, or more than one signer. Those are answers your user gives, and they go to both closeTransactions and the verifier. See Verification. To run any of these against an API you host yourself, set LUMENWIPE_API_URL, for example http://localhost:3001, and use that base URL in the curl command.

Next steps

Headless example

The reference integration, with signing weight, exchange closes and a mainnet rehearsal.

Networks

What differs on mainnet, and the checklist before going live.

Limits

Request rate, keys, sessions, batches and bodies.

Compatibility and deprecation

What can change, how much notice you get, and what defines SDK 1.0.