Skip to content

feat(policy): add the TAIP-7 for field to Policy - #14

Closed
malikfaik wants to merge 2 commits into
TransactionAuthorizationProtocol:mainfrom
malikfaik:policy-for-field
Closed

malikfaik wants to merge 2 commits into
TransactionAuthorizationProtocol:mainfrom
malikfaik:policy-for-field

Conversation

@malikfaik

Copy link
Copy Markdown

Policy carries from, fromAgent and fromRole, but not for — so a policy built with this library cannot say which party it applies to, and the field is dropped when an inbound message is parsed and re-serialised.

TAIP-7 uses for alongside from on all three policy types, and implementations read it: one gateway we interoperate with feeds policy.for to its presentation request as the DID to present to, so a policy that omits it arrives with nobody to answer.

This adds the field next to from, with omitempty to match the rest of the struct, plus a round-trip test mirroring TestPolicy_FromFieldRoundTrip. go test ./... and go vet ./... pass.

@malikfaik malikfaik closed this Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant