Token Verification
Last updated
POST /api/bv7x/oracle/verify
Content-Type: application/json{
"wallet": "0xd8B71d23e1a8da9867497C0E757A1143B94C3e1e",
"signature": "0x1a2b3c...",
"timestamp": 1711647600
}{
"success": true,
"token": "eyJhbGciOiJIUzI1NiIs...",
"tier": "basic",
"balance": "750000000",
"expiresAt": "2026-03-28T22:30:00Z"
}curl https://bv7x.ai/api/bv7x/oracle \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."from web3 import Web3
from eth_account.messages import encode_defunct
import requests, time
wallet = "0xYourWalletAddress"
private_key = "0xYourPrivateKey"
timestamp = int(time.time())
message = f"Verify BV7X balance: {wallet}:{timestamp}"
signed = Web3().eth.account.sign_message(
encode_defunct(text=message), private_key=private_key
)
resp = requests.post("https://bv7x.ai/api/bv7x/oracle/verify", json={
"wallet": wallet,
"signature": signed.signature.hex(),
"timestamp": timestamp,
})
token = resp.json()["token"]
signal = requests.get("https://bv7x.ai/api/bv7x/oracle",
headers={"Authorization": f"Bearer {token}"}
).json()
print(signal)import { ethers } from "ethers";
const wallet = new ethers.Wallet("0xYourPrivateKey");
const timestamp = Math.floor(Date.now() / 1000);
const message = `Verify BV7X balance: ${wallet.address}:${timestamp}`;
const signature = await wallet.signMessage(message);
const verifyRes = await fetch("https://bv7x.ai/api/bv7x/oracle/verify", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ wallet: wallet.address, signature, timestamp }),
});
const { token } = await verifyRes.json();
const signal = await fetch("https://bv7x.ai/api/bv7x/oracle", {
headers: { Authorization: `Bearer ${token}` },
}).then((r) => r.json());
console.log(signal);