neynarxyz / nodejs-sdk

Typescript SDK for Neynar APIs
https://neynar.com
MIT License
50 stars 10 forks source link

Kevin/neyn 1450 calling postframeaction with #110

Closed MrKevinOConnell closed 4 months ago

MrKevinOConnell commented 4 months ago

Note: the /frame/action endpoint is autogenerated, so I set maxRedirects to the frame config

test:

const cast_hash = "0xcaf0ba0af50df96a6e168b8c751b9a9a2a1db54f"
const casts = await client.fetchBulkCasts([cast_hash])
const cast = casts.result.casts[0]
console.log(cast)
console.log(cast.frames[0].buttons)
const frame = await client.postFrameAction(process.env.SIGNER_UUID,cast_hash,{...cast.frames[0],button: cast.frames[0].buttons[0]})

console.log(frame)

returns:

Screenshot 2024-05-07 at 4 29 59 PM