Docs version: v1.3 · Last updated: 2026-02-16 (KST)
plug Documentation
plug is an authenticated RPC gateway for Plumise.
It adds API key auth, usage metering, and quota enforcement on top of your existing RPC integrations.
1. What plug does
Scope
- API-key based authentication
- Per-key monthly quota accounting
- Key block/revoke/delete controls
- HTTP JSON-RPC and WebSocket proxying
Out of scope
- Asset custody
- Trade/exchange brokerage
- User fund transfer execution
2. Quick checklist
- Verify login access at plug.plumise.com
- Generate and securely store API keys
- List all RPC URLs to migrate
- Prepare fallback/retry policies
3. Endpoint matrix
| Purpose | Protocol | URL pattern |
|---|---|---|
| Mainnet calls | HTTPS | https://plug.plumise.com/rpc/<API_KEY> |
| Testnet calls | HTTPS | https://plug.plumise.com/rpc/testnet/<API_KEY> |
| Mainnet subscriptions | WSS | wss://plug.plumise.com/ws/<API_KEY> |
| Testnet subscriptions | WSS | wss://plug.plumise.com/ws/testnet/<API_KEY> |
| Header-auth calls | HTTPS | https://plug.plumise.com/rpc + auth header |
4. Authentication modes
Path auth
- Pass key in URL path: /rpc/<API_KEY>
- Best for browser dapps
Header auth
- Authorization: Bearer <API_KEY>
- or x-plug-key: <API_KEY>
- Recommended for backend services
5. First request examples
curl -sS https://plug.plumise.com/rpc/<API_KEY> \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
curl -sS https://plug.plumise.com/rpc \
-H 'content-type: application/json' \
-H 'authorization: Bearer <API_KEY>' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
6. Client integration
viem
import { createPublicClient, http } from "viem";
import { mainnet } from "viem/chains";
const client = createPublicClient({
chain: mainnet,
transport: http("https://plug.plumise.com/rpc/<API_KEY>")
});
ethers HTTP
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider("https://plug.plumise.com/rpc/<API_KEY>");
ethers WebSocket
import { WebSocketProvider } from "ethers";
const ws = new WebSocketProvider("wss://plug.plumise.com/ws/<API_KEY>");
ws.on("block", (n) => console.log("block", n));
7. WebSocket operations
- Idle sockets may be closed by network layers
- Use keepalive and auto-reconnect
- Re-subscribe after reconnect
8. API key lifecycle
Creation
- Full key value is shown once at creation
- If lost, rotate to a new key
Rotation
- Create a new key
- Deploy config update
- Verify traffic
- Revoke old key
9. Quotas and billing
- Quotas are enforced per API key
- Over-quota requests return HTTP 429
- Monthly accounting uses UTC windows
10. Error map
| HTTP | JSON-RPC | Meaning | Immediate action |
|---|---|---|---|
| 401 | - | Missing or invalid API key | Verify auth format |
| 403 | -32003 | Account/key suspended | Ask admin to unblock |
| 429 | -32005 | Monthly quota exceeded | Upgrade or wait for next cycle |
| 502 | -32000 | Upstream RPC failure | Retry and fallback |
11. User troubleshooting
OTP email not received
- Check spam/promotions
- Avoid repeated requests inside one minute
- Allowlist no-reply@plumise.com
Frequent WebSocket disconnects
- Add keepalive
- Validate proxy timeout settings
- Ensure reconnect + resubscribe logic
12. Security checklist
- Never commit keys to git
- Mask keys in logs/APM/errors
- Separate keys per service/environment
- Rotate keys periodically
- Revoke immediately if leaked
13. Support
- Product support: support@plumise.com
- Security reports: security@plumise.com