The javascript/typescript client for interacting with documents on SPK network.
const spkClient = new SpkClient(SPK_INDEXER_HOST, ceramicClient),
const docContent = { key: "value" }
const parentId = "optionalParentStreamId"
const created = await spkClient.createDocument(docContent, parentId)
console.log(`Created new document with streamId ${created.streamId} and parent id ${parentId}`)
const fetched = await spkClient.fetchDocument(streamId)
const newContent = { key: "value2" }
await spkClient.updateDocument(streamId, newContent)
const userDocs = await spkClient.getDocumentsForUser("[Owning User DID]")
const childDocs = await spkClient.getDocumentChildren("[Parent document stream ID]")
- Public SPK indexer node https://us-01.infra.3speak.tv