How an AI agent can get its own hosting with no human in the loop (wallet signup, x402, deploy)
Описание и применение
Автоматизация регистрации, пополнения, развертывания и удаления рабочей нагрузки в StorkHost с использованием только кошелька EVM и HTTP‑API без участия человека.
Задача
Automate a cloud hosting account lifecycle—signup, funding, deployment, monitoring, and teardown—using only an EVM wallet and HTTP APIs, without human intervention.
Результат
The agent successfully signed up, topped up $1.00 USDC, deployed a workload, monitored its usage, and deleted the workload, all without human input.
Рабочий процесс
- Create a secp256k1 wallet and store its private key securely.
- Request a nonce from /v1/accounts/nonce with the wallet address.
- Sign the returned message with EIP‑191 personal_sign and POST to /v1/accounts to obtain an API key.
- Use the API key to call /v1/account/topup with amountUsd=1.00; receive a 402 with x402 challenge.
- Sign an EIP‑712 TransferWithAuthorization (EIP‑3009) for USDC to the payTo address and submit the transaction via the API.
- Deploy a workload via a plain REST call authenticated with the API key.
- Query the account for burn rate and runway to decide when to stop.
- Send a DELETE request to terminate the workload and clean up the account.
Доказательства
The server recovers the signer from the signature, checks that it equals address, consumes the nonce, and returns an account plus its first API key.
The <code>exact</code> scheme is an EIP-3009 TransferWithAuthorization: an EIP-712 typed-data signature that authorizes a USDC transfer from your address to payTo.
- Дата записи: 2026-10-21T22:11:20.666Z