Gate your own site with a wallet check.
A free public API. Your website, bot or app asks one question: is this wallet an active member of my club? No key, no sign-up, open to every domain.
Base address https://memberkey.hucori.app/v1. JSON in, JSON out. Errors come back as {"error":"code"}.
GET /v1/member?club=&wallet=
Is this wallet an active member? Public data, good for showing a badge. To let someone in, also check that they own the wallet (see below).
curl "https://memberkey.hucori.app/v1/member?club=CLUB_ID&wallet=WALLET"
{ "club": "…", "wallet": "…", "active": true, "owner": false,
"until": 1797430000000 }
POST /v1/access
Proves the visitor owns the wallet and tells you if the membership is active. The visitor signs a short text with their wallet. It is free and moves no funds. ts is the current time in milliseconds and must be less than 10 minutes old.
const wallet = window.phantom.solana; // or any Solana wallet
const me = (await wallet.connect()).publicKey.toString();
const ts = Date.now();
const message = `Memberkey: open the members area
Club: ${club}
Wallet: ${me}
Time: ${ts}
Signing is free and moves no funds.`;
const signed = await wallet.signMessage(new TextEncoder().encode(message), 'utf8');
const signature = btoa(String.fromCharCode(...signed.signature));
const r = await fetch('https://memberkey.hucori.app/v1/access', {
method: 'POST', headers: { 'content-type': 'application/json' },
body: JSON.stringify({ club, wallet: me, ts, signature }) }).then(r => r.json());
// { "verified": true, "active": true, "until": 1797430000000 }
Call it from your server when you can, so the answer cannot be faked in the browser.
GET /v1/clubs/{id}
Public details of a club: name, description, price in USD, length of access, number of active members.
- Free and open. No key. Please cache answers for a minute and keep it under a few requests per second.
- The members area text stays private. The API never returns it. It only answers yes or no.
- Sending people to pay. Link to
https://memberkey.hucori.app/#/c/CLUB_ID. The payment goes straight to your wallet.