DOCS.DEVFRIDGE.COOL

SDK

Gate access with Fridge timelocks

DevFridge $PASTA · Solana mint: 39kMeX4HVRW9qbbiHSPbRQ9xeXUF18GrNP6gL61Ppump · Ticker ≠ identity.

sdk.devfridge.cool contains the complete API reference, code samples, React examples, server-side examples, and AI integration prompts.

The DevFridge SDK lets a site use on-chain Fridge timelocks as a subscription gate instead of recurring payments. A user locks tokens to subscribe; longer locks mean fewer renewal transactions.

It is for any project that wants gated access without building billing infrastructure. Plans can use any token mint, not just $PASTA.

How it works

  1. The developer configures plans with minLockDays, renewalThresholdDays, and minLockAmount.
  2. The user locks tokens on devfridge.cool.
  3. The SDK checks qualifying locks through scan.devfridge.cool/api/sdk/check.
  4. The response returns active, needsRenewal, and daysRemaining so your app can grant access, prompt a renewal, or show the gate.

Quick start

<script src="https://sdk.devfridge.cool/sdk/devfridge-sdk.js"></script>
const fridge = new DevFridgeSDK({
  tokenMint: "YOUR_TOKEN_MINT_ADDRESS",
  plans: {
    pro: {
      minLockDays: 60,
      renewalThresholdDays: 29,
      minLockAmount: 10_000_000_000_000,
    },
  },
});

async function checkSubscription(walletAddress) {
  const status = await fridge.checkSubscription(walletAddress);

  if (status.active && !status.needsRenewal) {
    showContent();
    return;
  }

  if (status.active && status.needsRenewal) {
    showContent();
    showRenewalBanner(status.daysRemaining);
    return;
  }

  showSubscriptionGate();
}

Related pages

  • Fridge lock — the on-chain timelock program reused by SDK subscriptions.
  • Badge — the same live Fridge badge used across the ecosystem.