Skip to content

Fullnode HTTP API

Ngo Nghia edited this page Jul 10, 2019 · 1 revision

Create account

/wallet/createaccount

Returns the create account transaction raw data

Parameters

  • owner_address (string): Activated account, converted to a hex string.
  • account_address (string): New account address, converted to a hex string.

Example:

curl -X POST https://mainnet.mcash.network/wallet/createaccount -d '{"owner_address":"32ff35ad32efe8d0b0d3650f6982687140ea96e180", "account_address": "326f377bc42f76d7ed3abb54a2ef6ff24fcf7f7ca3"}'

Get block by block height

/wallet/getblockbynum

Returns the block object corresponding to the block height

Parameters

  • num (int): Block height.

Example:

curl -X POST https://mainnet.mcash.network/wallet/getblockbynum -d '{"num":68}'

Get block by block id

/wallet/getblockbyid

Returns the block object corresponding to the block id

Parameters

  • value (string): Block id.

Example:

curl -X POST https://mainnet.mcash.network/wallet/getblockbyid -d '{"value":"000000000000004473dacbb6a6b3b0cabad78c340f3fccb1991b7714bd83b1e0"}'

Get latest block

/wallet/getnowblock

Returns the latest block synced to the Full Node.

Example:

curl -X POST https://mainnet.mcash.network/wallet/getnowblock

Get block by latest

/wallet/getblockbylatestnum

Returns a list of block objects

Parameters

  • num (int): Number of blocks to query.

Example:

curl -X POST https://mainnet.mcash.network/wallet/getblockbylatestnum -d '{"num":5}'

Get transaction by id

/wallet/gettransactionbyid

Returns the transaction object corresponding to the transaction id

Parameters

  • value (string): Transaction id.

Example:

curl -X POST https://mainnet.mcash.network/wallet/gettransactionbyid -d '{"value":"649419e0d0fcfcc758fea62878e970d088fffa66f7515a907ecd021009d50277"}'

Get transaction info by id

/wallet/gettransactioninfobyid

Returns the transaction info corresponding to the transaction id

Parameters

  • value (string): Transaction id.

Example:

curl -X POST https://mainnet.mcash.network/wallet/gettransactioninfobyid -d '{"value":"649419e0d0fcfcc758fea62878e970d088fffa66f7515a907ecd021009d50277"}'