Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit deletes several obsolete Pulsar API files, including genesis.pulsar.go, packet.pulsar.go, params.pulsar.go, query.pulsar.go, and tx.pulsar.go, as part of the ongoing cleanup and refactoring efforts. These files are no longer needed and their removal helps streamline the codebase.
This commit introduces a new command, `mcp`, to the BitBadges CLI, allowing users to directly invoke session builder tools without the MCP protocol. The command supports various operations, including listing and calling session builders, and requires Node.js with the bitbadges-cli installed. Additionally, the `.gitignore` file has been updated to correctly ignore the `bitbadgeschaind` directory.
This was referenced Apr 13, 2026
Tracks the bitbadgesjs-sdk and bitbadges-cli rename — the JS CLI's
top-level subcommand is now `bitbadges-cli builder …`, so the chain
binary's cobra delegation follows suit. One commit, one file rename,
one registration update.
Scope:
- cmd/bitbadgeschaind/cmd/mcp_cmd.go → builder_cmd.go
- McpCmd() → BuilderCmd()
- Cobra Use: "mcp [args...]" → "builder [args...]"
- execNodeCLI("mcp", args) → execNodeCLI("builder", args)
- Short/Long descriptions and example blocks rewritten
- commands.go registration line
Verified: `go build -tags=test ./cmd/bitbadgeschaind` clean,
`bitbadgeschaind builder --help` forwards the full JS subcommand tree.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…isting Both tools were removed from the SDK registry — review_collection replaces them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ckage
The BitBadges SDK has been renamed on npm: 'bitbadgesjs-sdk' → 'bitbadges'.
The chain binary delegates sdk / api / builder subcommands to the Node
bitbadges-cli via npx; this updates the subprocess args and all user-facing
install instructions to reference the new package name.
- cmd/bitbadgeschaind/cmd/node_cli.go: npx subprocess args
'npx -p bitbadgesjs-sdk bitbadges-cli' → 'npx -p bitbadges bitbadges-cli';
install hint in the 'SDK CLI not available' error message
- cmd/bitbadgeschaind/cmd/{sdk,api,builder}_cmd.go: command help text
'npm install -g bitbadgesjs-sdk' → 'npm install -g bitbadges'
- install.sh: 3 install commands (bun + npm) + help text
- .github/workflows/release.yml: CI install command
Filesystem path references in _docs/ left unchanged (package directory
remains packages/bitbadgesjs-sdk/ in the bitbadgesjs monorepo).
Verified: go build ./cmd/bitbadgeschaind/ clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: migrate CLI delegation + install instructions to 'bitbadges' package
The chain binary previously exposed three near-identical forwarder
commands (`sdk`, `api`, `builder`) each of which shelled out to the
Node.js bitbadges-cli with a hardcoded subcommand name. Every new
top-level bitbadges-cli subcommand (e.g. `config`, and the newly
shipped `burner` / `create-with-burner` under `builder`) required a
new `*_cmd.go` file and a commands.go registration — three near-copy
files growing unboundedly as the JS CLI grows.
Replace the three with a single generic forwarder:
bitbadgeschaind cli <subcommand> [args...]
`cli` is a cobra command with DisableFlagParsing and a trivial RunE
that pulls the first positional as the subcommand name and passes
the rest through execNodeCLI(). Any top-level bitbadges-cli subcommand
is now automatically reachable without a Go change:
bitbadgeschaind cli sdk review tx.json
bitbadgeschaind cli api tokens get-collection 1
bitbadgeschaind cli builder templates vault --backing-coin USDC
bitbadgeschaind cli builder create-with-burner --msg-file col.json --manager bb1...
bitbadgeschaind cli config set apiKey <key>
Changes:
- NEW cmd/bitbadgeschaind/cmd/cli_cmd.go — the generic forwarder
- DEL cmd/bitbadgeschaind/cmd/sdk_cmd.go
- DEL cmd/bitbadgeschaind/cmd/api_cmd.go
- DEL cmd/bitbadgeschaind/cmd/builder_cmd.go
- MOD cmd/bitbadgeschaind/cmd/commands.go — drop the three
aliases, register CliCmd() instead
- MOD x/tokenization/client/cli/help_links.go — update the
in-repo help footer from `bitbadgeschaind sdk docs messages`
to `bitbadgeschaind cli sdk docs messages`
Clean break, no deprecation layer. The short `sdk`/`api`/`builder`
forms shipped with earlier releases; anyone scripting against them
will need to prefix with `cli` on v30. Worth it — the alternative is
carrying three dead files forever and still having to add new ones.
External-repo migration (bitbadges-docs, bitbadges-frontend, any dev
docs that show example commands) deferred to a follow-up when v30
lands on main — updating those today would break users on the
current release where `cli` doesn't exist yet.
Verified: `go build ./...` and `go vet ./cmd/bitbadgeschaind/...`
both clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…me (#74) The x/badges module was renamed to x/tokenization in v23, but the migration that re-derives collection addresses with the new module name — and moves the corresponding bank balances — was never wired into any upgrade handler. Every existing mainnet collection still stores a mintEscrowAddress / cosmosCoinBackedPath.address / cosmosCoinWrapperPath.address derived from module="badges", while today's msg handlers and every downstream consumer derives with module="tokenization". The daily indexer consistency check surfaced this as a 16-field-per-collection drift across all 11 active collections on mainnet. This adds migrateCollectionAddressesFromBadgesToTokenization and hooks it into the existing MigrateCollections loop so v30 will: 1. For each collection, compute the legacy (badges) and new (tokenization) forms of mintEscrowAddress + cosmosCoinBackedPath.address + every cosmosCoinWrapperPath.address. 2. Move any bank balances from the old address to the new one via bankKeeper.SendCoins. No-op when balances are zero (common for fresh wrapper/backed paths that never held funds). 3. Flip the reserved-protocol-address flag from the old address to the new one so downstream lookups don't treat stale module addresses as reserved. 4. Overwrite the stored address on the collection so future queries return the tokenization-derived value. All steps are skipped when old == new, so re-running the migration (or running it on a chain that was created post-rename) is a no-op. Derivation helpers are direct ports of the ones in msg_server_universal_update_collection.go with a pluggable module name. Pairs with bitbadges-indexer#100 which mirrors chain-augmented fields in the handler + has a one-shot v29-patch migration to re-sync DB state from chain; after v30 runs, that migration will pick up the new addresses. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
Collaborator
Author
|
Superseded by #76. The files-changed view on this PR was stuck at 208 files / 63k+ additions because 8 of the 9 commits here had already landed on master directly (same SHAs), leaving GitHub's diff computation confused. Only the address-migration commit was really outstanding — it's been cherry-picked onto a clean branch off current master in #76 with a proper 1-file / +172-line diff. |
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
Tracking branch for the v30 chain upgrade. Long-lived, not ready to merge until the v30 hard fork. Opening as a PR so it shows up alongside the rest of the MCP-fold-in wave and so reviewers can follow the chain-side work.
Currently contains three commits on top of
master:feat: add MCP command for BitBadges Builder toolsAdds
bitbadgeschaind mcp— a cobra subcommand that delegates to the Node.jsbitbadges-cli mcptool via the existingexecNodeCLIbridge. Makes the 50+ MCP builder tools, resources, and session flow reachable directly from the chain binary. Pairs with:bitbadges-cli mcpsubcommand this delegates toAlso includes a
.gitignorefix — the previous rulebitbadgeschaind(no leading slash) matched any path component namedbitbadgeschaind, which silently ignored all new files undercmd/bitbadgeschaind/. Changed to/bitbadgeschaindso it only matches the built binary at repo root.chore: remove deprecated Pulsar API fileswip: v30 upgrade scaffoldingPre-existing scaffolding for the v30 upgrade — migrations,
x/tokenization/types/v29/proto copies for the upgrade handler, etc. Not authored as part of the MCP work; just what was already on the branch.Test plan
go build -tags=test ./cmd/bitbadgeschaindcleanbitbadgeschaind mcp list --names→ 51 tools (requiresbitbadges-clion PATH orBITBADGES_SDK_CLI_PATHset)bitbadgeschaind mcp call get_current_timestampround-trips through to the Node CLIbitbadgeschaind mcp resources list --uris→ 11 resourcesbitbadgeschaind mcp --helpforwards the full subcommand tree from the Node CLIStatus
WIP / tracking branch. Not for merge until the v30 upgrade is complete. Cross-referenced here so the MCP fold-in wave has a chain-side anchor.
🤖 Generated with Claude Code