SEP-1

Every anchor must define a stellar.toml file to describe the anchors’s supported assets, any validators that are run, and other meta data.

Configuration

Simply add the SEP to your POLARIS_ACTIVE_SEPS list in settings.py:

POLARIS_ACTIVE_SEPS = ["sep-1", "sep-10", ...]

Integrations

Static files should be served by a professional-grade static file server in production. Specifically, anchors’ static file server should be configured to serve the SEP-1 TOML file at the .well-known/stellar.toml path. However, if the web server is not configured to serve the TOML file, Polaris provides two approaches for defining a stellar.toml file.

Rendering a Static TOML

If defined, Polaris locates an anchor’s stellar.toml file under the app’s static/polaris directory. For example, the SDF’s reference server takes this approach.

Anchors can also add a local-stellar.toml file for Polaris to use when LOCAL_MODE is True.

Rendering a Dynamic TOML

If no static stellar.toml file is defined, Polaris uses the registered TOML function. Polaris provides default attributes, but anchors must augment or replace them in order to fully support the SEP services activated on the Polaris server.

polaris.integrations.get_stellar_toml()[source]

Replace this function with another by passing it to register_integrations() as described in Registering Integrations.

The dictionary returned will be merged with Polaris’ default attributes and serialized using the toml.dumps() function. The output will be rendered in the HTTP response.

The base attributes provided by Polaris are:

  • ACCOUNTS
  • VERSION
  • SIGNING_KEY
  • NETWORK_PASSPHRASE
  • TRANSFER_SERVER
  • TRANSFER_SERVER_0024
  • KYC_SERVER
  • DIRECT_PAYMENT_SERVER

The contents of the dictionary returned will overwrite the default matching key values.

Returns:a dictionary of SEP-1 attributes