Skip to main content
Version: 0.3.x

Composites discovery

ComposeDB does not yet provide a way to discover composites directly, however it is possible to create composites from known models.

Models discovery

The ComposeDB CLI can be used to list the models indexed by 3Box Labs on the Clay network.

composedb model:list --table

Creating a composite from known models

When models are available on a Ceramic network, it is possible to load them into a composite so they can be easily reused.

Make sure you have the composedb packages installed, before running the code below.

import { CeramicClient } from '@ceramicnetwork/http-client'
import { Composite } from '@composedb/devtools'
import { writeEncodedComposite } from '@composedb/devtools-node'

const ceramic = new CeramicClient('https://gateway-clay.ceramic.network')
const composite = await Composite.fromModels({ ceramic, models: ['<model ID>'] })

await writeEncodedComposite(composite, 'my-composite.json')