Skip to main content

Documentation Index

Fetch the complete documentation index at: https://stellaraddresskit.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The core function of this library is extractRouting. It takes an address and an optional memo and returns a canonical address and routingId.

Example: M-Address

An M-address contains both the base G-address and a multiplexed ID. The library extracts both automatically.
import { extractRouting } from 'stellar-address-kit';

const result = extractRouting({
  address: "MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLT7AV7Y6S33Z6S3CHBAAAAAAAAAAAAABQD"
});

console.log(result.address);   // "GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLT7AV7Y6S33Z6S3CHB"
console.log(result.routingId); // "123"