diff --git a/index.html b/index.html index c1e4ef3..6a616b2 100644 --- a/index.html +++ b/index.html @@ -61,7 +61,7 @@ font-weight: bold;}.hljs-deletion{background: #fdd;}.hljs-addition{background: # multihash of a public key.
create(opts: Object?, callback: function (Error, PeerId))
Create a new PeerId
by generating a new public/private keypair.
create(opts: Object?, callback: function (Error, PeerId))
Create a new PeerId
by generating a new public/private keypair.
opts: Object?
opts.bits: number? (=2048)
createFromB58String(str: string): PeerId
Creates a Peer ID from a base58
string representing the
key's multihash.
str: string
base58
encoded id
PeerId
-createFromPubKey(key: (string | Buffer), callback: function (Error, PeerId))
Creates a Peer ID from a buffer containing a public key.
+createFromPrivKey(key: (string | Buffer), callback: function (Error, PeerId))
Creates a Peer ID from a buffer containing a private key.
createFromJSON(obj: PeerIdJson, callback: function (Error, PeerId))
Import a PeerId
from a serialized JSON object.
obj: PeerIdJson
createFromJSON(obj: PeerIdJson, callback: function (Error, PeerId))
Import a PeerId
from a serialized JSON object.
obj: PeerIdJson
constructor(id: Buffer, privKey: RSAPrivateKey?, pubKey: RSAPublickKey?)
marshalPubKey(): Buffer
Create the protobuf version of the public key, matching go-ipfs formatting.
Buffer
The marshalled public key
Error
Failure
-marshalPrivKey(): Buffer
Create the protobuf version of the private key, +
marshalPrivKey(): Buffer
Create the protobuf version of the private key, matching go-ipfs formatting.
Buffer
-toJSON(): PeerIdJson
Return the jsonified version of the key, matching the formatting +
toJSON(): PeerIdJson
Return the jsonified version of the key, matching the formatting of go-ipfs for its config file.