The API for the open-source, multi-currency Kauri Wallet
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
Installation for Developers working on the Kauri Wallet
-
Download the latest
kauri-api
binary from releases -
Extract
kauri-api
release -
CD into the dir containing extracted binaries
cd [extract-dir]
-
Run the app
./kauri-api
-
Ensure you have NAV daemon (
navcoind
) running in your Activity / Process Monitor -
Setup Postman or something similar to test Kauri API endpoints
asciicast of installation on macOS:
https://app.swaggerhub.com/apis/Encrypt-S/kauri-api/0.1.1
The initial endpoint can be tested in Postman, Paw, Shell, Angular app, etc...
http://127.0.0.1:9002/api/transactions/v1/getrawtransactions
username: rpcuser
password: rpcpassword
Content-Type: application/json
This is the structure of the raw request body to be used in the POST:
{"transactions": [
{"currency": "NAV", "addresses": ["NW7uXr4ZAeJKigMGnKbSLfCBQY59cH1T8G", "NUDke42E3fwLqaBbBFRyVSTETuhWAi7ugk"]}
]}
The request body has the following model structure:
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]
A successful response will contain raw transaction data for supplied wallet addresses.
{
"data": [
{
"currency": "NAV",
"addresses": [
{
"address": "NW7uXr4ZAeJKigMGnKbSLfCBQY59cH1T8G",
"transactions": [
{
"txid": "11a7071a43a8da2b9ac116865a6cd92c985c3f7cbde63933d253f88dffaa311a",
"rawtx": "",
"verbose": null
},
{
"txid": "c8dad515d5e5c7a45bc5b3814fcf5e1f63474c9b67f84ee2ab9803f809e94929",
"rawtx": "01000000f0f33457011a31aaff8df853d23339e6bd7c3f5c982cd96c5a8616c19a2bdaa8431a07a711010000006a47304402202fbb2c5955013fc4806420a66e5c9116902c0263fe7920ae104ff1818ef62efd022040857e3108ae8f30e8a0800f8f892c8a97aa88b67b8e40032e2ba33d3445230e012103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ffffffff0300000000000000000000debdfcc1c60100232103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ac3688d6fcc1c60100232103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ac00000000",
"verbose": {
"anon-destination": "",
"blockhash": "52260690630225abb5b9bd1f9b72774ced5f9b74e18ac2ab7dd5b76d229fbfdd",
"blocktime": 1463088112,
"confirmations": 55769,
"hash": "c8dad515d5e5c7a45bc5b3814fcf5e1f63474c9b67f84ee2ab9803f809e94929",
"height": 523,
"hex": "01000000f0f33457011a31aaff8df853d23339e6bd7c3f5c982cd96c5a8616c19a2bdaa8431a07a711010000006a47304402202fbb2c5955013fc4806420a66e5c9116902c0263fe7920ae104ff1818ef62efd022040857e3108ae8f30e8a0800f8f892c8a97aa88b67b8e40032e2ba33d3445230e012103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ffffffff0300000000000000000000debdfcc1c60100232103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ac3688d6fcc1c60100232103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ac00000000",
"locktime": 0,
"size": 258,
"time": 1463088112,
"txid": "c8dad515d5e5c7a45bc5b3814fcf5e1f63474c9b67f84ee2ab9803f809e94929",
"version": 1,
"vin": [
{
"scriptSig": {
"asm": "304402202fbb2c5955013fc4806420a66e5c9116902c0263fe7920ae104ff1818ef62efd022040857e3108ae8f30e8a0800f8f892c8a97aa88b67b8e40032e2ba33d3445230e[ALL] 03f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4",
"hex": "47304402202fbb2c5955013fc4806420a66e5c9116902c0263fe7920ae104ff1818ef62efd022040857e3108ae8f30e8a0800f8f892c8a97aa88b67b8e40032e2ba33d3445230e012103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4"
},
"sequence": 4294967295,
"txid": "11a7071a43a8da2b9ac116865a6cd92c985c3f7cbde63933d253f88dffaa311a",
"vout": 1
}
],
"vout": [
{
"n": 0,
"scriptPubKey": {
"asm": "",
"hex": "",
"type": "nonstandard"
},
"value": 0,
"valueSat": 0
},
{
"n": 1,
"scriptPubKey": {
"addresses": [
"NW7uXr4ZAeJKigMGnKbSLfCBQY59cH1T8G"
],
"asm": "03f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4 OP_CHECKSIG",
"hex": "2103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ac",
"reqSigs": 1,
"type": "pubkey"
},
"value": 5000114.48,
"valueSat": 500011448000000
},
{
"n": 2,
"scriptPubKey": {
"addresses": [
"NW7uXr4ZAeJKigMGnKbSLfCBQY59cH1T8G"
],
"asm": "03f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4 OP_CHECKSIG",
"hex": "2103f6c3b8154a19327783dd46e0dda13f812f57b00f9246387f62d5ece8bed767b4ac",
"reqSigs": 1,
"type": "pubkey"
},
"value": 5000114.49616438,
"valueSat": 500011449616438
}
],
"vsize": 258
}
}
]
}
]
}
]
}