81trust / 100

Eth To Wei

by Ether to Wei Converter in Documents & files

x402 APIPassing, checked 2 h ago

Scale ether amounts into wei integer strings for transfers and tx value. Call when preparing value fields, allowances, or transfers denominated in ETH. Returns wei integer string and eth input as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.

POST https://api.delx.ai/api/v1/x402/eth-to-wei

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
4 ms typical, 4 ms slowest 5%
Last check
2 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/eth-to-wei" \
  -H "content-type: application/json" \
  -d '{"eth":0.05}'
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.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.delx.ai%2Fapi%2Fv1%2Fx402%2Feth-to-wei
const res = await pay("https://api.delx.ai/api/v1/x402/eth-to-wei", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"eth":0.05}),
});
console.log(await res.json());

Example input

{
  "eth": 0.05
}

Example output

{
  "eth": 0.05,
  "schema": "delx/util-eth-to-wei/v1",
  "wei": "50000000000000000"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed4026 ms$0.001
7 h agoPassed4024 ms$0.001