SDK Installation & Setup
SocialBlock provides a lightweight, framework-agnostic JavaScript SDK compatible with any modern frontend (React, Vue, Svelte, Vanilla JS).
π¦ Install via npm:
npm install @socialblock/sdk
βοΈ Basic Initialization:
import { SocialBlock } from '@socialblock/sdk'
SocialBlock.init({
domain: 'https://yourdomain.xyz',
chatroom: true,
tokenGating: {
tokenAddress: 'SBLK...', // CW20 or NFT
minHold: 10 // token threshold
},
streamOverlay: false
})
β Requirements:
Wallet connection (Keplr / MetaMask + custom)
DOM element to attach overlay (
#sb-chat
)HTTPS domain (chat overlays require SSL)
Embedded or popup mode supported
Last updated