Skip to main content

verify_niroom_proof

Verifies a wallet-signed proof used by a NiRoom node to authenticate a wallet address (and, optionally, an alias) during NiRoom device registration or session login. This is a read-only check — it validates a signature against the blockchain's account/alias state and never mutates it or exposes wallet secrets.

Request

{
"jsonrpc": "2.0",
"id": "niroom-wallet-proof",
"method": "verify_niroom_proof",
"params": {
"address": "NiRqzHVJfBJUj1WBUvHTPzYAJ4cKA6PQb2ZR33ZmS4Zp7DDcUxUE29nAkMtLPfCPXwPUgvYRZZ9NM2gN4uRRP1e12wTGSCMzn",
"alias": "example_alias",
"payload": "niroom-challenge:8f14e45fceea167a5a36dedd4bea2543",
"proof": "c2f1a1e6b9d4f0a3..."
}
}

Request parameters

  • address - the Nirmata wallet address that is being authenticated.
  • alias - optional; if non-empty, the request also verifies that address currently owns this alias on the blockchain (a leading @ is accepted and stripped). Leave empty to check only the signature over address.
  • payload - the exact canonical challenge string the caller asked the wallet to sign (for example, the challenge issued by a NiRoom node). Must be non-empty and at most 16 KiB; it is hashed with cn_fast_hash before signature verification.
  • proof - hex-encoded signature over payload, produced with address's spend private key and verified here against its spend public key.

Response

{
"id": "niroom-wallet-proof",
"jsonrpc": "2.0",
"result": {
"valid": true,
"status": "OK"
}
}

Response information

  • valid - true only when the signature in proof is valid for payload under address, and (if alias was supplied) address currently owns that alias.
  • status - "OK" when the signature and any alias ownership check succeeded; "FALSE" when the signature does not verify; "BAD_ARG" when address, proof or payload are malformed or payload is empty/oversized; "NOT_FOUND" when alias was supplied but is not owned by address. While the daemon is still synchronizing with the network, it returns a JSON-RPC error instead of a normal result, with error.code set to -9 (CORE_BUSY) and error.message "Core is busy."

This method only validates the wallet proof and alias ownership — it does not expose wallet secrets or mutate blockchain state, so it is safe to expose on the daemon's regular RPC endpoint (a NiRoom node running on the same host may call it via the local address, while mobile wallets and other clients keep using the daemon's public address).