@gooddollar/ceramic-seed-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i @gooddollar/ceramic-seed-sdk

Weekly Downloads

0

Version

1.0.9

License

ISC

Unpacked Size

43.8 kB

Total Files

13

Last publish

Collaborators

  • lbwgd
  • sirpush
  • alexey-goddollar