Skip to content

Object Definitions

This section describes the JSON objects used by the API.

Address Objects

addAddress.body

Query object to be submitted to addresses/addAddress.

Name Type Description
address string
publicKey string
Example
1
2
3
4
    {
        "address": "XYZ...",
        "publicKey": "string"
    }

addAddress.response

Response object returned from a call to addresses/addAddress.

Name Type Description
address string
privateKey string
publicKey string
Example
1
2
3
4
5
    {
        "address": "XYZ...",
        "privateKey": "string",
        "publicKey": "string"
    }

findLatestTransfers.response

Response object returned from a call to addresses/findLatestTransfers.

Name Type Description
hash string
timestamp string
amount findLatestTransfers.response.amount object
fee findLatestTransfers.response.fee object
from string
to string
blockHeight number
confirmations number
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
    {
        "hash": "string",
        "timestamp": "2019-06-11T13:20:18Z",
        "amount": {
            "value": 0,
            "token": "DCT"
        },
        "fee": {
            "value": 0,
            "token": "DCT"
        },
        "from": "string",
        "to": "string",
        "blockHeight": 0,
        "confirmations": 0
    }

findLatestTransfers.response.amount

Sub object used by findLatestTransfers.response.

Name Type Description
value number
token string
Example findLatestTransfers.response.amount
1
2
3
4
    {
        "value": 0,
        "token": "DCT"
    }

findLatestTransfers.response.fee

Sub object used by findLatestTransfers.response.

Name Type Description
value number
token string Asset ID for fee.
Example findLatestTransfers.response.fee
1
2
3
4
    {
        "value": 0,
        "token": "DCT"
    }

createTransaction.body

Name Type Description
transfer
Required
createTransaction.transfer object
key
Required
string

createTransaction.transfer

Name Type Description
amount
Required
createTransaction.amount object The amount of assets to transfer
from
Required
string Source of assets to transfer. Address for Bitcoin/Ethereum, Account name for Decent
to
Required
string Destination for assets. Address for Bitcoin/Ethereum, Account name for Decent
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    {
    "transfer": {
        "amount": {
        "value": 0,
        "token": "DCT"
        },
        "from": "string",
        "to": "string"
    },
    "key": "string"
    }

createTransaction.amount

Name Type Description
value
Required
number The number of assets to transfer
token
Required
string One of [ "BTC", "ETH", "DCT"]
Example
1
2
3
4
    {
        "value": 0,
        "token": "DCT"
    }

transfer

Name Type Description
amount
Required
transfer.amount The number of assets to transfer
from
Required
string Source address of the transaction
to
Required
string Destination address of the transaction
Example
    {
      "amount": {
          "value": 0,
          "token": "DCT"
      },
      "from": "string",
      "to": "string"
    }

transfer.amount

Name Type Description
amount
Required
The number and type of assets to transfer
token
Required
string One of [ "BTC", "ETH", "DCT"]
Example
    {
        "value": 0,
        "token": "DCT"
    }

Signed Transactions

A 'signed transaction' is one where the transaction (for the target blockchain) has been signed with a private key, and then packaged with the paired public key.

transactionSigned

Depending on the blockchain selected in the blockchain query parameter, one of the following objects will be expected as the request's body:

transactionSigned = (btc.transactionSigned | eth.transactionSigned | dct.transactionSigned )

DCore Signed Transactions

Signed Transaction sub-objects for DCore.

These are usually relevant when blockchain="DCore".

dct.transactionSigned

A DCore specific signed transaction.

Name Type Description
operations
Required
Array of dct.transactionSigned.operation objects
blockData
Required
dct.transactionSigned.blockData object
signatures
Required
Array of strings
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    {
        "operations": [
        {
            "extensions": [
            "string"
            ],
            "type": 0,
            "from": "string",
            "to": "string",
            "amount": {
            "amount": 0,
            "assetId": "string"
            },
            "fee": {
            "amount": 0,
            "assetId": "string"
            }
        }
        ],
        "blockData": {
        "expiration": "string",
        "refBlockNum": 0,
        "refBlockPrefix": {
            "low": 0,
            "high": 0,
            "unsigned": true
        }
        },
        "signatures": [
        "string"
        ]
    }

dct.transactionSigned.operation

Name Type Description
extensions Array of strings
type number
from string
to string
amount dct.transactionSigned.operations.amount object
fee dct.transactionSigned.operations.fee object
Example dct.transactionSigned.operation
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
    {
      "extensions": [
        "string"
      ],
      "type": 0,
      "from": "string",
      "to": "string",
      "amount": {
        "amount": 0,
        "assetId": "DCT"
      },
      "fee": {
        "amount": 0,
        "assetId": "DCT"
      }
    }

dct.transactionSigned.operations.amount

Name Type Description
amount
Required
number Quantity of asset
assetId
Required
string Denomination of the asset
Example dct.transactionSigned.operations.amount
1
2
3
4
    {
        "amount": 0,
        "assetId": "DCT"
    }

dct.transactionSigned.operations.fee

