@meddleware/access-gate-ui
v0.1.20
Published
Operator console for creating and managing on-chain Sui access gates — create gates, configure settings, airdrop NFTs, and freeze gates via a wallet-connected SPA.
Downloads
3,304
Readme
@meddleware/access-gate-ui
A standalone Vue 3 operator console for on-chain access gates on Sui. Any third party can create a gate, sell NFT-gated access to a resource (an upload relay, an API, a website, a game), and manage it — all client-side, signing with their own wallet.
Gates are created under Meddleware's published access_gate package, so a 20 bps commission on
every purchase is structurally routed to the Meddleware treasury on-chain (see
access-gate-sui).
Served at sui-access-gate.meddleware.co.uk. Later it will also be embedded in the main
Meddleware dashboard alongside the other Sui tools.
Features
- Connect any Sui wallet (wallet-standard)
- Create a gate — price, uses (unlimited pass or single-use), soulbound, auto-burn, and NFT metadata
- My gates — discover every gate the connected wallet administers (via its owned
AdminCaps) - Manage — update price, payment recipient, default uses, soulbound, auto-burn, and NFT metadata; pause/unpause purchases
- Airdrop — grant access NFTs to any address for free
- Freeze — make a gate immutable (irreversible, typed confirmation)
Local development
npm install
npm run dev
@meddleware/nft-gate-clientresolves from the npm registry. To develop against an unpublished local copy, usenpm link @meddleware/nft-gate-clientor anoverridesentry.
Environment variables
All VITE_* vars are baked into the static bundle at build time.
| Variable | Default | Description |
| --- | --- | --- |
| VITE_NETWORK | testnet | testnet or mainnet |
| VITE_RPC_TESTNET | https://fullnode.testnet.sui.io:443 | Sui gRPC-web endpoint for testnet |
| VITE_RPC_MAINNET | https://fullnode.mainnet.sui.io:443 | Sui gRPC-web endpoint for mainnet |
| VITE_GATE_FREEZE_REQUIRES_UNPAUSED | false | Created gates can't be frozen while paused |
| VITE_GATE_LOCK_COMMISSION_ON_FREEZE | false | Freezing a created gate locks in the platform commission |
| VITE_GATE_PAUSE_BLOCKS_DECRYPTION | false | Pausing a created gate also blocks Seal decryption |
| VITE_GATE_PAUSE_BLOCKS_ACCESS | false | Pausing a created gate also blocks pass use (consume, relay uploads) |
| VITE_GATE_MIN_PRICE_MIST | auto | Minimum paid price: auto = the on-chain minimum (10 × the platform's minimum commission, read live from PlatformConfig); a MIST integer raises it further |
| VITE_GATE_ALLOW_FREE | true | Allow price-0 gates (each pays the platform's one-off free-gate fee) |
| VITE_DOCS_URL / VITE_DEV_URL | Meddleware docs | Header documentation links |
The four VITE_GATE_* restriction flags form the gate's on-chain GatePolicy: it is recorded
immutably on every gate the tool creates, and anyone can read it from the gate. The policy is set by
this tool, not enforced on gates created by calling the contract directly. The platform's commission
floor, minimum paid price and free-gate fee are enforced on-chain for every gate of the package.
When AccessGateView is embedded (e.g. in the dashboard), the host app's build supplies these
variables.
The access_gate package ID and PlatformConfig object ID are hardcoded in
src/constants.ts (commission enforcement) and are not configurable.
Docker build
The Docker context is this repo root; @meddleware/nft-gate-client resolves from npm, so it must
be published first.
docker build --build-arg VITE_NETWORK=testnet -t access-gate-ui:latest .Architecture
Thin app — no accounting logic. Every PTB (create/setters/airdrop/freeze) and every on-chain read
comes from @meddleware/nft-gate-client; the app only wires forms to those builders and the
wallet executor. See CLAUDE.md.
License
0BSD
