demo version
This commit is contained in:
parent
fbb282a801
commit
672d6daa8e
125 changed files with 17918 additions and 1481 deletions
|
@ -1,11 +1,11 @@
|
|||
const ChainUtil = require('../chain-util');
|
||||
const ChainUtil = require('../util/chain-util');
|
||||
const SeedRandom = require('seedrandom');
|
||||
|
||||
const outputValidation = {
|
||||
publicKey: ChainUtil.validateIsPublicKey,
|
||||
sensor: ChainUtil.validateIsString,
|
||||
sensorName: ChainUtil.validateIsString,
|
||||
amount: ChainUtil.createValidateIsIntegerWithMin(1),
|
||||
counter: ChainUtil.createValidateIsIntegerWithMin(1)
|
||||
sensorHash: ChainUtil.validateIsString,
|
||||
brokerHash: ChainUtil.validateIsString
|
||||
};
|
||||
|
||||
function validateOutputs(t) {
|
||||
|
@ -54,12 +54,12 @@ class Integration {
|
|||
}
|
||||
}
|
||||
|
||||
static createOutput(recipientPublicKey, sensorId, amount, counter) {
|
||||
static createOutput(amount, sensorName, sensorRegistrationHash, brokerRegistrationHash) {
|
||||
return {
|
||||
publicKey: recipientPublicKey,
|
||||
sensor: sensorId,
|
||||
amount: amount,
|
||||
counter: counter
|
||||
sensorName: sensorName,
|
||||
sensorHash: sensorRegistrationHash,
|
||||
brokerHash: brokerRegistrationHash
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -128,6 +128,10 @@ class Integration {
|
|||
witnesses: witnesses
|
||||
};
|
||||
}
|
||||
|
||||
static name() {
|
||||
return "Integration";
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Integration;
|
Loading…
Add table
Add a link
Reference in a new issue