blockchain-certificates / cert-issuer

Issues Blockcerts using either the Bitcoin or Ethereum blockchain
MIT License
413 stars 208 forks source link

ILP Addresses and Blockcerts #305

Open westurner opened 3 days ago

westurner commented 3 days ago

How can or should a Blockcert indicate an ILP Interledger Protocol address or a Payment Pointer?

Example Global Allocation Scheme Addresses :

g.acme.bob - a destination address to the account "bob" held with the connector "acme"

g.us-fed.ach.0.acmebank.swx0a0.acmecorp.sales.199.~ipr.cdfa5e16-e759-4ba3-88f6-8b9dc83c1868.2 - a destination address for a particular invoice:

  • Neighborhoods: us-fed., ach., 0.
  • Account identifiers: acmebank., swx0a0., acmecorp., sales, 199 (An ACME Corp sales account at ACME Bank)
  • Interactions: ~ipr, cdfa5e16-e759-4ba3-88f6-8b9dc83c1868, 2*

And from [ https://paymentpointers.org/ ] "Payment Pointers and Payment Setup Protocols":

The following payment pointers resolve to the specified endpoint URLS:

ILP specifies SPSP Simple Payment Setup Protocol for exchanging Payment pointers over HTTPS. https://interledger.org/developers/rfcs/simple-payment-setup-protocol/

ILP Web Monetization https://webmonetization.org/ specifies Payment Pointers over HTTPS in HTML with a <link> node.

In Web3, there's EDNS Ethereum DNS and no HTTPS.

W3C DIDs and Blockcerts should work over any set of request-response capable protocols.

Blockcerts are verifiable; how could blockcerts also indicate payment pointers and/or ILP addresses?

Couldn't Blockcerts also be written to and verified from ripplenet just like Bitcoin or Ethereum, which typically have significantly higher tx fees? But that's not even necessary to add a payment pointer to a blockcert, but then HTTPS without blockcert verification (or CT Log verification) would be used by SPSP FWIU?

lemoustachiste commented 3 days ago

Hi @westurner,

that's a very comprehensive issue you opened and I am not familiar with most of the technologies you are listing.

I believe Blockcerts could be plugged into any blockchain, provided you can register a transaction with some data, and retrieve it later in the verifier.

I have seen some blockcerts anchored to the Polygon chain, granted that is somewhat "easy" as Polygon is an EVM chain and follows the same patterns as ETH.

Now, if you are familiar with ILP internals, you will need:

And in the verifier (actually https://github.com/blockchain-certificates/explorer-lookup):

If you want DIDs in the mix, you'll need to represent the public key associated to the issuing address into a DID document (and reference said key as your verification method). You'll probably need to implement a Public Key to Blockchain address converter, as in https://github.com/blockchain-certificates/jsonld-signatures-merkleproof2019/blob/master/src/inspectors/deriveIssuingAddressFromPublicKey.ts.

As for payment pointers I have no idea how they work and what they do at this point so I cannot advise.