Skip to content

KMD API

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

API for KMD (Key Management Daemon)

Base URLs:

Email: Support

Authentication

  • API Key (api_key)
    • Parameter Name: X-KMD-API-Token, in: header. Generated header parameter. This value can be found in /kmd/data/dir/kmd.token. Example value: ‘330b2e4fc9b20f4f89812cf87f1dabeb716d23e3f11aec97a61ff5f750563b78’

Default

CreateWallet

Code samples

Terminal window
curl -X POST http://localhost/v1/wallet \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/wallet HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"master_derivation_key": [
0
],
"wallet_driver_name": "string",
"wallet_name": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/wallet',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/wallet',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/wallet', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/wallet', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/wallet");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/wallet", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/wallet

Create a wallet

Create a new wallet (collection of keys) with the given parameters.

Body parameter

{
"master_derivation_key": [
0
],
"wallet_driver_name": "string",
"wallet_name": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyCreateWalletRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/walletAPIV1POSTWalletResponse

DeleteKey

Code samples

Terminal window
curl -X DELETE http://localhost/v1/key \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
DELETE http://localhost/v1/key HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/key',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.delete 'http://localhost/v1/key',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.delete('http://localhost/v1/key', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost/v1/key', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/key");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost/v1/key", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

DELETE /v1/key

Delete a key

Deletes the key with the passed public key from the wallet.

Body parameter

{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyDeleteKeyRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to DELETE /v1/keyAPIV1DELETEKeyResponse

DeleteMultisig

Code samples

Terminal window
curl -X DELETE http://localhost/v1/multisig \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
DELETE http://localhost/v1/multisig HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/multisig',
{
method: 'DELETE',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.delete 'http://localhost/v1/multisig',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.delete('http://localhost/v1/multisig', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','http://localhost/v1/multisig', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/multisig");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "http://localhost/v1/multisig", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

DELETE /v1/multisig

Delete a multisig

Deletes multisig preimage information for the passed address from the wallet.

Body parameter

{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyDeleteMultisigRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/multisig/deleteAPIV1DELETEMultisigResponse

ExportKey

Code samples

Terminal window
curl -X POST http://localhost/v1/key/export \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/key/export HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/key/export',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/key/export',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/key/export', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/key/export', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/key/export");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/key/export", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/key/export

Export a key

Export the secret key associated with the passed public key.

Body parameter

{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyExportKeyRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"private_key": [
0
]
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/key/exportAPIV1POSTKeyExportResponse

ExportMasterKey

Code samples

Terminal window
curl -X POST http://localhost/v1/master-key/export \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/master-key/export HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/master-key/export',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/master-key/export',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/master-key/export', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/master-key/export', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/master-key/export");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/master-key/export", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/master-key/export

Export the master derivation key from a wallet

Export the master derivation key from the wallet. This key is a master “backup” key for the underlying wallet. With it, you can regenerate all of the wallets that have been generated with this wallet’s POST /v1/key endpoint. This key will not allow you to recover keys imported from other wallets, however.

Body parameter

{
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyExportMasterKeyRequesttruenone

Example responses

200 Response

{
"error": true,
"master_derivation_key": [
0
],
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/master-key/exportAPIV1POSTMasterKeyExportResponse

ExportMultisig

Code samples

Terminal window
curl -X POST http://localhost/v1/multisig/export \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/multisig/export HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"address": "string",
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/multisig/export',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/multisig/export',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/multisig/export', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/multisig/export', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/multisig/export");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/multisig/export", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/multisig/export

Export multisig address metadata

Given a multisig address whose preimage this wallet stores, returns the information used to generate the address, including public keys, threshold, and multisig version.

Body parameter

{
"address": "string",
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyExportMultisigRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"multisig_version": 0,
"pks": [
[
0
]
],
"threshold": 0
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/multisig/exportAPIV1POSTMultisigExportResponse

GenerateKey

Code samples

Terminal window
curl -X POST http://localhost/v1/key \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/key HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"display_mnemonic": true,
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/key',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/key',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/key', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/key', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/key");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/key", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/key

Generate a key

Generates the next key in the deterministic key sequence (as determined by the master derivation key) and adds it to the wallet, returning the public key.

Body parameter

{
"display_mnemonic": true,
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyGenerateKeyRequesttruenone

Example responses

200 Response

{
"address": "string",
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/keyAPIV1POSTKeyResponse

GetVersion

Code samples

Terminal window
curl -X GET http://localhost/versions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
GET http://localhost/versions HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/versions',
{
method: 'GET',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.get 'http://localhost/versions',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.get('http://localhost/versions', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost/versions', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/versions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost/versions", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /versions

Retrieves the current version

Body parameter

{}

Parameters

NameInTypeRequiredDescription
bodybodyVersionsRequestfalsenone

Example responses

200 Response

{
"versions": [
"string"
]
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to GET /versionsVersionsResponse

GetWalletInfo

Code samples

Terminal window
curl -X POST http://localhost/v1/wallet/info \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/wallet/info HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/wallet/info',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/wallet/info',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/wallet/info', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/wallet/info', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/wallet/info");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/wallet/info", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/wallet/info

Get wallet info

Returns information about the wallet associated with the passed wallet handle token. Additionally returns expiration information about the token itself.

Body parameter

{
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyWalletInfoRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"wallet_handle": {
"expires_seconds": 0,
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/wallet/infoAPIV1POSTWalletInfoResponse

ImportKey

Code samples

Terminal window
curl -X POST http://localhost/v1/key/import \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/key/import HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"private_key": [
0
],
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/key/import',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/key/import',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/key/import', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/key/import', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/key/import");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/key/import", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/key/import

Import a key

Import an externally generated key into the wallet. Note that if you wish to back up the imported key, you must do so by backing up the entire wallet database, because imported keys were not derived from the wallet’s master derivation key.

Body parameter

{
"private_key": [
0
],
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyImportKeyRequesttruenone

Example responses

200 Response

{
"address": "string",
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/key/importAPIV1POSTKeyImportResponse

ImportMultisig

Code samples

Terminal window
curl -X POST http://localhost/v1/multisig/import \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/multisig/import HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"multisig_version": 0,
"pks": [
[
0
]
],
"threshold": 0,
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/multisig/import',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/multisig/import',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/multisig/import', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/multisig/import', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/multisig/import");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/multisig/import", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/multisig/import

Import a multisig account

Generates a multisig account from the passed public keys array and multisig metadata, and stores all of this in the wallet.

Body parameter

{
"multisig_version": 0,
"pks": [
[
0
]
],
"threshold": 0,
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyImportMultisigRequesttruenone

Example responses

200 Response

{
"address": "string",
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/multisig/importAPIV1POSTMultisigImportResponse

InitWalletHandleToken

Code samples

Terminal window
curl -X POST http://localhost/v1/wallet/init \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/wallet/init HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_id": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/wallet/init',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/wallet/init',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/wallet/init', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/wallet/init', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/wallet/init");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/wallet/init", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/wallet/init

Initialize a wallet handle token

Unlock the wallet and return a wallet handle token that can be used for subsequent operations. These tokens expire periodically and must be renewed. You can POST the token to /v1/wallet/info to see how much time remains until expiration, and renew it with /v1/wallet/renew. When you’re done, you can invalidate the token with /v1/wallet/release.

Body parameter

{
"wallet_id": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyInitWalletHandleTokenRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"wallet_handle_token": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/wallet/initAPIV1POSTWalletInitResponse

ListKeysInWallet

Code samples

Terminal window
curl -X POST http://localhost/v1/key/list \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/key/list HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/key/list',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/key/list',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/key/list', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/key/list', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/key/list");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/key/list", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/key/list

List keys in wallet

Lists all of the public keys in this wallet. All of them have a stored private key.

Body parameter

{
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyListKeysRequesttruenone

Example responses

200 Response

{
"addresses": [
"string"
],
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/key/listAPIV1POSTKeyListResponse

ListMultisg

Code samples

Terminal window
curl -X POST http://localhost/v1/multisig/list \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/multisig/list HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/multisig/list',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/multisig/list',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/multisig/list', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/multisig/list', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/multisig/list");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/multisig/list", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/multisig/list

List multisig accounts

Lists all of the multisig accounts whose preimages this wallet stores

Body parameter

{
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyListMultisigRequesttruenone

Example responses

200 Response

{
"addresses": [
"string"
],
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/multisig/listAPIV1POSTMultisigListResponse

ListWallets

Code samples

Terminal window
curl -X GET http://localhost/v1/wallets \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
GET http://localhost/v1/wallets HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/wallets',
{
method: 'GET',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.get 'http://localhost/v1/wallets',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.get('http://localhost/v1/wallets', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost/v1/wallets', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/wallets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost/v1/wallets", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /v1/wallets

List wallets

Lists all of the wallets that kmd is aware of.

Body parameter

{}

Parameters

NameInTypeRequiredDescription
bodybodyListWalletsRequestfalsenone

Example responses

200 Response

{
"error": true,
"message": "string",
"wallets": [
{
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to GET /v1/walletsAPIV1GETWalletsResponse

ReleaseWalletHandleToken

Code samples

Terminal window
curl -X POST http://localhost/v1/wallet/release \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/wallet/release HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/wallet/release',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/wallet/release',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/wallet/release', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/wallet/release', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/wallet/release");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/wallet/release", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/wallet/release

Release a wallet handle token

Invalidate the passed wallet handle token, making it invalid for use in subsequent requests.

Body parameter

{
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyReleaseWalletHandleTokenRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/wallet/releaseAPIV1POSTWalletReleaseResponse

RenameWallet

Code samples

Terminal window
curl -X POST http://localhost/v1/wallet/rename \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/wallet/rename HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_id": "string",
"wallet_name": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/wallet/rename',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/wallet/rename',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/wallet/rename', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/wallet/rename', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/wallet/rename");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/wallet/rename", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/wallet/rename

Rename a wallet

Rename the underlying wallet to something else

Body parameter

{
"wallet_id": "string",
"wallet_name": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyRenameWalletRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/wallet/renameAPIV1POSTWalletRenameResponse

RenewWalletHandleToken

Code samples

Terminal window
curl -X POST http://localhost/v1/wallet/renew \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/wallet/renew HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"wallet_handle_token": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/wallet/renew',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/wallet/renew',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/wallet/renew', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/wallet/renew', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/wallet/renew");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/wallet/renew", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/wallet/renew

Renew a wallet handle token

Renew a wallet handle token, increasing its expiration duration to its initial value

Body parameter

{
"wallet_handle_token": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodyRenewWalletHandleTokenRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"wallet_handle": {
"expires_seconds": 0,
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}
}

Responses

StatusMeaningDescriptionSchema
200OKResponse POST /v1/wallet/renewAPIV1POSTWalletRenewResponse

SignMultisigProgram

Code samples

Terminal window
curl -X POST http://localhost/v1/multisig/signprogram \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/multisig/signprogram HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"address": "string",
"data": "string",
"partial_multisig": {
"Subsigs": [
{
"Key": [
0
],
"Sig": [
0
]
}
],
"Threshold": 0,
"Version": 0
},
"public_key": [
0
],
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/multisig/signprogram',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/multisig/signprogram',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/multisig/signprogram', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/multisig/signprogram', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/multisig/signprogram");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/multisig/signprogram", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/multisig/signprogram

Sign a program for a multisig account

Start a multisig signature, or add a signature to a partially completed multisig signature object.

Body parameter

{
"address": "string",
"data": "string",
"partial_multisig": {
"Subsigs": [
{
"Key": [
0
],
"Sig": [
0
]
}
],
"Threshold": 0,
"Version": 0
},
"public_key": [
0
],
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodySignProgramMultisigRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"multisig": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/multisig/signdataAPIV1POSTMultisigProgramSignResponse

SignMultisigTransaction

Code samples

Terminal window
curl -X POST http://localhost/v1/multisig/sign \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/multisig/sign HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"partial_multisig": {
"Subsigs": [
{
"Key": [
0
],
"Sig": [
0
]
}
],
"Threshold": 0,
"Version": 0
},
"public_key": [
0
],
"signer": [
0
],
"transaction": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/multisig/sign',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/multisig/sign',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/multisig/sign', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/multisig/sign', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/multisig/sign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/multisig/sign", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/multisig/sign

Sign a multisig transaction

Start a multisig signature, or add a signature to a partially completed multisig signature object.

Body parameter

{
"partial_multisig": {
"Subsigs": [
{
"Key": [
0
],
"Sig": [
0
]
}
],
"Threshold": 0,
"Version": 0
},
"public_key": [
0
],
"signer": [
0
],
"transaction": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodySignMultisigRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"multisig": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/multisig/signAPIV1POSTMultisigTransactionSignResponse

SignProgram

Code samples

Terminal window
curl -X POST http://localhost/v1/program/sign \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/program/sign HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"address": "string",
"data": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/program/sign',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/program/sign',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/program/sign', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/program/sign', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/program/sign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/program/sign", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/program/sign

Sign program

Signs the passed program with a key from the wallet, determined by the account named in the request.

Body parameter

{
"address": "string",
"data": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodySignProgramRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"sig": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/data/signAPIV1POSTProgramSignResponse

SignTransaction

Code samples

Terminal window
curl -X POST http://localhost/v1/transaction/sign \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
POST http://localhost/v1/transaction/sign HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
const inputBody = '{
"public_key": [
0
],
"transaction": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/v1/transaction/sign',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.post 'http://localhost/v1/transaction/sign',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.post('http://localhost/v1/transaction/sign', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','http://localhost/v1/transaction/sign', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/v1/transaction/sign");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "http://localhost/v1/transaction/sign", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /v1/transaction/sign

Sign a transaction

Signs the passed transaction with a key from the wallet, determined by the sender encoded in the transaction.

Body parameter

{
"public_key": [
0
],
"transaction": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

Parameters

NameInTypeRequiredDescription
bodybodySignTransactionRequesttruenone

Example responses

200 Response

{
"error": true,
"message": "string",
"signed_transaction": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKResponse to POST /v1/transaction/signAPIV1POSTTransactionSignResponse

SwaggerHandler

Code samples

Terminal window
curl -X GET http://localhost/swagger.json \
-H 'Accept: application/json' \
-H 'X-KMD-API-Token: API_KEY'
GET http://localhost/swagger.json HTTP/1.1
Host: localhost
Accept: application/json
const headers = {
'Accept':'application/json',
'X-KMD-API-Token':'API_KEY'
};
fetch('http://localhost/swagger.json',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY'
}
result = RestClient.get 'http://localhost/swagger.json',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json',
'X-KMD-API-Token': 'API_KEY'
}
r = requests.get('http://localhost/swagger.json', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'X-KMD-API-Token' => 'API_KEY',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost/swagger.json', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost/swagger.json");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
"X-KMD-API-Token": []string{"API_KEY"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost/swagger.json", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /swagger.json

Gets the current swagger spec.

Returns the entire swagger spec in json.

Example responses

200 Response

"string"

Responses

StatusMeaningDescriptionSchema
200OKThe current swagger specstring
defaultDefaultUnknown ErrorNone

Schemas

APIV1DELETEKeyResponse

{
"error": true,
"message": "string"
}

APIV1DELETEKeyResponse is the response to DELETE /v1/key friendly:DeleteKeyResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1DELETEMultisigResponse

{
"error": true,
"message": "string"
}

APIV1DELETEMultisigResponse is the response to POST /v1/multisig/delete` friendly:DeleteMultisigResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1GETWalletsResponse

{
"error": true,
"message": "string",
"wallets": [
{
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
]
}

APIV1GETWalletsResponse is the response to GET /v1/wallets friendly:ListWalletsResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
wallets[APIV1Wallet]falsenone[APIV1Wallet is the API’s representation of a wallet]

APIV1POSTKeyExportResponse

{
"error": true,
"message": "string",
"private_key": [
0
]
}

APIV1POSTKeyExportResponse is the response to POST /v1/key/export friendly:ExportKeyResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
private_keyPrivateKeyfalsenonenone

APIV1POSTKeyImportResponse

{
"address": "string",
"error": true,
"message": "string"
}

APIV1POSTKeyImportResponse is the response to POST /v1/key/import friendly:ImportKeyResponse

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1POSTKeyListResponse

{
"addresses": [
"string"
],
"error": true,
"message": "string"
}

APIV1POSTKeyListResponse is the response to POST /v1/key/list friendly:ListKeysResponse

Properties

NameTypeRequiredRestrictionsDescription
addresses[string]falsenonenone
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1POSTKeyResponse

{
"address": "string",
"error": true,
"message": "string"
}

APIV1POSTKeyResponse is the response to POST /v1/key friendly:GenerateKeyResponse

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1POSTMasterKeyExportResponse

{
"error": true,
"master_derivation_key": [
0
],
"message": "string"
}

APIV1POSTMasterKeyExportResponse is the response to POST /v1/master-key/export friendly:ExportMasterKeyResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
master_derivation_keyMasterDerivationKeyfalsenoneMasterDerivationKey is used to derive ed25519 keys for use in wallets
messagestringfalsenonenone

APIV1POSTMultisigExportResponse

{
"error": true,
"message": "string",
"multisig_version": 0,
"pks": [
[
0
]
],
"threshold": 0
}

APIV1POSTMultisigExportResponse is the response to POST /v1/multisig/export friendly:ExportMultisigResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
multisig_versioninteger(uint8)falsenonenone
pks[PublicKey]falsenonenone
thresholdinteger(uint8)falsenonenone

APIV1POSTMultisigImportResponse

{
"address": "string",
"error": true,
"message": "string"
}

APIV1POSTMultisigImportResponse is the response to POST /v1/multisig/import friendly:ImportMultisigResponse

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1POSTMultisigListResponse

{
"addresses": [
"string"
],
"error": true,
"message": "string"
}

APIV1POSTMultisigListResponse is the response to POST /v1/multisig/list friendly:ListMultisigResponse

Properties

NameTypeRequiredRestrictionsDescription
addresses[string]falsenonenone
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1POSTMultisigProgramSignResponse

{
"error": true,
"message": "string",
"multisig": "string"
}

APIV1POSTMultisigProgramSignResponse is the response to POST /v1/multisig/signdata friendly:SignProgramMultisigResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
multisigstring(byte)falsenonenone

APIV1POSTMultisigTransactionSignResponse

{
"error": true,
"message": "string",
"multisig": "string"
}

APIV1POSTMultisigTransactionSignResponse is the response to POST /v1/multisig/sign friendly:SignMultisigResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
multisigstring(byte)falsenonenone

APIV1POSTProgramSignResponse

{
"error": true,
"message": "string",
"sig": "string"
}

APIV1POSTProgramSignResponse is the response to POST /v1/data/sign friendly:SignProgramResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
sigstring(byte)falsenonenone

APIV1POSTTransactionSignResponse

{
"error": true,
"message": "string",
"signed_transaction": "string"
}

APIV1POSTTransactionSignResponse is the response to POST /v1/transaction/sign friendly:SignTransactionResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
signed_transactionstring(byte)falsenonenone

APIV1POSTWalletInfoResponse

{
"error": true,
"message": "string",
"wallet_handle": {
"expires_seconds": 0,
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}
}

APIV1POSTWalletInfoResponse is the response to POST /v1/wallet/info friendly:WalletInfoResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
wallet_handleAPIV1WalletHandlefalsenoneAPIV1WalletHandle includes the wallet the handle corresponds to
and the number of number of seconds to expiration

APIV1POSTWalletInitResponse

{
"error": true,
"message": "string",
"wallet_handle_token": "string"
}

APIV1POSTWalletInitResponse is the response to POST /v1/wallet/init friendly:InitWalletHandleTokenResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
wallet_handle_tokenstringfalsenonenone

APIV1POSTWalletReleaseResponse

{
"error": true,
"message": "string"
}

APIV1POSTWalletReleaseResponse is the response to POST /v1/wallet/release friendly:ReleaseWalletHandleTokenResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone

APIV1POSTWalletRenameResponse

{
"error": true,
"message": "string",
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}

APIV1POSTWalletRenameResponse is the response to POST /v1/wallet/rename friendly:RenameWalletResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
walletAPIV1WalletfalsenoneAPIV1Wallet is the API’s representation of a wallet

APIV1POSTWalletRenewResponse

{
"error": true,
"message": "string",
"wallet_handle": {
"expires_seconds": 0,
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}
}

APIV1POSTWalletRenewResponse is the response to POST /v1/wallet/renew friendly:RenewWalletHandleTokenResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
wallet_handleAPIV1WalletHandlefalsenoneAPIV1WalletHandle includes the wallet the handle corresponds to
and the number of number of seconds to expiration

APIV1POSTWalletResponse

{
"error": true,
"message": "string",
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}

APIV1POSTWalletResponse is the response to POST /v1/wallet friendly:CreateWalletResponse

Properties

NameTypeRequiredRestrictionsDescription
errorbooleanfalsenonenone
messagestringfalsenonenone
walletAPIV1WalletfalsenoneAPIV1Wallet is the API’s representation of a wallet

APIV1Wallet

{
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}

APIV1Wallet is the API’s representation of a wallet

Properties

NameTypeRequiredRestrictionsDescription
driver_namestringfalsenonenone
driver_versioninteger(uint32)falsenonenone
idstringfalsenonenone
mnemonic_uxbooleanfalsenonenone
namestringfalsenonenone
supported_txs[TxType]falsenone[TxType is the type of the transaction written to the ledger]

APIV1WalletHandle

{
"expires_seconds": 0,
"wallet": {
"driver_name": "string",
"driver_version": 0,
"id": "string",
"mnemonic_ux": true,
"name": "string",
"supported_txs": [
"string"
]
}
}

APIV1WalletHandle includes the wallet the handle corresponds to and the number of number of seconds to expiration

Properties

NameTypeRequiredRestrictionsDescription
expires_secondsinteger(int64)falsenonenone
walletAPIV1WalletfalsenoneAPIV1Wallet is the API’s representation of a wallet

CreateWalletRequest

{
"master_derivation_key": [
0
],
"wallet_driver_name": "string",
"wallet_name": "string",
"wallet_password": "string"
}

APIV1POSTWalletRequest is the request for POST /v1/wallet

Properties

NameTypeRequiredRestrictionsDescription
master_derivation_keyMasterDerivationKeyfalsenoneMasterDerivationKey is used to derive ed25519 keys for use in wallets
wallet_driver_namestringfalsenonenone
wallet_namestringfalsenonenone
wallet_passwordstringfalsenonenone

DeleteKeyRequest

{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1DELETEKeyRequest is the request for DELETE /v1/key

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

DeleteMultisigRequest

{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1DELETEMultisigRequest is the request for DELETE /v1/multisig

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

Digest

[
0
]

Digest represents a 32-byte value holding the 256-bit Hash digest.

Properties

NameTypeRequiredRestrictionsDescription
Digest represents a 32-byte value holding the 256-bit Hash digest.[integer]falsenonenone

ed25519PrivateKey

[
0
]

Properties

None

ed25519PublicKey

[
0
]

Properties

None

ed25519Signature

[
0
]

Classical signatures */

Properties

NameTypeRequiredRestrictionsDescription
Classical signatures */[integer]falsenonenone

ExportKeyRequest

{
"address": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1POSTKeyExportRequest is the request for POST /v1/key/export

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

ExportMasterKeyRequest

{
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1POSTMasterKeyExportRequest is the request for POST /v1/master-key/export

Properties

NameTypeRequiredRestrictionsDescription
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

ExportMultisigRequest

{
"address": "string",
"wallet_handle_token": "string"
}

APIV1POSTMultisigExportRequest is the request for POST /v1/multisig/export

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
wallet_handle_tokenstringfalsenonenone

GenerateKeyRequest

{
"display_mnemonic": true,
"wallet_handle_token": "string"
}

APIV1POSTKeyRequest is the request for POST /v1/key

Properties

NameTypeRequiredRestrictionsDescription
display_mnemonicbooleanfalsenonenone
wallet_handle_tokenstringfalsenonenone

ImportKeyRequest

{
"private_key": [
0
],
"wallet_handle_token": "string"
}

APIV1POSTKeyImportRequest is the request for POST /v1/key/import

Properties

NameTypeRequiredRestrictionsDescription
private_keyPrivateKeyfalsenonenone
wallet_handle_tokenstringfalsenonenone

ImportMultisigRequest

{
"multisig_version": 0,
"pks": [
[
0
]
],
"threshold": 0,
"wallet_handle_token": "string"
}

APIV1POSTMultisigImportRequest is the request for POST /v1/multisig/import

Properties

NameTypeRequiredRestrictionsDescription
multisig_versioninteger(uint8)falsenonenone
pks[PublicKey]falsenonenone
thresholdinteger(uint8)falsenonenone
wallet_handle_tokenstringfalsenonenone

InitWalletHandleTokenRequest

{
"wallet_id": "string",
"wallet_password": "string"
}

APIV1POSTWalletInitRequest is the request for POST /v1/wallet/init

Properties

NameTypeRequiredRestrictionsDescription
wallet_idstringfalsenonenone
wallet_passwordstringfalsenonenone

ListKeysRequest

{
"wallet_handle_token": "string"
}

APIV1POSTKeyListRequest is the request for POST /v1/key/list

Properties

NameTypeRequiredRestrictionsDescription
wallet_handle_tokenstringfalsenonenone

ListMultisigRequest

{
"wallet_handle_token": "string"
}

APIV1POSTMultisigListRequest is the request for POST /v1/multisig/list

Properties

NameTypeRequiredRestrictionsDescription
wallet_handle_tokenstringfalsenonenone

ListWalletsRequest

{}

APIV1GETWalletsRequest is the request for GET /v1/wallets

Properties

None

MasterDerivationKey

[
0
]

MasterDerivationKey is used to derive ed25519 keys for use in wallets

Properties

None

MultisigSig

{
"Subsigs": [
{
"Key": [
0
],
"Sig": [
0
]
}
],
"Threshold": 0,
"Version": 0
}

MultisigSig is the structure that holds multiple Subsigs

Properties

NameTypeRequiredRestrictionsDescription
Subsigs[MultisigSubsig]falsenone[MultisigSubsig is a struct that holds a pair of public key and signatures
signatures may be empty]
Thresholdinteger(uint8)falsenonenone
Versioninteger(uint8)falsenonenone

MultisigSubsig

{
"Key": [
0
],
"Sig": [
0
]
}

MultisigSubsig is a struct that holds a pair of public key and signatures signatures may be empty

Properties

NameTypeRequiredRestrictionsDescription
KeyPublicKeyfalsenonenone
SigSignaturefalsenonenone

PrivateKey

[
0
]

Properties

None

PublicKey

[
0
]

Properties

None

ReleaseWalletHandleTokenRequest

{
"wallet_handle_token": "string"
}

APIV1POSTWalletReleaseRequest is the request for POST /v1/wallet/release

Properties

NameTypeRequiredRestrictionsDescription
wallet_handle_tokenstringfalsenonenone

RenameWalletRequest

{
"wallet_id": "string",
"wallet_name": "string",
"wallet_password": "string"
}

APIV1POSTWalletRenameRequest is the request for POST /v1/wallet/rename

Properties

NameTypeRequiredRestrictionsDescription
wallet_idstringfalsenonenone
wallet_namestringfalsenonenone
wallet_passwordstringfalsenonenone

RenewWalletHandleTokenRequest

{
"wallet_handle_token": "string"
}

APIV1POSTWalletRenewRequest is the request for POST /v1/wallet/renew

Properties

NameTypeRequiredRestrictionsDescription
wallet_handle_tokenstringfalsenonenone

Signature

[
0
]

Properties

None

SignMultisigRequest

{
"partial_multisig": {
"Subsigs": [
{
"Key": [
0
],
"Sig": [
0
]
}
],
"Threshold": 0,
"Version": 0
},
"public_key": [
0
],
"signer": [
0
],
"transaction": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1POSTMultisigTransactionSignRequest is the request for POST /v1/multisig/sign

Properties

NameTypeRequiredRestrictionsDescription
partial_multisigMultisigSigfalsenoneMultisigSig is the structure that holds multiple Subsigs
public_keyPublicKeyfalsenonenone
signerDigestfalsenonenone
transactionstring(byte)falsenonenone
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

SignProgramMultisigRequest

{
"address": "string",
"data": "string",
"partial_multisig": {
"Subsigs": [
{
"Key": [
0
],
"Sig": [
0
]
}
],
"Threshold": 0,
"Version": 0
},
"public_key": [
0
],
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1POSTMultisigProgramSignRequest is the request for POST /v1/multisig/signprogram

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
datastring(byte)falsenonenone
partial_multisigMultisigSigfalsenoneMultisigSig is the structure that holds multiple Subsigs
public_keyPublicKeyfalsenonenone
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

SignProgramRequest

{
"address": "string",
"data": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1POSTProgramSignRequest is the request for POST /v1/program/sign

Properties

NameTypeRequiredRestrictionsDescription
addressstringfalsenonenone
datastring(byte)falsenonenone
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

SignTransactionRequest

{
"public_key": [
0
],
"transaction": "string",
"wallet_handle_token": "string",
"wallet_password": "string"
}

APIV1POSTTransactionSignRequest is the request for POST /v1/transaction/sign

Properties

NameTypeRequiredRestrictionsDescription
public_keyPublicKeyfalsenonenone
transactionstring(byte)falsenoneBase64 encoding of msgpack encoding of a Transaction object
Note: SDK and goal usually generate SignedTxn objects
in that case, the field txn / Transaction of the
generated SignedTxn object needs to be used
wallet_handle_tokenstringfalsenonenone
wallet_passwordstringfalsenonenone

TxType

"string"

TxType is the type of the transaction written to the ledger

Properties

NameTypeRequiredRestrictionsDescription
anonymousstringfalsenoneTxType is the type of the transaction written to the ledger

VersionsRequest

{}

VersionsRequest is the request for GET /versions

Properties

None

VersionsResponse

{
"versions": [
"string"
]
}

VersionsResponse is the response to GET /versions friendly:VersionsResponse

Properties

NameTypeRequiredRestrictionsDescription
versions[string]falsenonenone

WalletInfoRequest

{
"wallet_handle_token": "string"
}

APIV1POSTWalletInfoRequest is the request for POST /v1/wallet/info

Properties

NameTypeRequiredRestrictionsDescription
wallet_handle_tokenstringfalsenonenone