Python SDK for the Superfluid Protocol
Project description
Welcome to Superfluid Python SDK(Unofficial) 👋
🏠 Homepage
✨ Superfluid App
📖 Docs
Introduction
superfluid.py is an application framework for interacting with the Superfluid Protocol using the Python Programming Language.
Features
- Minimal Framework initialization (
rpc
andchain id
) - New Operation syntax for transactions
- Read/Create/Update/Delete Agreement Operations (Constant Flow Agreement and Instant Distribution Agreement(In development))
Notable Used Technologies
- Python
- Web3.py
Installation
pip install superfluid
Usage
from superfluid import CFA_V1
from superfluid import Web3FlowInfo
rpc: str = "YOUR PREFERRED RPC"
chain_id: int = "CHAIN ID"
######################################################
###### CONSTANT FLOW AGREEMENT OPERATIONS ###########
######################################################
cfaV1Instance = CFA_V1(rpc, chain_id)
super_token: str = "SUPER TOKEN ADDRESS"
sender: str = "SENDER ADDRESS"
receiver: str = "RECEIVER ADDRESS"
flow_rate: int = "FLOW RATE"
PRIVATE_KEY: str = "YOUR PRIVATE KEY"
flow_data: Web3FlowInfo = cfaV1Instance.get_flow(super_token, sender, receiver)
create_flow_operation = cfaV1Instance.create_flow(
sender, receiver, super_token, flow_rate)
transaction_hash = create_flow_operation.exec(PRIVATE_KEY)
update_flow_operation = cfaV1Instance.update_flow(
sender, receiver, super_token, flow_rate)
transaction_hash = update_flow_operation.exec(PRIVATE_KEY)
delete_flow_operation = cfaV1Instance.delete_flow(
sender, receiver, super_token)
transaction_hash = delete_flow_operation.exec(PRIVATE_KEY)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
superfluid-0.2.1.tar.gz
(20.4 kB
view details)
Built Distribution
File details
Details for the file superfluid-0.2.1.tar.gz
.
File metadata
- Download URL: superfluid-0.2.1.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b66c354fb6405e48f1452cc428caeaba90f79ed07a72ea497c32c1d1ab9faebe |
|
MD5 | 4b9966eaa0d63eb0d165cf92c42a13c4 |
|
BLAKE2b-256 | 57567831bfea3e8cb807d42426f0b3f5bfbd8ef477e48d857158ad9203939514 |
File details
Details for the file superfluid-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: superfluid-0.2.1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6f2aae83b38f7fef9f944e50de618a8970515ec1579b168b2951c0c917a3554 |
|
MD5 | cb8df112fb10ff755cc0747be5fefbed |
|
BLAKE2b-256 | 02ca0f166ff03b339e13450115eb94b3e8611d8ac7297459381912aa99b5e88b |