update aqua

This commit is contained in:
boneyard93501 2021-11-08 13:28:58 -06:00
parent d0252d284d
commit cdf911bd76
2 changed files with 43 additions and 34 deletions

View File

@ -3,7 +3,7 @@
* This file is auto-generated. Do not edit manually: changes may be erased.
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/.
* If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
* Aqua version: 0.4.0-235
* Aqua version: 0.4.1-239
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
@ -18,7 +18,7 @@ import {
export interface EIPValidatorDef {
eip712_validation_string: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>;
eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>;
eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>;
}
export function registerEIPValidator(service: EIPValidatorDef): void;
export function registerEIPValidator(serviceId: string, service: EIPValidatorDef): void;
@ -81,9 +81,9 @@ export function registerEIPValidator(...args: any) {
export interface DataProviderDef {
delete_records: (password: string, callParams: CallParams<'password'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record: (signature: string, callParams: CallParams<'signature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record_count: (callParams: CallParams<null>) => number | Promise<number>;
get_records: (callParams: CallParams<null>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record: (signature: string, callParams: CallParams<'signature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record_count: (callParams: CallParams<null>) => number | Promise<number>;
get_records: (callParams: CallParams<null>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: string; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
}
export function registerDataProvider(service: DataProviderDef): void;
export function registerDataProvider(serviceId: string, service: DataProviderDef): void;
@ -381,8 +381,8 @@ export function delete_records(...args: any) {
export function eip_consensus_halfway(signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise<boolean>;
export function eip_consensus_halfway(peer: FluencePeer, signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise<boolean>;
export function eip_consensus_halfway(signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise<boolean[]>;
export function eip_consensus_halfway(peer: FluencePeer, signature: string, locations: { node_id: string; relay_id: string; }[], service_node: string, consensus_service: string, threshold: number, config?: {ttl?: number}): Promise<boolean[]>;
export function eip_consensus_halfway(...args: any) {
let script = `
@ -440,7 +440,7 @@ export function eip_consensus_halfway(...args: any) {
)
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [$result.$.[0]!])
(call %init_peer_id% ("callbackSrv" "response") [$result])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
)
)
@ -796,41 +796,50 @@ export function eip_consensus(...args: any) {
)
(call %init_peer_id% ("getDataSrv" "threshold") [] threshold)
)
(fold locations loc
(par
(par
(seq
(seq
(seq
(seq
(fold locations loc
(par
(seq
(call -relay- ("op" "noop") [])
(call loc.$.relay_id! ("op" "noop") [])
)
(xor
(seq
(call loc.$.node_id! ("DataProvider" "get_record") [signature] res)
(ap res.$.stdout.[0].ts_validation! $result)
)
(seq
(seq
(seq
(seq
(call loc.$.relay_id! ("op" "noop") [])
(call -relay- ("op" "noop") [])
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
(call -relay- ("op" "noop") [])
(call loc.$.relay_id! ("op" "noop") [])
)
(xor
(seq
(call loc.$.node_id! ("DataProvider" "get_record") [signature] res)
(ap res.$.stdout.[0].ts_validation! $result)
)
(seq
(seq
(seq
(seq
(call loc.$.relay_id! ("op" "noop") [])
(call -relay- ("op" "noop") [])
)
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
(call -relay- ("op" "noop") [])
)
(call loc.$.relay_id! ("op" "noop") [])
)
)
(call -relay- ("op" "noop") [])
)
(call loc.$.relay_id! ("op" "noop") [])
)
(call service_node ("op" "noop") [])
)
(next loc)
)
(call loc.$.relay_id! ("op" "noop") [])
)
(call service_node ("op" "noop") [])
(call -relay- ("op" "noop") [])
)
(next loc)
(call service_node ("op" "noop") [])
)
(null)
)
)
(call -relay- ("op" "noop") [])

View File

@ -3,7 +3,7 @@
* This file is auto-generated. Do not edit manually: changes may be erased.
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/.
* If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
* Aqua version: 0.4.0-235
* Aqua version: 0.4.1-239
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
@ -18,7 +18,7 @@ import {
export interface EIPValidatorDef {
eip712_validation_string: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>;
eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>;
eip712_validation_url: (eip_str: string, peer_id: string, callParams: CallParams<'eip_str' | 'peer_id'>) => { stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; } | Promise<{ stderr: string; stdout: { signature: string; validation: { eip_validation: boolean; peer_id: string; timestamp: number; ts_validation: boolean; }; }; }>;
}
export function registerEIPValidator(service: EIPValidatorDef): void;
export function registerEIPValidator(serviceId: string, service: EIPValidatorDef): void;
@ -81,9 +81,9 @@ export function registerEIPValidator(...args: any) {
export interface DataProviderDef {
delete_records: (password: string, callParams: CallParams<'password'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record: (signnature: string, callParams: CallParams<'signnature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record_count: (callParams: CallParams<null>) => number | Promise<number>;
get_records: (callParams: CallParams<null>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record: (signnature: string, callParams: CallParams<'signnature'>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
get_record_count: (callParams: CallParams<null>) => number | Promise<number>;
get_records: (callParams: CallParams<null>) => { stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; } | Promise<{ stderr: string; stdout: { eip712_doc: string; eip_validation: boolean; event_address: string; peer_id: string; signature: number; signed_response: string; timestamp: number; ts_validation: boolean; }[]; }>;
}
export function registerDataProvider(service: DataProviderDef): void;
export function registerDataProvider(serviceId: string, service: DataProviderDef): void;