Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

学习下这个DIF的 js lib的设计, 它这个设计貌似如果实现不同的 did 可以有一个统一的界面,然后可以来实现各种不同的动作 #483

Open
mave99a opened this issue Nov 20, 2020 · 1 comment
Assignees

Comments

@mave99a
Copy link
Contributor

mave99a commented Nov 20, 2020

学习下这个DIF的 js lib的设计, 它这个设计貌似如果实现不同的 did 可以有一个统一的界面,然后可以来实现各种不同的动作。

https://github.com/decentralized-identity/did-jwt
https://github.com/decentralized-identity/did-jwt-vc

例如其例子:

import * as EthrDID from 'ethr-did'
import { Issuer } from 'did-jwt-vc'

const issuer: Issuer = new EthrDID({
  address: '0xf1232f840f3ad7d23fcdaa84d6c66dac24efb198',
  privateKey: 'd8b595680851765f38ea5405129244ba3cbad84467d190859f4c8b20c1ff6c75'
})

想象一下, 把 ether-did, 换成 abt-did,或其他did,都能工作那是比较好的。 我们自己的一些设计也可以朝这个角度靠拢个。

目前有两个比较简单容易用的did方法: did:key, 这个完全不依赖后段, did:web,这个根据一个web服务返回 did,都是比较简单容易的did,经常被用作不同did 互动的 reference

@mave99a
Copy link
Contributor Author

mave99a commented Nov 20, 2020

https://identity.foundation/working-groups/identifiers-discovery.html

这里有不少repo的设计可能值得学习和研究

@wangshijun wangshijun self-assigned this Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants