API Documentation

Marko Zagar edited this page Feb 12, 2019 · 19 revisions

Ixian uses HTTP GET requests for communication with the API and always responds with a JSON response in the body of the HTTP response.

The response looks generally like this:

{
    "id": [currently unused],
    "result": [object],
    "error": {
        "code": [integer],
        "message": [string]
    }
}

All three fields are optional, but either "result" or "error" will always be present. The structure of the "result" field is dependent on the type of query - please see specific API commands for details.

Error codes

Error Code Description
RPC_INVALID_REQUEST -32600 An empty command was sent.
RPC_METHOD_NOT_FOUND -32601 An unknown command was sent.
RPC_INVALID_PARAMS -32602 Some required parameters were missing or invalid.
RPC_INTERNAL_ERROR -32603 An unexpected error occurred within Ixian. Please see the node log for details.
RPC_PARSE_ERROR -32700 There was an error parsing the request (currently unused)
RPC_MISC_ERROR -1 Unspecified error - an exception was thrown, but there is no additional information. Please see the node log for details. (currently unused)
RPC_FORBIDDEN_BY_SAFE_MODE -2 This command is not allowed while the server is operating in Safe Mode. (currently unused)
RPC_TYPE_ERROR -3 One of the parameters was an incorrect type. (currently unused)
RPC_WALLET_ERROR -4 An unknown error occurred during a wallet operation. Please see the node log for details.
RPC_INVALID_ADDRESS_OR_KEY -5 A transaction was attempted from/to an invalid address, nonce or public key.
RPC_WALLET_INSUFFICIENT_FUNDS -6 There were not enough funds in the wallet to fulfill the request.
RPC_OUT_OF_MEMORY -7 There was an out of memory exception while processing the request. (currently unused)
RPC_INVALID_PARAMETER -8 Some of the parameters are invalid, missing or duplicate.
RPC_CLIENT_NOT_CONNECTED -9 The node is not connected to the network. (currently unused)
RPC_CLIENT_IN_INITIAL_DOWNLOAD -10 The node is synchronizing with the network. (currently unused)
RPC_WALLET_INVALID_ACCOUNT_NAME -11 Currently unused.
RPC_WALLET_KEYPOOL_RAN_OUT -12 Currently unused.
RPC_WALLET_UNLOCK_NEEDED -13 The wallet file is locked and has to be unlocked before using. (currently unused)
RPC_WALLET_PASSPHRASE_INCORRECT -14 Incorrect wallet passphrase. (currently unused)
RPC_WALLET_WRONG_ENC_STATE -15 An encrypt/decrypt operation was attempted, but the wallet is in an incorrect encryption state. (currently unused)
RPC_WALLET_ENCRYPTION_FAILED -16 There was an error while encrypting the wallet. (currently unused)
RPC_WALLET_ALREADY_UNLOCKED -17 Attempting to unlock the wallet, but it is already unlocked. (currently unused)
RPC_DATABASE_ERROR -20 There was an error accessing the database. (currently unused)
RPC_DESERIALIZATION_ERROR -22 There was an error parsing the request body. (currently unused)
RPC_VERIFY_ERROR -25 The requested operation would result in an invalid block.
RPC_VERIFY_REJECTED -26 The requested operation was rejected by the network. (currently unused)
RPC_VERIFY_ALREADY_IN_CHAIN -27 The transaction already exists and will not be added twice.
RPC_IN_WARMUP -28 The API server hasn't finished startup yet. (currently unused)

Add Transaction

Generates a new IXI transaction to transfer funds between wallets. Multiple 'from' wallets with different amounts may be specified, as well as multiple target wallets and amounts.

Note: If you do not specify from, the required funds and fee will be deducted from the node's addresses (the order is unspecified). Multiple addresses may be used if the first one chosen does not have sufficient funds. Alternatively, if you do specify from, your total amount must include the required transaction fee. The transaction fee may be calculated in multiple ways:

  • Call the API createtransaction, which will generate a transaction object but not send it to the network. In this way you can measure the object's size and calculate an appropriate fee. This API takes the same parameters as addtransaction.
  • Call the API calculatetransactionfee, which will return the required fee amount for the given transaction. This API takes the same parameters as addtransaction.
  • Use the autofee parameter, which will deduct the required transaction fee from the first specified from address. The address must have sufficient funds to cover both the amount and fee. You can change the order of from addresses to ensure this.

Method: addtransaction

Input parameters:

Parameter Type Required Description
to String Yes List of Base58 encoded recipient addresses with their amounts. Amounts are separated by '_' character. Addresses are separated by '-' character (i.e. address1_amount1-address2_amount2)
from String No List of Base58 encoded sending addresses with their amounts. Amounts are separated by '_' character. Addresses are separated by '-' character (i.e. address1_amount1-address2_amount2). All addresses must belong to the same private key. If no from parameter is specified, it will be automatically generated, where the addresses with least IxiCash will be spent first.
fee Number No Transaction fee, specified in IxiCash per kB. If no fee parameter is specified, the default (which is also the minimum) 0.00005 IxiCash per kB will be used.
autofee Boolean No If specified, the system will automatically deduct the required fee from the first address given in from. This parameter is not required if you have included the appropriate fees somewhere in the from list, or are not specifying the from list at all.

