Builds a publishable PreKeyBundle from a batch for the server.
Includes: identity public key + SPK public key + SPK signature + optionally one OTK public key by index.
The PreKeyBatch to extract from.
Recipient's Ed25519 public key.
Optional
Optional index of an OTK to include (0-based).
PreKeyBundle ready for server upload.
const bundle = publishableBundle(batch, identityPub, 42);// bundle.oneTimePreKeyPublicKey = batch.oneTimePreKeys[42].publicKey Copy
const bundle = publishableBundle(batch, identityPub, 42);// bundle.oneTimePreKeyPublicKey = batch.oneTimePreKeys[42].publicKey
Builds a publishable PreKeyBundle from a batch for the server.
Includes: identity public key + SPK public key + SPK signature + optionally one OTK public key by index.