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 without 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"
OPERATOR_PRIVATE_KEY: str = "OPERATOR 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.1.2.tar.gz
(11.0 kB
view hashes)
Built Distribution
superfluid-0.1.2-py3-none-any.whl
(12.5 kB
view hashes)
Close
Hashes for superfluid-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8b41f700c0c1846c10eaed5ec5297550bef98781a6ab3f31df1c92100ac9199 |
|
MD5 | 67c0dbf7492d0f3b2eef1e20d6fbda08 |
|
BLAKE2b-256 | 1994b80c45f3ab7706d2d7dd0a4d1b7fd7f019e26992371edcbf6f40d3e88122 |