feat(taip-9)!: ConfirmRelationship body matches the spec Agent payload - #7
Merged
Merged
Conversation
BREAKING CHANGE: ConfirmRelationship's body is now the flat TAIP-9 Agent payload (@context, @type=#Agent, @id, for, role) instead of the non-spec {relationship, status} wrapper. @id is the confirmed agent/address; for (required) is the entity it acts on behalf of; role is optional. Removes the now-dead Relationship struct. Consumers read body.ID / body.For / body.Role; the @id and for fields are required by NewConfirmRelationshipMessage.
thomasjsk
force-pushed
the
feature/confirm-relationship-owner
branch
from
June 12, 2026 14:00
3df8b58 to
a8a8137
Compare
Merged
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.
What
Reshapes the
ConfirmRelationshipmessage body to match the TAIP-9 specification.Per TAIP-9, the confirmation payload matches the
Agentpayload — a flat object:@context—https://tap.rsvp/schema/1.0@type—https://tap.rsvp/schema/1.0#Agent@id— REQUIRED, the DID of the confirmed agent/addressfor— REQUIRED, the DID of the entity the agent acts on behalf of (single DID or array, per TAIP-5)role— OPTIONAL, the agent's role in the transactionCanonical spec example:
{ "@context": "https://tap.rsvp/schema/1.0", "@type": "https://tap.rsvp/schema/1.0#Agent", "@id": "did:pkh:eip155:1:0x1234a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb", "for": "did:web:beneficiary.vasp", "role": "SettlementAddress" }The previous body used a non-spec
{ relationship: { parties: [...] }, status }wrapper, which does not appear anywhere in TAIP-9.Changes
ConfirmRelationshipBodyis now the flat Agent payload (@id,for,role); therelationship/statuswrapper fields are removed.NewConfirmRelationshipMessagevalidates@idandfor(both required) and emits body@type=#Agent(the#ConfirmRelationshipIRI remains the envelope/message type).Relationshipstruct is removed (Partyis retained — still used by other message types).for, optionalrole, and required-field validation.BREAKING CHANGE
The wire shape of
ConfirmRelationshipchanged. Consumers must:body.ID(@id) — notbody.Relationship.Parties[0].ID.body.For(for).body.Role(role).body.Relationship/body.Status(removed).@idandforwhen constructing (now required).