Verify

API reference

Path Tools

/tools — the public operations of the PATH protocol, called with a Path Global key.

Scope tools.

https://api.pathglobal.finance/tools

Path Tools are the public operations of the PATH protocol, called with a Path Global key. Answers are PATH objects, as signed.

RouteAnswer
GET /{ "tools": [ … ] }: each tool's id, group, title, summary, method, path, whether it is signed, whether it writes, own_member for a tool that runs for a PATH member of its own, and whether it is available to the caller
GET /:toolOne tool
POST /:toolRuns a tool with the JSON body it takes. Takes Idempotency-Key

Groups: registers, reach, requests, receipts, checkout, connect, tunnels. The input of each tool is the input of its protocol operation; see the API reference. The registers tools answer networks with endpoint_formats, the ids of their formats; the formats themselves are read at the catalogue routes.

Tools of a member of its own

tunnels_exclusion (PUT /tunnels/exclusion, { "excluded": true }, signed, writes) sets whether the caller, as a PATH member, is excluded from the tunnels of its network. It runs for a caller whose membership of its own is proved, which this version does not take: it is listed available: false, and a call answers 409 pathglobal.addresses.membership_unverified.

References and their owner

A reference created through a tool (a request, an instruction, a receipt, a checkout session, a connection) is read and changed by the client that created it. A signed tool that names a reference (request_revoke, request_paid, receipt_transition, checkout_read, connection_read, connection_usage, connection_consume, connection_revoke) answers another client 404 pathglobal.core.not_found, with the same body as a reference that does not exist. The public reads stay open, as on PATH: request_read, receipt_read, receipt_chain, instruction_read and object. The payee receipts of deposits (Endpoints) are read this way; no client moves them.

In test mode

A test key is answered by the sandbox, from the subjects, addresses and aliases of the key, and from the fixture payees of the sandbox network. Each answer is the object of the protocol, with the members of the protocol, signed by the test key published at /.well-known/path-keys (protocol_version 0.2.0). A tool the sandbox does not serve answers 503 pathglobal.tools.unavailable.

ToolAnswerProtocol object
sonarkind: "sonar_answer": identifier_type, identifier_hash, requester, nonce, found, member, endpoint. Takes identifier_type, identifier and nonceSONAR
finder{ step1, step2 }: step1 is the SONAR answer, step2 is { follow, composed_by: "client" }, or null when nothing was foundFINDER
sonar_federated{ nonce, holders, unavailable }; each holder is { network, member, endpoint, proof }Federated SONAR
resolverkind: "resolver_answer": address, requester, standing: "holder", valid, accepts, limits, commitment, commitment_version, grammar: 2. accepts lists what the address accepts now as grammar-2 capabilities, in order of preference, each with its limits and reference_required on pledged terms. commitment and commitment_version are those of the latest pledge, null on derived terms. Takes key, a PATH address; an alias answers 400 pathglobal.tools.refused with details.path_code path.core.malformed_request and details.path_detail.field: "key"RESOLVER
resolver_lookupThe resolver_answer of the address an alias designates, with key (the alias normalised: lower case, separators removed), address, nonce and requester. Takes key, an alias alias:<network>:<name>, and nonce, in the signed body (PIP-0028). An alias that does not resolve answers 404 pathglobal.tools.refused with path.core.not_found, one answer for every caseRESOLVER
commitmenttype: "path.address.commitment": address, issuer, commitment, version, committed_at; null values on derived termsCommitment
payee_checkkind: "payee_check": key, requester, mode, result, subject_type, nonce, and display_name with close_match and shown. Takes key, mode, name with verify, and noncePayee check
instruction_issue, instruction_readtype: "path.instruction", grammar: 2: reference, issuer, payee, via, beneficiary ({ format, value, fields? }), payment_reference, amount, limits, single_use, status: "open", expires_at, intent_version. instruction_issue takes address and via, a capability of the address's accepts, for a fixture payee or a PATH address issued in the sandbox. The instruction is open 30 minutes; payment_reference is set when the entry has reference_required. A capability outside the accepts answers 409 with path.instruction.capability_not_accepted, one with no beneficiary 409 with path.instruction.destination_unavailable, and an expired instruction is read as 410 with path.instruction.expiredInstructions
request_create, request_read, request_revoke, request_paidtype: "path.request", grammar: 2: reference, issuer, payee, amount (an Amount, or null), accepts, intent_version (the latest pledged version, or null), order_reference, status (created, revoked, paid), settled_by, expires_atRequest
receipt_issue, receipt_read, receipt_transition, receipt_chaintype: "path.receipt", grammar: 2: issued_by, payer, payee, request, instruction, via, sent, received, rail_references, status, reason_code, supersedes, route: null. A receipt issued by the payer is issued pending, names payee, and moves only to failed; with an instruction issued in the sandbox, its via and payee are those of the instruction. The chain lists every statement, oldest firstReceipt
receipt_verify{ valid, reason? }. Takes envelope and, for a chain, chain, the statements before it, oldest first: each signature is verified, and each supersedes is the digest of the statement before itVerify a receipt
objectThe request or the receipt of a referenceINTEROP
discoveryThe discovery document of the host, as served at /.well-known/path-configurationDiscovery
networks, network, railsThe networks and rails of the registerRegisters

An address that is revoked, or replaced by rotation, is answered as PATH answers it (PIP-0027): resolver, commitment, payee_check, request_create and instruction_issue answer 410 pathglobal.tools.refused, with details.path_code path.address.revoked and details.path_detail: { rotated }, true for a replaced address. The answer never names another address. An address that does not exist answers 404.

A negative SONAR answer has the same members as a positive one, with found: false and member and endpoint null. identifier_hash is opaque; the identifier is not in the answer. A revoked or expired request is read as 410 pathglobal.tools.refused, with details.path_code path.request.revoked or path.request.expired. request_paid needs settled receipts that cover the request, otherwise 409 pathglobal.tools.refused with path.request.not_covered.

Errors

CodeStatusWhen
pathglobal.tools.unavailable503The tool is not available
pathglobal.tools.refusedThe PATH status; 502 for a server errorThe protocol refused the operation; details.path_code carries the PATH code, and details.path_detail its detail when it has one
pathglobal.addresses.membership_unverified409The tool runs for a PATH member of its own
pathglobal.core.not_found404No tool has that id, or the reference is not one the caller created
pathglobal.tools.answer_unverifiable502A signed answer Path Global reads does not verify against the keys of the operator that answered, or does not answer the question asked

On this page