Full SDK + React component library for ContentHub — a decentralised content platform on Celo & Base.
Includes:
- Contract ABIs + deployed addresses (Celo mainnet & Base mainnet)
- MiniPay wallet integration utilities (balances, transfers, gas estimation)
- Pre-configured wagmi config (Base, Celo, Celo Sepolia)
- Divvi referral SDK helpers
- Farcaster Mini App SDK hook
<Navbar />React component with auto-MiniPay detection
Repository: https://github.com/AK-Bit-Lab/ContentHub-Packages
Live app: https://contenthubs.vercel.app
npm install @bamzzstudio/contenthub-sdk
# peer deps
npm install viem wagmi react react-domFor the <Navbar /> component, also install:
npm install @rainbow-me/rainbowkitimport { createContentHubWagmiConfig } from '@bamzzstudio/contenthub-sdk/wagmi';
const config = createContentHubWagmiConfig({
walletConnectProjectId: 'your-project-id',
});import { CONTRACTS, COMMUNITY_CONTENT_HUB_ABI, CONTENT_NFT_ABI } from '@bamzzstudio/contenthub-sdk/contracts';
const celoHub = CONTRACTS.celo.communityContentHub;
// { address: '0x0bac...', abi: [...] }import {
isMiniPay,
getMiniPayAddress,
createMiniPayPublicClient,
createMiniPayWalletClient,
getUSDmBalance,
sendTokenTransfer,
USDM_ADDRESS,
} from '@bamzzstudio/contenthub-sdk/minipay';
if (isMiniPay()) {
const address = await getMiniPayAddress();
const publicClient = createMiniPayPublicClient();
const balance = await getUSDmBalance(publicClient, address!);
console.log('USDm balance:', balance);
}import { getDivviReferralTag, submitDivviReferral } from '@bamzzstudio/contenthub-sdk/divvi';
const tag = getDivviReferralTag(userAddress);
// append tag to transaction calldata
// after tx confirmed:
await submitDivviReferral(txHash, chainId);import { useFarcasterContext } from '@bamzzstudio/contenthub-sdk/farcaster';
function App() {
const { isSDKLoaded, context } = useFarcasterContext();
// ...
}import { Navbar } from '@bamzzstudio/contenthub-sdk/components';
export default function Layout({ children }) {
return (
<>
<Navbar appName="My App" logoSrc="/logo.svg" />
<main>{children}</main>
</>
);
}| Path | Contents |
|---|---|
@bamzzstudio/contenthub-sdk |
All exports re-exported |
.../abi |
COMMUNITY_CONTENT_HUB_ABI, CONTENT_NFT_ABI |
.../contracts |
CONTRACTS, NETWORK_NAMES, ABIs |
.../minipay |
MiniPay utils, ERC-20 ABI, token addresses |
.../wagmi |
createContentHubWagmiConfig, defaultConfig |
.../divvi |
getDivviReferralTag, submitDivviReferral |
.../farcaster |
useFarcasterContext, farcasterSdk |
.../components |
<Navbar /> |
MIT © AK-Bit-Lab