functionland / docs

docs.fx.land
https://docs.fx.land/functionyard
5 stars 8 forks source link

design doc: DApp Connect #59

Open gitaaron opened 2 years ago

gitaaron commented 2 years ago

This issue covers all work related to the design of cluster administration. See here for work related to implementation.

Use Case / Story

Currently, the FULA client samples require the user to enter their PeerId in order to connect to the box. There should be a way for each DApp to know what the PeerId (or list of PeerIds if the owner owns more than one box) is so that the user does not have to enter it when they load the DApp.

gitaaron commented 2 years ago

The DApp should be able to connect to the owner's box without external (paid or free) services otherwise -

  1. Paid means there will always be a charge for DApp users

  2. If free it means we are relying on public infra that may not always work

ruffiano89 commented 2 years ago

Solution: DID Credentials doc can be solution for this issue: Create and verify W3C Verifiable Credentials in JWT format. Example:

const vcPayload: JwtCredentialPayload = {
  sub: 'did:ethr:0x435df3eda57154cf8cf7926079881f2912f54db4',
  nbf: 1562950282,
  vc: {
    '@context': ['https://www.w3.org/2018/credentials/v1'],
    type: ['VerifiableCredential'],
    credentialSubject: {
      ownerOf: {
        boxPeers[QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn, ...]
      }
    }
  }
}

I @ruffiano89 will back to this issue after completing DID provider