Output:

  • success: transaction details are returned as a JSON object and the error field is set to null:
  • fail JSON encoded details with a non-null error and a null result:

Errors:

Error Description
RPC_INVALID_ADDRESS_OR_KEY Addresses specified in the "from" parameter does not belong to this node.
RPC_INVALID_PARAMS Invalid "from" amounts, or invalid "to" addresses or amounts were specified.
RPC_VERIFY_ERROR The transaction does not pass verification - this usually means that no usable "from" addresses were present, or there was something wrong with the signing key.
RPC_WALLET_INSUFFICIENT_FUNDS Address or addresses specified have insufficient balance to be used for the transaction.
RPC_TRANSACTION_ERROR An error occured while adding the transaction, check the message and log file for details.
RPC_INTERNAL_ERROR An unexpected error occured within the node. Please see the node log for details.

Example:

GET http://localhost:8081/addtransaction?from=1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq_10000-1PC5kubyLvTmsf16CugqHpBG8B8PK4YjcfSjjLMqbUi8YvkQ_5000&to=153xXfVi1sznPcRqJur8tutgrZecNVYGSzetp47bQvRfNuDix_15000&autofee=true

{
	"result": {
		"id": "15-CoxywacZbqiK1sf84R6nuYyW32u5sDbTqD4VZgpeGChw",
		"version": 2,
		"blockHeight": "15",
		"nonce": "47961",
		"signature": "537b1..0c2ce2d7c2",
		"pubKey": "1FUryQwQL5bs83yxnf5ywkkBDZjV6XezBz5BmMX5ioCRsRVmj",
		"timeStamp": "1547587273",
		"type": "0",
		"amount": "1000.00000000",
		"applied": "0",
		"checksum": "0765a87d5393ad8742de1f8a9ce39f2ae1f1a5a6e7bafc066e454c1856661326",
		"from": {
			"1":"10000.00005000",
			"2":"5000.00000000"
		},
		"to": {
			"153xXfVi1sznPcRqJur8tutgrZecNVYGSzetp47bQvRfNuDix": "15000.00000000"
		},
		"fee": "0.00005000"
	},
	"error": null,
	"id": null
}

Create Transaction

Generates a new IXI transaction, but doesn't add it to the Transaction Pool. This enables manual TX fee calculations and features such as offline transactions.

Note: If you do not specify from, the required funds and fee will be deducted from the node's addresses (the order is unspecified). Multiple addresses may be used if the first one chosen does not have sufficient funds. If you do specify from, it will not include any transaction fees. It is up to the caller of this API to examine the returned Transaction object and add the fee in the from list. This allows greater flexibility than autofee or not specifying the from list.

Method: createtransaction

Input parameters:

Parameter Type Required Description
to String Yes List of Base58 encoded recipient addresses with their amounts. Amounts are separated by '_' character. Addresses are separated by '-' character (i.e. address1_amount1-address2_amount2)
from String No List of Base58 encoded sending addresses with their amounts. Amounts are separated by '_' character. Addresses are separated by '-' character (i.e. address1_amount1-address2_amount2). All addresses must belong to the same private key. If no from parameter is specified, it will be automatically generated, where the addresses with least IxiCash will be spent first.
fee Number No Transaction fee, specified in IxiCash per kB. If no fee parameter is specified, the default (which is also the minimum) 0.00005 IxiCash per kB will be used.
autofee Boolean No If specified, the system will automatically deduct the required fee from the first address given in from. This parameter is not required if you have included the appropriate fees somewhere in the from list, or are not specifying the from list at all.

Output:

  • success: transaction details are returned as a JSON object and the error field is set to null. This transaction is not added to the network.
  • fail JSON encoded details with a non-null error and a null result:

Errors:

Error Description
RPC_INVALID_ADDRESS_OR_KEY Addresses specified in the "from" parameter does not belong to this node.
RPC_INVALID_PARAMS Invalid "from" amounts, or invalid "to" addresses or amounts were specified.
RPC_VERIFY_ERROR The transaction does not pass verification - this usually means that no usable "from" addresses were present, or there was something wrong with the signing key.
RPC_WALLET_INSUFFICIENT_FUNDS Address or addresses specified have insufficient balance to be used for the transaction.
RPC_TRANSACTION_ERROR An error occured while adding the transaction, check the message and log file for details.
RPC_INTERNAL_ERROR An unexpected error occured within the node. Please see the node log for details.

Example:

GET http://localhost:8081/createtransaction?from=1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq_10000-1PC5kubyLvTmsf16CugqHpBG8B8PK4YjcfSjjLMqbUi8YvkQ_5000&to=153xXfVi1sznPcRqJur8tutgrZecNVYGSzetp47bQvRfNuDix_15000

