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]
impl AttestationService
pub fn new(conn_str: &str) -> AttestationService
[src]
pub fn new(conn_str: &str) -> AttestationService
pub fn get_report(&self, quote: &String) -> Result<ASResponse, Error>
[src]
pub fn get_report(&self, quote: &String) -> Result<ASResponse, Error>
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("e).unwrap(); assert_eq!(true, as_response.result.validate);
pub fn build_request(&self, quote: &String) -> QuoteRequest
[src]
pub fn build_request(&self, quote: &String) -> QuoteRequest
input: encrypted enclave quote output : JSON-RPC request object
pub fn send_request(&self, quote_req: QuoteRequest) -> Result<ASResponse, Error>
[src]
pub fn send_request(&self, quote_req: QuoteRequest) -> Result<ASResponse, Error>
request the report object
pub fn rlp_encode_registration_params(
&self,
quote: &String
) -> Result<(Vec<u8>, ASResponse), Error>
[src]
pub fn rlp_encode_registration_params(
&self,
quote: &String
) -> Result<(Vec<u8>, ASResponse), Error>
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("e).unwrap(); assert_eq!(true, as_response.result.validate); assert_eq!("2.0",as_response.jsonrpc );
Auto Trait Implementations
impl Send for AttestationService
impl Send for AttestationService
impl Sync for AttestationService
impl Sync for AttestationService