Version: Next

Masternode API Wrapper

Network API Endpoints

All API methods return a value, Promise or callback if provided

methodmasternode endpointDescription
getContractInfo(contractName)/contracts/contractNameReturns the contract code of contractName example
getVariable(contractName, variableName, parms)/contracts/contractName/variableName?key=parmRetrieve the current state of a contract variable example
getContractMethods(contractName)/contracts/contractName/methodsReturns all methods belonging to contractName example
pingServer()/pingChecks if network is online example
getCurrencyBalance(vk)/contracts/currency/balancesA wrapper method for getVariable() which always returns the result of the currency contract's balances?key=vk example
contractExists(contractName)/contracts/contractNamea wrapper method for getContractInfo() which returns if a contract exists on the blockchain
sendTransaction(txData, callback)/submits a contract to the network a txHash will be returned. Use checkTransaction() to get tx result
getNonce(senderVk, callback)/nonce/senderVkGet the current nonce and processor for a public key (vk)
checkTransaction(txHash, callback)/tx?hash=txHashGet the result of a transaction