Documentation Index
Fetch the complete documentation index at: https://docs.neynar.com/llms.txt
Use this file to discover all available pages before exploring further.
Opens a specific cast in the Farcaster client.
import { sdk } from '@farcaster/miniapp-sdk'
// View cast by hash
await sdk.actions.viewCast({ hash: '0xa2fbef8c8e4d00d8f84ff45f9763b8bae2c5c544' })
Parameters
The hash of the cast you want to view.
Return Value
Promise<void> - This action does not return a value. It triggers navigation to the cast view in the Farcaster client.
// View a specific cast
await sdk.actions.viewCast({
hash: "0x6a112e2d35e2d2008e25dd29811e8769d1edd9ca",
});
// View a cast and close the mini app
await sdk.actions.viewCast({
hash: "0x6a112e2d35e2d2008e25dd29811e8769d1edd9ca",
close: true,
});
// View a cast by author and hash
await sdk.actions.viewCast({
hash: "0x78c086e5",
authorUsername: "six",
});