mirror of
https://github.com/fluencelabs/aqua-lib
synced 2024-12-04 15:20:23 +00:00
Add definition of Sig service (#18)
This commit is contained in:
parent
7ce35fdc74
commit
75a978c779
15
builtin.aqua
15
builtin.aqua
@ -251,3 +251,18 @@ service Script("script"):
|
||||
-- Returns a list of existing scripts on the node.
|
||||
-- Each object in the list is of the following structure
|
||||
list() -> []ScriptInfo
|
||||
|
||||
service Sig("sig"):
|
||||
-- Signs data with the current peer's key.
|
||||
-- Can only be called on %init_peer_id%
|
||||
-- Accepts data only from the following sources:
|
||||
-- trust-graph.get_trust_bytes
|
||||
-- trust-graph.get_revocation_bytes
|
||||
-- registry.get_key_bytes
|
||||
-- registry.get_record_bytes
|
||||
-- Argument: data - byte array to sign
|
||||
-- Returns: signature as a byte array
|
||||
sign(data: []u8) -> []u8
|
||||
|
||||
-- Given the data and signature both as byte arrays, returns true if the signature is correct, false otherwise.
|
||||
verify(signature: []u8, data: []u8) -> bool
|
||||
|
Loading…
Reference in New Issue
Block a user