feat(signing): add Cosmos SIGN_MODE_DIRECT support #693
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
Add SDK support for signing Cosmos SDK transactions using the SIGN_MODE_DIRECT protobuf encoding and legacy Amino JSON.
signCosmos()API function (supports SIGN_MODE_DIRECT and legacy Amino JSON)COSMOS_DERIVATIONpath (m/44'/118'/0'/0/0)🔧 Context / Implementation
This adds Cosmos signing support to the SDK’s generic signing flow by introducing a new encoding type and derivation path, plus a dedicated API helper that accepts both protobuf SignDoc and Amino JSON payloads. The e2e test suite exercises common Cosmos message types and skips when the connected firmware does not advertise COSMOS encoding support (requires v0.18.10+).
🧪 Test Plan
pnpm --filter gridplus-sdk run buildCI=1 DEBUG_SIGNING=1 baseUrl=http://127.0.0.1:3000 DEVICE_ID=SD0001 PASSWORD=12345678 PAIRING_SECRET=12345678 ENC_PW=12345678 APP_NAME=lattice-manager pnpm --filter gridplus-sdk run e2e-sign-cosmos🖼️ Screenshots (if applicable)