docs(midnight): bring the SDK readme up to the AltVM template - #55
Merged
Conversation
The midnight-sdk readme was nine lines, against 43-83 for every sibling AltVM SDK, and it claimed 'warp deploy' works on Midnight. It does not: the token logic lives inside the core contract, so a warp deploy targets the counterpart chain and references the Midnight end as a foreignDeployment. The contracts repository said so and the two disagreed. Now follows the same shape as aleo-sdk and radix-sdk - identity, install, usage, setup - plus the environment-variable section aleo-sdk has and this package needs more of, since proving is local and needs both a proof server and the compiled Compact artifacts on disk. Records midnightNetworkId, which is mandatory (signing throws without it) and appeared in no documentation anywhere, and that gatewayUrls is the read path for all chain state. Also adds midnight to the CLI readme's two supported-protocol lists, which omitted a protocol the code already accepts, and corrects the pre-commit Rust commands in AGENTS.md and CLAUDE.md: CI runs them with the midnight feature, so as written nothing behind that feature flag was ever compiled locally. Adds hyperlane-midnight to the chain-crate table.
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.
The
midnight-sdkreadme was nine lines. Every sibling AltVM SDK readme is 43-83, and they all follow one template: identity sentence,## Install,## Usagewith a runnable snippet,## Setup. This brings ours onto it.It also said something wrong
The old readme advertised
warpdeployas working. It does not: Midnight has no cross-contract calls, so the token logic lives inside the core contract and the route is created bycore deploy. A warp deploy targets the counterpart chain and references the Midnight end as aforeignDeployment. The implementation repo said so, and the two documents disagreed.What is new
Beyond the template, an
## Environment variablessection —aleo-sdkis the only sibling with one, and this package needs it more, because proving happens locally and needs both a proof server and the compiled Compact artifacts on disk. Two items in it were documented nowhere at all:midnightNetworkIdis mandatory. Signing throws without it. It is in no schema, so nothing validates its presence for you.HYPERLANE_MIDNIGHT_CONTRACTSmust be exported before building this package, not just before using it. Unset, the build copies artifacts from whatever sibling checkout it finds, and the packaged fallback carries verifier keys only — so proving fails at run time rather than at build time.Also records that
gatewayUrlsis the read path for all chain state, which is the difference most likely to bite someone wiring a chain entry for the first time.Beyond the SDK readme
midnightadded to the CLI readme's two supported-protocol lists. Both omitted a protocol the code already accepts, sohyperlane address to-bytes32 -p midnightworks today but is undocumented.AGENTS.mdandCLAUDE.mdare corrected to include themidnightfeature. CI already runs them that way; as written, nothing behind that feature flag was ever compiled locally, so a contributor could not reproduce CI.hyperlane-midnightadded to the chain-crate table.Changeset included.