Skip to content

kin-labs/kinetic-python-sdk

Repository files navigation

kinetic-python

Python SDK implementation to use Kinetic by Kin Foundation

Installation

pip install kinetic-sdk

Usage

Initialization

import kinetic_sdk

environment = 'devnet'
app_index = 1
sdk = kinetic_sdk.KineticSdk.setup(environment, app_index)

Get Account History

history = sdk.get_history(account_public_key, mint_public_key)

Get Token Accounts

token_accounts = sdk.get_token_accounts(account_public_key, mint_public_key)

Request Airdrop

airdrop = sdk.request_airdrop(account_public_key, amount_str, mint_public_key)

Create Account

owner = Keypair.generate()
account = sdk.create_account(owner, mint_public_key)

Make Transfer

tx = sdk.make_transfer(
    owner=alice_keypair,
    destination=bob_public_key, 
    amount=1, 
    mint=mint_public_key, 
    tx_type=TransactionType.NONE
)

Documentation

This file can be followed for sample code, but more documentation and samples be here.

Development

Clone this request

git clone [email protected]:kin-labs/kinetic-python.git

Install the dependencies, the project uses Poetry, so you don't need to worry about creating virtual environments because it will create it for you.

make install

Run test

make test