Skip to content

Conversation

@yilmazbahadir
Copy link
Collaborator

@yilmazbahadir yilmazbahadir commented Dec 30, 2025

Summary

Add SDK support for signing Cosmos SDK transactions using the SIGN_MODE_DIRECT protobuf encoding and legacy Amino JSON.

  • Add signCosmos() API function (supports SIGN_MODE_DIRECT and legacy Amino JSON)
  • Add COSMOS encoding type (requires firmware v0.18.10+)
  • Add COSMOS_DERIVATION path (m/44'/118'/0'/0/0)
  • Add e2e tests for Cosmos signing

🔧 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

  1. pnpm --filter gridplus-sdk run build
  2. CI=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
  3. Expected result: build succeeds; Cosmos e2e tests pass or are skipped if firmware < v0.18.10

🖼️ Screenshots (if applicable)

Before After

Add SDK support for signing Cosmos SDK transactions using the
SIGN_MODE_DIRECT protobuf encoding.

Add signCosmosDirect() API function
Add COSMOS encoding type (requires firmware v0.18.10+)
Add COSMOS_DERIVATION path (m/44'/118'/0'/0/0)
Add e2e tests for Cosmos signing
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 21, 2026

Open in StackBlitz

npm i https://pkg.pr.new/GridPlus/gridplus-sdk@693

commit: f21a85f

@yilmazbahadir yilmazbahadir marked this pull request as ready for review January 21, 2026 10:15
Expose signCosmos as the SDK helper and update Cosmos e2e tests.
Document that COSMOS encoding requires firmware v0.18.10+.
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.

2 participants