{
	"result": {
		"id": "15-CoxywacZbqiK1sf84R6nuYyW32u5sDbTqD4VZgpeGChw",
		"version": 2,
		"blockHeight": "15",
		"nonce": "47961",
		"signature": "537b159c1..ce2d7c2",
		"pubKey": "1FUryQwQL5bs83yxnf5ywkkBDZjV6XezBz5BmMX5ioCRsRVmj",
		"timeStamp": "1547587273",
		"type": "0",
		"amount": "1000.00000000",
		"applied": "0",
		"checksum": "0765a87d5393ad8742de1f8a9ce39f2ae1f1a5a6e7bafc066e454c1856661326",
		"from": {
			"1":"10000.00000000",
			"2":"5000.00000000"
		},
		"to": {
			"153xXfVi1sznPcRqJur8tutgrZecNVYGSzetp47bQvRfNuDix": "15000.00000000"
		},
		"fee": "0.00005000"
	},
	"error": null,
	"id": null
}

Calculate Transaction Fee

This method takes the same parameters as addtransaction. It does not generate a transaction object, but rather calculates the size of the resulting Transaction object and therefore the total fee required to send it. The fee is returned as a number in result.

Method: calculatetransactionfee

Input parameters:

Parameter Type Required Description
to String Yes List of Base58 encoded recipient addresses with their amounts. Amounts are separated by '_' character. Addresses are separated by '-' character (i.e. address1_amount1-address2_amount2)
from String No List of Base58 encoded sending addresses with their amounts. Amounts are separated by '_' character. Addresses are separated by '-' character (i.e. address1_amount1-address2_amount2). All addresses must belong to the same private key. If no from parameter is specified, it will be automatically generated, where the addresses with least IxiCash will be spent first.
fee Number No Transaction fee, specified in IxiCash per kB. If no fee parameter is specified, the default (which is also the minimum) 0.00005 IxiCash per kB will be used.

Output:

  • success: required total transaction fee is calculated and returned as a number in result.
  • fail JSON encoded details with a non-null error and a null result:

Errors:

Error Description
RPC_INVALID_ADDRESS_OR_KEY Addresses specified in the "from" parameter does not belong to this node.
RPC_INVALID_PARAMS Invalid "from" amounts, or invalid "to" addresses or amounts were specified.
RPC_VERIFY_ERROR The transaction does not pass verification - this usually means that no usable "from" addresses were present, or there was something wrong with the signing key.
RPC_WALLET_INSUFFICIENT_FUNDS Address or addresses specified have insufficient balance to be used for the transaction.
RPC_TRANSACTION_ERROR An error occured while adding the transaction, check the message and log file for details.
RPC_INTERNAL_ERROR An unexpected error occured within the node. Please see the node log for details.

Example:

GET http://localhost:8081/calculatetransactionfee?from=1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq_10000-1PC5kubyLvTmsf16CugqHpBG8B8PK4YjcfSjjLMqbUi8YvkQ_5000&to=153xXfVi1sznPcRqJur8tutgrZecNVYGSzetp47bQvRfNuDix_15000

{
	"result": 0.00005,
	"error": null,
	"id": null
}

Get Balance

Returns balance of the specified address.

Method: getbalance

Input parameters:

Parameter Type Required Description
address String Yes Base58 encoded wallet address

Output:

  • success: address balance in the result field and the error field set to null
  • fail: JSON encoded details with a non-null error and a null result:

Errors:

Error Description
RPC_INTERNAL_ERROR An unexpected error occured within the node. Please see the node log for details.

Note: No error is returned if attempting to read the balance for a nonexistant wallet. In this case, a balance of "0.00000000" is returned.

Example:

GET http://localhost:8081/getbalance?address=153xXfVi1sznPcRqJur8tutgrZecNVYGSzetp47bQvRfNuDix

{
	"result": "0.00102720",
	"error": null,
	"id":null
}

Get Block

Returns specified block data.

Method: getblock

Input parameters:

Parameter Type Required Description
num Number Yes Block number to retrieve.

Errors:

Error Description
RPC_INVALID_PARAMETER The specified block number was invalid.
RPC_INTERNAL_ERROR An unexpected error occured within the node. Please see the node log for details.

Output:

  • success: block details are returned as a JSON object and the error field is set to null
  • fail: JSON encoded details with a non-null error and a null result:

Example:

GET http://localhost:8081/getblock?num=50

