diff --git a/docs/source/usage.rst b/docs/source/usage.rst index ee7120a..4324c2c 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -357,10 +357,10 @@ Recap: Asset Creation & Transfer .then(() => conn.searchAssets('Bicycle Inc.')) .then(assets => console.log('Found assets with serial number Bicycle Inc.:', assets)) -Seed Functionality Ed25519Keypair +Ed25519Keypair Seed Functionality --------------------------------- -BigchainDB JavaScript driver allows you to create a keypair based on a seed. +BigchainDB JavaScript driver allows you to create a keypair based on a seed. The constructor accepts a 32 byte seed. One of the ways to create a seed from a string (e.g. a passphrase) is the one used by ``bip39``, specifically the function ``mnemonicToSeed``. @@ -375,6 +375,11 @@ As our constructor ``Ed25519Keypair()`` only accepts a seed of 32 bytes, we slic var keypair = new driver.Ed25519Keypair(bip39.mnemonicToSeed("yourString").slice(0, 32)) +You can use the ``Ed25519Keypair()`` constructor as well without seed. + +.. code-block:: js + + var keypair = new driver.Ed25519Keypair() Divisible Assets ----------------