Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

fix!: remove getPublicKey method #376

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Apr 17, 2023

The getPublicKey method can be used to fetch the public key of a peer that uses an RSA peer id.

The same thing can be accomplished by using content routing to look up the value for the /pk key. E.g

const peerKey = uint8ArrayConcat([
  uint8ArrayFromString('/pk/'),
  peerId.multihash.digest
])

const key = await node.contentRouting.get(peerKey)

BREAKING CHANGE: the getPublicKey method has been removed

The getPublicKey method can be used to fetch the public key of a
peer that uses an RSA peer id.

This method is redundant as it can be accomplished by using content
routing to look up the value for the `/pk` key.  E.g

```js
const peerKey = uint8ArrayConcat([
  uint8ArrayFromString('/pk/'),
  peer.multihash.digest
])

const key = await node.contentRouting.get(peerKey)
```

BREAKING CHANGE: the getPublicKey method has been removed
@achingbrain achingbrain marked this pull request as draft April 17, 2023 15:55
@achingbrain achingbrain requested review from wemeetagain and maschad May 9, 2023 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants