Masternode API Wrapper 🔗︎
Network API Endpoints 🔗︎
All API methods return a value, Promise or callback if provided
method | masternode endpoint | Description |
---|---|---|
getContractInfo(contractName) | /contracts/contractName | Returns the contract code of contractName example |
getVariable(contractName, variableName, parms) | /contracts/contractName/variableName?key=parm | Retrieve the current state of a contract variable example |
getContractMethods(contractName) | /contracts/contractName/methods | Returns all methods belonging to contractName example |
pingServer() | /ping | Checks if network is online example |
getCurrencyBalance(vk) | /contracts/currency/balances | A wrapper method for getVariable() which always returns the result of the currency contract's balances?key=vk example |
contractExists(contractName) | /contracts/contractName | a 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/senderVk | Get the current nonce and processor for a public key (vk) |
checkTransaction(txHash, callback) | /tx?hash=txHash | Get the result of a transaction |