Struct enigma_tools_u::attestation_service::service::AttestationService[][src]

pub struct AttestationService { /* fields omitted */ }

Functional Struct to interact with the AS (Attestation Service).

Methods

impl AttestationService
[src]

Example

use attestation_service;
 
let service : AttestationService = AttestationService::new(AS url);
let quote = String::from("enclave quote in base64 encoding...");
let as_response : ASResponse = service.get_report(&quote).unwrap();
assert_eq!(true, as_response.result.validate);

input: encrypted enclave quote output : JSON-RPC request object

request the report object

encode to rlp the report -> registration for the enigma contract

Example

use attestation_service;
 
let service : AttestationService = AttestationService::new(AS url);
let quote = String::from("...base64 encoded quote ...");
let (rlp_encoded, as_response ) = service.rlp_encode_registration_params(&quote).unwrap();
assert_eq!(true, as_response.result.validate);
assert_eq!("2.0",as_response.jsonrpc );

Auto Trait Implementations