StellarTomlResolver

StellarTomlResolver

StellarTomlResolver allows resolving stellar.toml files.

Constructor

new StellarTomlResolver()

Source:

Methods

(async, static) resolve(domain, optsopt) → {Promise}

Returns a parsed stellar.toml file for a given domain.

StellarSdk.StellarTomlResolver.resolve('acme.com')
  .then(stellarToml => {
    // stellarToml in an object representing domain stellar.toml file.
  })
  .catch(error => {
    // stellar.toml does not exist or is invalid
  });
Source:
See:
Parameters:
Name Type Attributes Description
domain string

Domain to get stellar.toml file for

opts object <optional>

Options object

Name Type Attributes Description
allowHttp boolean <optional>

Allow connecting to http servers, default: false. This must be set to false in production deployments!

timeout number <optional>

Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.

Returns:
Type:
Promise

A Promise that resolves to the parsed stellar.toml object