yeah prev/id are cids (or ipld links), id is the genesis event cid. Your python example, both the prev/id are dag-cbor cids, when they should likely be dag-jose cids, looks like an issue there
Have you been able to create genesis events already? and now try to update? (edit: oh now see your second part, hmm)
@zfer Those CIDs came from the API itself. Does this mean that I have to re-encode them vefore submiting another request?
What’s the difference between dag-cbor and dag-jose? When I replicated the code, I saw that the dag-jose-utils library uses the dag-cbor codec. See here: const block = await Block.encode({ value: payload, codec: dagCBOR, hasher: sha256 })
I have also found that the payload encoding produces different results when these cids from the payload are string representations vs when they are instances of the CID class. Do these classes have custom encoding?
You would do the same for a genesis event, and can add data if you want
The genesis payload is encoded in dag-cbor, then that dag-cbor cid is encoded and signed and wrapped in dag-jose. The dag-jose signed block links to the dag-cbor block payload
@zfer I’m following your advice and trying to first create a signed genesis commit. I’ve debugged the JS library and the payload I now get from python is identical. But Istill get an error while sending it:
{'error': "Cannot read properties of undefined (reading 'id')"}
What does this error mean? The only similar field in the payload is _id. Does the payload looks good to you?
If anyone having the same issues as @mdot and me is interested in a Python client for Ceramic, now that we have a stripped down version, we’re collecting some feedback so we can decide whether to build a full-fledged client. Show your interest in this thread.