The publisher's signing_keys pin for a message from agentUrl, read from
the publisher's adagents.json (adcontextprotocol/adcp#9016). Use it as
PublisherSigningKeyPin.signingKeys.
Only entries that BOTH match agentUrl (with
agentUrlMatchesAuthorizedEntry, so origin-only entries count at
3.3+) AND authorize the message's scope count. Such an entry:
resolves to something, so an unresolvable or signals-only entry does not count;
is inside its effective window at at;
covers country, and each property in propertyIds.
An entry that authorizes nothing for the message never pins or unpins it,
so callers MUST pass the message's scope.
Among the entries that count:
The publisher pins the agent only if every one carries signing_keys. If
any has none (absent or empty), the result is undefined: no pin, so use
the agent's JWKS alone.
Otherwise the result is the union of their keys. Identical keys appear
once. Copies that differ in revoked_at are all kept, so the earliest
revocation applies whatever the entry order.
With propertyIds, each property gets its own pin, and the result keeps
only the keys every pinned property allows.
Returns [], which PublisherSigningKeyPin reads as "accept no key", when
the agent is NOT authorized for the message:
it is not listed;
below 3.3 it matches more than one exact entry (ambiguous_agent_url);
no entry authorizes the scope;
no entry authorizes one of propertyIds;
the pinned properties share no key.
Not being authorized is never reported as "no pin".
constpinFor = (adagents: AdAgentsJson) => resolvePublisherSigningKeyPin(adagents, sellerAgentUrl, { adcpVersion, country, propertyIds }); constpin: PublisherSigningKeyPin = { publisher:'publisher.example', signingKeys:pinFor(adagents), // Your own uncached adagents.json fetch; null means the publisher no longer pins. refresh:async () =>pinFor(awaitfetchAdagentsUncached()) ?? null, };
The publisher's
signing_keyspin for a message fromagentUrl, read from the publisher'sadagents.json(adcontextprotocol/adcp#9016). Use it asPublisherSigningKeyPin.signingKeys.Only entries that BOTH match
agentUrl(with agentUrlMatchesAuthorizedEntry, so origin-only entries count at 3.3+) AND authorize the message's scope count. Such an entry:at;country, and each property inpropertyIds.An entry that authorizes nothing for the message never pins or unpins it, so callers MUST pass the message's scope.
Among the entries that count:
signing_keys. If any has none (absent or empty), the result isundefined: no pin, so use the agent's JWKS alone.revoked_atare all kept, so the earliest revocation applies whatever the entry order.propertyIds, each property gets its own pin, and the result keeps only the keys every pinned property allows.Returns
[], whichPublisherSigningKeyPinreads as "accept no key", when the agent is NOT authorized for the message:ambiguous_agent_url);propertyIds;Not being authorized is never reported as "no pin".