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 (
rpcandchain 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.2.tar.gz
(20.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aleph_superfluid-0.2.2.tar.gz.
File metadata
- Download URL: aleph_superfluid-0.2.2.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c6cf86d50aef77779178a4409fe67de3b38ccc50140b3b1336d1b36ef710672
|
|
| MD5 |
a78f9e77b832f0818080b36a624b4360
|
|
| BLAKE2b-256 |
fe869521019567769423d3fcae463213252b684f0baa4ffba4db733346c2bbd4
|
File details
Details for the file aleph_superfluid-0.2.2-py3-none-any.whl.
File metadata
- Download URL: aleph_superfluid-0.2.2-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25827e49d8628aad235166b8caf5053fa0c104b5f8e3e207faa0815ae4fc810d
|
|
| MD5 |
84e832a5b50703a8056e69086292c3d3
|
|
| BLAKE2b-256 |
b9ff26a51ce9d86be27ebc9eb440c4d211277d1eb01b5794f6507464a4b18cd4
|