55 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2021-09-30 14:06:59 -05:00
data PVResponse:
peer_id: string
timestamp: u64
eip_validation: bool
ts_validation: bool
2021-10-23 13:47:42 -05:00
data DBRecord:
2021-09-30 14:06:59 -05:00
snapshot_id: u64
2021-10-23 13:47:42 -05:00
event_address: string
event_signature: string
eip712_doc: string
peer_id: string
timestamp: u64
eip_validation: bool
ts_validation: bool
signed_response: string
data DBResult:
stderr: string
stdout: []DBRecord
2021-09-30 14:06:59 -05:00
2021-10-23 13:47:42 -05:00
service EIPValidator("snapshot"):
2021-10-04 00:26:26 -05:00
eip712_validation_string(eip_str: string, peer_id: string) -> string
eip712_validation_url(eip_str: string, peer_id: string) -> string
2021-09-30 14:06:59 -05:00
2021-10-08 18:22:18 -05:00
service DataProvider("snapshot"):
2021-10-23 13:47:42 -05:00
get_records() -> DBResult
get_record(snapshot_id: u64) -> DBResult
2021-09-30 14:06:59 -05:00
2021-10-04 00:26:26 -05:00
func validate(relay: string, peer:string, eip712_json: string) -> string:
2021-09-30 14:06:59 -05:00
on peer via relay:
2021-10-23 13:47:42 -05:00
result <- EIPValidator.eip712_validation_string(eip712_json, peer)
2021-10-04 00:26:26 -05:00
<- result
func validate_from_url(relay: string, peer:string, eip712_url: string) -> string:
on peer via relay:
2021-10-23 13:47:42 -05:00
result <- EIPValidator.eip712_validation_url(eip712_url, peer)
2021-09-30 14:06:59 -05:00
<- result
2021-10-23 13:47:42 -05:00
func get_record(relay:string, peer:string, snapshot_id: u64) -> DBResult:
2021-09-30 14:06:59 -05:00
on peer via relay:
result <- DataProvider.get_record(snapshot_id)
<- result
2021-10-23 13:47:42 -05:00
func get_records(relay:string, peer:string) -> DBResult:
2021-09-30 14:06:59 -05:00
on peer via relay:
result <- DataProvider.get_records()
<- result