Giter VIP home page Giter VIP logo

kin-sdk-unity-tutorial-server-python's Introduction

Kin Unity SDK tutorial-server

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:

  1. Fund newly created accounts
  2. Send payments
  3. Whitelist transactions for the client

You can also extend it to suit your needs.

sample python code

Installation

  1. Clone to your localhost directory
  2. Use pip to install dependencies in requirements.txt
  3. 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.

  1. Push to your server (Heroku recommended)

Usage

Simply call the server with GET/POST to perform the following functions:

  1. Fund a new account

    GET: fund = 1

    POST: address, memo, amount

  2. Send a payment to an account

    GET: request = 1

    POST: address, id, memo, amount

  3. Whitelist a transaction for the client

    GET: whitelist = 1

    POST: address, id, memo, amount

Variables

  1. address: The blockchain address you wish to make a payment to
  2. memo: Memo to add to your transaction
  3. amount: Amount to send for your transaction
  4. id: A unique id for your client (optional)

Contributing

Please read CONTRIBUTING.md for details.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

kin-sdk-unity-tutorial-server-python's People

Contributors

hitwill avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.