kauri-api

module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2018 License: MIT

README

Kauri API

Build Status Go Report Card Coverage Status GitHub release Last commit

The API for the open-source, multi-currency Kauri Wallet.

API Development

Installation for Developers working on the Kauri API

go get -u github.com/golang/dep/cmd/dep
go get github.com/Encrypt-S/kauri-api
dep ensure
go run app/main.go

This should build the app and provide you with API functionality @ 127.0.0.1:9002

UI Development

Installation for Developers working on the Kauri Wallet

  1. Download the proper kauri-api binary from releases

  2. Extract kauri-api release

  3. Locate the dir containing extracted binaries cd [extract-dir]

  4. Run the Go app ./kauri-api

  5. Ensure you have NAV daemon (navcoind) running in your Activity / Process Monitor

  6. Setup Postman or something similar to test Kauri API endpoints

Swagger Spec

https://app.swaggerhub.com/apis/Encrypt-S/kauri-api/0.0.1

API Calls

The initial endpoint can be tested in Postman, Paw, Shell, Angular app, etc...

POST to /v1/getrawtransactions
http://127.0.0.1:9002/api/transactions/v1/getrawtransactions
Auth
username: rpcuser
password: rpcpassword
Headers

Content-Type: application/json

Body

This is the structure of the raw request body to be used in the POST:

{"transactions": [
    {"currency":  "NAV", "addresses": ["validNAVaddress1", "validNAVaddress2"]}
]}
Models

The request body above can be organised into the following models:

transactions - Addresses for each currency in wallet

Transactions {
  transactions  [...]
}

WalletItem - Object containing currency and array of addresses

WalletItem {
  currency  string
  addresses WalletAddresses[...]
}

WalletAddresses - Array of addresses

WalletAddresses [string, string, string]

Directories

Path Synopsis
app
api
fs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL