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.
- Using the CLI
- Using the API
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')
composedb composite:from-model <model ID> --ceramic-url=https://gateway-clay.ceramic.network --output=my-composite.json