Giter VIP home page Giter VIP logo

friendbot's Introduction

Friendbot Server for the Kin Testnet Network

An alternative friendbot implementation using the kin-sdk-node.

The service exposes 2 endpoints:

  • Creating an account with a desired starting kin balance.
  • Funding existing an account with a desired kin amount.

Funding an account

GET SERVICE_URL/fund?addr=<public adderss>&amount=<starting kin balance>

addr - required, the public address of the account to create.
amount - optional, the starting balance of the newly created account.

Result:

{
  "hash":"b13c232bdc4f070061f6b1722a69ef13670c510fe51051b4d9db23ce3a9ee82f",
}

The result response will include the hash of the transaction used to create the account.

Creating an account

GET SERVICE_URL?addr=<public adderss>&amount=<starting kin balance>

addr - required, the public address of an existing account to fund.
amount - required, the amount of kin to fund.

Result:

{
  "hash":"b13c232bdc4f070061f6b1722a69ef13670c510fe51051b4d9db23ce3a9ee82f",
}

The result response will include the hash of the transaction used to fund the account.

Install

Clone the repo

git clone https://github.com/kinecosystem/friendbot.git

Install the repo

npm install

Build

npm run build

Run

npm run start

Configuration

The service must be configured before running, configure by changing the config/default.json.

The most important of which are the:

  • base_seed: the root account seed, which is used to fund and create account. this account must be created and well funded beforehand.
  • channels_salt: the salt that used for deterministically create friendbot channels, channels are required for handling multiple requests concurrently.
  • channels_count: channels count, determines the service parallelism level.
  • starting_balance: channels starting balance.

friendbot's People

Contributors

dependabot[bot] avatar doc999tor avatar yosriz avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.