feat(hive): Hive blockchain integration — firmware through txbuilder#187
Merged
Conversation
Points modules/keepkey-firmware to the feature/hive branch which adds Hive blockchain signing support (HiveGetPublicKey, HiveSignTx). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Points to BitHighlander/device-protocol@f2b32d8 which adds messages-hive.proto with HiveGetPublicKey/HiveSignTx/HiveSignedTx (wire IDs 1600-1603).
…build pipeline
- chains.ts: add HIVE to chainFamily union, CONFIGS entry (BIP44 m/44'/1275'/0'/0/0,
color #E31337, hiveGetPublicKey/hiveSignTx), and CAIP/networkId/decimal fallbacks
(hive:beeab0de/slip44:1275, decimals 3) since pioneer-caip PR not yet published
- index.ts: fix address extraction to check result?.publicKey for Hive (hiveGetPublicKey
returns { publicKey: 'STM...' } not { address: '...' })
- Makefile: add DEVICE_PROTOCOL_BUILD_STAMP — auto-builds device-protocol on make dev/install
- modules/device-protocol: bump to feature/hive (adds messages-hive.proto to build:js,
drops broken build:json which pbjs v0.0.5 cannot parse with reserved fields)
POST /addresses/hive: derives STM-prefixed public key via hiveGetPublicKey,
caches result, returns { address: 'STM6...' }. Requires firmware v7.14.0+.
- txbuilder/hive.ts: buildHiveTransfer (fetches tx-params + resolves STM key → account name via Pioneer in parallel) and broadcastHiveTx (POSTs signed tx to Pioneer /api/v1/hive/broadcast with reassembled JSON body) - txbuilder/index.ts: wire case 'hive' into buildTx / signTx / broadcastTx; add pioneerBaseUrl param so custom Pioneer URLs flow through to txbuilder - index.ts: fix fromAddress extraction for hiveGetPublicKey (returns publicKey not address); pass getPioneerApiBase() to buildTx - rest-api.ts + swagger.json: GET /api/pioneer/status and POST /api/pioneer/url endpoints for switching Pioneer backend at runtime
4 tasks
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
Full Hive blockchain integration from firmware proto through transaction builder. All API verification checkpoints pass with device connected on feature/hive firmware.
Layer 0 — device-protocol (
feature/hivebranch, submodule pinned):messages-hive.protowith wire IDs 1600–1603build:js; excluded frombuild:json(pbjs v0.0.5 can't parsereservedfields)Layer 1 — Firmware (
feature/hivebranch, submodule pinned):lib/firmware/hive.c,fsm_msg_hive.h,include/keepkey/firmware/hive.hm/44'/1275'/0'/0/0Layer 2 — hdwallet (
fork/feature/hiveSHAadee5155):hdwallet-core/src/hive.ts—HiveGetPublicKey,HiveSignTx,HiveSignedTxinterfaceshdwallet-keepkey/src/hive.ts— protobuf shims + transport (returns{publicKey: 'STM...'})Layer 4 — Vault:
chains.ts—chainFamily: 'hive', CONFIGS entry, CAIP/networkId/decimal fallbacksindex.ts—publicKeyfallback in address extraction,pioneerBaseUrlpassed to txbuildertxbuilder/hive.ts—buildHiveTransfer(Pioneer tx-params + account lookup) +broadcastHiveTxrest-api.ts+swagger.json—/addresses/hive,/api/pioneer/status,/api/pioneer/urlMakefile— device-protocol build stampAPI verification (all pass with feature/hive firmware)
hive:beeab0deinsupportedChains— ✅/addresses/hivereturnsSTM6...key — ✅hive:beeab0decorrect — ✅minFirmwaregate excludes chain when no device — ✅What's next (before merge)
buildHiveTransferthrows helpful error if no on-chain account; send UI needs to surface this clearly vs a generic errorChain.Hive/ CAIP fallbacks can be removedTest plan
GET /addresses/hivereturnsSTM6...minFirmwaregate: chain absent fromsupportedChainswhen no device connected/api/pioneer/urlswitches backend at runtime; persists across restartbuildHiveTransferthrows "No Hive account" for a fresh key (no on-chain account)