4.0.0-rc.0The public key is a base64 encoded string of a protobuf containing an RSA DER buffer. This uses a node buffer to pass the base64 encoded public key protobuf to the multihash for ID generation.
var PeerId = require('peer-id')
PeerId.create({ bits: 1024 }, (err, id) => {
  console.log(JSON.stringify(id.toJSON(), null, 2)
})
{
  "id": "Qma9T5YraSnpRDZqRR4krcSJabThc8nwZuJV3LercPHufi",
  "privKey": "CAAS4AQwggJcAgEAAoGBAMBgbIqyOL26oV3nGPBYrdpbv..",
  "pubKey": "CAASogEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMBgbIqyOL26oV3nGPBYrdpbvzCY..."
}
  
Creates a new Klass
Extends Stream.Writable
(any)
	    
          A magic number that identifies this Klass.
Klass event
a typedef with nested properties
(any)
	    
          (any)
	    
          Get an instance of Klass. Will make a klass instance multiword, like a klass
Klass:
        that class
      
    
  
  
  
  
  
  
Rest property function
(...Number)
	    
          undefined:
        nothing
      
    
  
  
  
  
  
  
Get an instance of Klass. Will make a klass instance multiword, like a klass. This needs a number input.
undefined:
        nothing
      
    
  
  
  
  
  
  
This is Foo
This is bar
I am the container of stream types
I am a passthrough stream that belongs to customStreams