Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0dc4fb9
Enhance InputRequest and permission model in docs
iamalwaysuncomfortable Apr 30, 2026
be4f23e
Add readAddress field to ConnectHistory interface
iamalwaysuncomfortable Apr 30, 2026
c6ad425
Refine InputRequest discriminator and permission model
iamalwaysuncomfortable May 5, 2026
5067daf
Specify readAddress as a permission
iamalwaysuncomfortable May 5, 2026
fa653fe
Implement wallet-specified inputs and structured permission grants
iamalwaysuncomfortable May 5, 2026
63f5ad8
Merge pull request #85 from ProvableHQ/feat/wallet-specified-inputs
iamalwaysuncomfortable May 6, 2026
c3ea986
Add record UIDs and envelope-metadata grants for record reads
iamalwaysuncomfortable May 6, 2026
e2b001e
Add private input example to the dapp page
iamalwaysuncomfortable May 12, 2026
c403b56
Add quickstart for using private inputs
iamalwaysuncomfortable May 12, 2026
e2d22e8
Remove view-key-as-input feature
iamalwaysuncomfortable May 28, 2026
a5d741c
Add type: "derived" InputRequest for wallet-computed cryptographic va…
iamalwaysuncomfortable May 14, 2026
756011a
Merge pull request #88 from ProvableHQ/feat/derived-inputs
iamalwaysuncomfortable May 28, 2026
91a0a58
Require recordname on type:"record" InputRequest
iamalwaysuncomfortable May 29, 2026
2df9b8d
feat(types): split blinding algorithm; ArgType + catalog possibleValues
iamalwaysuncomfortable May 29, 2026
49b666c
feat(adapter): generic argConstraints on AlgorithmGrant
iamalwaysuncomfortable May 29, 2026
21dd57f
feat(shield): advertise two blinding algorithms; docs for modes + arg…
iamalwaysuncomfortable May 29, 2026
764b8d5
fix(adapter): generic arg const name, ArgType error text, changeset f…
iamalwaysuncomfortable May 30, 2026
841b71e
fix(example): honor ALGORITHM_SCHEMAS optional/possibleValues in deri…
iamalwaysuncomfortable Jun 2, 2026
5ddded6
docs(quickstart): require recordname in record-slot examples; add res…
iamalwaysuncomfortable Jun 2, 2026
4f148d3
fix: adapter modal button was being disabled when readAddress was false
dms120 Jun 2, 2026
f40eaef
Merge branch 'examples/private-inputs-example' of https://github.com/…
dms120 Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .changeset/derived-inputs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
'@provablehq/aleo-types': minor
'@provablehq/aleo-wallet-standard': minor
'@provablehq/aleo-wallet-adaptor-core': minor
'@provablehq/aleo-wallet-adaptor-leo': minor
'@provablehq/aleo-wallet-adaptor-fox': minor
'@provablehq/aleo-wallet-adaptor-soter': minor
'@provablehq/aleo-wallet-adaptor-puzzle': minor
'@provablehq/aleo-wallet-adaptor-shield': minor
'@provablehq/aleo-wallet-adaptor-react': minor
---

Add `type: "derived"` InputRequest for wallet-evaluated cryptographic algorithms

A new `InputRequest` variant lets a dapp ask the wallet to compute a value by running a named cryptographic algorithm over the wallet's own state (view key, wallet-maintained counters, etc.) plus dapp-supplied `args`, and substitute the result into a transaction input slot. The dapp never observes the wallet-side inputs — only the output.

Strictly opt-in: a new `algorithmsAllowed?: AlgorithmGrant[]` field on `ConnectOptions` authorizes derived inputs at exact `(algorithm, program, function, inputPosition)` call sites. All four fields are required and exact-match; there is no broad default. The wallet refuses every derived request whose tuple is not present.

A new adapter method `algorithmsSupported(): Promise<string[]>` lets a dapp discover which algorithms a wallet implements before populating `algorithmsAllowed`. Wallets without derived-input support return `[]` (the base implementation's default).

Derived-input `args` are a general `Record<string, AlgorithmArg>` map; `AlgorithmArg.type` is `ArgType = LiteralType | "string"` (the `"string"` widening carries non-Aleo-literal args). `ALGORITHM_SCHEMAS` declares each arg's type plus optional `possibleValues`/`optional`. `AlgorithmGrant` gains an optional generic `argConstraints?: Record<string, string[] | "any">` to pin per-arg values at connect time.

Inaugural algorithms (program-scoped blinding, two-stage): `program-scoped-blinding-factor` (output `field`) and `program-scoped-blinded-address` (output `address`), filling a private `blinding_factor` and a public `blinded_address` input from the same wallet-maintained counter. Shared args: `mode` (`"issue"` advances the counter for a swap; `"resolve"` reuses a past counter for a claim, selected by the public `targetAddress` — the counter never leaves the wallet), `membershipProgram`/`membershipMapping` (where the wallet probes used-address state), and `targetAddress` (resolve only).

The `<AleoWalletProvider>` React component accepts a new optional `algorithmsAllowed` prop and forwards it on connect; the `useWallet()` context exposes `algorithmsSupported`. Existing usages without these are unaffected.

See `docs/adapter-privacy-extension.md` § "Derived inputs" for the full spec, and `docs/dapp-privacy-quickstart.md` for an implementor's guide.
23 changes: 23 additions & 0 deletions .changeset/wallet-specified-inputs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@provablehq/aleo-types': minor
'@provablehq/aleo-wallet-standard': minor
'@provablehq/aleo-wallet-adaptor-core': minor
'@provablehq/aleo-wallet-adaptor-leo': minor
'@provablehq/aleo-wallet-adaptor-fox': minor
'@provablehq/aleo-wallet-adaptor-soter': minor
'@provablehq/aleo-wallet-adaptor-puzzle': minor
'@provablehq/aleo-wallet-adaptor-shield': minor
'@provablehq/aleo-wallet-adaptor-react': minor
---

Add wallet-specified input requests and structured permission grants

`TransactionOptions.inputs` is now `TransactionInput[]` (= `(string | InputRequest)[]`). Dapps can place an `InputRequest` in any slot to ask the wallet to fill in the active address or auto-select an owned record matching dapp-supplied filters. Passing literal `string[]` continues to work — `string` is a subtype of `TransactionInput`.

Adapters that do not yet implement fulfillment (leo, fox, soter, puzzle) throw `WalletInputRequestNotSupportedError` when an `InputRequest` is encountered. Shield forwards inputs to the extension, which is expected to support them.

`connect()` accepts a new optional `options?: ConnectOptions` parameter carrying `recordAccess` and `readAddress`. When `readAddress: false`, the toolkit short-circuits `decrypt`, `requestRecords`, `transitionViewKeys`, and `requestTransactionHistory` with `WalletAddressWithheldError`. Connections with `readAddress: false` are only valid alongside `decryptPermission: NoDecrypt`. Adapters other than shield throw `WalletConnectOptionsNotSupportedError` when these options are set.

The `<AleoWalletProvider>` React component accepts new props `recordAccess` and `readAddress` and forwards them on connect. Existing usages without these props are unaffected.

If your code reads `TransactionOptions.inputs[i]` as a string, narrow with `typeof i === 'string'` (or use the exported `isLiteralInput` type guard) before passing it to a `string`-typed API.
Loading