Possible bug in docs

I was following these steps

and this code

import { CeramicClient } from '@ceramicnetwork/http-client'
import { readEncodedComposite } from '@composedb/devtools-node'
import { DID } from 'dids'
import { Ed25519Provider } from 'key-did-provider-ed25519'
import { getResolver } from 'key-did-resolver'
import { fromString } from 'uint8arrays/from-string'

// Hexadecimal-encoded private key for a DID having admin access to the target Ceramic node
// Replace the example key here by your admin private key
const privateKey = fromString('b0cb[...]515f')

const did = new DID({
  resolver: getResolver(),
  provider: new Ed25519Provider(privateKey),
await did.authenticate()

// Replace by the URL of the Ceramic node you want to deploy the Models to
const ceramic = new CeramicClient('http://localhost:7007')
// An authenticated DID with admin access must be set on the Ceramic instance
ceramic.did = did

// Replace by the path to the local encoded composite file
const composite = await readEncodedComposite(ceramic, 'my-first-composite.json')

// Notify the Ceramic node to index the models present in the composite
await composite.startIndexingOn(ceramic)

only worked with this change

const privateKey = fromString('b0cb[...]515f', "base16")

NOTE: the key I was using was


of course I have changed it now.

I hope this helps the docs, otherwise I’d love to know where I went wrong.

Thanks :slight_smile:

Hi, yes indeed it’s missing in the docs, thanks for reporting the issue!
This PR should fix it once merged: Fix missing second argument to import DID private key in code examples by PaulLeCam · Pull Request #57 · ceramicstudio/js-composedb · GitHub