mirror of
https://github.com/fluencelabs/eip712-validation-node
synced 2025-05-31 00:41:22 +00:00
68 lines
1.7 KiB
Plaintext
68 lines
1.7 KiB
Plaintext
data Response:
|
|
peer_id: string
|
|
timestamp: u64
|
|
eip_validation: bool
|
|
ts_validation: bool
|
|
|
|
data EipResponse:
|
|
signature: string
|
|
validation: Response
|
|
|
|
data ValidationResult:
|
|
stderr: string
|
|
stdout: EipResponse
|
|
|
|
|
|
data DBRecord:
|
|
snapshot_id: u64
|
|
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
|
|
|
|
service EIPValidator("EIPValidator"):
|
|
eip712_validation_string(eip_str: string, peer_id: string) -> ValidationResult
|
|
eip712_validation_url(eip_str: string, peer_id: string) -> ValidationResult
|
|
|
|
service DataProvider("DataProvider"):
|
|
get_records() -> DBResult
|
|
get_record(snapshot_id: u64) -> DBResult
|
|
get_record_count() -> u64
|
|
delete_records(password: string) -> DBResult
|
|
|
|
|
|
func validate(eip712_url: string, node: string, relay:string) -> ValidationResult:
|
|
on node via relay:
|
|
res <- EIPValidator.eip712_validation_url(eip712_url, node)
|
|
<- res
|
|
|
|
func get_records(node: string, relay:string) -> DBResult:
|
|
on node via relay:
|
|
res <- DataProvider.get_records()
|
|
<- res
|
|
|
|
func get_record(snapshot_id: u64, node: string, relay:string) -> DBResult:
|
|
on node via relay:
|
|
res <- DataProvider.get_record(snapshot_id)
|
|
<- res
|
|
|
|
func get_record_count(node: string, relay:string) -> u64:
|
|
on node via relay:
|
|
res <- DataProvider.get_record_count()
|
|
<- res
|
|
|
|
func delete_records(password: string, node: string, relay:string) -> DBResult:
|
|
on node via relay:
|
|
result <- DataProvider.delete_records(password)
|
|
<- result
|
|
|
|
|