Skip to main content

SDK for ChainSettle API integrations.

Project description

ChainSettle-SDK

ChainSettle-SDK The ChainSettle SDK is a Python package designed to facilitate interactions with the ChainSettle API, enabling developers to manage off-chain settlement attestations and monitor their on-chain statuses seamlessly.

Features

Initiate settlement attestations across various types (e.g., Plaid, PayPal).

Poll settlement status until reaching a terminal state.

Retrieve detailed settlement information.

Simulate signing processes for specific settlement types.

Manage validators and store salts associated with settlements.

Installation

Ensure you have Python 3.7 or higher installed and either pip or uv package manager. Then, clone the repository:

git clone https://github.com/BrandynHamilton/chainsettle-sdk.git
cd chainsettle-
pip install uv # Only if not already installed
uv pip install -e .

Usage

Here's a basic example of how to use the SDK:

from chainsettle_sdk import ChainSettleService

# Initialize the service
chainsettle = ChainSettleService()

# Initiate a settlement attestation
response = chainsettle.initiate_attestation(
    settlement_id="unique_settlement_id",
    settlement_type="plaid",
    network="base",
    user_email="user@example.com",
    amount=10000,
    recipient_email="recipient@example.com",
    counterparty="0xCounterpartyAddress",
    metadata="Optional metadata"
)

print("Settlement initiated:", response)

For a more comprehensive example, refer to the main.py script included in the repository.

Configuration

The SDK relies on a configuration module to manage settings such as API URLs and supported networks. Ensure that the chainsettle_sdk/config.py file is properly configured with the necessary parameters.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your enhancements.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

chainsettle_sdk-0.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

chainsettle_sdk-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file chainsettle_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: chainsettle_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for chainsettle_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3882a8dc2258eda4871d84c27922f75dd967f5e27a936fd2ef62cb2c36388b6f
MD5 818006a34df72e1b97bb31935ea0e87c
BLAKE2b-256 33567d038d9a73289949c4daaab4f3793243d2de276f26f9cccc2e4ada3f18c8

See more details on using hashes here.

File details

Details for the file chainsettle_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for chainsettle_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bd2a1f1b852b9552ddfea82043f21a48113400332a531cddd716b95794c84a9
MD5 8335eb815d44368e8b4bc4cc20aaca4c
BLAKE2b-256 f284e9b09600512a06ce9b3d57f1e83eb5a326b8e4c3b29daa6bff1fa139a669

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