stellar_address_kit library
Classes
- AddressError
- Details of a terminal error encountered during address parsing.
- DecodedMuxedAddress
- DestinationError
- Details of a terminal error encountered during destination account parsing.
- ErrorCode
- Standard error codes returned when address parsing fails.
- MuxedAddress
- Class for handling Stellar Muxed Addresses (M... addresses).
- MuxedDecoder
- MuxedEncoder
- Normalization
- Details about a non-canonical input that was normalized.
- NormalizeResult
- ParseResult
- The result of parsing a raw Stellar address string.
- RoutingInput
- The set of parameters required to resolve a deposit route.
- RoutingResult
- Immutable result object returned from routing resolution.
- RoutingWarning
- Represents a non-blocking notification emitted during routing resolution.
- StellarAddress
- An immutable representation of a Stellar Address.
- Warning
- Represents a warning encountered during address parsing or routing.
- WarningCode
- Warning codes returned when an address is valid but has non-standard properties.
- WarningContext
- Contextual details for specific warning types.
Enums
- AddressKind
- The three types of Stellar addresses supported by the kit.
- RoutingSource
- Identifies the mechanism used to resolve a routing ID.
Properties
- digitsOnly → RegExp
-
final
- uint64Max → BigInt
-
final
Functions
-
detect(
String address) → AddressKind? -
Classifies a raw Stellar address string into one of the three Stellar
address kinds — classic (
G…), muxed (M…), or contract (C…) — without performing any deposit-routing logic. -
extractRouting(
RoutingInput input) → RoutingResult - Extracts deposit routing information from a Stellar payment input. Following the standard priority policy, M-address identifiers take precedence over any provided memo.
-
normalizeMemoId(
String s) → NormalizeResult - Strict normalizer for MEMO_ID type. A MEMO_ID must be a non-empty string of digits parseable as a uint64. Leading zeros are invalid (except the canonical "0"). Returns null if the value cannot be used as a routing ID.
-
normalizeMemoTextId(
String s) → NormalizeResult - Normalizer for MEMO_TEXT type — tries to parse a numeric routing ID. Leading zeros trigger a normalization warning; non-numeric values return null.
-
parse(
String input) → ParseResult - Parses a String into a ParseResult. Normalizes the input to uppercase and returns any applicable warnings or errors if the format is unrecognized.
-
validate(
String address, {bool strict = false}) → bool
Exceptions / Errors
- ExtractRoutingException
- Exception thrown when the routing input is fundamentally malformed.
- StellarAddressException