Repository navigation
Conversation
- Every operator field left unset by SEP1_OPERATOR now goes into missing with the reason to set it there, instead of silently staying a placeholder. - The operator can set code, name and status in the JSON file, overriding the chain value and the kit's test/live default; an over-limit chain value with no override names SEP1_OPERATOR as the fix. - parseOperatorValues rejects arrays, empty strings, an unknown anchor_asset_type, an ORG_URL without https://, and an over-limit or unknown code/name/status. - U+007F is escaped; a lone surrogate in any value throws, naming the field. - An empty proof_uri leaves attestation_of_reserve open instead of publishing a blank link; the report's expiry is threaded through as expiresAt. - The generated file gets a short header; the template keeps the longer one, since it is the renderer's output with no inputs at all. - Dropped a comment restating the next function and one claiming SEP-1 derives status from the network, which is the kit's own default.
SEP1_OPERATOR now resolves against INIT_CWD, the directory npm was called from, the same way extend-target.ts resolves --config; before this, the README's own example broke when run from the repo root. The command now reads and checks the operator file before connecting to the chain, so a bad path or malformed JSON is reported without a wasted round trip, and names the file on a syntax error. It also prints a warning when the oracle's latest report has expired, instead of publishing an expired attestation with no sign of it.
- Name the deployment record and keys file the command needs, say it writes a whole file, and the operator keys list now covers the new code/name/status overrides with an updated JSON example. - A domain already serving a stellar.toml must merge the share's currency entry in, instead of publishing the generated file as is. - State plainly that SEP-1 links a domain to an account through its home_domain, and a SEP-41 contract has none, so this is unsettled. - TESTING.md: drop a phrase no test covers, split the wallet-parse test into its own row, and add the sep1-reads and sep1-operator test rows. - Regenerate the testnet example with the new short header; the template is unchanged, since the renderer's empty output did not change.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #432
Refs #450
Wallets and explorers read an issuer's
stellar.toml(SEP-1) to show who issues a token and what backs it. The kit is a template, so it cannot publish one file for every operator. This adds a template and a harness command that fills it in from a deployment: the operator regenerates it after each attestation, soattestation_of_reservealways points at the latest proof.Changes
scripts/harness/lib/stellar-toml.ts: a pure renderer. It turns the chain values and the operator's values into SEP-1 v2.7.0 TOML, and lists every field still open with the reason.npm run sep1 -w scripts/harness: reads the share token's name, symbol and decimals, the network passphrase, the oracle's latest report and the SEP-40 feed from the deployment record, and writesscripts/harness/stellar.<network>.toml(git-ignored). It only reads.SEP1_OPERATOR, so a regeneration never overwrites them. The file is checked before any network call; an unknown key, an empty value, ananchor_asset_typeoutside SEP-1's list or anORG_URLwithouthttps://is refused, naming the key.docs/sep1/stellar.template.toml: the renderer's output with every field open. A test keeps the two in sync.docs/sep1/stellar.testnet.toml: an example generated from the testnet deployment, operator fields still open.Deviations
statusdefaults toliveon the public network andtestelsewhere. The operator can setcode,nameandstatusin the operator file; a chain value past a SEP-1 limit stays open until they do.attestation_of_reserve, and the command prints a warning.Acceptance criteria
stellar.tomltemplate in the repository, with every operator field markedcontractset for the share token,attestation_of_reserveset to the latestproof_uri)Test plan
Automated tests
NoRecordversus any other refusal), and the template staying in sync. The SEP-1 check serves each rendered file over local HTTP and parses it with the SDK'sStellarToml.Resolver, the same code wallets use.npm run lint,format:check,typecheck: pass.sep1right afterdeploylistsattestation_of_reserveas open; aftertest:happy-pathit fills it with the latest report.Manual verification
HARNESS_NETWORK=testnet npm run sep1 -w scripts/harness(reads only) produceddocs/sep1/stellar.testnet.toml.Breaking changes
None.
Checklist
Screenshots
None.