Documentation

Build on Solinkify

One settlement layer to charge (and pay) for datasets, APIs, content, and checkouts, whether the customer is a person or an autonomous AI agent. Five pillars, one on-chain program on Solana.

Overview

Solinkify is a Web3 ecosystem on Solana with five product pillars backed by a single Anchor program, one escrow model, and one fee-split router. The recipient always keeps 99%; a flat 1% protocol fee is split on-chain.

Program IDA8qSJCS2uxxnEMdCcpjX2L8hUUMydoeCi5xq5qvzS22B
NetworkSolana Devnet (current)
Protocol fee1% flat · 0.8% with a $SINKY discount
StablecoinsUSDC · USDT · PYUSD (6 decimals)
EscrowProgram-owned PDAs, never end-user wallets
Base APIhttps://api.solinkify.com

Packages are consumed from the monorepo today; NPM / PyPI / marketplace publishing is deferred to pre-mainnet.

How it works: the money flow

Every payment settles on-chain. 99% goes to the recipient; the 1% fee is split by route:

DestinationJalur A (direct)Jalur B (via node)
Recipient99%99%
Relay node0.375%
Epoch pool0.375%
Treasury0.9%0.15%
Team0.1%0.1%
  • Jalur B → A fallback: if no active relay node/epoch, the fee falls back to the Jalur A split automatically.
  • $SINKY discount: stake ≥ 500 SINKY and your total fee drops to 0.8% (every share ×0.8).
  • Escrow + anti-replay: funds route through a program PDA; verification is one-shot, bound to endpoint + amount + mint.

Gate: the AI paywall

Block AI scrapers with an HTTP 402 paywall; ethical agents auto-pay in stablecoins. It ships as one core with thin adapters for every stack.

Install

bash
npm install @solinkify/gate

Next.js (middleware)

ts
// middleware.ts
import { protectFromAI } from "@solinkify/gate";

export const middleware = protectFromAI({
  wallet: "YOUR_CREATOR_WALLET",   // receives 99%
  price: 0.001,                     // per request (USDC)
  endpointId: "my-blog",            // your on-chain endpoint
  detection: "basic",               // basic (SEO-safe) | strict | strict+
});

export const config = { matcher: "/:path*" };

Express

ts
import { protectFromAIExpress } from "@solinkify/gate/express";

app.use(protectFromAIExpress({
  wallet: "YOUR_CREATOR_WALLET",
  price: 0.001,
  endpointId: "my-api",
}));

Runs on (almost) any stack

Adapters: Next.js · Express · Cloudflare Workers · Astro · SvelteKit · Hono · Nuxt · Remix · Fastify · Lambda@Edge · generic Fetch. Plus Python (WSGI/ASGI), a WordPress plugin, a Kong plugin, and a reverse proxy for any site (PHP/Ruby/static/legacy) with no code changes.

Python (Flask / Django / FastAPI)

bash
pip install solinkify-gate
python
# WSGI (Flask / Django). ASGI variant: solinkify_gate.asgi
from solinkify_gate import GateConfig
from solinkify_gate.wsgi import SolinkifyGateMiddleware

app.wsgi_app = SolinkifyGateMiddleware(app.wsgi_app, GateConfig(
    wallet="YOUR_CREATOR_WALLET",
    price=0.001,
    endpoint_id="my-api",
))

WordPress · Kong · any site (proxy)

WordPress

  1. Copy the plugin into wp-content/plugins/ (single file, no build).
  2. Activate it in Plugins.
  3. Set your wallet + price in the plugin settings.

Kong Gateway

  1. Copy sdk-gate-kong/kong/plugins/solinkify-gate to Kong’s Lua path.
  2. Enable the solinkify-gate plugin.
  3. kong restart.

Any site (proxy)

  1. npm i -g @solinkify/gate-proxy
  2. Write gate.config.json (wallet, price, upstream).
  3. Run it, or use Nginx auth_request / Caddy forward_auth.

What Gate blocks

A 2-tier, SEO-safe detector classifies every request. Real humans and browsers always pass; only bots hit the 402. User-agents are verified against official IP ranges, so a spoofed “Googlebot” from a fake IP is still blocked.

ModeBlocksAllows
basic (default)AI crawlerssearch engines + humans (SEO-safe)
strictAI crawlers + search engineshumans only ⚠ hurts SEO
strict++ headless/scraper UAs, optional datacenter IPshumans only

AI crawlers (blocked in basic & strict): OpenAI GPTBot / ChatGPT-User / OAI-SearchBot, Anthropic ClaudeBot, Google Gemini, PerplexityBot, Amazonbot, ByteDance Bytespider, CommonCrawl CCBot, Diffbot, and more. Search engines (only blocked in strict): Googlebot, Bingbot: allow-listed by default so your SEO stays intact.

Payment modes

  • Pay-per-request: lock → verify → release 99%.
  • Pre-paid balance: deposit once; the backend debits per request (no per-request signature).
  • Subscription: buy time-based access; header until expiry.