{
	"result": {
		"Block Number": "50",
		"Version": "2",
		"Block Checksum": "92efa8dc14175cddfbd31f41fad14a3e73cdc78298f74c322df1725a6aa189c1",
		"Last Block Checksum": "453848a354570441ceded657f229a9df07f653120636e80f5b18dba1fb288c6b",
		"Wallet State Checksum": "8906b11174faacc776930de40b41f230ad702212d900a04448702cdf10c5b2d0",
		"Sig freeze Checksum": "464c6a6e88db2aac2eb534312213adb528334a0e8eb98db8ab92196d0ec86811",
		"PoW field": "null",
		"Timestamp": "1548940147",
		"Difficulty": "11730489520294945089",
		"Signature count": "3",
		"Transaction count": "1",
		"Transaction amount": "0.20002000",
		"Signatures": "[
			[\"H7tj...4kvmX9QqHUy2qMriDVOlUQcttNPmRBLRw=\",\"AC9ELmKQl8QNkA0XjWUiqPU7MjbKxfcQi3MxGpuJKgwIPoaD\"],
			[\"tME0...aiWgNf2Jcu+8chlE0tUodf0x+j/NiCsWg=\",\"AFUKPO4W+0rVPp8LJcHdL+HaY8N8IoPgv7jaAO3UeAdPqDAc\"],
			[\"zT8h...PJmQwJ8JXESIFWJhbiDSuQfv6xZm/XQHQ=\",\"AK2U1C1+vRWrFdIzeFixcGl29ytd/QH142eb9s8pkzx3AMmA\"]
		]",
		"TX IDs": "[
			\"stk-44-49-4Eywy3ngSxpvVbXTKopcuXe1xetoR4ALAsmfCBFiMtvd\"
		]"
	},
	"error": null,
	"id": null
}

Get Last Blocks

Returns the last 10 blocks.

Method: getlastblocks

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured while fetching one or more of the blocks.

Output:

  • success: list of blocks in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result:

Example:

GET http://localhost:8081/getlastblocks

{
	"result": [
		{
			"Block Number": "71",
			"Version": "2",
			"Block Checksum": "90330a25935159c8048aad049578216379e6bfaa7c85a0e29799c648fc673653",
			"Last Block Checksum": "999ae1525a69e1e076b21c411aae20e1d2ffaae4660abfa9321b488010ae4250",
			"Wallet State Checksum": "2c50b13f2d34fe6bb88cf4401ccbf11381823b78a330a1bd32ed00142297394a",
			"Sig freeze Checksum": "5e16b955a50957271f36af1cab5dffde430559580f10e458366812b99d47a8df",
			"PoW field": "null",
			"Timestamp": "1548940839",
			"Difficulty": "11730489520294945089",
			"Signature count": "3",
			"Transaction count": "1",
			"Transaction amount": "0.20002001",
			"Signatures":"...",
			"TX IDs":"..."
		},
		...
	],
	"error": null,
	"id": null
}

Note: the resulting block object is exactly the same as for the getblock method.


Get Full Block

Returns specified block data with full transactions included.

Method: getfullblock

Input parameters:

Parameter Type Required Description
num Number Yes Block number to retrieve.

Errors:

Error Description
RPC_INVALID_PARAMETER The specified block number was invalid.
RPC_INTERNAL_ERROR An unknown error occured while fetching the block.

Output:

  • success: block details are returned as a JSON object and the error field is set to null
  • fail: JSON encoded details with a non-null error and a null result:

Example:

GET http://localhost:8081/getfullblock?num=50

{
	"result": {
		"Block Number": "50",
		"Version": "2",
		"Block Checksum": "92efa8dc14175cddfbd31f41fad14a3e73cdc78298f74c322df1725a6aa189c1",
		"Last Block Checksum": "453848a354570441ceded657f229a9df07f653120636e80f5b18dba1fb288c6b",
		"Wallet State Checksum": "8906b11174faacc776930de40b41f230ad702212d900a04448702cdf10c5b2d0",
		"Sig freeze Checksum": "464c6a6e88db2aac2eb534312213adb528334a0e8eb98db8ab92196d0ec86811",
		"PoW field": "null",
		"Timestamp": "1548940147",
		"Difficulty": "11730489520294945089",
		"Signature count": "3",
		"Transaction count": "1",
		"Transaction amount": "0.20002000",
		"Signatures": "[
			[\"H7tj...4kvmX9QqHUy2qMriDVOlUQcttNPmRBLRw=\",\"AC9ELmKQl8QNkA0XjWUiqPU7MjbKxfcQi3MxGpuJKgwIPoaD\"],
			[\"tME0...aiWgNf2Jcu+8chlE0tUodf0x+j/NiCsWg=\",\"AFUKPO4W+0rVPp8LJcHdL+HaY8N8IoPgv7jaAO3UeAdPqDAc\"],
			[\"zT8h...PJmQwJ8JXESIFWJhbiDSuQfv6xZm/XQHQ=\",\"AK2U1C1+vRWrFdIzeFixcGl29ytd/QH142eb9s8pkzx3AMmA\"]
		]",
		"TX IDs": "[
			\"stk-44-49-4Eywy3ngSxpvVbXTKopcuXe1xetoR4ALAsmfCBFiMtvd\"
		]",
		"Transactions": "[
			{
				\"id\": \"stk-44-49-4Eywy3ngSxpvVbXTKopcuXe1xetoR4ALAsmfCBFiMtvd\",
				\"version\": 1,
				\"blockHeight\": \"49\",
				\"nonce\": \"0\",
				\"signature\": \"5374616b65\",
				\"pubKey\": \"1ixianinfinimine234234234234234234234234234242HP\",
				\"data\": \"2c00000000000000\",
				\"timeStamp\": \"1548940147\",
				\"type\": \"2\",
				\"amount\": \"0.20002000\",
				\"applied\": \"0\",
				\"checksum\": \"36781655c23b509f85e46513608ba359b849795580344c5340c778c51e466fd1\",
				\"from\": {
					\"1\": \"0.20002000\"
				},
				\"to\": {
					\"15iYQBgVhq4JeY3TUfNaMBNFkz27UCQWFjjay14C4b3EuHofG\": \"0.10003000\",
					\"19V9VYuGfqoGjRbGZgcF8XNrAeb5REF8gCZKhp7ZsNX3rG8VZ\":\"0.00010001\",
					\"1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq\":\"0.09988999\"},
					\"fee\":\"0.00000000\"
			}
		]
	},
	"error": null,
	"id": null
}

