我应该在哪里粘贴此文档中的代码:https://github.com/uport-project/uport-connect
我正在谈论这段代码:
import { Connect } from 'uport-connect'
const uport = new Connect('MyDAppName')
// or on mainnet
// const uport = new Connect('MyDAppName', {network: 'mainnet'})
还有这个:
uport.requestDisclosure()
uport.onResponse('disclosureReq').then(res => {
const did = res.payload.did
...
})