Everything you need to add permissionless, blockchain-native subscriptions to your product — from SDK to smart contracts to webhooks.
Add VREN to any React or Node.js project with a single package. The SDK handles all blockchain complexity so your team ships features, not infrastructure.
npm install @vren/sdkThe VrenProvider initializes your configuration once at the root of your application, making your appId and contract address available to all child components via React context.
import { VrenProvider } from "@vren/sdk/react";
export default function App({ children }) {
return (
<VrenProvider
config={{
appId: "0xYOUR_APP_ID",
network: "polygon",
}}
>
{children}
</VrenProvider>
);
}The useGate hook checks the connected wallet's subscription status against the VREN smart contract in real time. It caches the result for 30 seconds to prevent redundant RPC calls.
import { useGate } from "@vren/sdk/react";
export function PremiumFeature() {
const { data, isLoading } = useGate("premium");
if (isLoading) return <Spinner />;
if (!data?.access) return <UpgradePrompt />;
return <YourPremiumContent />;
}Trigger a USDC subscription directly from your UI. The hook manages wallet confirmation and transaction state, exposing isPending, isConfirming, and isConfirmed flags.
import { useSubscribe } from "@vren/sdk/react";
export function SubscribeButton({ planId }) {
const { subscribe, isPending, isConfirmed } = useSubscribe();
return (
<button
onClick={() => subscribe(planId)}
disabled={isPending}
>
{isPending ? "Confirming…" : "Subscribe"}
</button>
);
}VREN consists of two EVM contracts: VrenRegistry (app identity and payout routing) and VrenSubscription (ERC-1155 minting and USDC payment splitting). Both are open source.
For server-side access checks and receiving on-chain events in your backend, VREN exposes a minimal REST surface.