The AI agent side

An ethical agent auto-pays a 402 with the agent SDK:

ts
import { GateClient } from "@solinkify/gate-sdk";

const client = new GateClient({
  wallet: agentKeypair,
  rpcUrl: "https://api.devnet.solana.com",
  maxPricePerRequest: 0.01,   // budget cap (USDC)
});

const { response, via, paymentId } = await client.fetchProtected(url);
const content = await response.text();
if (via === "payment" && paymentId) await client.release(paymentId);

Pay: crypto checkout

Accept USDC/USDT/PYUSD from customers. One hosted checkout is the core; every channel is a thin adapter that creates a session and redirects to it.

Embeddable widget (no backend)

html
<script src="https://solinkify.com/sdk/solinkify-pay.js"></script>
<button data-solinkify data-merchant="YOUR_WALLET"
  data-amount="9.99" data-currency="USD" data-token="USDC"
  data-order="ORDER-123" data-return="https://store.com/thanks">
  Pay with Crypto
</button>

Server API

bash
curl -X POST https://api.solinkify.com/api/gateway/session \
  -H "Content-Type: application/json" \
  -d '{"merchant_wallet":"YOUR_WALLET","amount":9.99,"currency":"USD","order_id":"ORDER-123","token_mint":"USDC","return_url":"https://store.com/thanks"}'
# → { ok, session_id, checkout_url }, then redirect the buyer to checkout_url

Plugins: WooCommerce, OpenCart, and PrestaShop. Set your wallet and go. Manage everything from the Pay console.

Plugin installation

Packages aren’t on the marketplaces yet (pre-mainnet). Install from the plugin folder in the repo, then set your merchant wallet and default token in the plugin settings (backend defaults to api.solinkify.com).

WooCommerce

  1. Copy packages/sdk-pay-woo into wp-content/plugins/.
  2. WP Admin → Plugins → activate Solinkify Pay for WooCommerce.
  3. WooCommerce → Settings → Payments → enable it, set wallet + token.

OpenCart 3.x

  1. Copy packages/sdk-pay-opencart/upload/ into your OpenCart root.
  2. Admin → Extensions → Payments → install Solinkify Pay.
  3. Edit it: set wallet + token, then Enable.

PrestaShop 8.x

  1. Zip packages/sdk-pay-prestashop/solinkifypay.
  2. Admin → Modules → Upload a module → pick the zip.
  3. Configure: set wallet + token.

DataHub: dataset marketplace

List a dataset with a stablecoin price and on-chain access control (x402); buyers (human or AI) unlock it instantly after paying, and you keep 99%. Every purchase path settles through the same pay_spl instruction.

Browse the Marketplace or list an asset from Upload.

Social Commerce: Blinks

Turn any DataHub asset into a one-click checkout for the X timeline. A Blink is a Solana Action; the shareable link is your asset page with auto-buy params:

text
https://www.solinkify.com/book/<asset_id>?autoBuy=true&noEmail=true

Create and share Blinks from the Social console. The underlying Action lives at /api/actions/buy/<asset_id> and settles Jalur B → A.

DePIN / $SINKY: run a node

Stake $SINKY, relay third-party payments, and earn. A node earns three ways: a direct 0.375% per relayed tx, a stake-weighted share of the epoch USDC pool, and daily $SINKY emission.

TierMin stakeMultiplierEmission/day
Lite251.0×0.015 SINKY
Bronze1001.0×0.07 SINKY
Silver5001.5×0.41 SINKY
Gold20002.5×1.92 SINKY
  • Pool weight = stake × multiplier × uptime. Emission = per-tier accrual × uptime (capped ≈ 1,370/day).
  • Lane Lite: run a phone as a node. It connects outbound to the coordinator (ed25519 auth) and is paid off-chain in batches.
  • Stake ≥ 500 SINKY as a creator/merchant to also cut your own fee to 0.8% (7-day unstake cooldown).

Register and track from the Node console.

API reference

EndpointMethodPurpose
/api/gateway/sessionPOSTcreate a Pay checkout session
/api/gateway/session/:idGETsession detail (checkout + polling)
/api/gateway/session/:id/verifyPOSTconfirm on-chain (fail-closed, anti-replay)
/api/gateway/sessions?merchant=GETlist a merchant's sessions
/api/actions/buy/:idGET/POSTSolana Action (Blink)
/api/books?seller=GETa seller's DataHub assets
/.well-known/solinkifyGETGate discovery document

On-chain

One Anchor program (32 instructions). Key PDAs:

EndpointConfig["gate_endpoint", creator, endpoint_id]
EscrowAccount["gate_escrow", payer, payment_id]
PrepaidBalance["gate_balance", payer, mint]
AssetState["asset", book_id]
NodeOperator["node_operator", operator]
EpochState["epoch_state", epoch_num]
CreatorStake["creator_stake", creator]

Funds are only ever custodied by program-owned PDAs. Fee destinations are pinned on-chain. A caller cannot redirect any part of the fee.