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

  1. Verify login access at plug.plumise.com
  2. Generate and securely store API keys
  3. List all RPC URLs to migrate
  4. Prepare fallback/retry policies

3. Endpoint matrix

PurposeProtocolURL pattern
Mainnet callsHTTPShttps://plug.plumise.com/rpc/<API_KEY>
Testnet callsHTTPShttps://plug.plumise.com/rpc/testnet/<API_KEY>
Mainnet subscriptionsWSSwss://plug.plumise.com/ws/<API_KEY>
Testnet subscriptionsWSSwss://plug.plumise.com/ws/testnet/<API_KEY>
Header-auth callsHTTPShttps://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

  1. Create a new key
  2. Deploy config update
  3. Verify traffic
  4. 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

HTTPJSON-RPCMeaningImmediate action
401-Missing or invalid API keyVerify auth format
403-32003Account/key suspendedAsk admin to unblock
429-32005Monthly quota exceededUpgrade or wait for next cycle
502-32000Upstream RPC failureRetry and fallback

11. User troubleshooting

OTP email not received

  1. Check spam/promotions
  2. Avoid repeated requests inside one minute
  3. Allowlist no-reply@plumise.com

Frequent WebSocket disconnects

  1. Add keepalive
  2. Validate proxy timeout settings
  3. 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

plug — Production RPC for Plumise