Register KYC Proof
curl --request POST \
--url https://api.example.com/api/v1/register \
--header 'Content-Type: application/json' \
--data '
{
"public_signals": [
{}
],
"proof": {
"pi_a": [
{}
],
"pi_b": [
{}
],
"pi_c": [
{}
]
},
"encrypted_blob": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/register"
payload = {
"public_signals": [{}],
"proof": {
"pi_a": [{}],
"pi_b": [{}],
"pi_c": [{}]
},
"encrypted_blob": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
public_signals: [{}],
proof: {pi_a: [{}], pi_b: [{}], pi_c: [{}]},
encrypted_blob: '<string>'
})
};
fetch('https://api.example.com/api/v1/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'public_signals' => [
[
]
],
'proof' => [
'pi_a' => [
[
]
],
'pi_b' => [
[
]
],
'pi_c' => [
[
]
]
],
'encrypted_blob' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/register"
payload := strings.NewReader("{\n \"public_signals\": [\n {}\n ],\n \"proof\": {\n \"pi_a\": [\n {}\n ],\n \"pi_b\": [\n {}\n ],\n \"pi_c\": [\n {}\n ]\n },\n \"encrypted_blob\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/register")
.header("Content-Type", "application/json")
.body("{\n \"public_signals\": [\n {}\n ],\n \"proof\": {\n \"pi_a\": [\n {}\n ],\n \"pi_b\": [\n {}\n ],\n \"pi_c\": [\n {}\n ]\n },\n \"encrypted_blob\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"public_signals\": [\n {}\n ],\n \"proof\": {\n \"pi_a\": [\n {}\n ],\n \"pi_b\": [\n {}\n ],\n \"pi_c\": [\n {}\n ]\n },\n \"encrypted_blob\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"txid": "MC526N5AWJUZ57HEIUQATWVCLSW3GIYDDQGOKBYQCZSHRSZ4V7HQ",
"nullifier_hex": "156f82bc6f8d385dfb...",
"explorer_url": "https://allo.info/tx/MC52...",
"demo": false
}
Widget Integration
Register KYC Proof
Process a validated Zero-Knowledge proof and register the nullifier on-chain.
POST
/
api
/
v1
/
register
Register KYC Proof
curl --request POST \
--url https://api.example.com/api/v1/register \
--header 'Content-Type: application/json' \
--data '
{
"public_signals": [
{}
],
"proof": {
"pi_a": [
{}
],
"pi_b": [
{}
],
"pi_c": [
{}
]
},
"encrypted_blob": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/register"
payload = {
"public_signals": [{}],
"proof": {
"pi_a": [{}],
"pi_b": [{}],
"pi_c": [{}]
},
"encrypted_blob": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
public_signals: [{}],
proof: {pi_a: [{}], pi_b: [{}], pi_c: [{}]},
encrypted_blob: '<string>'
})
};
fetch('https://api.example.com/api/v1/register', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/register",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'public_signals' => [
[
]
],
'proof' => [
'pi_a' => [
[
]
],
'pi_b' => [
[
]
],
'pi_c' => [
[
]
]
],
'encrypted_blob' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/register"
payload := strings.NewReader("{\n \"public_signals\": [\n {}\n ],\n \"proof\": {\n \"pi_a\": [\n {}\n ],\n \"pi_b\": [\n {}\n ],\n \"pi_c\": [\n {}\n ]\n },\n \"encrypted_blob\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/register")
.header("Content-Type", "application/json")
.body("{\n \"public_signals\": [\n {}\n ],\n \"proof\": {\n \"pi_a\": [\n {}\n ],\n \"pi_b\": [\n {}\n ],\n \"pi_c\": [\n {}\n ]\n },\n \"encrypted_blob\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"public_signals\": [\n {}\n ],\n \"proof\": {\n \"pi_a\": [\n {}\n ],\n \"pi_b\": [\n {}\n ],\n \"pi_c\": [\n {}\n ]\n },\n \"encrypted_blob\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"txid": "MC526N5AWJUZ57HEIUQATWVCLSW3GIYDDQGOKBYQCZSHRSZ4V7HQ",
"nullifier_hex": "156f82bc6f8d385dfb...",
"explorer_url": "https://allo.info/tx/MC52...",
"demo": false
}
The main KYC registration endpoint. It verifies the cryptographic
snarkjs Groth16 proof. If the proof is mathematically sound, the backend pays the transaction fee to anchor the nullifier into the Algorand NullifierRegistry smart contract.
Body
array
required
The public output array from the
snarkjs proof (e.g., Nullifier Haash, SMT Root, Authority Signature).object
required
string
The ECIES-encrypted identity package. Only supplied if Conditional Anonymity is enabled.
Response
boolean
Indicates whether the proof was valid and the Algorand transaction succeeded.
string
The Algorand transaction ID for the NullifierRegistry interaction.
{
"success": true,
"txid": "MC526N5AWJUZ57HEIUQATWVCLSW3GIYDDQGOKBYQCZSHRSZ4V7HQ",
"nullifier_hex": "156f82bc6f8d385dfb...",
"explorer_url": "https://allo.info/tx/MC52...",
"demo": false
}