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