Files
wallet/crates
grenadeandClaude Opus 5.5 7ddab3ebda
ci / gate (push) Failing after 1m22s
feat(near): wallet-near, shared with the sponsor, with NEP-366 delegate actions
The sponsor (#81) relays each wallet's NEAR legs as meta-transactions, so
it encodes, decodes and verifies the same bytes the wallet signs. Rather
than a second implementation in the observer, the NEP-649 key and the
transaction encoder move out of wallet-data into wallet-near: no I/O, no
dependency on wallet-core, a raw 64-byte seed in and its own error type.

New in it is delegate.rs:
- DelegateAction signs over SHA-256 of NEP-461's prefix (2^30 + 366)
  and its borsh, as nearcore 2.13's classic Delegate action (tag 8)
  wants.
- SignedDelegate::decode is the sponsor's side. It accepts only the
  shapes the wallet sends (function calls and transfers, from an
  ML-DSA-65 key) and refuses anything else, trailing bytes included.
- verify checks the signature under the empty context.
- A relayer wraps the result as Action::Delegate.

An ML-DSA-65 delegate action, relayed, was proven on mainnet once,
outside the repo: 2SVwJsa1seKQHvAJ2JCzaBvAq8cLfJSPJtppxkr9ahK4.

Refs #81, #74

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUx7SPonBnB3ofU4mH41WT
2026-10-09 13:31:41 +03:00
..