Skip to main content

Headless Hathor Wallet API (0.27.0)

Download OpenAPI specification:Download

License: MIT

This wallet is fully controlled through an HTTP API.

Create and start a wallet and add to store.

Request Body schema: application/json
required

Data to start the wallet

wallet-id
required
string

Defines the key of wallet that future requests will need to use as a reference.

passphrase
string

Passphrase of the wallet that will be created.

seedKey
required
string

Key of the corresponding seed in the config file to create the wallet.

seed
string

24-words seed separated with spaces. This parameter is incompatible with seedKey. Either seed or seedKey are required.

xpubkey
string

Account level xpubkey. This will be used to start wallet on readonly mode.

multisig
boolean

Start as a multisig wallet. Requires multisig configuration.

multisigKey
string

Key of the multisig wallet data in the config. This allow wallets to be started without a seedKey, e.g. with the seed on the parameters or from an xpubkey.

scanPolicy
string
Default: "gap-limit"
Enum: "gap-limit" "index-limit"

Address scanning policy to use.

gapLimit
number

Gap limit to use when scanning addresses. Only used when scanPolicy is set to 'gap-limit'. If not given the configured default will apply.

policyStartIndex
number
Default: 0

Load addresses starting from this index. Only used when scanPolicy is set to 'index-limit'.

policyEndIndex
number

Stop loading addresses at this index. Only used when scanPolicy is set to 'index-limit'. Defaults to policyStartIndex

Responses

Request samples

Content type
application/json
{
  • "wallet-id": "123",
  • "passphrase": "Test",
  • "seedKey": "default"
}

Response samples

Content type
application/json
Example
{
  • "success": true
}

Create and start a read-only wallet through an HSM, then add it to store.

Request Body schema: application/json
required

Data to start the wallet

wallet-id
required
string

Define the key of the corresponding wallet it will be executed the request.

hsm-key
required
string

Key name containing the BIP32 xPriv on the HSM device.

Responses

Request samples

Content type
application/json
{
  • "wallet-id": "hardware-wallet-1",
  • "hsm-key": "hathor_wallet_1"
}

Response samples

Content type
application/json
Example
{
  • "success": true
}

Get MultiSig xpub for a seed.

Request Body schema: application/json
required
seedKey
required
string

Key of the corresponding seed in the config file to create the wallet.

passphrase
string

Passphrase of the wallet.

Responses

Request samples

Content type
application/json
{
  • "seedKey": "default",
  • "passphrase": "Test"
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "xpubkey": "xpub...."
}

Return the wallet status

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{}

Return the balance of HTR

query Parameters
token
string

Token uid. Optional parameter to get the balance from a token different than HTR.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "available": 2,
  • "locked": 0
}

Return the current address

query Parameters
mark_as_used
boolean

Mark the current address as used. So, it will return a new address in the next call.

index
integer

Get the address in this specific derivation path index.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "address": "H8bt9nYhUNJHg7szF32CWWi1eB8PyYZnbt"
}

Get the index of an address

query Parameters
address
required
string

Address to get the index.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "index": 2,
  • "success": true
}

Return all generated addresses of the wallet.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "addresses": [
    ]
}

Send a transaction to exactly one output.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the transaction

address
required
string

Address to send the tokens.

value
required
integer

The value parameter must be an integer with the value in cents, i.e., 123 means 1.23 HTR.

token
string

Token uid to send the transaction, just in case is not HTR.

object

[DEPRECATED] Token to send the transaction, just in case is not HTR. This parameter is old and still works for compatibility reasons but will be removed soon, you should use the string format.

change_address
string

Optional address to send the change amount.

Responses

Request samples

Content type
application/json
{
  • "address": "Wk2j7odPbC4Y98xKYBCFyNogxaRimU6BUj",
  • "value": 100,
  • "token": "006e18f3c303892076a12e68b5c9c30afe9a96a528f0f3385898001858f9c35d"
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Token HTR: Insufficient amount of tokens"
}

Decode tx hex or serialized partial tx into human readable inputs and outputs with metadata to assist informed decision-making. To obtain input metadata, this method retrieves a transaction per input from the wallet's transaction history. If the required transaction is not located, the method queries the fullnode for the transaction details.

Request Body schema: application/json
required

Transaction hex representation or a partial transaction serialization.

txHex
string

Hex format of a Transaction instance.

partial_tx
string

Serialized PartialTx instance.

Responses

Request samples

