Skip to main content

Python client for the AVP Agent Verification Protocol — multi-chain wallet trust scoring

Project description

avp-sdk

Python client for the AVP Agent Verification Protocol — multi-chain wallet trust scoring with Sybil resistance and ZK nullifiers.

Install

pip install avp-wallet-sdk

Zero dependencies. Pure Python stdlib.

Quick Start

from avp_sdk import AVPClient

client = AVPClient("https://avp-protocol.onrender.com")

# Step 1 — get a challenge message to sign
challenge = client.challenge("0xYourWallet", "ethereum")
print(challenge.message)  # sign this with your wallet

# Step 2 — submit the signature
result = client.verify(challenge, signature="0x...")
print(result.trust_score)   # 75
print(result.trust_tier)    # "verified"
print(result.permissions)   # ["read", "write", "governance_vote"]
print(result.jwt_token)     # "eyJ..."

# Step 3 — validate a token later
info = client.validate(result.jwt_token)
print(info.valid)           # True
print(info.wallet_address)  # "0xYourWallet"

Development Mode

Use TEST_ prefixed signatures to test without a real wallet:

result = client.quick_verify("0xTestWallet", "ethereum", "TEST_my_signature")
print(result.trust_tier)  # "basic"

Supported Chains

Chain Value
Ethereum ethereum
Polygon polygon
BSC bsc
Solana solana

Trust Tiers

Tier Score Key Permissions
SOVEREIGN 80–100 governance_vote, admin_actions
VERIFIED 60–79 write, transfer_standard
BASIC 40–59 read, transfer_limited
UNTRUSTED 0–39 read only

Boost Trust Score

result = client.verify(
    challenge,
    signature="0x...",
    operator_id="my-operator",         # +15–25 points if operator has stake
    device_fingerprint="browser-hash", # +10 points
)

Error Handling

from avp_sdk import (
    AVPClient,
    AVPAuthError,
    AVPChallengeError,
    AVPRateLimitError,
    AVPSybilError,
    AVPTokenError,
    AVPConnectionError,
)

client = AVPClient("https://avp-protocol.onrender.com")

try:
    challenge = client.challenge("0xWallet", "ethereum")
    result = client.verify(challenge, signature="0x...")
except AVPAuthError:
    print("Signature verification failed")
except AVPChallengeError:
    print("Challenge expired or already used")
except AVPRateLimitError as e:
    print(f"Rate limited — retry in {e.retry_after}s")
except AVPSybilError:
    print("Wallet flagged as Sybil risk")
except AVPConnectionError:
    print("Could not reach AVP server")

Operators

Operators stake ETH-equivalent value to boost trust scores for their users.

# Register an operator
op = client.register_operator("my-operator", stake_amount=1.0)
print(op.is_active)      # True
print(op.trust_multiplier)  # 1.0

# Use operator in verification
result = client.verify(challenge, signature="0x...", operator_id="my-operator")
# Trust score gets +15 bonus from operator stake

Configuration

client = AVPClient(
    base_url="https://your-avp-instance.com",
    timeout=30,   # request timeout in seconds
    retries=3,    # retries on network errors
)

Run Tests

pip install pytest
pytest tests/ -v

Tests run against the live Render API. Requires internet connection.

Links

License

MIT — Oyewole Emmanuel Abiodun

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

avp_wallet_sdk-0.3.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

avp_wallet_sdk-0.3.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file avp_wallet_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: avp_wallet_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for avp_wallet_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 900d60a64ba801aa8580b003acf43b32b1a5c69fbf3bde089696e10cc96cd4eb
MD5 78bdeb062f3a3ac50d8be73b0686c1ef
BLAKE2b-256 85f8252ba816329efbeba4844524c8320dab9af2f3cf02ba6489f15905c099fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for avp_wallet_sdk-0.3.0.tar.gz:

Publisher: publish.yml on ABICITYE/avp-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file avp_wallet_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: avp_wallet_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for avp_wallet_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfa75e5fb20d5fe4fae32854238b8700a65db25356dfc383e281931ae889a8c6
MD5 5b2081c843570c0438f6263c42be62c0
BLAKE2b-256 49b270bc64a3a583965bbd7f85d5250c75d40e632ba315e8d076d160fefc2131

See more details on using hashes here.

Provenance

The following attestation bundles were made for avp_wallet_sdk-0.3.0-py3-none-any.whl:

Publisher: publish.yml on ABICITYE/avp-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page