Module sui::nitro_attestation
- Struct
NitroAttestationDocument
- Function
verify_nitro_attestation_internal
- Function
verify_nitro_attestation
- Function
get_module_id
- Function
get_timestamp
- Function
get_digest
- Function
get_pcrs
- Function
get_public_key
- Function
get_user_data
- Function
get_nonce
use std::ascii;
use std::bcs;
use std::option;
use std::string;
use std::vector;
use sui::address;
use sui::clock;
use sui::hex;
use sui::object;
use sui::transfer;
use sui::tx_context;
Struct NitroAttestationDocument
public struct NitroAttestationDocument has copy, drop, store
Click to open
Fields
- module_id: vector<u8>
- timestamp: u64
- digest: vector<u8>
- pcrs: vector<vector<u8>>
- public_key: std::option::Option<vector<u8>>
- user_data: std::option::Option<vector<u8>>
- nonce: std::option::Option<vector<u8>>
Function verify_nitro_attestation_internal
Internal native function
fun verify_nitro_attestation_internal(attestation: &vector<u8>, current_timestamp: u64): sui::nitro_attestation::NitroAttestationDocument
Click to open
Implementation
native fun verify_nitro_attestation_internal(
attestation: &vector<u8>,
current_timestamp: u64
): NitroAttestationDocument;
Function verify_nitro_attestation
@param attestation: attesttaion documents bytes data. @param clock: the clock object.
Returns parsed NitroAttestationDocument after verifying the attestation.
public fun verify_nitro_attestation(attestation: &vector<u8>, clock: &sui::clock::Clock): sui::nitro_attestation::NitroAttestationDocument
Click to open
Implementation
public fun verify_nitro_attestation(
attestation: &vector<u8>,
clock: &Clock
): NitroAttestationDocument {
verify_nitro_attestation_internal(attestation, clock::timestamp_ms(clock))
}
Function get_module_id
public fun get_module_id(attestation: &sui::nitro_attestation::NitroAttestationDocument): vector<u8>
Click to open
Implementation
public fun get_module_id(attestation: &NitroAttestationDocument): vector<u8> {
attestation.module_id
}
Function get_timestamp
public fun get_timestamp(attestation: &sui::nitro_attestation::NitroAttestationDocument): u64
Click to open
Implementation
public fun get_timestamp(attestation: &NitroAttestationDocument): u64 {
attestation.timestamp
}
Function get_digest
public fun get_digest(attestation: &sui::nitro_attestation::NitroAttestationDocument): vector<u8>
Click to open
Implementation
public fun get_digest(attestation: &NitroAttestationDocument): vector<u8> {
attestation.digest
}
Function get_pcrs
public fun get_pcrs(attestation: &sui::nitro_attestation::NitroAttestationDocument): vector<vector<u8>>
Click to open
Implementation
public fun get_pcrs(attestation: &NitroAttestationDocument): vector<vector<u8>> {
attestation.pcrs
}
Function get_public_key
public fun get_public_key(attestation: &sui::nitro_attestation::NitroAttestationDocument): std::option::Option<vector<u8>>
Click to open
Implementation
public fun get_public_key(attestation: &NitroAttestationDocument): Option<vector<u8>> {
attestation.public_key
}
Function get_user_data
public fun get_user_data(attestation: &sui::nitro_attestation::NitroAttestationDocument): std::option::Option<vector<u8>>
Click to open
Implementation
public fun get_user_data(attestation: &NitroAttestationDocument): Option<vector<u8>> {
attestation.user_data
}
Function get_nonce
public fun get_nonce(attestation: &sui::nitro_attestation::NitroAttestationDocument): std::option::Option<vector<u8>>
Click to open
Implementation
public fun get_nonce(attestation: &NitroAttestationDocument): Option<vector<u8>> {
attestation.nonce
}