Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/keys/ed25519-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

const sha = require('multihashing-async/src/sha')
const protobuf = require('protons')
const multibase = require('multibase')
const errcode = require('err-code')
const uint8ArrayEquals = require('uint8arrays/equals')
const uint8ArrayToString = require('uint8arrays/to-string')

const crypto = require('./ed25519')
const pbm = protobuf(require('./keys.proto'))
Expand Down Expand Up @@ -85,7 +85,7 @@ class Ed25519PrivateKey {
*/
async id () {
const hash = await this.public.hash()
return multibase.encode('base58btc', hash).toString().slice(1)
return uint8ArrayToString(hash, 'base58btc')
}

/**
Expand Down