Skip to main content

Run a standalone example

Requires Node.js 20+.
Save the following as ctoken.mjs:
Run it with your own Base Sepolia read endpoint:
This wrapper lookup needs no wallet or indexer.

Supply your own wallet client

Add a wallet client with an account for owner balances, signing, and transactions. Node uses the same constructor and sessions as browsers.

Example: an external signing RPC

The signing RPC must sign and submit for your account; a public read RPC cannot. Keep signing credentials in your wallet integration. Next: transactions · testnet faucets.

CJS and ESM

The standalone example above uses ESM.