Note: The block format is essentially the same as for the method getlastblock and the transaction details are the same as for the method gettransaction.


Get Transaction

Returns the information about a specified transaction.

Method: gettransaction

Input parameters:

Parameter Type Required Description
id String Yes Transaction id of the transaction to retrieve

Errors:

Error Description
RPC_INVALID_PARAMETER The specified transaction id was invalid.
RPC_INTERNAL_ERROR An unknown error occured while fetching the transaction details.

Output:

  • success: transaction information JSON encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/gettransaction?id=1-7on93B4WDRguRpaB22osfJV9EPs24pyJWgTkKpNrLV5p

{
	"result": { 
		"id": "stk-44-49-4Eywy3ngSxpvVbXTKopcuXe1xetoR4ALAsmfCBFiMtvd",
		"version": 1,
		"blockHeight": "49",
		"nonce": "0",
		"signature": "5374616b65",
		"pubKey": "1ixianinfinimine234234234234234234234234234242HP",
		"data": "2c00000000000000",
		"timeStamp": "1548940147",
		"type": "2",
		"amount": "0.20002000",
		"applied": "0",
		"checksum": "36781655c23b509f85e46513608ba359b849795580344c5340c778c51e466fd1",
		"from": {
			"1": "0.20002000"
		},
		"to": {
			"15iYQBgVhq4JeY3TUfNaMBNFkz27UCQWFjjay14C4b3EuHofG": "0.10003000",
			"19V9VYuGfqoGjRbGZgcF8XNrAeb5REF8gCZKhp7ZsNX3rG8VZ": "0.00010001",
			"1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq": "0.09988999"
		},
		"fee": "0.00000000"
	},
	"error": null,
	"id": null
}

My Wallet

Returns all the wallets in the node's wallet file and their balances.

Method: mywallet

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: result field contains JSON-encoded list of wallets and balances and the with error field is set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/mywallet

{
	"result": {
		"1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq": "99880008.39139947",
		"1PC5kubyLvTmsf16CugqHpBG8B8PK4YjcfSjjLMqbUi8YvkQ5": "11240.00000000"
	},
	"error": null,
	"id": null
}

My Public Key

Returns the primary public key of this node.

Method: mypubkey

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: public key in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/mypubkey

{
	"result": "00020000...5d1e69cb503000000010001",
	"error": null,
	"id": null
}

Get Wallet

Returns the information about a specified address/wallet.

Method: getwallet

Input parameters:

Parameter Type Required Description
id String Yes Wallet address to retrieve

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Note: Attempting to get the details of an invalid value will return empty data (no public key, balance = 0)

Output:

  • success: wallet information JSON-encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/getwallet?id=1HT1RvL3bujSsy3q4FR86Kfe8ixwdQVcGf27qcSryUFmV15d3

{
	"result": {
		"id": "1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq",
		"balance": "99880008.79095943",
		"type": "Normal",
		"requiredSigs": "1",
		"allowedSigners": "null",
		"extraData": "null",
		"publicKey": "00020000...3000000010001"
	},
	"error": null,
	"id": null
}

Presence List

Returns the presence list information.

Method: pl

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: presence list JSON-encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/pl

{
	"result":[
		{
			"version": 0,
			"wallet": "AK2U1C1+vRWrFdIzeFixcGl29ytd/QH142eb9s8pkzx3AMmA",
			"pubkey": "AAIAANl...zOr6aTXAs71VAwAAAAEAAQ==",
			"metadata": null,
			"addresses": [
				{
					"version": 0,
					"device": "57e6814f-fc0f-4b12-ba28-674c18304f5d",
					"address":"172.20.207.81:10000",
					"type": "M",
					"nodeVersion": "xdc-0.6.1a-dev",
					"lastSeenTime": 1548942000,
					"signature": "lQQe7...D85YgNao="
				}
			],
			"owner": " "
		},
		...
	],
	"error": null,
	"id": null
}

Clients

Returns a list of clients that are connected to this node.

Method: clients

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: list of clients JSON-encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/clients

{
	"result": [
		"172.20.207.81:55700",
		"172.20.207.81:55859",
		...
	],
	"error": null,
	"id": null
}

Servers

Returns a list of servers that this node is connected to.

Method: servers

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: list of servers JSON-encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/servers

{
	"result": [
		"172.20.207.81:10000",
		"172.20.207.81:10002",
		...
	],
	"error": null,
	"id": null
}

