Skip to content

feat(rust): add hosted authorization-lock support - #79

Merged
edo-chan merged 4 commits into
mainfrom
codex/developer-rust-auth-locks
Nov 9, 2026
Merged

edo-chan merged 4 commits into
mainfrom
codex/developer-rust-auth-locks

Conversation

@edo-chan

@edo-chan edo-chan commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Adds the missing Rust hosted authorization-lock API: typed add/remove preparation, current-slot lock reads, and decoding the existing role permission. This is stacked on #66, which contains TypeScript and Python support.

The expiry enum makes callers choose duration or absolute expiry. Requests preserve u64 values as decimal strings; reads validate integer widths, activity, ordering, and lock counters. Preparations preserve signature requests and ParticipantSet approval plans and recognize the current wire kinds 10/11.

Native k1 signing handles the hosted lock API's exact EIP-191 prefix at the 88/16-byte instruction offsets. Raw k1 SignV2 behavior is preserved. Real k1/r1 tests reconstruct the canonical message from serialized arguments, account flags and replay fields, verify signatures, and reject changed lock arguments. Lock permission grants remain in the Protocol SDK because the current hosted add-role contract does not accept that permission.

Draft only, as requested. No CI changes, merges, package publication, or deployment. The existing Rust workflow runs formatting, tests, Clippy, and package verification; its configuration is unchanged. These hosted APIs require portal #1170 and the auth-lock program, but do not depend on Rust Protocol SDK publication.

Validation:

  • Full Rust workspace tests passed: 429 library tests plus public API tests.
  • cargo +1.96.1 clippy --workspace --all-targets --locked -- -D warnings and formatting passed.
  • Cargo package verification and an external consumer of the extracted crate passed.
  • Independent review identified the k1 prefix, unsupported grant, and r1 fixture issues; all corrected. Final review at cde0173 found no remaining blockers and independently passed 31 focused tests.

@edo-chan
edo-chan changed the base branch from feat/authorization-locks to main November 9, 2026 15:19
@edo-chan
edo-chan marked this pull request as ready for review November 9, 2026 15:21
@edo-chan
edo-chan merged commit 44912ea into main Nov 9, 2026
1 check passed
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.

1 participant