Register your website
- Sign in with the wallet that created the token. Select your token in My launches → dApps on DevNet or mainnet. Each token has one registered app. You can add multiple experiences inside it.
- Choose Register your website. Enter the name members should see, the exact HTTPS origin listed as your token’s official website and a return URL on that same origin. For example, use
https://members.example.comandhttps://members.example.com/callback. Your server must handle that path. - Under Website settings, generate the DNS TXT record, publish it and select Check verification. For a standard
<project>.vercel.apporigin, the dashboard also offers a file you can publish at the displayed path. The file must be public and return the displayed value without a redirect. Renew verification before the seven-day expiry shown in the dashboard. - In Server keys, select Create server key. Copy the app ID and store the new secret in your backend’s secret manager, or download the backend configuration while the key is available. The secret is shown once. Keep the file out of source control, browser builds and logs.
- For a first holder experience, add a Holder requirement with ID
holderand a minimum of one token. Under Experiences, createmember-area, select the requirement and leave the price empty. Your backend checks that requirement before it serves the member area.
Install the SDK
Install version 0.2.0 from the npm registry in your backend project. The SDK requires Node.js 20 or newer. The bundled example below uses Node.js 22.13 or newer.@oneswap/dapp-sdk/browser, opens the OneSwap wallet for sign-in or checkout. It needs the network and a wallet link or payment ID. Keep the server secret and member access tokens on your backend.
Try the included member site
The package includes a working site with server-side sign-in, holder checks and a SQLite order store. Follow these steps on your verified DevNet origin.- On your server, set
DAPP_NETWORK=devnet,DAPP_ID,DAPP_SECRET,EXAMPLE_ORIGIN(the exact HTTPS origin, without a trailing slash) andRULE_ID=holder. Register<EXAMPLE_ORIGIN>/callbackin the dashboard. - From a writable working directory, run the command below. The site listens on
127.0.0.1:3481by default. Forward your verified HTTPS origin to that process. Keep the SQLite file on persistent storage. SetEXAMPLE_DATABASEto choose its path. - Open the site as a member and sign in. Review the listed requirement in OneSwap Wallet, allow the connection and return to your site. In My launches → dApps, select Check connection to confirm that your backend finished the exchange.
- Try a holder and a second account without the token. Both should be able to sign in. Only the consenting holder should see the protected area. For a paid test, use a different buyer wallet from the creator wallet.
Sign-in and holder access
Protect the first route in your own app.
Token checkout
Sell an item and verify settlement before delivery.
Treasury rewards
Propose awards and show each member their receipt.
Launchpad market data
Read token prices, market activity and public quotes.