OpenZeppelin / OpenZeppelin/guardian
multisig-client: move `nonce` into the options object of proposal-creation APIs
@haseebrabbani is already working on this.
Since Aug 12, 2026.
- Dominant language
- Rust
- Stars
- 10
- Forks
- 20
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 43
Description
Context
createP2idProposal(recipient, faucet, amount, nonce?, options?) places the optional
nonce positionally before the options object, so callers who only want options must
pass a positional undefined:
await multisig.createP2idProposal(
recipientAccountId,
faucetAccountId,
1000n,
undefined, // nonce hole
{ reclaimHeight: 500_000 },
);
Raised during review of #381 (comment):
the undefined hole makes every documented example ugly and the call sites error-prone.
The same shape applies to the rest of the create*Proposal family — options added by
future features (as #322 added noteType and #366 added reclaimHeight/timelockHeight)
make the positional nonce progressively worse.
Proposal
Fold nonce into the options object so the 4th parameter is a single options bag:
await multisig.createP2idProposal(recipientAccountId, faucetAccountId, 1000n, {
nonce: 42, // optional, defaults to Date.now() as today
noteType: NoteType.Private,
reclaimHeight: 500_000,
});
Two migration options:
- Deprecation window — detect the 4th parameter's type (
number⇒ legacy nonce,
object ⇒ options bag) and keep both working for a release, with the positional form
marked@deprecated. - Clean break — change the signature outright in the next breaking release. If the
#366 release ships as 0.17.0 (breaking on the Rust side anyway), this change could
ride the same window and skip the type-detection dance entirely.
The wire format is unaffected either way — this is purely call-signature ergonomics.
Scope
createP2idProposal,createConsumeNotesProposal,createAddSignerProposal,
createRemoveSignerProposal,createChangeThresholdProposal,
createSwitchGuardianProposal,createUpdateProcedureThresholdProposal- Example wrappers:
examples/_shared/multisig-browser,examples/web, and the
smoke-web harness - Docs:
docs/MULTISIG_SDK.md,packages/miden-multisig-client/README.md
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.