This is a simple server side implementation of Kin's python SDK. It can work as a standalone implementation, or together with the client side wrapper provided in the Kin Unity SDK tutorial.
With this code, you can call Kin's blockchain to:
- Fund newly created accounts
- Send payments
- Whitelist transactions for the client
You can also extend it to suit your needs.
- Clone to your localhost directory
- Use pip to install dependencies in requirements.txt
- Modify the following variables in server.py
kin_env = TEST_ENVIRONMENT
unique_app_id = '1acd' #your app id assigned by Kin - you can use 1acd for testing
seed = os.environ['PRIVATE_KEY'] #private key (keep private/ store in .env file for production)
public_address = 'GCMVZ4B6P4QEZL727UH2A6ABA2AYY67GZC3NILDD2DVSZPRN4QQCRATG' #public key
You can use Kin's Laboratory to generate your seed and public address.
- Push to your server (Heroku recommended)
Simply call the server with GET/POST to perform the following functions:
-
GET: fund = 1
POST: address, memo, amount
-
GET: request = 1
POST: address, id, memo, amount
-
Whitelist a transaction for the client
GET: whitelist = 1
POST: address, id, memo, amount
- address: The blockchain address you wish to make a payment to
- memo: Memo to add to your transaction
- amount: Amount to send for your transaction
- id: A unique id for your client (optional)
Please read CONTRIBUTING.md for details.
This project is licensed under the MIT License - see the LICENSE.md file for details