Skip to main content

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


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 hashes)

Uploaded Source

Built Distribution

kylink-0.0.24-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page