Skip to main content
Defined in @coinbase/onchainkit
Opens a specific Farcaster cast within the host application using the castโ€™s unique hash identifier.

Parameters

string
required
The unique hash identifier of the cast to view. This is the cryptographic hash that uniquely identifies a cast on the Farcaster network.

Returns

() => void
Function that opens the specified cast when called.

Usage Patterns

Content Attribution

Reference original casts that inspired your Mini App content:
components/AttributionFooter.tsx

Discussion Threading

Navigate cast conversations and replies:
components/DiscussionThread.tsx

Social Proof

Showcase community engagement with your Mini App:
components/SocialProof.tsx

Best Practices

Hash Validation

Always validate cast hashes before using them:
components/SafeCastViewer.tsx

Performance Optimization

Cache cast metadata to avoid repeated lookups:
components/CastLibrary.tsx

User Experience

Provide context about the cast before opening:
components/ContextualCastLink.tsx
Cast hashes must be valid Farcaster cast identifiers. Invalid hashes may cause errors or unexpected behavior in the host application.
Viewing casts provides a seamless way to reference Farcaster content from your Mini App. Use this for community highlights, content attribution, and threading discussions related to your app.