Python SDK for Kylink Platform
Project description
Kylink-py
Kylink-py, means the package for Python Toolkit for Kylink Platform
Installation
pip install kylink
Usage
Example: fetch and parse a USDT Transfer Event
import os
import web3
import kylink
from kylink.evm import SingleEventDecoder
# for internet
ky = kylink.Kylink(api_token=YOUT_APIKEY)
log = ky.eth.events(
"address = unhex('dac17f958d2ee523a2206206994597c13d831ec7')", limit=1
)[0]
w3 = web3.Web3()
abi = {
"anonymous": False,
"inputs": [
{"indexed": True, "name": "from", "type": "address"},
{"indexed": True, "name": "to", "type": "address"},
{"indexed": False, "name": "value", "type": "uint256"},
],
"name": "Transfer",
"type": "event",
}
decoder = SingleEventDecoder(w3, event_abi=abi)
result = decoder.decode(log)
print(result)
You can read detailed guide on our document site
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
kylink-0.0.24.tar.gz
(6.2 kB
view details)
Built Distribution
File details
Details for the file kylink-0.0.24.tar.gz
.
File metadata
- Download URL: kylink-0.0.24.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e848726427aff0eae0d309bb738b88145a734a828d99d8ea74b0870b6c1939aa |
|
MD5 | 243ef0702ff12983ed95a7683c8f31cb |
|
BLAKE2b-256 | d5f6d76ce4bca0c2b2ef7c6100b3f46e162d906e269d9bcb478732062bd8f9fe |
File details
Details for the file kylink-0.0.24-py3-none-any.whl
.
File metadata
- Download URL: kylink-0.0.24-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cddbf17486d1e5cfd35d3745fec8e1708cdc5612f0e9eabac0ac0f629d6879b |
|
MD5 | 1f4d83a5052b1070e7a91b5f136e1a9b |
|
BLAKE2b-256 | 439a60447204df5694a180897437662347cfd8df01b80a1eb43a44effbec2868 |