Abstract concept Validator
Validators form the end of a signed are in a KIP Document.
Subclasses: SigMud
, SvcSigMud
, PubSig
Signatures range from a KeyIntro
chunk to a Validator
with an overlapping key number. It is possible to span an entire KIP Document
with one signature, but also portions may be addressed. Finally, there is a
time-out option by placing some keys OffKey
for a part of a
range in the KIP Document.
Validators define a number of useful methods:
-
is_signed()
returnsTrue
if this document was signed, orFalse
otherwise. -
get_keynrs()
returns the key numbers that are to be used in the signature. -
set_signers (validkeys)
is called by subclasses to set the keys that formed correct signatures. -
got_signers()
returnsTrue
if at least one key was set asvalidkeys
, orFalse
otherwise. -
get_signers()
returns thevalidkeys
as setup withset_signers()
. -
make_signature()
is an internal method called to create a fresh signature. Subclasses should override this method and locally set the signature value such that it may be exported to CBOR. It will probably have to obtain a list of internalKey
objects for a given keynr from kipctx, in light of the non-unique key numbering system in KIP Documents. -
validate_signature()
invokes the signature validation process. Subclasses should override this method and callset_signers()
when successful. It will probably have to obtain a list of internalKey
objects for a given key number from the internal KIP context, in light of the non-unique key numbering system in KIP Documents.