signMessage drops the COSE_Key, producing an incomplete CIP-30 DataSignature
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- typescript
- 领域
- api
调研方向
阅读 packages/evolution/src/sdk/client/internal/Signing.ts signMessage 和 packages/evolution/src/sdk/wallet/Wallet.ts SignedMessage,然后将它们与 packages/evolution/src/cose/SignData.ts 进行比较。为 wallet.signMessage 和 verifyData 添加回归测试,并验证返回的结果应包含 COSE_Key,且两种 wallet API 路径的验证都应成功。
由索引模型根据 Issue 内容生成。
描述
Summary
CIP-30 signData returns a DataSignature of { signature, key }, where key is the CBOR-encoded COSE_Key needed to verify the signature. SignData.signData produces both, but the wallet's signMessage returns only { payload, signature } and drops the key, and the SignedMessage interface has no key field. A consumer therefore cannot verify a message signed via the wallet API without obtaining the public key some other way, which breaks self-contained CIP-30 verification. No security impact: the dropped value is a public key, so nothing is leaked or made forgeable — it is a functional / spec-compliance gap.
Affected
packages/evolution/src/sdk/client/internal/Signing.ts
- signMessage (L363-381): returns
{ payload, signature }at L380, droppingsigned.key
packages/evolution/src/sdk/wallet/Wallet.ts
- SignedMessage interface (L37-39): has payload + signature, no
key
contrast: packages/evolution/src/cose/SignData.ts SignedMessage (L39-41) already carries { signature, key }
Fix
Add a key field to the wallet SignedMessage interface and return Bytes.toHex(signed.key) from signMessage. Ensure the CIP-30 api-wallet path carries the key through as well, so both wallet types return a complete DataSignature.
Regression test
- given: a message signed via
wallet.signMessage - before fix: result has no
keyfield;verifyDatacannot be called without externally supplying the public key - after fix: result includes the COSE_Key hex, and
verifyData(address, keyHash, payload, { signature, key })verifies
Must FAIL on main today and PASS after the fix.
Reference
Reported informally (signMessage drops COSE_Key). Standard basis: CIP-30 DataSignature = { signature, key }.
- 主要语言
- TypeScript
- 星标
- 22
- 派生
- 33
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 44
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
IntersectMBO/evolution-sdk 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
IntersectMBO/evolution-sdk#559 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
IntersectMBO/evolution-sdk#557 ·
维护者通常 1 天内回复
-
dependencies good first issue
难度 1/5 1 小时以内 新手友好度 93/100
IntersectMBO/evolution-sdk#541 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
IntersectMBO/evolution-sdk#518 ·
维护者通常 1 天内回复
-
enhancement external-review
难度 2/5 1-3 小时 新手友好度 84/100
IntersectMBO/evolution-sdk#456 · 1 条评论 ·
维护者通常 1 天内回复
查看 IntersectMBO/evolution-sdk 的全部 Issue
相似的 Issue
-
priority:high
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
immich-app/immich#32426 ·
维护者通常 1 天内回复
-
documentation good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
libredb/libredb-studio#1756 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复