diff --git a/pb/crypto.proto b/pb/crypto.proto index 76bc53c..345a904 100644 --- a/pb/crypto.proto +++ b/pb/crypto.proto @@ -1,5 +1,3 @@ -package crypto.pb; - enum KeyType { RSA = 0; } diff --git a/src/index.js b/src/index.js index 64f5d81..96cf02b 100644 --- a/src/index.js +++ b/src/index.js @@ -60,7 +60,7 @@ function Id (id, privKey, pubKey) { } } -// unwrap the private key protobuf stream +// unwrap the private key protobuf function unmarshal (key) { var dpb = messages.PrivateKey.decode(key) return dpb diff --git a/tests/test.js b/tests/test.js index b643d30..61a55cc 100644 --- a/tests/test.js +++ b/tests/test.js @@ -18,8 +18,8 @@ const testIdB58String = 'QmQ2zigjQikYnyYUSXZydNXrDRhBut2mubwJBaLXobMt3A' describe('id', function (done) { this.timeout(30000) it('create a new id', done => { - // this will always be randomly generated. is there something i can test it against? var id = PeerId.create() + expect(id.toB58String().length).to.equal(46) done() }) it('recreate an Id from Hex string', done => {