public class ValueInstance extends Object
| Constructor and Description |
|---|
ValueInstance(OmniledgerRPC ol,
InstanceId id)
Instantiates a new ValueInstance given a working omniledger instance and
an instanceId.
|
ValueInstance(OmniledgerRPC ol,
Proof p) |
| Modifier and Type | Method and Description |
|---|---|
TransactionId |
evolveValue(byte[] newValue,
Signer owner) |
void |
evolveValueAndWait(byte[] newValue,
Signer owner)
Asks omniledger to update the value and waits until the new value has
been stored in the global state.
|
Instruction |
evolveValueInstruction(byte[] newValue,
Signer owner,
int pos,
int len)
Creates an instruction to evolve the value in omniledger.
|
InstanceId |
getId() |
Instance |
getInstance() |
byte[] |
getValue() |
void |
update() |
public ValueInstance(OmniledgerRPC ol, InstanceId id) throws CothorityException
ol - is a link to an omniledger instance that is runningid - of the value-instance to connect toCothorityExceptionpublic ValueInstance(OmniledgerRPC ol, Proof p) throws CothorityException
CothorityExceptionpublic void update()
throws CothorityException
CothorityExceptionpublic Instruction evolveValueInstruction(byte[] newValue, Signer owner, int pos, int len) throws CothorityCryptoException
TODO: allow for evolution if the expression has more than one identity.
newValue - the value to replace the old value.owner - must have its identity in the "invoke:update" rulepos - position of the instruction in the ClientTransactionlen - total number of instructions in the ClientTransactionCothorityCryptoExceptionpublic TransactionId evolveValue(byte[] newValue, Signer owner) throws CothorityException
CothorityExceptionpublic void evolveValueAndWait(byte[] newValue,
Signer owner)
throws CothorityException
newValue - the value to replace the old value.owner - is the owner that can sign to evolve the darcCothorityExceptionpublic InstanceId getId()
public byte[] getValue()
throws CothorityCryptoException
CothorityCryptoExceptionpublic Instance getInstance()
Copyright © 2018. All rights reserved.