{
  "format": "delx/discovery-pack/v1",
  "id": "crypto-chain-primitives",
  "title": "Crypto chain primitives for agents",
  "description": "Local-first unit and gas math agents need before signing or quoting: gwei↔wei, ETH↔wei, USDC raw, bps, gas cost, CAIP-2, and confirmation ETAs—$0.001 each, no RPC.",
  "audience": "Trading, wallet, and infra agents on EVM chains",
  "query": "convert gwei wei eth usdc raw units gas cost chain id for agents",
  "keywords": [
    "gwei to wei API",
    "eth to wei API",
    "USDC raw units",
    "gas cost calculator API",
    "CAIP-2 chain id",
    "x402 crypto units",
    "agent EVM math",
    "no RPC utility"
  ],
  "updated_at": "2026-08-23",
  "canonical_url": "https://commerce.delx.ai/packs/crypto-chain-primitives",
  "machine_url": "https://commerce.delx.ai/packs/crypto-chain-primitives.json",
  "entrypoints": {
    "human": "https://commerce.delx.ai/?q=convert%20gwei%20wei%20eth%20usdc%20raw%20units%20gas%20cost%20chain%20id%20for%20agents",
    "intent_search": "https://api.delx.ai/api/v1/x402/start?q=convert%20gwei%20wei%20eth%20usdc%20raw%20units%20gas%20cost%20chain%20id%20for%20agents",
    "graph": "https://commerce.delx.ai/discovery.json"
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "discovery-pack-crypto-chain-primitives"
  },
  "products": [
    {
      "tool_name": "util_gwei_to_wei",
      "service_name": "Gwei to Wei Converter",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/gwei-to-wei",
      "product_url": "https://commerce.delx.ai/products/util-gwei-to-wei",
      "intent_url": "https://commerce.delx.ai/intents/gwei-to-wei-api",
      "machine_url": "https://commerce.delx.ai/intents/gwei-to-wei-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "gwei": {
            "description": "Input field: gwei.",
            "type": "number"
          }
        },
        "required": [
          "gwei"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "gwei": 1.5
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/gwei-to-wei -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"gwei\":1.5}'"
    },
    {
      "tool_name": "util_wei_to_gwei",
      "service_name": "Wei to Gwei Converter",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/wei-to-gwei",
      "product_url": "https://commerce.delx.ai/products/util-wei-to-gwei",
      "intent_url": "https://commerce.delx.ai/intents/wei-to-gwei-api",
      "machine_url": "https://commerce.delx.ai/intents/wei-to-gwei-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "wei": {
            "description": "Input field: wei.",
            "type": "string"
          }
        },
        "required": [
          "wei"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "wei": "1500000000"
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/wei-to-gwei -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"wei\":\"1500000000\"}'"
    },
    {
      "tool_name": "util_eth_to_wei",
      "service_name": "Ether to Wei Converter",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/eth-to-wei",
      "product_url": "https://commerce.delx.ai/products/util-eth-to-wei",
      "intent_url": "https://commerce.delx.ai/intents/eth-to-wei-api",
      "machine_url": "https://commerce.delx.ai/intents/eth-to-wei-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "eth": {
            "description": "Input field: eth.",
            "type": "number"
          }
        },
        "required": [
          "eth"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "eth": 0.05
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/eth-to-wei -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"eth\":0.05}'"
    },
    {
      "tool_name": "util_wei_to_eth",
      "service_name": "Wei to Ether Converter",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/wei-to-eth",
      "product_url": "https://commerce.delx.ai/products/util-wei-to-eth",
      "intent_url": "https://commerce.delx.ai/intents/wei-to-eth-api",
      "machine_url": "https://commerce.delx.ai/intents/wei-to-eth-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "wei": {
            "description": "Input field: wei.",
            "type": "string"
          }
        },
        "required": [
          "wei"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "wei": "50000000000000000"
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/wei-to-eth -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"wei\":\"50000000000000000\"}'"
    },
    {
      "tool_name": "util_usdc_to_raw",
      "service_name": "USDC to Raw (6 decimals)",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/usdc-to-raw",
      "product_url": "https://commerce.delx.ai/products/util-usdc-to-raw",
      "intent_url": "https://commerce.delx.ai/intents/usdc-to-raw-api",
      "machine_url": "https://commerce.delx.ai/intents/usdc-to-raw-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "usdc": {
            "description": "Input field: usdc.",
            "type": "number"
          }
        },
        "required": [
          "usdc"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "usdc": 1.5
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/usdc-to-raw -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"usdc\":1.5}'"
    },
    {
      "tool_name": "util_token_amount_to_raw",
      "service_name": "Token Amount to Raw Units",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/token-amount-to-raw",
      "product_url": "https://commerce.delx.ai/products/util-token-amount-to-raw",
      "intent_url": "https://commerce.delx.ai/intents/token-amount-to-raw-api",
      "machine_url": "https://commerce.delx.ai/intents/token-amount-to-raw-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "amount": {
            "description": "Input field: amount.",
            "type": "number"
          },
          "decimals": {
            "description": "Input field: decimals.",
            "type": "integer"
          }
        },
        "required": [
          "amount",
          "decimals"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "amount": 1.25,
        "decimals": 6
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/token-amount-to-raw -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"amount\":1.25,\"decimals\":6}'"
    },
    {
      "tool_name": "util_gas_cost_usd",
      "service_name": "Gas Cost in USD",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/gas-cost-usd",
      "product_url": "https://commerce.delx.ai/products/util-gas-cost-usd",
      "intent_url": "https://commerce.delx.ai/intents/gas-cost-usd-api",
      "machine_url": "https://commerce.delx.ai/intents/gas-cost-usd-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "gas_used": {
            "description": "Input field: gas used.",
            "type": "integer"
          },
          "gas_price_wei": {
            "description": "Input field: gas price wei.",
            "type": "string"
          },
          "eth_usd": {
            "description": "Input field: eth usd.",
            "type": "integer"
          }
        },
        "required": [
          "gas_used",
          "gas_price_wei",
          "eth_usd"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "gas_used": 21000,
        "gas_price_wei": "1000000000",
        "eth_usd": 3000
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/gas-cost-usd -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"gas_used\":21000,\"gas_price_wei\":\"1000000000\",\"eth_usd\":3000}'"
    },
    {
      "tool_name": "util_gas_cost_eth",
      "service_name": "Gas Cost in Ether",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/gas-cost-eth",
      "product_url": "https://commerce.delx.ai/products/util-gas-cost-eth",
      "intent_url": "https://commerce.delx.ai/intents/gas-cost-eth-api",
      "machine_url": "https://commerce.delx.ai/intents/gas-cost-eth-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "gas_used": {
            "description": "Input field: gas used.",
            "type": "integer"
          },
          "gas_price_wei": {
            "description": "Input field: gas price wei.",
            "type": "string"
          }
        },
        "required": [
          "gas_used",
          "gas_price_wei"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "gas_used": 21000,
        "gas_price_wei": "1000000000"
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/gas-cost-eth -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"gas_used\":21000,\"gas_price_wei\":\"1000000000\"}'"
    },
    {
      "tool_name": "util_bps_to_fraction",
      "service_name": "Basis Points to Fraction",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/bps-to-fraction",
      "product_url": "https://commerce.delx.ai/products/util-bps-to-fraction",
      "intent_url": "https://commerce.delx.ai/intents/bps-to-fraction-api",
      "machine_url": "https://commerce.delx.ai/intents/bps-to-fraction-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "bps": {
            "description": "Input field: bps.",
            "type": "integer"
          }
        },
        "required": [
          "bps"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "bps": 25
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/bps-to-fraction -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"bps\":25}'"
    },
    {
      "tool_name": "util_chain_id_name",
      "service_name": "Chain ID → Network Name",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/chain-id-name",
      "product_url": "https://commerce.delx.ai/products/util-chain-id-name",
      "intent_url": "https://commerce.delx.ai/intents/chain-id-name-api",
      "machine_url": "https://commerce.delx.ai/intents/chain-id-name-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "chain_id": {
            "description": "Input field: chain id.",
            "type": "integer"
          }
        },
        "required": [
          "chain_id"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "chain_id": 8453
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/chain-id-name -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"chain_id\":8453}'"
    },
    {
      "tool_name": "util_caip2_build",
      "service_name": "CAIP-2 Build",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/caip2-build",
      "product_url": "https://commerce.delx.ai/products/util-caip2-build",
      "intent_url": "https://commerce.delx.ai/intents/caip2-build-api",
      "machine_url": "https://commerce.delx.ai/intents/caip2-build-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "namespace": {
            "description": "Input field: namespace.",
            "type": "string"
          },
          "reference": {
            "description": "Input field: reference.",
            "type": "string"
          }
        },
        "required": [
          "namespace",
          "reference"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "namespace": "eip155",
        "reference": "8453"
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/caip2-build -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"namespace\":\"eip155\",\"reference\":\"8453\"}'"
    },
    {
      "tool_name": "util_confirmations_needed",
      "service_name": "Confirmations Needed",
      "category": "chain-primitives-local",
      "price_usdc": "0.001",
      "method": "POST",
      "route": "/api/v1/x402/confirmations-needed",
      "product_url": "https://commerce.delx.ai/products/util-confirmations-needed",
      "intent_url": "https://commerce.delx.ai/intents/confirmations-needed-api",
      "machine_url": "https://commerce.delx.ai/intents/confirmations-needed-api.json",
      "input_schema": {
        "type": "object",
        "properties": {
          "tx_block": {
            "description": "Input field: tx block.",
            "type": "integer"
          },
          "head_block": {
            "description": "Input field: head block.",
            "type": "integer"
          },
          "target": {
            "description": "Input field: target.",
            "type": "integer"
          }
        },
        "required": [
          "tx_block",
          "head_block",
          "target"
        ],
        "additionalProperties": true
      },
      "example_input": {
        "tx_block": 100,
        "head_block": 105,
        "target": 12
      },
      "agentcash_buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/confirmations-needed -m POST -H 'x-delx-source: discovery-pack-crypto-chain-primitives' --max-amount 0.001 -b '{\"tx_block\":100,\"head_block\":105,\"target\":12}'"
    }
  ]
}
