Skip to content

feat(lexe): expose authenticated client grants through native bridge - #59

Open
ntheile wants to merge 2 commits into
masterfrom
lexe-connect-poc
Open

ntheile wants to merge 2 commits into
masterfrom
lexe-connect-poc

Conversation

@ntheile

@ntheile ntheile commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

https://github.com/ZapriteApp/app-to-app-authorization

Summary by CodeRabbit

  • New Features

    • Added authenticated credential inspection through getClientInfo().
    • Exposes credential type, client identity, optional label, timestamps, scopes, permissions, and effective permissions.
    • Supports checking credential authorization details and expiration status.
  • Documentation

    • Documented credential inspection requirements, validation practices, fail-closed handling, and SDK compatibility.
    • Clarified that general permission checks do not confirm credential authorization.
  • Tests

    • Added coverage for successful credential inspection, returned grant details, and error propagation.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 534cb2fa-6e4c-4b30-85c2-9618eaf85ef4

📥 Commits

Reviewing files that changed from the base of the PR and between 3b10f14 and 5b197b7.

⛔ Files ignored due to path filters (1)
  • bindings/react-native-lexe/src/generated/react_native_lexe.ts is excluded by !**/generated/**
📒 Files selected for processing (5)
  • bindings/react-native-lexe/rust/src/lib.rs
  • bindings/react-native-lexe/src/LexeLniNode.ts
  • bindings/react-native-lexe/src/__tests__/LexeLniNode.test.ts
  • crates/lni/lexe/api.rs
  • crates/lni/lexe/lib.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • bindings/react-native-lexe/src/tests/LexeLniNode.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds authenticated client authorization inspection to the Lexe Rust API and React Native binding. It returns credential identity, timestamps, scopes, permissions, and effective permissions, with integration tests and usage documentation.

Changes

Authenticated client inspection

Layer / File(s) Summary
Lexe client info API
crates/lni/Cargo.toml, crates/lni/lexe/*, crates/lni/lib.rs
The Lexe dependency is updated to 0.1.23. The API maps wallet client authorization data into LexeClientInfo, exposes it through LexeNode, re-exports the type, and adds integration coverage.
React Native client info binding
bindings/react-native-lexe/rust/src/lib.rs, bindings/react-native-lexe/src/LexeLniNode.ts
The native and TypeScript bindings expose getClientInfo(). The TypeScript method converts optional timestamps and copies scopes and permission arrays.
Client info validation and documentation
bindings/react-native-lexe/src/__tests__/LexeLniNode.test.ts, bindings/react-native-lexe/README.md
Tests cover read-only grant inspection and error propagation. The README documents the returned fields, validation requirements, SDK version, and rebuild requirement.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ReactNativeApp
  participant LexeLniNode
  participant NativeLexeNode
  participant LexeWallet
  ReactNativeApp->>LexeLniNode: getClientInfo()
  LexeLniNode->>NativeLexeNode: get_client_info()
  NativeLexeNode->>LexeWallet: client_info()
  LexeWallet-->>NativeLexeNode: credential identity and grants
  NativeLexeNode-->>LexeLniNode: ClientInfo
  LexeLniNode-->>ReactNativeApp: LexeClientInfo
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: exposing authenticated client grant information through the native bridge.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.98.0)

Clippy execution timed out


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-19T00:49:34.759900Z 3b10f14 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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