Content type
application/json
{
  • "txHex": "string",
  • "partial_tx": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "tx": {
    },
  • "balance": {
    }
}

Build a transaction with many outputs without sending. Will not include signatures.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the transaction

required
Array of objects

Outputs to create the transaction.

Array of objects

Inputs to create the transaction.

change_address
string

Optional address to send the change amount.

Responses

Request samples

Content type
application/json
Example
{
  • "outputs": [
    ],
  • "inputs": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Token HTR: Insufficient amount of tokens"
}

Get the hex representation of a melt tokens transaction without input data.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to melt tokens.

token
required
string

UID of the token to melt.

amount
required
integer

The amount of tokens to melt. It must be an integer with the value in cents, i.e., 123 means 1.23.

deposit_address
string

Optional deposit_address to send the deposit HTR received after the melt.

change_address
string

Optional address to send the change amount of custom tokens after melt.

melt_authority_address
string

Optional address to send the new melt authority output created.

allow_external_melt_authority_address
boolean

If the melt authority address is allowed to be from another wallet. Default is false.

Responses

Request samples

Content type
application/json
{
  • "token": "000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa",
  • "amount": 100
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "There aren't enough tokens in the inputs to melt."
}

Add signatures to the transaction and return the txHex with the signatures.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Transaction hex and signatures

txHex
required
string

Transaction hex representation.

required
Array of objects

Signatures collected for the transaction.

Responses

Request samples

Content type
application/json
{
  • "txHex": "string",
  • "signatures": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "txHex": "0123abc..."
}

Push a transaction from the txHex.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Signed transaction hex

txHex
required
string

Transaction hex representation.

Responses

Request samples

Content type
application/json
{
  • "txHex": "string"
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "tx": {
    }
}

Identify which inputs on the transaction are from the loaded wallet.

query Parameters
txHex
required
string

Transaction hex to identify.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "inputs": [
    ]
}

Build an input data from the ECDSA signature(s).

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data required to build the input data

index
required
number

The bip32 path address index we will use.

signature
string

[P2PKH] The ECDSA signature in little endian, DER encoded in hex format.

signatures
object

[P2SH] Each key will be the signer xpubkey as used on the multisig configuration, the value will be the signature (ECDSA little endian, DER encoded in hex format).

Responses

Request samples

Content type
application/json
{
  • "index": 0,
  • "signature": "string",
  • "signatures": { }
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "inputData": "abc123..."
}

Get the hex representation of a transaction without input data.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the transaction

required
Array of objects

Outputs to create the transaction.

Array of objects

Inputs to create the transaction.

change_address
string

Optional address to send the change amount.

Responses

Request samples

Content type
application/json
{
  • "outputs": [
    ],
  • "inputs": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Token HTR: Insufficient amount of tokens"
}

Get the hex representation of a create a token transaction without input data.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the token.

name
required
string

Name of the token.

symbol
required
string

Symbol of the token.

amount
required
integer

The amount of tokens to mint. It must be an integer with the value in cents, i.e., 123 means 1.23.

address
string

Optional destination address of the minted tokens.

change_address
string

Optional address to send the change amount.

create_mint
boolean

If should create mint authority for the created token. Default is true.

mint_authority_address
string

Optional address to send the mint authority output created.

allow_external_mint_authority_address
boolean

If the mint authority address is allowed to be from another wallet. Default is false.

create_melt
boolean

If should create melt authority for the created token. Default is true.

melt_authority_address
string

Optional address to send the melt authority output created.

allow_external_melt_authority_address
boolean

If the melt authority address is allowed to be from another wallet. Default is false.

Responses

Request samples

Content type
application/json
{
  • "name": "Test Coin",
  • "symbol": "TSC",
  • "amount": 100
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Don't have enough HTR funds to mint this amount."
}

Get the hex representation of a mint tokens transaction without input data.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to mint tokens.

token
required
string

UID of the token to mint.

amount
required
integer

The amount of tokens to mint. It must be an integer with the value in cents, i.e., 123 means 1.23.

address
string

Optional destination address of the minted tokens.

change_address
string

Optional address to send the change amount.

create_mint
boolean

If should create another mint authority for the created token. Default is true.

mint_authority_address
string

Optional address to send the new mint authority output created.

allow_external_mint_authority_address
boolean

If the mint authority address is allowed to be from another wallet. Default is false.

Responses

Request samples

Content type
application/json
{
  • "token": "0000073b972162f70061f61cf0082b7a47263cc1659a05976aca5cd01b3351ee",
  • "amount": 100
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Don't have enough HTR funds to mint this amount."
}

