Docs — SDK, subscription accounts and bot setup | GateKey
DOCS · v0.4 DEVNET

Read a membership in one call.

GateKey stores every subscription as a public Solana account. There is no API key, no webhook to trust and no export to reconcile — you read the chain, or you let the SDK read it for you.

Quickstart

{{ q.n }}
{{ q.title }} {{ q.body }}
install npm
$ npm i @gatekey/sdk $ gatekey init --cluster devnet

Payment lifecycle

The cycle counter scans due accounts, sends the charge, splits the platform fee inside the same instruction and extends validity. Nothing needs a request from the member after the first signature.

{{ l.n }} {{ l.title }} {{ l.body }}

Subscription account

One account per (creator, subscriber, tier). It is the only source of truth for every access layer — bots, dashboards and third-party apps read this record.

FIELD TYPE MEANING
{{ f.name }} {{ f.type }} {{ f.desc }}

Instructions

{{ i.name }} {{ i.desc }} signer: {{ i.signer }}

Access states

{{ s.label }} {{ s.body }}

SDK reference

gate-content.ts
import { GateKey } from '@gatekey/sdk';   const gk = new GateKey({ cluster: 'mainnet' }); const sub = await gk.getSubscription({   creator, subscriber, tier: 'signal', });   if (sub?.isActive) unlock(sub.tier); // → { tier: 'signal', active: true }
{{ m.name }} {{ m.desc }}

Bot setup

The bot needs three permissions and deliberately does not ask for a fourth. Add it to the room first, then bind the room to a tier in the console.

{{ p.label }} {{ p.detail }}
{{ p.tag }}
Want a devnet tier to test against? We provision a sandbox creator, a funded subscriber wallet and a bot invite.
Request sandbox