feat(signature): add org.accordproject.signature@1.0.0 - #195
Conversation
Reposition org.accordproject.signature from a narrow ContractSigned transaction into a general model of verifiable attestations over contract and agreement content. Adds the Attestation envelope, Signatory, ValidityWindow, Delegation, AttestationStatus, SignatureMethod, AssuranceLevel, and an abstract Proof with OpaqueProof as an escape hatch for protocol-specific proof formats. Content is bound via org.accordproject.crypto@1.0.0.ContentHash from the published crypto model, so attestations carry digest algorithm, value, encoding, and optional canonicalization metadata rather than a bare string. Keeps the ContractSigned extends Request transaction from earlier signature versions and enriches it with optional Attestation[] data, so older consumers have a familiar migration path while newer integrations can inspect structured signature metadata. Part of the agentic-commerce model family alongside crypto and x402, with a2a/ap2 to follow. Aligns with the reference-implementation signing work in accordproject/apap#182. Signed-off-by: Niall Roche <niall.roche@gmail.com>
|
Great work on this model — a few suggestions for consideration: Typed proof subtypes
For DocuSign this maps directly: Identity verification method
Add Status decline/revocation reason
Replace Multi-document supportA single Replace AP stack integrationTemplate archive reference on Content representation. Add Happy to elaborate on any of these or sketch out how they'd compose with the existing |
|
Thanks for the detailed review @mttrbrts and the DocuSign steer makes this more in line with industry norms. All six of your suggestions are now in, across the two commits above. Adopted as proposed:
One addition beyond your list, in its own commit so it can be dropped independently: a 'WALLET_KEY_CONTROL' value on 'IdentityVerificationMethod'. Wallet-based signing otherwise has to fall back to 'CUSTOM' + 'customName', which understates something that's becoming common rather than exceptional. The argument for a first-class value is that it differs in kind from the others: in every other method a third party vouches for the identity, whereas here the ledger does. providerId carries how the key was resolved. Happy to revert it to 'CUSTOM' if you'd rather keep the enum provider-oriented. Feedback on two of yours, having built against this model in an x402/blockchain flow: the multi-document and content-representation changes earned their keep immediately. A single wallet signature there covers two documents that are hashed differently by design — the terms document (SHA-256 over rendered text, 'PLAINTEXT') and the acceptance statement binding the signer to a specific offer (Keccak-256 over RFC 8785 canonical 'JSON', 'CONCERTO_JSON'). With one contentHash and no representation field there was no way to express that, and a verifier had no way to know what to re-hash. Both suggestions were exactly right. Model validates against crypto@1.0.0, contract@0.2.0 and runtime@0.2.0. |
| import org.accordproject.runtime@0.2.0.Request from https://models.accordproject.org/accordproject/runtime@0.2.0.cto | ||
| import org.accordproject.contract@0.2.0.Contract from https://models.accordproject.org/accordproject/contract@0.2.0.cto |
There was a problem hiding this comment.
We should also bump these to 1.0.0
| * alongside the status keeps that evidence with the attestation. | ||
| */ | ||
| concept AttestationStatusDetail { | ||
| o AttestationStatus status |
There was a problem hiding this comment.
Should this still have default=CREATED
…@1.0.0 Addresses the six suggestions from @mttrbrts's review: - ProviderProof extends Proof, giving structured provider evidence (providerId, envelopeOrSessionId, recipientId, certificateUri, ipAddress, userAgent) alongside the OpaqueProof escape hatch. - IdentityVerificationMethod + IdentityVerification, added to Attestation, so the mechanism backing an assurance tier is explicit rather than implied. - AttestationStatusDetail replaces the bare status enum, carrying the reason and timestamp providers record for declines and revocations. - DocumentAttestation[] replaces the single contentHash, so one signing action can cover a bundle of documents. - TemplateReference on ContractSigned, capturing the archive identifier, version and hash that produced the contract. - ContentRepresentation on DocumentAttestation, telling a verifier which form was hashed — signatories usually sign rendered text, not a data model. One open question for review: no IdentityVerificationMethod value describes control of a blockchain account key. A wallet flow that proves key control currently has to use CUSTOM with a customName. Given the direction of the agentic work, a first-class WALLET_KEY_CONTROL value may be worth adding. Validated against crypto@1.0.0, contract@0.2.0 and runtime@0.2.0 with concerto-core. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Niall Roche <niall.roche@gmail.com>
Following the open question on the previous commit: wallet-based signing had to fall back to CUSTOM with a customName, which understated a mechanism that is becoming common rather than exceptional. WALLET_KEY_CONTROL covers a signatory demonstrating control of a blockchain account by signing a challenge verified against that account's public key. It is a distinct mechanism rather than a variant of the others: no third party vouches for the identity, the ledger does. Where a verifier needs to know how the key was resolved, that goes in providerId (for example "hedera-mirror-node"). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Niall Roche <niall.roche@gmail.com>
Moving status into AttestationStatusDetail dropped the default that previously sat on Attestation.status. Restore it on the nested field so a newly-built attestation still starts in the same state. Raised in review by @mttrbrts. Signed-off-by: Niall Roche <niall.roche@gmail.com>
8cbdad4 to
94b641d
Compare
Closes #<N/A>
Reposition
org.accordproject.signaturefrom a narrowContractSignedtransaction into a general model of verifiable attestations over contract and agreement content.Changes
org.accordproject.signature@1.0.0.Attestationenvelope,Signatory,ValidityWindow,Delegation,AttestationStatus,SignatureMethod, andAssuranceLevel.Proofconcept withOpaqueProofas an escape hatch for protocol-specific proof formats.org.accordproject.crypto@1.0.0.ContentHash, so attestations carry digest algorithm, value, encoding, and optional canonicalization metadata rather than a bare string.ContractSigned extends Requesttransaction and enrich it with optionalAttestation[]data, giving older consumers a familiar migration path while newer integrations can inspect structured signature metadata.Flags
1.0.0version because the signature namespace is being repositioned from a narrow transaction model into a stable signature/attestation model.signature@0.3.0for compatibility.accordproject/apap#182.Screenshots or Video
N/A
Related Issues
Author Checklist
--signoffoption of git commit.masterfromfork:branchname