GAIP Buyer Assurance Agent

v1.5.0
io.github.tjcgraham-rgb/gaip-buyer-assurance Checked 4 days ago Published 1 month ago

Now part of GAIP Witness: records a buyer's request and checks what was delivered.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

assurance_prepare Prepare a buyer-side delivery check

Use this when you, the buyer, chose a public service and want its delivery checked end to end. Pass `service_url`, `checks` and explicit_read_only_consent=true. GAIP preflights it and records your checks; returns a `terms_id` for assurance_complete. Free, no account; records a GAIP receipt only. Inputs must be public and non-personal.

ParameterTypeDescription
checks *array1-8 checks, each {"id": "http_status_in", "allowed": [200]}, {"id": "content_type_is", "value": "application/json"}, {"id": "non_empty"}, {"id": "json_parses"}, {"id": "json_required_keys", "keys": ["…
explicit_read_only_consent *Must be true: you consent to a public, read-only check.
service_url *stringPublic https URL of the service.
counterparty_idstringName or URL of the agent or service.
data_classificationstringPUBLIC (default) or NON_PERSONAL_PUBLIC. Never send personal data.
episode_idstringOptional: your own id to group related calls.
task_classstringOptional: short name of the task, e.g. weather_forecast.

assurance_complete Complete a buyer-side delivery check

Use this when finishing a Buyer Assurance check. Pass the `terms_id` from assurance_prepare and mode PUBLIC_REPLAY (GAIP replays the service) or BUYER_SUBMITTED. Returns PASS / FAIL / UNKNOWN per check and a delivery receipt. Free, no account; records a GAIP receipt only. Inputs must be public and non-personal.

ParameterTypeDescription
mode *PUBLIC_REPLAY: GAIP fetches the public URL itself. BUYER_SUBMITTED: check a response you pass in.
terms_id *stringThe terms_id returned when the terms were registered.
bodystringBUYER_SUBMITTED: the response body you received (max 32 KiB).
body_sha256stringBUYER_SUBMITTED: SHA-256 of the body, instead of the body.
content_typestringBUYER_SUBMITTED: the Content-Type you received.
data_classificationstringPUBLIC (default) or NON_PERSONAL_PUBLIC. Never send personal data.
http_statusintegerBUYER_SUBMITTED: the HTTP status you received.

assurance_verify Verify a Buyer Assurance receipt

Use this when you hold a Buyer Assurance terms or delivery receipt_id and want to confirm it. Returns the retained record and its integrity proof (integrity only). Free, read-only, no account; inputs must be public and non-personal.

ParameterTypeDescription
receipt_id *stringA receipt_id returned by an earlier GAIP call.