toronet-app-integrations
When to use
Use this skill when the user wants to:
- configure ToroNet in a frontend or backend app
- use the correct ToroNet testnet network configuration
- read from ToroNet with ethers.js or wagmi
- write to ToroNet through a connected EVM wallet
- perform contract writes through the ToroNet keystore API
- decide between wallet-based and API-based transaction flows
Do not use this skill for smart contract authoring, deployment with toronetdeploy, or SDK-only workflows unless directly needed for app integration.
Instructions
- Split ToroNet integrations into read and write.
- For reads, use ethers.js or wagmi, ensure the ToroNet network and RPC URL are correct, and use the contract ABI and address provided by the user.
- For writes, choose the path that matches the product need: wallet-based when the end user should approve transactions in their wallet, API-based when the product needs a more seamless experience without repeated wallet prompts.
- Treat wallet-based writes as the default client-side write pattern: ask the user to connect an EVM wallet such as MetaMask, prompt the wallet for transactions, and keep signing and approval inside the wallet flow.
- Treat ToroNet keystore API writes as a backend or trusted-server pattern: do not expose ToroNet keystore credentials in the browser, keep
addr, pwd, ABI payloads, and transaction execution on the server, and note that the credentials used for these API calls can be created and verified using the ToroNet SDK.
- When working on testnet, use the provided testnet configuration and testnet keystore API URL; on mainnet, use the provided mainnet keystore API URL and do not invent an EVM mainnet RPC configuration unless the user provides it.
- If the user asks for code examples, keep them practical, separate read and write examples, and clearly label whether a write example is wallet-based or API-based.
- Keep answers focused on integration, not smart contract development or deployment.
Default workflow
- Determine whether the task is a read or a write integration.
- Determine whether the app is frontend-only or has a backend.
- Configure ToroNet network access first.
- For reads, use ethers.js or wagmi with the correct RPC URL.
- For writes, choose between wallet-based or API-based execution; if API-based, move the transaction logic to a trusted backend.
- Return code or architecture guidance that matches the chosen integration pattern and include a short security note when API-based writes are involved.
Checks
- correct RPC URL and chain ID are used
- ABI and contract address are present
- wallet-based writes use an EVM wallet
- API-based writes come from a trusted backend
- ToroNet keystore credentials are not exposed in client-side code
See the reference guide for network details, integration patterns, security guidance, and example request structures.
Relevant assets:
assets/toronet-testnet.ts
assets/toronet-keystore-api.examples.json
1---2name: toronet-app-integrations3description: Integrate ToroNet into frontend or backend apps. Use when the user wants ToroNet network configuration, contract reads with ethers.js or wagmi, wallet-based writes, or server-side writes through the ToroNet keystore API.4license: MIT5---67# toronet-app-integrations89## When to use1011Use this skill when the user wants to:1213- configure ToroNet in a frontend or backend app14- use the correct ToroNet testnet network configuration15- read from ToroNet with ethers.js or wagmi16- write to ToroNet through a connected EVM wallet17- perform contract writes through the ToroNet keystore API18- decide between wallet-based and API-based transaction flows1920Do not use this skill for smart contract authoring, deployment with `toronetdeploy`, or SDK-only workflows unless directly needed for app integration.2122## Instructions23241. Split ToroNet integrations into read and write.252. For reads, use ethers.js or wagmi, ensure the ToroNet network and RPC URL are correct, and use the contract ABI and address provided by the user.263. For writes, choose the path that matches the product need: wallet-based when the end user should approve transactions in their wallet, API-based when the product needs a more seamless experience without repeated wallet prompts.274. Treat wallet-based writes as the default client-side write pattern: ask the user to connect an EVM wallet such as MetaMask, prompt the wallet for transactions, and keep signing and approval inside the wallet flow.285. Treat ToroNet keystore API writes as a backend or trusted-server pattern: do not expose ToroNet keystore credentials in the browser, keep `addr`, `pwd`, ABI payloads, and transaction execution on the server, and note that the credentials used for these API calls can be created and verified using the ToroNet SDK.296. When working on testnet, use the provided testnet configuration and testnet keystore API URL; on mainnet, use the provided mainnet keystore API URL and do not invent an EVM mainnet RPC configuration unless the user provides it.307. If the user asks for code examples, keep them practical, separate read and write examples, and clearly label whether a write example is wallet-based or API-based.318. Keep answers focused on integration, not smart contract development or deployment.3233## Default workflow34351. Determine whether the task is a read or a write integration.362. Determine whether the app is frontend-only or has a backend.373. Configure ToroNet network access first.384. For reads, use ethers.js or wagmi with the correct RPC URL.395. For writes, choose between wallet-based or API-based execution; if API-based, move the transaction logic to a trusted backend.406. Return code or architecture guidance that matches the chosen integration pattern and include a short security note when API-based writes are involved.4142## Checks4344- correct RPC URL and chain ID are used45- ABI and contract address are present46- wallet-based writes use an EVM wallet47- API-based writes come from a trusted backend48- ToroNet keystore credentials are not exposed in client-side code4950See [the reference guide](references/REFERENCE.md) for network details, integration patterns, security guidance, and example request structures.5152Relevant assets:5354- `assets/toronet-testnet.ts`55- `assets/toronet-keystore-api.examples.json`