HashIdentifiable
Contract
, FollowerContract
, NSmartContract
, SlotContract
, UnsContract
public interface Approvable extends HashIdentifiable
Approvable logic:
Approvable instance provides self check()
, and list of other items. Note that transaction that have no
output, e.g. empty getRevokingItems()
and getNewItems()
will not change the ledger and therefore
will not be processed by the network.
Created by sergeych on 16/07/2017.
Modifier and Type | Method | Description |
---|---|---|
default void |
addError(ErrorRecord r) |
|
default void |
addError(Errors code,
java.lang.String object,
java.lang.String message) |
|
default boolean |
check() |
|
boolean |
check(java.lang.String prefix) |
Check the the document is valid assuming all mentioned items are OK, e.g.
|
default java.time.ZonedDateTime |
getCreatedAt() |
|
default java.util.Collection<ErrorRecord> |
getErrors() |
|
default java.time.ZonedDateTime |
getExpiresAt() |
|
default java.util.Set<Approvable> |
getNewItems() |
get items created by this transaction.
|
default java.util.Set<Approvable> |
getReferencedItems() |
List of items (e.g.
|
default java.util.HashMap<java.lang.String,Reference> |
getReferences() |
Map of references that item have.
|
default java.util.Set<Approvable> |
getRevokingItems() |
List of items that will be revoked on positive consensus.
|
default boolean |
isInWhiteList(java.util.List<com.icodici.crypto.PublicKey> whiteList) |
|
default boolean |
isU(java.util.Set<com.icodici.crypto.KeyAddress> issuerKeys,
java.lang.String issuerName) |
Special check for item to pass or not U contract criteria: allowed issuer keys and issuer name
|
default boolean |
paymentCheck(java.util.Set<com.icodici.crypto.KeyAddress> issuerKeys) |
Special check for U contracts (used as payment for
Parcel ). |
default boolean |
shouldBeU() |
Getter for the node that shows for the node if item should be U contract and should check with special payment check.
|
getId
default java.util.HashMap<java.lang.String,Reference> getReferences()
default java.util.Set<Approvable> getReferencedItems()
default java.util.Set<Approvable> getRevokingItems()
default java.util.Set<Approvable> getNewItems()
boolean check(java.lang.String prefix) throws Quantiser.QuantiserException
prefix
- is for marking checking itemQuantiser.QuantiserException
- if processing cost limit is gotdefault boolean check() throws Quantiser.QuantiserException
Quantiser.QuantiserException
default boolean paymentCheck(java.util.Set<com.icodici.crypto.KeyAddress> issuerKeys) throws Quantiser.QuantiserException
Parcel
).
Use shouldBeU()
to know if item should checked using this method.issuerKeys
- is set of keys allowed for U issuingQuantiser.QuantiserException
default void addError(ErrorRecord r)
default java.time.ZonedDateTime getCreatedAt()
default void addError(Errors code, java.lang.String object, java.lang.String message)
default java.util.Collection<ErrorRecord> getErrors()
default java.time.ZonedDateTime getExpiresAt()
default boolean isU(java.util.Set<com.icodici.crypto.KeyAddress> issuerKeys, java.lang.String issuerName)
issuerKeys
- is set of allowed by node keys for U issuingissuerName
- is allowed issuer namedefault boolean isInWhiteList(java.util.List<com.icodici.crypto.PublicKey> whiteList)
default boolean shouldBeU()