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.2.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.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chainsettle_sdk-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d3f99863c0184195b26912eecaf97ada768fa057b04b28173e2f27ecac1ed043
MD5 6cf65157747406b06f2d7d11b2c2ceeb
BLAKE2b-256 9263f1e2f48dd3e545bd85001bda506869d52826eff68314e202051b83189d5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chainsettle_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 34afb545d3ab6c0119a1726247fa8c732e6b9a177891985ec4e950f12af01929
MD5 ce6d5cbadf8273dab2635dc00f4bebdd
BLAKE2b-256 5b95679e1c2658891fb2c3c3e1ba4a61efde129846712c1d01fafa5487dd9f92

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