Transaction list

Returns the list of applied transactions in the redacted window.

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: transaction list JSON-encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/tx

{
	"result": {
		"stk-91-96-GEBR49QVbNoc4q8HirWTa9oAixWiNQ9TNJnBnU49VsbU": {
			"id": "stk-91-96-GEBR49QVbNoc4q8HirWTa9oAixWiNQ9TNJnBnU49VsbU",
			"version": 1,
			"blockHeight": "96",
			"nonce": "0",
			"signature": "5374616b65",
			"pubKey": "1ixianinfinimine234234234234234234234234234242HP",
			"data": "5b00000000000000",
			"timeStamp": "1548941727",
			"type": "2",
			"amount": "0.20002001",
			"applied": "97",
			"checksum": "bee300c0b2596d66f82e15ac1e431cfce7391d1f0daec41a25326990817ff163",
			"from": {
				"1":"0.20002001"
			},
			"to": {
			"15iYQBgVhq4JeY3TUfNaMBNFkz27UCQWFjjay14C4b3EuHofG": "0.10003001",
			"19V9VYuGfqoGjRbGZgcF8XNrAeb5REF8gCZKhp7ZsNX3rG8VZ": "0.00010001",
			"1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq": "0.09988999"
		},
		"fee": "0.00000000"
		},
		...
	},
	"error": null,
	"id": null
}

Unapplied transaction list

Returns the list of unapplied transactions in the memory pool.

Method: txu

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: unapplied transaction list JSON-encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/txu

{
	"result": {
		"125-Eau8yftyoMnt316Hb8YJvzc9jZvSLUwdq2UxhppWFpng": {
			"id": "125-Eau8yftyoMnt316Hb8YJvzc9jZvSLUwdq2UxhppWFpng",
			"version": 2,
			"blockHeight": "125",
			"nonce": "6178",
			"signature": "0b8afc5d9e1..4eb9e9126b612ee730cb686f657434bbc55cc",
			"pubKey": "1JKZFqQs4yiH6Dq4bfom7xcpL6zG53DrjcY6HD9QJ6cRWmXdq",
			"timeStamp": "1548942726",
			"type": "0",
			"amount": "20000.00000000",
			"applied":"0", 
			"checksum": "f1cf2631009697fd8724091391e5990a281724393fc37ab6d5091c49d63236fe",
			"from": {
				"1": "20000.00005000"
			},
			"to": {
				"15iYQBgVhq4JeY3TUfNaMBNFkz27UCQWFjjay14C4b3EuHofG": "20000.00000000"
			},
			"fee": "0.00005000"
		},
		...
	},
	"error": null,
	"id": null
}

Status

Returns the status of the node.

Method: status

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: status JSON-encoded in tje result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/status

{
	"result": {
		"Node Version": "xdc-0.6.1a-dev",
		"Network type": "testnet",
		"My time": 1548942886,
		"Network time difference": 0,
		"My External IP": "172.20.207.81",
		"Queues": "Rcv: 0, RcvTx: 0, SendClients: 0, SendServers: 0, Storage: 0, Logging: 0",
		"Node Deprecation Block Limit": 216000,
		"DLT Status": "Active",
		"Block Processor Status": "Running",
		"Block Height":130, "Block Version": 2,
		"Required Consensus": 3,
		"Wallets": 5,
		"Presences": 3,
		"Supply": "200020024.00235090",
		"Applied TX Count": 126,
		"Unapplied TX Count": 0,
		"WS Checksum": "6f9e68d6ea27ee59a6f40f6493502c78e639fde149e6a4a9220d197deb21b1cb",
		"WS Delta Checksum": "6f9e68d6ea27ee59a6f40f6493502c78e639fde149e6a4a9220d197deb21b1cb",
		"Network Clients": [
			"172.20.207.81:55700",
			"172.20.207.81:55859"
		],
		"Network Servers": [
		],
		"Masters": 3,
		"Relays": 0,
		"Clients": 0,
		"Workers": 0
	},
	"error": null,
	"id": null
}

Miner stats

Returns miner stats of the node.

Method: minerstats

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: miner stats JSON-encoded in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/minerstats

{
	"result": {
		"Hashrate": 101,
		"Search Mode": "randomLowestDifficulty",
		"Current Block": 5,
		"Current Difficulty": 11730489520294945089,
		"Solved Blocks (Local)":0,
		"Solved Blocks (Network)":0,
		"Empty Blocks": 135,
		"Last Solved Block": 0,
		"Last Solved Block Time": "Never"
	},
	"error": null,
	"id": null
}

Block Height

Returns current block height of the node.

Method: blockheight

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: block height as an ulong in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/blockheight

{
	"result": 140,
	"error": null,
	"id": null
}

Supply

Returns current total IxiCash supply in the network.

Method: supply

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: IXI supply as a decimal number in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/supply

{
	"result": "200020026.20262112",
	"error": null,
	"id": null
}

Generate New Address

Generates new address for receiving and spending IxiCash, using the node's public key.

Method: generatenewaddress

