Fork of the 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.
This is a friendly fork that adds support for the Base blockchain. It may be deprecated once merged upstream.
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
aleph_superfluid-0.2.1.tar.gz
(20.5 kB
view details)
File details
Details for the file aleph_superfluid-0.2.1.tar.gz
.
File metadata
- Download URL: aleph_superfluid-0.2.1.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead887e6636721d018095e3413bd161ffbf7092944d1523859a1e1900fec674c |
|
MD5 | 23074a8f120f8e5358c7ab05f8071b9e |
|
BLAKE2b-256 | e48b018ee0a1689c4f84db71064917a4f0f1c8219d2d818e68e896cbdd294338 |