diff --git a/index.js b/index.js index 75f9009..715d8e1 100644 --- a/index.js +++ b/index.js @@ -72,8 +72,9 @@ async function SDK ({ // I think this is used to create a persisted identity? const noiseSeed = corestore._deriveSecret(applicationName, 'replication-keypair') + const keyPair = HypercoreProtocol.keyPair(noiseSeed) swarm.listen({ - keyPair: HypercoreProtocol.keyPair(noiseSeed) + keyPair }) return { @@ -88,6 +89,10 @@ async function SDK ({ _dns: dns } + async function getIdentity() { + return keyPair + } + function destroy (cb) { for (const drive of drives.values()) { drive.close()