Ever thought you could sell a joke? Now you can.
Accept Solana payments for any content — a joke, a recipe, a secret, a full course. Two lines of HTML. No backend work for the creator.
- Blogger
- Wix
- Squarespace — password:
test123
<div data-anonguard-gate="CONTENT_ID" data-shard="CLIENT_SHARD"></div>
<script src="https://anonguard.io/gate.js"></script>Replace CONTENT_ID and CLIENT_SHARD with the values from your AnonGuard dashboard after publishing gated content.
Try the live demo, or see demo.html for the source.
- The widget renders a locked preview card with an "Unlock Content" button.
- Clicking the button opens a payment modal — QR code, wallet connect, or deep link for mobile.
- The buyer pays in SOL, USDC, or USDT on Solana.
- After the payment is confirmed on-chain, the content is decrypted and displayed in place.
- The unlock is saved locally so returning visitors see the content without paying again.
Content is encrypted client-side with AES-256-GCM before it leaves the creator's browser. The encryption key is split into two shards using XOR:
- Server shard — stored on AnonGuard, encrypted with Shamir's Secret Sharing across multiple keys
- Client shard — in the
data-shardattribute on the creator's page
Neither shard alone decrypts anything. Both are combined inside the buyer's browser only after a verified payment. The server never holds the full key. The creator's page never sees the server shard. No single point of compromise exposes the content.
If a payment goes through but something fails on the server side (network issue, database miss, browser crash), the "Already paid? Connect wallet" option lets the buyer prove wallet ownership. The server cross-references on-chain transactions to recover the purchase.
Buyers don't lose money.
| Platform | Script embed | Iframe embed |
|---|---|---|
| Blogger | Yes | Yes |
| Wix | Yes | Yes |
| Squarespace | Yes | Yes |
| Self-hosted WordPress | Yes | Yes |
| WordPress.com free | No | No |
| Medium | No | No |
The script embed gives a modal experience. The iframe embed works on platforms that allow custom HTML but block external scripts.
The widget auto-detects its API origin from the script URL. Point it at your own backend:
<script src="https://your-server.com/gate.js"></script>All API calls go to your-server.com. The production build at anonguard.io/gate.js has the origin hardcoded for security. This file is the flexible version for self-hosters.
| File | Description |
|---|---|
gate.js |
Full widget source — readable, unminified |
demo.html |
Working demo page using a live gated item |
images/ |
Hero banner and widget screenshots |
package.json |
Package metadata |
SECURITY.md |
Vulnerability reporting |
LICENSE |
MIT |
The production version at anonguard.io/gate.js is this code, minified with esbuild and with the API origin locked.
MIT — see LICENSE.
