Updates string data protected by access control.

Internally calls http PUT /data on the AltExecCnsAPI.

The difference from sendData is that an error is returned if there is no data for the specified objectId.


Name Type Description
password string Account password
contractName string Target contract name
functionName string Target function name
objectId string DataObject ID
data string String to be saved in the data store
params array Parameters to pass to Contract function
abi JSONObject ABI of the contract to call
callback function callback


Name Type Description
err error Error
txHash string Transaction hash of executed transaction


contract.updateData('__PASSWORD__', 'Building', 'update', 'building-object1', 'building data', ['building1'], abi, function(err, txHash) {
  if (err) console.error(err);
  else console.log(txHash);

results matching ""

    No results matching ""