81trust / 100

Wei Ether Convert

by Delx Wei Ether Convert in Documents & files

x402 APIPassing, checked 3 h ago

Convert between wei and ether using fixed 1e18 scaling without RPC — call when converting wei↔ether with fixed 1e18 scaling. Use for chain input hygiene without live RPC—adjacent to OneSource-class small chain reads, but static/local only so rights and margin stay clear. Returns deterministic machine-readable JSON for $0.003 USDC via x402 on Base. Execution is first-party, local-only, stateless, and memory-only with no paid upstream, no input retention, and no claim of live chain tip, web searc…

POST https://api.delx.ai/api/v1/x402/wei-ether-convert

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
179 ms typical, 179 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.delx.ai/api/v1/x402/wei-ether-convert" \
  -H "content-type: application/json" \
  -d '{"amount":1000000000000000000,"direction":"wei_to_ether"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.delx.ai%2Fapi%2Fv1%2Fx402%2Fwei-ether-convert
const res = await pay("https://api.delx.ai/api/v1/x402/wei-ether-convert", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"amount":1000000000000000000,"direction":"wei_to_ether"}),
});
console.log(await res.json());

Example input

{
  "amount": 1000000000000000000,
  "direction": "wei_to_ether"
}

Example output

{
  "amount": 1000000000000000000,
  "direction": "wei_to_ether",
  "ether": 1,
  "schema": "delx/util-wei-ether-convert/v1",
  "wei": "1000000000000000000"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402179 ms$0.003