Get the signatures for all inputs from the wallet

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Transaction hex representation

txHex
required
string

Transaction hex representation.

Responses

Request samples

Content type
application/json
{
  • "txHex": "string"
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "signatures": "..."
}

Returns a transaction hex with input data calculated from the arguments

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Transaction hex and signatures

txHex
required
string

Transaction hex representation.

signatures
Array of arrays

Signatures collected for the transaction.

Responses

Request samples

Content type
application/json
{
  • "txHex": "string",
  • "signatures": [ ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "txHex": "0123abc..."
}

Send a transaction from the transaction hex and collected signatures

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Transaction hex and signatures

txHex
required
string

Transaction hex representation.

signatures
Array of arrays

Signatures collected for the transaction.

Responses

Request samples

Content type
application/json
{
  • "txHex": "string",
  • "signatures": [ ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "hash": "00000000059dfb65633acacc402c881b128cc7f5c04b6cea537ea2136f1b97fb",
  • "nonce": 2455281664,
  • "timestamp": 1594955941,
  • "version": 1,
  • "weight": 18.11897634891149,
  • "parents": [
    ],
  • "inputs": [
    ],
  • "outputs": [
    ],
  • "tokens": [ ]
}

Create or update an atomic-swap proposal.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the proposal

partial_tx
string

A proposal to update. If not present a new one will be created.

object

Create outputs receiving the tokens as described in this parameter.

object

Create inputs to send tokens from this wallet as described here. May add change outputs if needed.

lock
boolean
Default: true

If the utxos chosen for this proposal should be locked so they are not spent on another call. Use with caution.

change_address
string

Optional address to send the change amount.

object

Property containing references for this proposal on the Atomic Swap Service

Responses

Request samples

Content type
application/json
Example
{
  • "send": {
    }
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Token HTR: Insufficient amount of tokens"
}

Get this wallet signatures for a proposal.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Get the requested wallet's signatures for an atomic-swap.

partial_tx
required
string

Proposal to sign.

Responses

Request samples

Content type
application/json
{
  • "partial_tx": "PartialTx|..."
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "signatures": "PartialTxInputData|..."
}

Registers a proposal for the Headless Wallet to listen to and interact with the Atomic Swap Service

path Parameters
proposalId
required
string

Proposal identifier on the Atomic Swap Service

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Request the registration of a proposal id with the service.

password
required
string

Proposal password on the Atomic Swap Service.

Responses

Request samples

Content type
application/json
{
  • "password": "abc123"
}

Response samples

Content type
application/json
Example
{
  • "success": {
    }
}

Fetches a proposal data from the Atomic Swap Service

path Parameters
proposalId
required
string

Registered proposal identifier

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": {
    }
}

Fetches the list of listened proposals for this wallet

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": {
    }
}

Removes a proposal from the registered listened proposals

path Parameters
proposalId
required
string

Registered proposal identifier

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": {
    }
}

Add signatures to a proposal and return the signed transaction in hex format.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Add signatures and return the txHex of the resulting transaction.

partial_tx
required
string

Proposal to add signatures.

signatures
required
Array of strings

Signatures to add.

object

Property containing references for this proposal on the Atomic Swap Service

Responses

Request samples

Content type
application/json
Example
{
  • "partial_tx": "PartialTx|...",
  • "signatures": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "txHex": "0123..."
}

Add signatures to a proposal and push the signed transaction.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Add signatures and push the resulting transaction.

partial_tx
required
string

Proposal to add signatures.

signatures
required
Array of strings

Signatures to add.

Responses

Request samples

Content type
application/json
{
  • "partial_tx": "PartialTx|...",
  • "signatures": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "tx": {
    }
}

Unlock all inputs if they are marked as selected on the wallet storage.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Unlock the inputs on the proposal.

partial_tx
required
string

Proposal to unlock.

Responses

Request samples

Content type
application/json
{
  • "partial_tx": "PartialTx|..."
}

Response samples

Content type
application/json
Example
{
  • "success": true
}

Get all utxos marked selected as input on a transaction to be sent.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "locked_utxos": [
    ]
}

Extract input data from a txHex in an atomic-swap compliant format.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Extract the input data on the given txHex as an atomic-swap signature.

txHex
required
string

Transaction hex to extract input data.

Responses

Request samples

Content type
application/json
{
  • "txHex": "0123..."
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "signatures": "PartialTxInputData|..."
}

