Merge pull request #684 from spartanz51/patch-1

Write Access with id ?
This commit is contained in:
Mark Robert Henderson 2019-09-16 22:47:47 -04:00 committed by GitHub
commit 4af0ab3226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,7 +193,7 @@ ipfs.on('ready', async () => {
const options = {
// Give write access to ourselves
accessController: {
write: [orbitdb.identity.publicKey]
write: [orbitdb.identity.id]
}
}
@ -203,7 +203,7 @@ ipfs.on('ready', async () => {
})
```
To give write access to another peer, you'll need to get their public key with some means. They'll need to give you the output of their OrbitDB instance's key: `orbitdb.identity.publicKey`.
To give write access to another peer, you'll need to get their public key with some means. They'll need to give you the output of their OrbitDB instance's key: `orbitdb.identity.id`.
The keys look like this:
`042c07044e7ea51a489c02854db5e09f0191690dc59db0afd95328c9db614a2976e088cab7c86d7e48183191258fc59dc699653508ce25bf0369d67f33d5d77839`
@ -219,7 +219,7 @@ ipfs.on('ready', async () => {
accessController: {
write: [
// Give access to ourselves
orbitdb.identity.publicKey,
orbitdb.identity.id,
// Give access to the second peer
'042c07044e7ea51a489c02854db5e09f0191690dc59db0afd95328c9db614a2976e088cab7c86d7e48183191258fc59dc699653508ce25bf0369d67f33d5d77839',
]