diff --git a/lib/feed-v1/index.js b/lib/feed-v1/index.js index 760e783..fec0ec9 100644 --- a/lib/feed-v1/index.js +++ b/lib/feed-v1/index.js @@ -169,6 +169,7 @@ function create(opts) { if ((err = validateContent(msg))) throw err const privateKey = Buffer.from(opts.keys.private, 'base64') + // TODO: add a label prefix to the metadata before signing const metadataBuf = Buffer.from(stringify(msg.metadata), 'utf8') // TODO: when signing, what's the point of a customizable hmac? const sigBuf = ed25519.sign(privateKey, metadataBuf) @@ -187,6 +188,7 @@ function fromPlaintextBuffer(plaintextBuf, msg) { } module.exports = { + getMsgHash, getMsgId, getFeedId, isFeedId, @@ -198,7 +200,4 @@ module.exports = { validateOOO, validateBatch, validateOOOBatch, - - // custom APIs: - getMsgHash, }