Content pfp
Content
@
https://warpcast.com/~/channel/fc-devs
0 reply
0 recast
0 reaction

Greg pfp
Greg
@greg
where is the latest example of how to create a signer and publish a message to snapchain? examples in the docs don't work :/ https://docs.farcaster.xyz/developers/guides/writing/submit-messages
1 reply
1 recast
2 reactions

Sanjay pfp
Sanjay
@sanjay
That is the latest. Specifically, this example should work https://github.com/farcasterxyz/hub-monorepo/blob/main/packages/hub-nodejs/examples/write-data/index.ts. What's the error you're seeing?
2 replies
0 recast
2 reactions

Greg pfp
Greg
@greg
just copied and pasted the whole file to my editor with latest version of farcaster/hub-nodejs and getting type errors on every makeCastAdd() as well as the final client.submitMessage Property `type` is missing but required in type `CastAddBody` for the former I fixed that but client.submitMessage is still not happy
2 replies
0 recast
1 reaction

Sanjay pfp
Sanjay
@sanjay
Hmm, that's odd. `type` should be optional. But you should able to do `type: CastType.CAST` and it should work. I'll fix. What's the issue with submitMessage?
1 reply
0 recast
1 reaction

Greg pfp
Greg
@greg
yea that's what i did for makeCastAdd but then submitMessage seems to not like CastType.CAST
1 reply
0 recast
1 reaction

Greg pfp
Greg
@greg
also worth pointing out that the example tries to do the equivalent of `client.submitMessage(cast)` instead of `cast.value` but that seemed even more wrong ๐Ÿ˜…
1 reply
0 recast
1 reaction