Send a transaction with many outputs.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the transaction

required
Array of objects

Outputs to create the transaction.

Array of objects

Inputs to create the transaction.

object
Deprecated

[DEPRECATED] Token to send the transaction, just in case is not HTR. This parameter is old and will be deprecated soon, you must preferably use the token parameter in the output object.

change_address
string

Optional address to send the change amount.

Responses

Request samples

Content type
application/json
Example
{
  • "outputs": [
    ],
  • "inputs": [
    ]
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Token HTR: Insufficient amount of tokens"
}

Create a token.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the token.

name
required
string

Name of the token.

symbol
required
string

Symbol of the token.

amount
required
integer

The amount of tokens to mint. It must be an integer with the value in cents, i.e., 123 means 1.23.

address
string

Destination address of the minted tokens.

change_address
string

Optional address to send the change amount.

create_mint
boolean

If should create mint authority for the created token. Default is true.

mint_authority_address
string

Optional address to send the mint authority output created.

allow_external_mint_authority_address
boolean

If the mint authority address is allowed to be from another wallet. Default is false.

create_melt
boolean

If should create melt authority for the created token. Default is true.

melt_authority_address
string

Optional address to send the melt authority output created.

allow_external_melt_authority_address
boolean

If the melt authority address is allowed to be from another wallet. Default is false.

data
Array of strings

List of utf-8 encoded strings to create a data output for each.

Responses

Request samples

Content type
application/json
{
  • "name": "Test Coin",
  • "symbol": "TSC",
  • "amount": 100
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Don't have enough HTR funds to mint this amount."
}

Mint tokens.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to mint tokens.

token
required
string

UID of the token to mint.

address
required
string

Destination address of the minted tokens.

amount
required
integer

The amount of tokens to mint. It must be an integer with the value in cents, i.e., 123 means 1.23.

change_address
string

Optional address to send the change amount.

mint_authority_address
string

Optional address to send the new mint authority output created.

allow_external_mint_authority_address
boolean

If the mint authority address is allowed to be from another wallet. Default is false.

Responses

Request samples

Content type
application/json
{
  • "token": "006e18f3c303892076a12e68b5c9c30afe9a96a528f0f3385898001858f9c35d",
  • "address": "Wk2j7odPbC4Y98xKYBCFyNogxaRimU6BUj",
  • "amount": 100
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Don't have enough HTR funds to mint this amount."
}

Melt tokens.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to melt tokens.

token
required
string

UID of the token to melt.

amount
required
integer

The amount of tokens to melt. It must be an integer with the value in cents, i.e., 123 means 1.23.

change_address
string

Optional address to send the change amount of custom tokens after melt.

deposit_address
string

Optional address to send the deposit HTR received after the melt.

melt_authority_address
string

Optional address to send the new melt authority output created.

allow_external_melt_authority_address
boolean

If the melt authority address is allowed to be from another wallet. Default is false.

Responses

Request samples

Content type
application/json
{
  • "token": "006e18f3c303892076a12e68b5c9c30afe9a96a528f0f3385898001858f9c35d",
  • "amount": 100
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "There aren't enough inputs to melt."
}

Create an NFT.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to create the token.

name
required
string

Name of the token.

symbol
required
string

Symbol of the token.

amount
required
integer

The amount of tokens to mint. It must be an integer.

data
required
string

NFT data for the first output of the transaction.

address
string

Destination address of the minted tokens.

change_address
string

Optional address to send the change amount.

create_mint
boolean

If should create mint authority for the created NFT. Default is false.

mint_authority_address
string

Optional address to send the mint authority output created.

allow_external_mint_authority_address
boolean

If the mint authority address is allowed to be from another wallet. Default is false.

create_melt
boolean

If should create melt authority for the created NFT. Default is false.

melt_authority_address
string

Optional address to send the melt authority output created.

allow_external_melt_authority_address
boolean

If the melt authority address is allowed to be from another wallet. Default is false.

Responses

Request samples

Content type
application/json
{
  • "name": "Test Coin",
  • "symbol": "TSC",
  • "amount": 100,
  • "data": "ipfs://ipfs/myNFTHash/filename"
}

Response samples

Content type
application/json
Example
{
  • "success": false,
  • "error": "Don't have enough HTR funds to mint this amount."
}

Return the data of a transaction, if it exists in the wallet

query Parameters
id
required
string

