Context
Follow-up to #365 and #400.
Source TODO:
https://github.com/cashubtc/coco/pull/400/changes#diff-0103091746c9015f4fece02e671808fd1f9b50c0981611512e59e7f2289d9949R51
The current BOLT11 handler supports:
- ordinary unlocked quotes;
- locked quotes using a newly generated Coco-owned key; and
- locked quotes using an existing Coco-owned public key.
An explicitly supplied ownedPubkey is verified against Coco's key ring because
the existing quote flow assumes Coco will later redeem every quote it creates.
Problem
There is no distinct flow for creating a NUT-20 quote locked to a public key
owned by another party.
Simply removing the local-key check would be unsafe: the quote could enter
Coco's normal prepare, execution, or recovery paths even though Coco cannot
produce the required NUT-20 signature.
The API must represent external ownership explicitly and keep externally owned
quotes separate from wallet-owned redemption.
Scope
- Introduce an explicit quote-creation flow or discriminated input for an
externally owned NUT-20 lock.
- Keep the external-lock API distinct from
locked: true and the internal
Coco-owned ownedPubkey path.
- Validate the supplied compressed public key.
- Require NUT-20 support before requesting the quote.
- Verify that the mint returns the requested public key.
- Represent external ownership clearly in the returned quote or associated
metadata.
- Prevent externally owned quotes from accidentally entering Coco-owned
prepare, execution, signing, or recovery paths.
- Document the intended caller and ownership model.
Acceptance criteria
Out of scope
- Importing or storing another party's private key.
- Automatically redeeming an externally owned quote.
- Changing the existing Coco-owned NUT-20 recovery policy.
Context
Follow-up to #365 and #400.
Source TODO:
https://github.com/cashubtc/coco/pull/400/changes#diff-0103091746c9015f4fece02e671808fd1f9b50c0981611512e59e7f2289d9949R51
The current BOLT11 handler supports:
An explicitly supplied
ownedPubkeyis verified against Coco's key ring becausethe existing quote flow assumes Coco will later redeem every quote it creates.
Problem
There is no distinct flow for creating a NUT-20 quote locked to a public key
owned by another party.
Simply removing the local-key check would be unsafe: the quote could enter
Coco's normal prepare, execution, or recovery paths even though Coco cannot
produce the required NUT-20 signature.
The API must represent external ownership explicitly and keep externally owned
quotes separate from wallet-owned redemption.
Scope
externally owned NUT-20 lock.
locked: trueand the internalCoco-owned
ownedPubkeypath.metadata.
prepare, execution, signing, or recovery paths.
Acceptance criteria
Out of scope