Input parameters:

None

Errors:

Error Description
RPC_INTERNAL_ERROR An unknown error occured in the node. Please check the node log for details.

Output:

  • success: new address in the result field with the error field set to null
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/generatenewaddress

{
	"result": "1KXcNjfyChUPhMK5Wnkj8ZQ6GQCiYs65uBaWkK9jdCvrWuDgS",
	"error": null,
	"id": null
}

Add MultiSig Transaction

Creates an initial transaction for a Multi-Signature wallet. The transaction is broadcast to the network, but not executed until the minimum number of required signatures are added.

Method: addmultisigtransaction

Input parameters:

Parameter Type Required Description
to String Yes A list of destination addresses and amounts for each in the same format as for addtransaction
fee Number No Desired transaction fee per KB, if you would like to increase it from the default value (lower values will be rejected.
from String No An address of the originating Multisig wallet which will be deducted.

Errors:

Error Description
RPC_WALLET_ERROR The specified wallet is not a multisig wallet.
RPC_WALLET_INSUFFICIENT_FUNDS The balance on the from wallet is too low for this transaction.
RPC_WALLET_INSUFFICIENT_FUNDS An unknown error occured while creating the transaction - please check the node's log file.

Output:

  • success: the transaction is added to the Transaction Pool and broadcast to the network and the Transaction object is returned.
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/addmultisigtransaction?from=1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv&to=153xXfVi1sznPcRqJur8tutgrZecNVYGSzetp47bQvRfNuDix_15000

{
	"result": {
		"id": "15-CoxywacZbqiK1sf84R6nuYyW32u5sDbTqD4VZgpeGChw",
		"version": 2,
		"blockHeight": "15",
		"nonce": "47961",
		"signature": "537b159c193..c2ce2d7c2",
		"data": "7dc3adb039..997aa3a8452a6844cc4e6c6",
		"pubKey": "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv",
		"timeStamp": "1547587273",
		"type": "4",
		"amount": "15000.00000000",
		"applied": "0",
		"checksum": "0765a87d5393ad8742de1f8a9ce39f2ae1f1a5a6e7bafc066e454c1856661326",
		"from": {
			"0":"15000.00015000",
		},
		"to": {
			"1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv": "15000.00000000"
		},
		"fee": "0.00015000"
	},
	"error": null,
	"id": null
}

Add MultiSig TX Signature

Signs an already existing Multi-Signature wallet transaction, thereby permitting the change on the wallet or the withdrawal of funds.
Note: If there are more allowed signers than the required signatures value, any combination of allowd signatures will work, as long as they reach the required minimum number of signatures.

Method: addmultisigtxsignature

Input parameters:

Parameter Type Required Description
wallet String Yes The destination wallet - wallet, which will be changed by the transaction origtx.
origtx String Yes The multisig transaction you are validating with additional signature.

Errors:

Error Description
RPC_INVALID_PARAMETER One or more of the required parameters are missing or invalid.
RPC_TRANSACTION_ERROR The transaction specified by origtx does not exist.
RPC_INTERNAL_ERROR An unknown error occured while creating the transaction - please check the node's log file.

Output:

  • success: the transaction is added to the Transaction Pool and broadcast to the network and the Transaction object is returned.
  • fail: JSON encoded details with a non-null error and a null result

Example:

GET http://localhost:8081/addmultisigtransaction?wallet=1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv&origtx=15-CoxywacZbqiK1sf84R6nuYyW32u5sDbTqD4VZgpeGChw

{
    "result": {
        "id": "50-kyfpUJEqKjJwcFv2MzdazCJcpwhqeYW3GwQM6W3tDE4DWDCL6gkwHHWKSiNy",
        "version": 3,
        "blockHeight": "50",
        "nonce": "17678",
        "signature": "8ce677e9488d89a32..5f5195399b343",
        "pubKey": "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv",
        "data": "4d734000000032..0010100000000",
        "timestamp": "1549981848",
        "type": "6",
        "amount": "0.00000000",
        "applied": "0",
        "checksum": "082cfa49212251a10be37bcc23f78e18b1faef6e64c822c2288294675c8120a13814ebd2ec5326e00a777733",
        "from": {
            "1": "0.00010000"
        },
        "to": {
            "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv": "0.00000000"
        },
        "fee": "0.00010000"
    },
    "error": null,
    "id": null
}

Add MultiSig Key

Adds the specified address to the 'allowed signers' list of the target multisig wallet. If the wallet is not a multisig wallet, this command will change it into one.
Note: After this transaction is processed, the required signatures does not change. You must also issue a transaction changemultisigs to adjust the number of required signatures.
In the event where the wallet is newly converted into a multisig wallet, the required signers value will be 1, meaning that either of the addresses may use the wallet.

Method: addmultisigkey

Input parameters:

Parameter Type Required Description
wallet String Yes The wallet where the specified signer will be added as an allowed signer.
signer String Yes The signing address which will be permitted to use the target wallet.

Errors:

Error Description
RPC_INVALID_PARAMS One or more of the required parameters are missing or invalid.
RPC_INTERNAL_ERROR An unknown error occured while creating the transaction - please check the node's log file.

Output:

  • success: the transaction is added to the Transaction Pool and broadcast to the network and the Transaction object is returned.
  • fail: JSON encoded details with a non-null error and a null result

Example:

{
    "result": {
        "id": "16-4aLyz5LksuySmtqHvs5YfE36uym8pqK9gh7E2bUtiqiiwjFNmvapaS55CyJ7",
        "version": 3,
        "blockHeight": "16",
        "nonce": "22160",
        "signature": "4bd9a2560d6be7..6350c4662b1edb43",
        "pubKey": "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv",
        "data": "4d73012400..d9ee46c99b5b06baad",
        "timestamp": "1549980713",
        "type": "5",
        "amount": "0.00000000",
        "applied": "0",
        "checksum": "ff0717335924a41fb2eed9decd4786d6c8d9596e98afb3897185bdb44701806555da8ca9b3724758b2edcfdd",
        "from": {
            "1": "0.00010000"
        },
        "to": {
            "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv": "0.00000000"
        },
        "fee": "0.00010000"
    },
    "error": null,
    "id": null
}

Delete MultiSig Key

Deletes the specified address from the 'allowed signers' list of the target multisig wallet. If all other signers, except the original wallet owner, are removed, the wallet will be converted into a normal wallet.
Note: You cannot use this to remove the original owner of the wallet. You cannot remove a signer if doing so will leave the wallet unusuable (if the change would bring the number of allowed signers below the required signatures).

Method: delmultisigkey

Input parameters:

Parameter Type Required Description
wallet String Yes The wallet where the specified signer will be removed from allowed signers.
signer String Yes The signing address which will be removed from the target wallet.

Errors:

Error Description
RPC_INVALID_PARAMS One or more of the required parameters are missing or invalid.
RPC_INTERNAL_ERROR An unknown error occured while creating the transaction - please check the node's log file.

Output:

  • success: the transaction is added to the Transaction Pool and broadcast to the network and the Transaction object is returned.
  • fail: JSON encoded details with a non-null error and a null result

Example:

{
    "result": {
        "id": "25-27QZ5kmBCWp8e7ufkbJrxX2HqaFCQakHk7SsDvfea4HeBXMqV28yCw6HXXihb",
        "version": 3,
        "blockHeight": "25",
        "nonce": "84286",
        "signature": "6789fc53819b..5783981f06947c7b21",
        "pubKey": "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv",
        "data": "4d730224..dc101d9ee46c99b5b06baad",
        "timestamp": "1549981011",
        "type": "5",
        "amount": "0.00000000",
        "applied": "0",
        "checksum": "7fe9182d6de44916ab9d074c46c214adfcdf1fe2e80f3a42e2074f04be8f0a38e66caeacab69e0fc8e1d48f1",
        "from": {
            "1": "0.00010000"
        },
        "to": {
            "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv": "0.00000000"
        },
        "fee": "0.00010000"
    },
    "error": null,
    "id": null
}

Change MultiSig Required Signatures

Changes the required number of signatures on a multisig wallet. The required number of signatures is the minimum number of additional signatures for any transaction performed on a multisig wallet before the transaction is executed.
Note: The required number of signatures cannot be increased to such a value that would make the wallet unusuable. (More required signatures than allowed signers.
Note: Any combination of allowed signatures will enable the transaction, as long as the number of required signatures is reached.

Method: changemultisigs

Input parameters:

Parameter Type Required Description
wallet String Yes The multisig wallet which will have its required signatures alterred.
sigs String Yes New number of signatures.

Errors:

Error Description
RPC_INVALID_PARAMS One or more of the required parameters are missing or invalid.
RPC_INVALID_PARAMETER The sigs parameter was not a number or was out of range.
RPC_INTERNAL_ERROR An unknown error occured while creating the transaction - please check the node's log file.

Output:

  • success: the transaction is added to the Transaction Pool and broadcast to the network and the Transaction object is returned.
  • fail: JSON encoded details with a non-null error and a null result

Example:

{
    "result": {
        "id": "22-kqKnZqEUnXuHwKVU1hNU1sFtbeY49ymr9S6BPHr3n9CVbN6jadWaJ9MXhw12",
        "version": 3,
        "blockHeight": "22",
        "nonce": "55626",
        "signature": "63f03ab39d93267..2559fad1763510c9851",
        "pubKey": "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv",
        "data": "4d730302..9ee46c99b5b06baad",
        "timestamp": "1549980883",
        "type": "5",
        "amount": "0.00000000",
        "applied": "0",
        "checksum": "f22dda59a601ff28451136c0f8f84bfa9eef59d4b56c3218c635ddd11badc7c963c5f55041de9b7b347630b9",
        "from": {
            "1": "0.00010000"
        },
        "to": {
            "1CQy94c7iNv1QGv9P4UQmgLEPMNzrkq89gdVWiq87CundLWKv": "0.00000000"
        },
        "fee": "0.00010000"
    },
    "error": null,
    "id": null
}
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.