Transaction id (hash) to get data.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "tx_id": "0000340349f9342c4e5eda6f818697f6c1748a81e2ff4b67bc2211d7f8761b11",
  • "version": 1,
  • "timestamp": 1578430704,
  • "is_voided": false,
  • "inputs": [
    ],
  • "outputs": [
    ],
  • "parents": [
    ]
}

Return the number of blocks confirming the transaction, if it exists in the wallet

query Parameters
id
required
string

Transaction id (hash) to get blocks confirmation number.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "confirmationNumber": 15
}

Return the transaction history

query Parameters
limit
integer

Sort and return only the quantity in limit.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "0000340349f9342c4e5eda6f818697f6c1748a81e2ff4b67bc2211d7f8761b11": {
    },
  • "0000276ec988df605b56072065f1b9f2395966a3c7c17c692078b2bca43fad8c": {
    }
}

Stop a running wallet and remove from store.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true
}

Return utxos and some helpful information regarding it.

query Parameters
max_utxos
integer

Maximum number of utxos to return. Default to MAX_INPUTS (255)

token
string

Token to filter the utxos. If not sent, we select only HTR utxos.

filter_address
string

Address to filter the utxos.

amount_smaller_than
integer

Maximum limit of utxo amount to filter the utxos list. We will return only utxos that have an amount lower than this value. Integer representation of decimals, i.e. 100 = 1.00.

amount_bigger_than
integer

Minimum limit of utxo amount to filter the utxos list. We will return only utxos that have an amount bigger than this value. Integer representation of decimals, i.e. 100 = 1.00.

maximum_amount
integer

Limit the maximum total amount to return summing all utxos. Integer representation of decimals, i.e. 100 = 1.00.

only_available_utxos
boolean

Get only available utxos, ignoring locked ones. Defaults to false.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "total_amount_available": 12000,
  • "total_utxos_available": 2,
  • "total_amount_locked": 6000,
  • "total_utxos_locked": 1,
  • "utxos": [
    ]
}

Consolidates utxos to a given address.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Data to consolidate utxos.

destination_address
required
string

Recipient to the consolidated utxos.

max_utxos
integer

Maximum number of utxos to aggregate. Default to MAX_INPUTS (255)

token
string

Token to filter the utxos. If not sent, we select only HTR utxos.

filter_address
string

Address to filter the utxos.

amount_smaller_than
integer

Maximum limit of utxo amount to filter the utxos list. We will consolidate only utxos that have an amount lower than this value. Integer representation of decimals, i.e. 100 = 1.00.

amount_bigger_than
integer

Minimum limit of utxo amount to filter the utxos list. We will consolidate only utxos that have an amount bigger than this value. Integer representation of decimals, i.e. 100 = 1.00.

maximum_amount
integer

Limit the maximum total amount to consolidate summing all utxos. Integer representation of decimals, i.e. 100 = 1.00.

Responses

Request samples

Content type
application/json
{
  • "destination_address": "HNnK9wgUVL6Cjzs1K3jpoGgqQTXCqpAnW8"
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "total_utxos_consolidated": 8,
  • "total_amount": 140800,
  • "utxos": [
    ]
}

Get information of a given address.

query Parameters
address
required
string

Address to get information of

token
string

Filter the information to a custom token or HTR (default: HTR)

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "total_amount_received": 9299200,
  • "total_amount_sent": 6400,
  • "total_amount_available": 9292800,
  • "total_amount_locked": 0,
  • "token": "00",
  • "index": 0
}

Get state of a nano contract.

query Parameters
id
required
string

ID of the nano contract to get the state from.

fields[]
Array of strings
Examples:
  • fields[]=token_uid&fields[]=total&fields[]=final_result&fields[]=oracle_script - Only direct fields
  • fields[]=token_uid&fields[]=total&fields[]=final_result&fields[]=oracle_script&fields[]=withdrawals.a'Wi8zvxdXHjaUVAoCJf52t3WovTZYcU9aX6'&fields[]=address_details.a'Wi8zvxdXHjaUVAoCJf52t3WovTZYcU9aX6' - Simple and dict fields (dict fields where the keys are addresses). For an address you must encapsulate the b58 with a''

List of fields to retrieve the state.

balances[]
Array of strings
Examples:
  • balances[]=00&balances[]=000008f2ee2059a189322ae7cb1d7e7773dcb4fdc8c4de8767f63022b3731845 - Example of balances

List of balances to retrieve from contract.

calls[]
Array of strings
Examples:
  • calls[]=private_method_1()&calls[]=private_method_2() - Example of calls

