Skip to main content

Trustless escrow API for crypto payments - programmatic smart contract escrow on Base

Project description

TBUSD Escrow SDK

Trustless escrow API for crypto payments. Programmatic smart contract escrow on Base blockchain.

Installation

pip install tbusd-escrow

Quick Start

from tbusd_escrow import EscrowClient, ReleaseType

# Initialize client with your private key
client = EscrowClient(private_key="0x...")

# Create an escrow for $100
escrow = client.create_escrow(
    beneficiary="0xRecipientAddress",
    amount=100.0,
    release_type=ReleaseType.MUTUAL
)

print(f"Escrow created: {escrow.address}")

# Fund the escrow
client.fund_escrow(escrow.address, 100.0)

# Check status
print(f"Status: {escrow.status}")  # "funded"

# Release funds when satisfied
escrow.release()

Features

  • Create escrows with flexible release types (mutual, buyer-protected, seller-protected, time-locked)
  • Arbitration support (optional or required)
  • Auto-release/cancel with timestamps
  • Query escrows by depositor or beneficiary
  • Full contract interaction (fund, release, cancel)

Release Types

from tbusd_escrow import ReleaseType

ReleaseType.MUTUAL           # Both parties must agree
ReleaseType.BUYER_PROTECTED  # Buyer can release, seller needs arbitrator
ReleaseType.SELLER_PROTECTED # Seller can release, buyer needs arbitrator  
ReleaseType.TIME_LOCKED      # Auto-release after specified time

Read-Only Mode

# No private key = read-only mode
client = EscrowClient()

# Query any escrow
escrow = client.get_escrow("0xEscrowAddress")
print(escrow.to_dict())

Links

Contract Addresses (Base Mainnet)

  • Factory: 0x1fFA195A86d7E7872EBC2D1d24899addD3f1eB8c
  • TBUSD Token: 0x0d02E2E2a7ADaF2372ca0C69845c8b159A24a595

License

MIT

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

tbusd_escrow-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

tbusd_escrow-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file tbusd_escrow-0.1.0.tar.gz.

File metadata

  • Download URL: tbusd_escrow-0.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for tbusd_escrow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fec82f6e29521165478bc57f6d3004713a11c04843e1a05d87743d3581de9231
MD5 d0a86ef6ee3ff96b4b5c1586f29473a1
BLAKE2b-256 040b9b1a5356c93cd8e923b005b151f53951a6f71e1c9e54fd0dab7988477fb5

See more details on using hashes here.

File details

Details for the file tbusd_escrow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tbusd_escrow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for tbusd_escrow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75e84416d3fcc25712eae81c82983decb1b5524a62da10c5289c9635736b54ac
MD5 2b2c3e56300e2c2dcc51cdf63785dd38
BLAKE2b-256 258c726874d0779a032e6541ffc6cb2b3e893f26e7874dce5e8aee7acfda0c08

See more details on using hashes here.

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