Stellar SEP Helper
Open source · TypeScript · Node.js 22+

Stellar TOML,
without the guesswork.

A small, focused toolkit for discovering, parsing, and sanity-checking SEP-1 stellar.toml files in TypeScript applications.

Focused functionality

Three steps. One small API.

Use the utility that fits your integration. Network and parsing errors are surfaced instead of being replaced with placeholder data.

01 / DISCOVER

Fetch the standard location

Requests /.well-known/stellar.toml over HTTPS and rejects unsuccessful HTTP responses.

02 / PARSE

Read actual TOML

Parses the response with a TOML parser, enforces SEP-1's 100 KiB file limit, and reports malformed input.

03 / CHECK

Catch common mistakes

Checks that VERSION is present and validates common endpoint URL and documentation field types.

Quick start

Fetch and inspect a domain

Install the package, then call the asynchronous fetch helper from your Node.js application.

terminal · npm
npm install github:anchor-tools/stellar-sep-helper
typescript
import {
  fetchStellarToml,
  validateStellarToml
} from 'stellar-sep-helper';

const record = await fetchStellarToml({ domain: 'example.com' });
const result = validateStellarToml(record);

if (!result.valid) {
  console.error('Stellar TOML needs attention:', result.errors);
}
For local input or test fixtures, use parseStellarToml(source). For custom runtimes or tests, pass a fetcher in the fetch options.
API reference

Small surface, explicit behavior

All exported helpers and types are available from the package root.

fetchStellarToml(options)

Fetches from the SEP-1 well-known URL and returns a parsed Sep1Record. Rejects on invalid input, HTTP errors, oversize content, or malformed TOML.

parseStellarToml(source)

Parses TOML text without network access and returns a Sep1Record. Throws when the source is not valid TOML.

validateStellarToml(record)

Returns { valid, errors } after checking the version, supported HTTPS endpoint fields, and optional documentation field types.

Important: A valid result only means the checked fields passed these baseline checks. It does not prove all SEP-1 requirements are met, verify Stellar account keys, or guarantee that a remote service is safe to use.
Build in the open

Contributions welcome

Protocol support should be tied to the SEP text, tested, and described accurately. Start with an issue for new SEP integrations or larger design changes.