getValidatorChallengeWithHttpInfo method
Issues the single-use nonce and the exact message a wallet must sign to claim a validator slot.
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.
Note: This method returns the HTTP Response.
Parameters:
- String tokenId:
TokenID is the Validator-tier GenesisNFT token id, as a decimal string in the
?tokenId=query. A value that is not a positive integer is 400. It is a string rather than a number because the parse that has always served this route trims surrounding whitespace, and one parse rule is better than two.
Implementation
Future<Response> getValidatorChallengeWithHttpInfo({ String? tokenId, }) async {
// ignore: prefer_const_declarations
final path = r'/v1/validator/challenge';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (tokenId != null) {
queryParams.addAll(_queryParams('', 'tokenId', tokenId));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}