interledger / receipt-verifier

Handles ILP STREAM receipts
Apache License 2.0
11 stars 2 forks source link

Cache and return original SPSP query id with receipts #24

Closed wilsonianb closed 3 years ago

wilsonianb commented 3 years ago

Currently, the SPSP endpoint that the query is proxied to is cached with the receipt nonce and returned in the /verify response.

In cases when the SPSP_ENDPOINTS_URL might return the same SPSP endpoint for multiple id's, it would be useful to know the original id / SPSP query path.

When SPSP_ENDPOINTS_URL is configured, the /verify response can include an id field:

{
    "amount": "10",
    "id": "users%2Falice",
    "spspEndpoint": "$wallet.com/alice"
}

This would be useful in Codius where the paths of the original SPSP query urls correspond to particular functions, but the SPSP_ENDPOINTS_URL regularly returns the single SPSP endpoint of the Codius host.