This Kin BE Demo Server is compatible with our Kin DApp Playground
- Your App is registered on the Kin Developer Portal so you can take advantage of the Kin Rewards Engine and get your App Index
- Environment variable for your App Index
- Environment variable for your Private Key. Visit The Kin Laboratory if you want help getting started with Keypairs for testing
- Environment variable for your Webhook Secret (if using webhooks)
.env
APP_INDEX=Your App App Index
PRIVATE_KEY=Your App Account Secret Key
SERVER_WEBHOOK_SECRET=Your Webhook Secret
Go Version
16.7
Go Installations
go build
go install
./kin-demo-go-sdk
or
go run main.go
GET /status
Response:
200 {
"appIndex": 360,
"env": 1,
"transactions": [],
"users": [
{
"name": "App",
"publicKey": "BsiFeVHeyYv56rBfmotqbeDU7Q9rs8SYkXRsm3umsYvV"
}
]
}
POST /setup?env=Test or setup?env=Prod
Response
200 or 400
POST /account?name=Test%20User
Response
201 or 400
GET /balance?user=Test%20User
Response
'999' or 400
POST /airdrop?to=Test%20User&amount=2000
Response
200 or 400
POST /send
Request Body
{
"from": "App",
"to": "Test User",
"amount": "2000",
"type": "Earn"
}
Response
200 or 400
POST /earn_batch
Request Body
{
"from": "App",
"batch": [
{to: "User1", amount: "111"},
{to: "User2", amount: "333"}
]
}
Response
200 or 400
GET /transaction?transaction_id=uxMepF4pYrexvFKJEsU2ATzxU1MSJkqx51DCEek5SszAPygRUgsFYT8Ai6yJYLyKBJuqTd4sBnsC9wDWpCFWXi4
Response
200 {
"payments": [
{
"destination": "GTpeCtraqEzkbSChQCmakFqyHpNU3iensTWnX58yQrk6",
"quarks": 100000000,
"sender": "89CLzhYJzZKs8mZ3GkwPeJfb3wHVJqGunyryBNjJhiDH",
"type": 1
}
],
"txState": 3
}
or 400
If you're just getting started, you might want to look at this first...
Join us on Discord if you're looking for support with your App or to connect with other active Kin developers.
If you're stuck or have any questions you'd like answering, get in touch on our kin-go channel.