Documentation
¶
Index ¶
- Constants
- type CertCrl
- type ChainConfig
- type Client
- func (p *Client) GetCertByID(ctx context.Context, ca uint8) (*CertCrl, error)
- func (p *Client) GetEnclaveID(ctx context.Context, enclaveId uint8, version uint32) (*EnclaveIdentityInfo, error)
- func (p *Client) GetTcbInfo(ctx context.Context, tcbType uint8, fmspc string, tcbVersion uint32) (*TcbInfo, error)
- type EnclaveIdentityInfo
- type TcbInfo
Constants ¶
View Source
const ( CA_ROOT uint8 = iota CA_PROCESSOR CA_PLATFORM CA_SIGNING )
Constants for CA types
View Source
const ( ENCLAVE_ID_QE uint8 = iota ENCLAVE_ID_QVE ENCLAVE_ID_TDQE )
Constants for Enclave ID types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainConfig ¶
type ChainConfig struct { AutomataPcsDao common.Address `json:"automata_pcs_dao"` AutomataFmspcTcbDao common.Address `json:"automata_fmspc_tcb_dao"` AutomataEnclaveIdentityDao common.Address `json:"automata_enclave_identity_dao"` }
ChainConfig holds the addresses of the smart contracts
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Server struct holds the Ethereum client and contract instances
func NewClient ¶
func NewClient(client *ethclient.Client, chain *ChainConfig) (*Client, error)
NewClient initializes a new Server instance
func (*Client) GetCertByID ¶
GetCertByID retrieves a certificate by its CA ID
func (*Client) GetEnclaveID ¶
func (p *Client) GetEnclaveID(ctx context.Context, enclaveId uint8, version uint32) (*EnclaveIdentityInfo, error)
GetEnclaveID retrieves enclave identity information by ID and version
type EnclaveIdentityInfo ¶
type EnclaveIdentityInfo struct { Identity json.RawMessage `json:"enclaveIdentity"` Signature string `json:"signature"` }
EnclaveIdentityInfo holds enclave identity information and its signature
func (*EnclaveIdentityInfo) Encode ¶
func (e *EnclaveIdentityInfo) Encode() []byte
Encode serializes EnclaveIdentityInfo to JSON
Click to show internal directories.
Click to hide internal directories.