Name Type Description
amount
Required
number Operation fee in assetId
assetId
Required
string Denomination of the fee
Example dct.transactionSigned.operations.fee
1
2
3
4
    {
        "amount": 0,
        "assetId": "DCT"
    }

dct.transactionSigned.blockData

Name Type Description
expiration
Required
string
blockRefNum
Required
number
refBlockPrefix
Required
dct.transactionSigned.refBlockPrefix object
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    {
        "expiration": "string",
        "refBlockNum": 0,
        "refBlockPrefix":
        {
            "low": 0,
            "high": 0,
            "unsigned": true
        }
    }

dct.transactionSigned.refBlockPrefix

Name Type Description
low
Required
number
high
Required
number
unsigned
Required
boolean
Example dct.transactionSigned.refBlockPrefix
1
2
3
4
5
    {
        "low": 0,
        "high": 0,
        "unsigned": true
    }

Bitcoin Signed Transactions

Signed Transaction sub-objects for Bitcoin.

These are usually relevant when blockchain="Bitcoin".

btc.transactionSigned

Name Type Description
block_height
Required
number
block_index
Required
number
hash
Required
string
addresses
Required
[ string ]
total
Required
number
fees
Required
number
size
Required
number
preference
Required
string
relayed_by
Required
string
received
Required
string
ver
Required
number
double_spend
Required
boolean
vin_sz
Required
number
vout_sz
Required
number
confirmations
Required
number
inputs
Required
[ btc.transactionSigned.input ]
ouputs
Required
[ btc.transactionSigned.output ]
tosign
Required
[ string ]
signatures
Required
[ string ]
pubkeys
Required
[ string ]
Example btc.transactionSigned
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
    {
        "transactionSigned": {
            "block_height": 0,
            "block_index": 0,
            "hash": "string",
            "addresses": [
            "string"
            ],
            "total": 0,
            "fees": 0,
            "size": 0,
            "preference": "string",
            "relayed_by": "string",
            "received": "string",
            "ver": 0,
            "double_spend": true,
            "vin_sz": 0,
            "vout_sz": 0,
            "confirmations": 0,
            "inputs": [
            {
                "prev_hash": "string",
                "output_index": 0,
                "output_value": 0,
                "sequence": 0,
                "addresses": [
                "string"
                ],
                "script_type": "string",
                "age": 0
            }
            ],
            "outputs": [
            {
                "value": 0,
                "script": "string",
                "addresses": [
                "string"
                ],
                "script_type": "string"
            }
            ],
            "tosign": [
            "string"
            ],
            "signatures": [
            "string"
            ],
            "pubkeys": [
            "string"
            ]
        }
    }

btc.transactionSigned.input

Name Type Description
prev_hash string
output-index number
output_value number
sequence number
addresses [ string ]
script_type string
age number
Example btc.transactionSigned.input
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    {
        "prev_hash": "string",
        "output_index": 0,
        "output_value": 0,
        "sequence": 0,
        "addresses": [
        "string"
        ],
        "script_type": "string",
        "age": 0
    }

btc.transactionSigned.output

Name Type Description
value number
script string
addresses [ string ]
script_type string
Example btc.transactionSigned.output
1
2
3
4
5
6
7
8
    {
        "value": 0,
        "script": "string",
        "addresses": [
        "string"
        ],
        "script_type": "string"
    }

Ethereum Signed Transactions

Signed Transaction sub-objects for Ethereum.

These are usually relevant when blockchain="Ethereum".

eth.transactionSigned

Name Type Description
block_height
Required
number
block_index
Required
number
hash
Required
string
addresses
Required
[ string ]
total
Required
number
fees
Required
number
size
Required
number
gas_limit
Required
number
gas_price
Required
number
received
Required
string
ver
Required
number
double_spend
Required
boolean
vin_sz
Required
number
vout_sz
Required
number
inputs
Required
[ eth.transactionSigned.input ]
ouputs
Required
[ eth.transactionSigned.output ]
tosign
Required
[ string ]
signatures
Required
[ string ]
Example eth.transactionSigned
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
    {
        "block_height": 0,
        "block_index": 0,
        "hash": "string",
        "addresses": [
        "string"
        ],
        "total": 0,
        "fees": 0,
        "size": 0,
        "gas_limit": 0,
        "gas_price": 0,
        "received": "string",
        "ver": 0,
        "double_spend": true,
        "vin_sz": 0,
        "vout_sz": 0,
        "inputs": [
        {
            "sequence": 0,
            "addresses": [
            "string"
            ]
        }
        ],
        "outputs": [
        {
            "value": 0,
            "addresses": [
            "string"
            ]
        }
        ],
        "tosign": [
        "string"
        ],
        "signatures": [
        "string"
        ]
    }

eth.transactionSigned.input

Name Type Description
sequence number
addresses [ string ]
Example btc.transactionSigned.output
1
2
3
4
    {
        "value": 0,
        "addresses": [ "a", "b" ]
    }

eth.transactionSigned.output

Name Type Description
value number
addresses [ string ]
Example btc.transactionSigned.output
1
2
3
4
    {
        "value": 0,
        "addresses": [ "a", "b" ]
    }