Enhance InputRequest and permission model in docs#84
Open
iamalwaysuncomfortable wants to merge 6 commits into
Open
Enhance InputRequest and permission model in docs#84iamalwaysuncomfortable wants to merge 6 commits into
iamalwaysuncomfortable wants to merge 6 commits into
Conversation
Update InputRequest type to include new request kinds and clarify wallet behavior. Revise permission model and fulfillment flow for better user input handling. Signed-off-by: Mike Turner <mike@provable.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Mike Turner <mike@provable.com>
Rename `kind` to `type` and `RecordMatcher` to `RecordFieldFilter`. Reframe the permission model as additive: `programs` and `decryptPermission` are preserved exactly, with `recordAccess` and `viewKeyExposure` as new opt-in fields. Drop `anyProgram` level. Document backward-compatibility guarantees, interaction rules, and validation failure modes.
Make readAddress optional with default true. Add an Address exposure subsection covering all four address-leakage surfaces (connect return, _publicKey getter, init handler, plaintext-bearing methods) and their behavior under readAddress: false. Document the decryptPermission: NoDecrypt-only constraint and the deliberate signMessage leak.
Adds the dapp-facing types and signature changes from docs/adapter-privacy-extension.md. aleo-types: new InputRequest, RecordFilters, RecordFieldFilter, TransactionInput types with isLiteralInput / hasInputRequest helpers. TransactionOptions.inputs widens from string[] to TransactionInput[]. aleo-wallet-standard: new ConnectOptions, RecordAccessGrant, ProgramGrant, RecordGrant, FieldGrant (with readAccess), ViewKeyExposure, plus a hasUnsupportedConnectOptions helper. ConnectFeature.connect and WalletAdapterProps.connect accept an optional fourth options argument. aleo-wallet-adaptor/core: BaseAleoWalletAdapter.connect accepts options, enforces the readAddress: false / decryptPermission: NoDecrypt precondition, tracks _readAddress, and short-circuits decrypt, requestRecords, transitionViewKeys, requestTransactionHistory under address withholding. New error classes: WalletInputRequestNotSupportedError, WalletConnectOptionsNotSupportedError, WalletAddressWithheldError. The new types are re-exported from core for dapp ergonomics. Wallet adapters: leo, fox, soter, puzzle widen connect with options? and throw WalletConnectOptionsNotSupportedError when any of the new options are set; their executeTransaction throws WalletInputRequestNotSupportedError when any input is an InputRequest. Shield forwards options to the extension and tolerates an empty address under readAddress: false. react: AleoWalletProvider accepts new optional props recordAccess, viewKeyExposure, readAddress and forwards them on every adapter.connect call. Dependency arrays updated. Doc: clarified that Account.address returns "" (empty string) under readAddress: false rather than null, and that FieldGrant.readAccess controls plaintext exposure independently of filterability.
24 tasks
marshacb
reviewed
May 5, 2026
marshacb
left a comment
There was a problem hiding this comment.
Awesome proposal. The permission model is clearly thought through. My main question/concern is around the viewKey input type and making sure we nail down the substitution semantics before wallets start implementing it. The feature detection question is smaller but worth a one-liner so dapp authors have a clear upgrade path. Happy to dig deeper on either if helpful.
Implement wallet-specified record inputs and address permission grants
dms120
approved these changes
May 22, 2026
dms120
left a comment
Collaborator
There was a problem hiding this comment.
Looks great to me 🙏 Aleo is a complex chain - with complex requirements that we can't go around but still the proposal is clear to me.
emmaprice082
approved these changes
May 26, 2026
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.
Description
This is a feature proposal for the wallet adapter that enables dapps to specify conditions for records or account info they want to use as inputs to functions. Currently for dapps to use Records, wallets must expose ALL records from a program, allowing the dapp to see all private state a user has. Also if the dapp wants to use the user's address, it has access to do so exposing the user's address to the dapp.
This proposed change would modify the behavior of the adapter to allow dapps to ask wallets and/or wallet users to specify:
.privateThe doc also proposes an extended permissions model for dapps to use to request access to record and address data from the wallet.
Type of Change
Packages Changed