Skip to content

docs(midnight): bring the SDK readme up to the AltVM template - #55

Merged
ctoyan merged 1 commit into
midnightfrom
docs/midnight-sdk-and-protocol-lists
Aug 26, 2026
Merged

docs(midnight): bring the SDK readme up to the AltVM template#55
ctoyan merged 1 commit into
midnightfrom
docs/midnight-sdk-and-protocol-lists

Conversation

@ctoyan

@ctoyan ctoyan commented Aug 26, 2026

Copy link
Copy Markdown

The midnight-sdk readme was nine lines. Every sibling AltVM SDK readme is 43-83, and they all follow one template: identity sentence, ## Install, ## Usage with a runnable snippet, ## Setup. This brings ours onto it.

It also said something wrong

The old readme advertised warp deploy as working. It does not: Midnight has no cross-contract calls, so the token logic lives inside the core contract and the route is created by core deploy. A warp deploy targets the counterpart chain and references the Midnight end as a foreignDeployment. The implementation repo said so, and the two documents disagreed.

What is new

Beyond the template, an ## Environment variables section — aleo-sdk is 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:

  • midnightNetworkId is mandatory. Signing throws without it. It is in no schema, so nothing validates its presence for you.
  • HYPERLANE_MIDNIGHT_CONTRACTS must 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 gatewayUrls is 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

  • midnight added to the CLI readme's two supported-protocol lists. Both omitted a protocol the code already accepts, so hyperlane address to-bytes32 -p midnight works today but is undocumented.
  • The pre-commit Rust commands in AGENTS.md and CLAUDE.md are corrected to include the midnight feature. 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-midnight added to the chain-crate table.

Changeset included.

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.
@ctoyan ctoyan self-assigned this Aug 26, 2026
@ctoyan
ctoyan merged commit 00586b4 into midnight Aug 26, 2026
3 of 7 checks passed
@ctoyan
ctoyan deleted the docs/midnight-sdk-and-protocol-lists branch August 26, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant