-
Notifications
You must be signed in to change notification settings - Fork 1
/
.details
30 lines (25 loc) · 1 KB
/
.details
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
address - 2p1G3gh8jdkPAdGGMr7Un9zBJdLvs2ZQrgQ
public key - 0x044f4fce5699c82a8a823b8911cd3f8b0ba8c9d90b78c0e8dc98c5acd7881e4b720d4b81561ae942b7dd3e1dc558de86b1d342d9d46f5f8e221a958b28c50d4a1a
code -
import { Connect, SimpleSigner } from 'uport-connect'
const uport = new Connect('T\'s new app', {
clientId: '2p1G3gh8jdkPAdGGMr7Un9zBJdLvs2ZQrgQ',
network: 'rinkeby or ropsten or kovan',
signer: SimpleSigner('9cd6bcb4398975b73edb8e9af716924779bdf45a3036e34cd228979a6135d68a')
})
// Request credentials to login
uport.requestCredentials({
requested: ['name', 'phone', 'country'],
notifications: true // We want this if we want to recieve credentials
})
.then((credentials) => {
// Do something
})
// Attest specific credentials
uport.attestCredentials({
sub: THE_RECEIVING_UPORT_ADDRESS,
claim: {
CREDENTIAL_NAME: CREDENTIAL_VALUE
},
exp: new Date().getTime() + 30 * 24 * 60 * 60 * 1000, // 30 days from now
})