URI Resolver
Resolves SRC47 compliant URIs via Signums Alias system to URLs, or other internal fields
const resolver = new URIResolver(ledger);const resolvedURL = await resolver.resolve("http://arts.johndoe@signum"); Copy
const resolver = new URIResolver(ledger);const resolvedURL = await resolver.resolve("http://arts.johndoe@signum");
with TLD
const resolver = new URIResolver(ledger);const resolvedURL = await resolver.resolve("https://arts.johndoe@crypto"); Copy
const resolver = new URIResolver(ledger);const resolvedURL = await resolver.resolve("https://arts.johndoe@crypto");
Or get the account Id (if set)
const resolver = new URIResolver(ledger);const accountId = await resolver.resolve("https://arts.johndoe@signum/ac"); Copy
const resolver = new URIResolver(ledger);const accountId = await resolver.resolve("https://arts.johndoe@signum/ac");
Also considers known top-level domains and accepts the following format for those URIs: .. (instead of @)
@
Tries to resolve the URI
A compliant URI
The URL or internal path, iff exists.
Error if
Static
Converts the given URI to a known top-level domain (TLD) format.
The URI to be converted.
Parses the URI. This method can be used to check SRC47 URI compliance
The parsed URI components
Error if URI is not compliant
URI Resolver
Resolves SRC47 compliant URIs via Signums Alias system to URLs, or other internal fields
with TLD
Or get the account Id (if set)
Also considers known top-level domains and accepts the following format for those URIs:.. (instead of
@
)