List of private method calls to execute and get result in the contract.

header Parameters
x-wallet-id
required
string

Define the key of the corresponding wallet it will be executed the request.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "nc_id": "3cb032600bdf7db784800e4ea911b10676fa2f67591f82bb62628c234e771595",
  • "blueprint_name": "Bet",
  • "fields": {
    }
}

Get the history of a nano contract.

query Parameters
id
required
string

ID of the nano contract to get the history from.

count
integer

Maximum number of items to be returned. Default is 100.

after
string

Hash of transaction to offset the result.

header Parameters
x-wallet-id
required
string

Define the key of the corresponding wallet it will be executed the request.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "count": 100,
  • "history": {
    }
}

Get the oracle data.

query Parameters
oracle
required
string

The address in base58 that will be used as oracle or the oracle data itself in hex (in this case, it will just be returned the same).

header Parameters
x-wallet-id
required
string

Define the key of the corresponding wallet it will be executed the request.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "oracleData": "12345678"
}

Get the result signed by the oracle. Returns the string of the argument to be used in the method.

query Parameters
oracle_data
required
string

The oracle data. If it's not an address, we expect the full input data.

required
string or integer or number or boolean

The result to be signed. If the type is bytes, then we expect it in hex.

type
required
string

The type of the result.

header Parameters
x-wallet-id
required
string

Define the key of the corresponding wallet it will be executed the request.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "oracleData": "12345678:1x0:str"
}

Create a nano contract of a blueprint.

header Parameters
x-wallet-id
required
string

Define the key of the corresponding wallet it will be executed the request.

Request Body schema: application/json
required

Data to create the nano contract.

blueprint_id
required
string

Blueprint ID of the new nano contract.

address
required
string

Address caller that will sign the nano contract creation transaction.

required
object

Data of the method for the nano contract.

Responses

Request samples

Content type
application/json
{
  • "blueprint_id": "1234abcd",
  • "address": "H8bt9nYhUNJHg7szF32CWWi1eB8PyYZnbt",
  • "data": {
    }
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "count": 100,
  • "history": {
    }
}

Execute a nano contract method.

header Parameters
x-wallet-id
required
string

Define the key of the corresponding wallet it will be executed the request.

Request Body schema: application/json
required

Data to execute the nano contract method.

nc_id
required
string

ID of the nano contract that will have the method executed.

method
required
string

Method to execute in the nano contract object.

address
required
string

Address caller that will sign the nano contract transaction.

required
object

Data of the method for the nano contract.

Responses

Request samples

Content type
application/json
{
  • "nc_id": "1234abcd",
  • "method": "method_name",
  • "address": "H8bt9nYhUNJHg7szF32CWWi1eB8PyYZnbt",
  • "data": {
    }
}

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "count": 100,
  • "history": {
    }
}

Get configuration string of a token.

query Parameters
token
required
string

Token to get the configuration string.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "configurationString": "[Test 1:TST1:007c9d497135e10dcba984f0b893804d7cb06721c800064cfbe05fafc138faca:5dd518cc]"
}

Reload configuration of the wallet.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true
}

Return the health of the wallet headless.

query Parameters
wallet_ids
string

Wallet ids to check, comma-separated. If not provided, will not check any wallet.

include_fullnode
boolean

Whether fullnode health should be checked and included in the response.

include_tx_mining
boolean

Whether tx mining service health should be checked and included in the response.

Responses

Response samples

Content type
application/json
{
  • "status": "pass",
  • "description": "Wallet-headless health",
  • "checks": {
    }
}

Get the last loaded address index of a wallet.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Responses

Response samples

Content type
application/json
Example
{
  • "success": true,
  • "index": 74
}

Load more addresses by pushing the end index of a wallet configured to index-limit scanning policy.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Count of addresses to load.

count
required
integer

Count of addresses to load.

Responses

Request samples

Content type
application/json
{
  • "count": 10
}

Response samples

Content type
application/json
Example
{
  • "success": true
}

Set the last address index of a wallet configured to index-limit scanning policy.

header Parameters
x-wallet-id
required
string

Defines the key of the wallet on which the request will be executed.

Request Body schema: application/json
required

Set the last loaded index on a wallet configured to index-limit scanning policy.

index
required
integer

Last address index to set.

Responses

Request samples

Content type
application/json
{
  • "index": 150
}

Response samples

Content type
application/json
Example
{
  • "success": true
}