Soda Labs
Soda Labs Docs
User InterfaceHttp proxy

Check if a token is nullified

Check whether an anonymous token Y value has been nullified.

A copy-paste example that checks whether a Y value has been nullified, via the /is-nullified endpoint. Available in Python and JavaScript.

Quick start

  • Requirements: a Y value (128-bit) to check. Override the proxy with BUBBLE_PROXY_URL if needed.
  • Install dependencies:

Python 3.10+. Use a virtualenv — the SDK pins web3==6.11.2.

pip install soda-bubble-sdk

Example script

is_nullified.py

import base64, json, os, urllib.request

Y_VALUE = os.environ["Y_VALUE"]  # decimal or 0x-hex
PROXY_URL = os.environ.get("BUBBLE_PROXY_URL", "https://proxy.bubble.sodalabs.net")

y = int(Y_VALUE, 16) if Y_VALUE.startswith("0x") else int(Y_VALUE)
y_bytes = y.to_bytes(16, "big")  # 128-bit

body = {"y_value": base64.b64encode(y_bytes).decode()}
req = urllib.request.Request(
    f"{PROXY_URL}/is-nullified", data=json.dumps(body).encode(),
    headers={"Content-Type": "application/json"}, method="POST")
with urllib.request.urlopen(req, timeout=60) as res:
    data = json.load(res)

print("Response:", data)
print("Nullified?:", data.get("response") is True)

Run it

Y_VALUE=0xabc123... python is_nullified.py

The script encodes the Y value to 16 bytes (base64), posts to /is-nullified, and prints whether it is nullified along with the raw response.

On this page