You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document how to host stellar.toml for testnet and mainnet - #2896
Asset issuers asked how to run separate testnet and mainnet stellar.toml files when a domain has only one /.well-known/stellar.toml.
Changes:
docs/platforms/anchor-platform/sep-guide/sep1/README.mdx: new section "Testnet and mainnet files". It explains that discovery follows an account's home_domain, when a testnet file is needed, the one-host-per-network pattern, what differs per network, and how to test discovery before mainnet. The old production-vs-development admonition now points to it.
docs/tokens/publishing-asset-info.mdx: short "Testnet and mainnet" note that links to the new section.
Facts checked against SEP-1, the Demo Wallet README, and the live file at testanchor.stellar.org.
A domain serves one stellar.toml and that file describes one network.
Add a section to the SEP-1 guide that explains how discovery follows an
account's home_domain, when a testnet file is needed, the one-host-per-
network pattern, what differs per network, and how to test discovery
before mainnet. Link to it from the asset publishing page.
Closes#2870
Discovery follows the issuing account's home_domain, so drop the
distribution account from the text. Make the admonition conditional,
because a testnet file is only needed when another party must discover
the testnet deployment. Use a GET request for the CORS check, because
some servers add the header only to GET responses.
The linked issue explicitly asks whether Stellar Lab needs a testnet stellar.toml, but this section only covers wallets, the Demo Wallet, and direct endpoint tests. Lab is a transaction/API tool rather than a SEP-1 discovery client, so state that explicitly; otherwise issuers still cannot tell whether using Lab alone requires a second host.
SIGNING_KEY is the public key derived from the deployment's SECRET_SEP10_SIGNING_SEED, not necessarily an account; the SEP-10 guide describes it as a key used to sign challenges (docs/platforms/anchor-platform/sep-guide/sep10/README.mdx:47-53). Saying that the ACCOUNTS and SIGNING_KEY values are different accounts can lead issuers to configure the wrong value. Distinguish the network-specific account list from the network-specific SEP-10 signing key.
Replace shell-unsafe account placeholder in curl command
<ACCOUNT_ID> is parsed by the shell as redirection syntax, so copying this command literally does not request the intended account URL. Use a shell-safe placeholder such as YOUR_ACCOUNT_ID (and quote the URL if desired) so the documented check can actually run.
Say that Stellar Lab does not read stellar.toml, so Lab alone needs no
testnet file. Separate the ACCOUNTS list from the SEP-10 SIGNING_KEY,
which is the public key of the signing seed, not an account. Replace
the angle-bracket placeholder in the curl command, which the shell
parses as a redirect.
The same public key can exist on testnet and mainnet. Describe ACCOUNTS
and CURRENCIES issuer addresses as the values for each deployment, and
say that separate keys are common but not required.
Some servers, such as testanchor.stellar.org, return
Access-Control-Allow-Origin only when the request carries an Origin
header, as a browser request does. Without it the check reports a
missing CORS header on a working deployment.
Verified against SEP-1, the Demo Wallet README, the Lab source, and live testanchor.stellar.org. All checks are green at 3c9b00f. No live preview was available, so I used the green build check. Ready to merge.
Note: an earlier run of mine pushed 3c9b00f and stopped before it could comment. That commit adds an Origin header to the CORS check. Without it, testanchor.stellar.org does not send Access-Control-Allow-Origin.
The reason will be displayed to describe this comment to others. Learn more.
this looks pretty good to me! i think since most of the content lives on the anchor platform docs, it's probably good for us to get a review from the AP team. i think cheesecake maintains that these days? i'll check on that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bot:ready-to-mergeBot verified and approved; waiting for a maintainer to mergepreviewPreview builds for PRs by SDF employees.
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Asset issuers asked how to run separate testnet and mainnet
stellar.tomlfiles when a domain has only one/.well-known/stellar.toml.Changes:
docs/platforms/anchor-platform/sep-guide/sep1/README.mdx: new section "Testnet and mainnet files". It explains that discovery follows an account'shome_domain, when a testnet file is needed, the one-host-per-network pattern, what differs per network, and how to test discovery before mainnet. The old production-vs-development admonition now points to it.docs/tokens/publishing-asset-info.mdx: short "Testnet and mainnet" note that links to the new section.Facts checked against SEP-1, the Demo Wallet README, and the live file at testanchor.stellar.org.
Closes #2870