randomSeed
This method is used to generate a new seed to be used with connectWithSeed.
Generated seed needs to be stored securely as it is the only way to authenticate the generated did:key.
DIDs using this method of authentication are meant for Credential generation and cannot utilize Lit.
How to use?
import { randomSeed } from "@orbisclub/orbis-sdk/utils/index.js"
const res = randomSeed();Parameters
None.
Returns
Uint8Array(32)Examples
Generate a new did:key and connect with it
In order to initiate Orbis SDK with a did:key connectWithSeed method is used.
/** Generate a new seed */
const seed = randomSeed()
const res = await orbis.connectWithSeed(seed)
console.log(res)