Sherry SDK
Build Interactive Web3 Triggers
What is Sherry SDK?
Think of Sherry SDK as a way to turn any social media post into an interactive Web3 application. Users can swap tokens, mint NFTs, vote on proposals, and more - all without leaving their social feed.
Sherry SDK is a TypeScript-first toolkit for building interactive Web3 triggers that embed directly within social media posts. Transform static content into dynamic blockchain experiences that users can interact with seamlessly.
What Makes Sherry Special?
- Embed Anywhere: Your triggers work in Twitter, Discord, Telegram, and any platform that supports rich content
- Zero Context Switch: Users never leave their social feed to interact with your dApp
- Developer Friendly: TypeScript-first with built-in validation and comprehensive tooling
- Multi-Chain Ready: One codebase, multiple blockchains - Avalanche, Celo, Ethereum, and more
Key Features
5 Powerful Action Types
Action Type | Use Case | Example |
---|---|---|
Blockchain | Smart contract interactions | Token approvals, NFT minting, DAO voting |
Transfer | Native token transfers | Tips, donations, payments |
Dynamic | Server-computed actions | Complex DeFi strategies, dynamic pricing |
Flow | Multi-step processes | Onboarding, approval + swap workflows |
Multi-Chain Support
- Mainnets: Avalanche C-Chain, Celo, Ethereum
- Testnets: Avalanche Fuji, Celo Alfajores
- Cross-Chain: Built-in bridge support via Wormhole
Built-in Validation
- Compile-time: Full TypeScript support catches errors early
- Runtime:
createMetadata()
validates your trigger configuration - ABI Compatibility: Automatic parameter validation against smart contract ABIs
Rich Parameter System
Configure user inputs with built-in validation:
- Standard Types: Text, numbers, addresses, booleans, dates.
- Selection Types: Dropdowns, radio buttons with custom options.
- File Types: Support for file and image uploads with specific constraints.
- Templates: Pre-built parameter templates for common use cases like email, amount, etc.
Refer to the Action Parameters documentation for full details.
Quick Start
Installation
npm install @sherrylinks/sdk
Your First Trigger
import { createMetadata, Metadata } from '@sherrylinks/sdk';
const metadata: Metadata = {
url: 'https://my-nft-collection.com',
icon: 'https://my-nft-collection.com/icon.png',
title: 'Mint Cosmic NFT',
description: 'Mint exclusive NFTs directly from social media',
actions: [
{
type: 'blockchain',
label: 'Mint NFT',
address: '0x742d35Cc6734C0532925a3b8D4ccd306f6F4B26C',
abi: contractAbi,
functionName: 'mint',
chains: { source: 43114 },
amount: 0.1, // 0.1 AVAX mint price
params: [
{
name: 'to',
label: 'Your Address',
type: 'address',
required: true,
},
{
name: 'tokenURI',
label: 'Metadata URI',
type: 'text',
value: 'ipfs://QmNft42...',
fixed: true,
},
],
},
],
};
// Validate and use your trigger
const validated = createMetadata(metadata);
console.log('✅ Trigger ready to deploy!');
What This Creates
When embedded in a social post, this trigger renders as:
Mint Cosmic NFT
┌─────────────────────────────────┐
│ Your Address: [0x...________] │
│ [Mint for 0.1 AVAX] │
└─────────────────────────────────┘
Users can mint directly from their social feed!
Learning Paths
Choose your adventure based on your experience level:
I want to start immediately
→ 5-Minute Quickstart - Get a trigger running in 5 minutes
I'm new to Web3 development
→ Complete Tutorial - Step-by-step with Next.js (30 min)
I'm experienced, show me the API
→ Action Types Reference - Deep dive into the API
I want to see examples
→ Live Examples - Working triggers for common use cases
Popular Use Cases
NFT Collections
Let users mint NFTs directly from announcement posts
Token Swaps
Enable DeFi trading without leaving social media
DAO Governance
Embed voting directly in community discussions
Donations
Accept crypto donations with custom amounts and recipients
Cross-Chain Bridges
Move assets between blockchains seamlessly
Lead Generation
Combine Web3 actions with email collection
Advanced Features
Multi-Step Flows
Create complex workflows with conditional logic:
const onboardingFlow: ActionFlow = {
type: 'flow',
label: 'Join Community',
initialActionId: 'collect-email',
actions: [
{
id: 'collect-email',
type: 'http',
label: 'Step 1: Enter Email',
path: '/api/newsletter',
params: [
/* email params */
],
nextActions: [{ actionId: 'mint-membership' }],
},
{
id: 'mint-membership',
type: 'blockchain',
label: 'Step 2: Mint Membership',
// ... blockchain action config
nextActions: [{ actionId: 'welcome' }],
},
{
id: 'welcome',
type: 'completion',
message: 'Welcome to the community!',
status: 'success',
},
],
};
Dynamic Actions
Server-side computed actions for complex logic:
{
type: 'dynamic',
label: 'Smart Swap',
path: '/api/calculate-optimal-swap',
chains: { source: 43114 },
params: [
{
name: 'amount',
label: 'Amount to Swap',
type: 'number',
required: true
}
]
}
Your server calculates the optimal swap route and returns a ready-to-execute transaction.
Ecosystem
Integration
- Social Platforms: Twitter/X, Twitch, YouTube
- Wallets: Comming soon
- Blockchains: Avalanche, Fuji
Community
- Discord - Get help and connect with other developers
- GitHub - Contribute to the SDK
- Examples Repository - Real-world implementations
Ready to Build?
Choose your starting point:
- Quick Start (5 min) - Get running immediately
- Complete Tutorial - Step-by-step guide with Next.js
- View Examples - Production-ready code samples
- API Reference - Deep dive into the SDK
SDK Stats
- Bundle Size: ~50KB gzipped
- Dependencies: Minimal (viem, abitype)
- Test Coverage: >90%
- TypeScript: 100% type coverage
- Performance: $<100ms validation time
The Sherry SDK is in active development. We're working hard to make everything as polished as possible. Found a bug? Report it on GitHub Need help? Join our Discord Want to contribute? Check our contribution guide