Add iris-ffi: native uniffi bindings, API-parallel to iris-wasm#26
Open
thomas-kroes wants to merge 4 commits into
Open
Add iris-ffi: native uniffi bindings, API-parallel to iris-wasm#26thomas-kroes wants to merge 4 commits into
thomas-kroes wants to merge 4 commits into
Conversation
New crates/iris-ffi for the iris-mobile React Native app (consumed via uniffi-bindgen-react-native; see iris-mobile docs/MOBILE_STRATEGY.md §3): - Mirrors the iris-wasm surface actually used by the extension/mobile TS layer (~30 functions + PrivateKey/TxBuilder/SpendBuilder/GrpcClient objects). Complex types cross as JSON strings — the workspace tsify is in JSON mode, so JS sees byte-identical shapes to the wasm boundary. - GrpcClient implements gRPC-web unary over HTTPS (reqwest + rustls), matching the protocol rpc.nockbox.org actually speaks; framing and trailer parsing unit-tested. Plain-gRPC remains possible later via the existing tonic client without changing the FFI surface. - 17 unit tests pin the same golden vectors as iris-crypto's tests and iris-mobile's jest suite (the cross-runtime parity gate), including the atom<->belts round-trip that is broken in published iris-wasm 0.2.0. Workspace tests: 71 passing. Deferred items documented in the README (TxBuilder.spend/allSpends, private-api, pagination). https://claude.ai/code/session_0117mqP3av4v5y2Wsj2J4zvB
Live transport tests (grpcurl + tonic + the shim, 2026-06-12) showed both rpc.nockbox.org and nockchain-api.zorp.io accept plain gRPC over HTTP/2 + TLS — the 'gRPC-web only' assumption was outdated. Simplifications: - iris-ffi GrpcClient now uses tonic's generated NockchainServiceClient directly (per-call connect, same FFI surface, same pb-JSON response shapes); the hand-rolled gRPC-web framing module is deleted - reqwest dependency dropped from iris-ffi - iris-grpc-proto native tonic dep gains tls + tls-webpki-roots, enabling the existing PublicNockchainGrpcClient against https endpoints too 14 iris-ffi tests passing (frame-parsing tests removed with the shim). https://claude.ai/code/session_0117mqP3av4v5y2Wsj2J4zvB
Hermes invokes UBRN exports on a small pthread stack; Cheetah signing, SLIP-10 derivation, Noun hashing, and tx building overflowed the guard region in TestFlight builds. Centralize offloading in crypto_stack and wrap all high-risk synchronous FFI exports. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New crates/iris-ffi for the iris-mobile (consumed via uniffi-bindgen-react-native; see iris-mobile docs/MOBILE_STRATEGY.md §3):
Workspace tests: 71 passing. Deferred items documented in the README (TxBuilder.spend/allSpends, private-api, pagination).