@gooddollar/ceramic-seed-sdk
v1.0.9
Published
Manage a privatekey or seed by multiple Ids
Downloads
15
Readme
CeramicSeedSDK
Manage a privatekey or seed by multiple Ids
Getting Started
Install Ceramic-seed-sdk into your project
yarn add @gooddollar/ceramic-seed-sdk
Usage
import { CeramicSDK } from '@gooddollar/ceramic-seed-sdk'
- Create a new instance of the sdk:
const sdk = new CeramicSDK("https://ceramic-clay.3boxlabs.com");
- Initialize a DID based on private key and create a new one if none exists:
const sdkClient = new CeramicSDK(NODE_URL_3BOXLABS);
const myPrvkey = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; // Length need to be 32
const res = await sdkClient.initialize(myPrvkey, "pubkeyToUseAsAuthId");
- Add the given private key as another authSecret that can access the DID seed:
const res = await sdkClient.addAuthenticator(myNewPrvkey, derivedPubkey2);
- Remove the provided authenticator:
const removed = await sdkClient.removeAuthenticator(pubkey);
- Retrieves the unencrypted master seed:
const ms = await sdkClient.getMasterSeed();