List challenge

Issues the single-use nonce and the exact message a wallet must sign to claim a validator slot.

GET /v1/validator/challenge

Addresshttps://api.hanzo.ai/v1/validator/challenge
MethodGET
Operationget_validator_challenge
AuthAuthorization: Bearer $HANZO_API_KEY

Issues the single-use nonce and the exact message a wallet must sign to claim a validator slot.

The nonce is bound to (validated org, slot) and stored server-side, so a signature obtained for one org or one slot can never be replayed for another, and the message POST /v1/validator verifies is rebuilt from those same server facts rather than trusted from the caller. Redeem it with POST /v1/validator before it expires; it can be redeemed once.

A tokenId outside the Validator tier is refused here rather than after signing.

Request

1 field.

FieldInTypeRequiredDescription
tokenIdquerystring—TokenID is the Validator-tier GenesisNFT token id, as a decimal string in the ?tokenId= query.

Response

StatusBodyMeaning
200validator.challengeViewok
defaultproblem-detailsrefused

200 body — 5 fields.

FieldInTypeAlwaysDescription
expiresAtbodyinteger (int64)—ExpiresAt is when the nonce stops being redeemable, as a Unix timestamp.
messagebodystring—Message is the EXACT text to personal_sign.
noncebodystring—Nonce is the single-use, org-bound challenge value to send back with the signature.
tokenIdbodyinteger (uint64)—TokenID is the slot the challenge was issued for.
ttlSecondsbodyinteger (int64)—TTLSeconds is the challenge lifetime in seconds.

Failure carries the platform error shape — see Errors.

Examples

hanzo validator challenge
import { Configuration, ValidatorApi } from 'hanzoai';

const api = new ValidatorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getValidatorChallenge();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ValidatorApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ValidatorApi(client).get_validator_challenge()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ValidatorAPI.GetValidatorChallenge(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, validator_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = validator_api::get_validator_challenge(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ValidatorApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ValidatorApi(client).getValidatorChallenge();
curl https://api.hanzo.ai/v1/validator/challenge \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool validator, op get_validator_challenge — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "validator",
         "arguments": {
           "op": "get_validator_challenge",
           "input": {}
         }
       }
     }'

Validator API · All Hanzo APIs · Interactive reference

Was this page useful?