Generate runtime definition independently of backend

Hi, is there a way as a client, to generate a runtimeDefinition.js by interacting only with a ceramic-node url?

Backend deployed a composite to testnet-clay, can my frontend independently build the runtimeDefinition.js ?

Because it seems that I have to create that definition from an encoded json composite.

Can I fetch this encoded.json from ceramic node url, from the frontend, and use it to generate the runtime definition ? Thanks

Hi, the encoded composite definition is the “source” of your composite, it is used notably to deploy models to any node, and generate the runtime definition files that can be used by the client.
You can’t generate the runtime definitions without the encoded composite definition, the Ceramic node itself doesn’t know anything about composites, only models.

Hi @paul ,

Thank you for the clarification.

Here are some assumptions, feel free to correct me please:

  1. The encoded definition of a composite will change depending on the ceramic node where it is deployed.
    (it seemed to change depending on if I am interacting with my local dev ceramic node and my staging ceramic node) is that correct?

2, Do you have any suggestions/recommendations on the best procedure for the frontend client to generate to runtime definition needed to interact with deployed ceramic node?

Hi,

  1. The encoded definition is a JSON file that describes models and additional metadata, it’s not affected by anything happening on a Ceramic node.
  2. The simplest way to create a runtime composite from an encoded on is likely to use the CLI, see Composites | ComposeDB on Ceramic