Thanks for your interest in contributing! This document covers the bits that aren't obvious from the code — primarily how the types are generated and our release flow.
pnpm install
pnpm build
pnpm lint
pnpm testpnpm install also installs the git hooks in .githooks/ (see Regenerating types).
The workflow in .github/workflows/main.yaml runs the linter, the build and the tests on every pull request and push to main.
tests/amino.test.ts checks wire compatibility with gno: tests/fixtures/amino.json holds messages encoded by gno's own amino codec, and the tests decode them, compare the result against gno's amino JSON, and re-encode them byte for byte. tests/exports.test.ts round-trips every exported message codec.
When syncing protos with a newer gno, regenerate the fixtures from that gno checkout (the command is at the top of tests/fixtures/generate/main.go) and extend the generator with any new messages.
The TypeScript sources under src/ are generated from the .proto files under protos/ with ts-proto. Do not edit them by hand.
pnpm codegenThis requires protoc to be installed and available on your PATH, at the version pinned in .github/workflows/codegen.yaml (currently 33.4). protoc's version is written into every generated file's banner and it supplies the well-known types under google/protobuf/, so a different protoc rewrites src/ even when no proto changed. Upgrading it is a deliberate change that regenerates the sources along with it.
You rarely need to run this by hand: pnpm install points core.hooksPath at .githooks/ (see scripts/install-hooks.mjs), and the pre-commit hook regenerates src/ and stages the result whenever a commit touches protos/, scripts/generate.sh or scripts/addIndices.js. Commits that touch nothing else skip it, so they pay no cost. Use git commit --no-verify to bypass it for one commit — but regenerate before opening a pull request, because CI checks it.
The Codegen job in .github/workflows/main.yaml regenerates the sources with the pinned protoc and fails if the result differs from what is committed, so generated code cannot drift from the protos it came from even if the hook was never installed.
Only the protos under the ROOTS listed in scripts/generate.sh (gno, ibc, tendermint, tm) are generated; ts-proto also emits every proto they import. The other directories under protos/ (cosmos, gogoproto, google, ...) hold just those dependencies, so when adding a proto, copy in only the files it imports.
The gno protos under protos/gno/ mirror the amino-generated protos in the gno repository (e.g. tm2/pkg/std/std.proto, gno.land/pkg/sdk/vm/vm.proto), adapted to this package's proto packages and friendlier message names (e.g. m_call → MsgCall). When syncing with gno, keep field numbers and types identical to upstream.
Versioning, changelog generation, git tagging, and npm publishing are all driven by Changesets. You should not edit CHANGELOG.md, bump the version in package.json, or run npm publish by hand.
Any PR that affects the published package must include a changeset. PRs that only touch internal tooling (CI, contributor docs) do not need one.
From the repo root:
pnpm changesetThe CLI will prompt you to:
- Pick a bump type —
patchfor bug fixes,minorfor backwards-compatible features (e.g. new messages or fields),majorfor breaking changes (e.g. renamed or removed messages). Follow Semantic Versioning. - Write a short summary. The summary becomes the bullet point in the published changelog, so write it for end users — describe the user-facing change, not the implementation. Markdown is supported.
This creates a Markdown file under .changeset/ (e.g. .changeset/quiet-pandas-jump.md). Commit it as part of your PR.
If you forget, you can also create the file manually:
---
"@gnolang/gno-types": patch
---
Short, user-facing description of the change.The Release GitHub Actions workflow (.github/workflows/release.yaml) runs on every push to main:
- If there are pending changesets in
.changeset/, the workflow opens (or updates) a PR titled "chore: version packages". That PR consumes the changesets, bumpspackage.json, and writes the new entries intoCHANGELOG.md. - When that PR is merged, the workflow runs again, sees no pending changesets, and instead builds the package, publishes it to npm, and pushes a git tag for the new version.
In short: you write the changeset, the bot does the rest. Maintainers review the version PR like any other PR before merging.
# Add a changeset interactively
pnpm changeset
# See which changesets are pending and what version bump they imply
pnpm changeset:status
# Apply pending changesets locally (bumps package.json, updates CHANGELOG.md, deletes consumed changesets).
# You normally don't run this manually — the release workflow does it via the version PR.
pnpm version:packages
# Build and publish to npm. Also bot-only in normal flow.
pnpm releaseThe release workflow publishes with npm trusted publishing (OIDC) and provenance, so no npm token is stored in the repository. @gnolang/gno-types must have gnolang/gno-types with the release.yaml workflow configured as a trusted publisher on npmjs.com. GITHUB_TOKEN is provided automatically.
Versions 1.0.0 through 1.0.8 predate this workflow and were released manually. From the next release onward, the changelog is generated by Changesets.
- Keep PRs focused — one logical change per PR.
- Run
pnpm lint,pnpm buildandpnpm testbefore pushing. - Include a changeset (see above) unless your change does not affect published output.