basm

package
v0.1.0-beta.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(msg string)

Log writes a message to the logs returned to the user with each invocation.

func LogToHost

func LogToHost(msg string)

LogToHost writes a message to standard error of the host. Because it logs to the host, this function is only useful for debugging or when developing a guest function in local development mode. For most uses, Log is more appropriate.

func ReadFromHost

func ReadFromHost(inputPtr uint64) []byte

ReadFromHost takes a packed offset/size pair in a format compatible with WebAssembly numeric types and returns the byte slice that was written to the shared memory of the host's WebAssembly runtime. The host is expected to free the memory when the guest function is complete.

func WriteToHost

func WriteToHost(data []byte) uint64

WriteToHost takes a byte slice and writes it to the shared memory of the host's WebAssembly runtime. It returns a packed offset/size pair in a format compatible with WebAssembly numeric types. The host is expected to free the memory when it is done with it.

Types

type EnclaveAttestation

type EnclaveAttestation string

type EnclaveMeasurement

type EnclaveMeasurement struct {
	Platform string
	Code     string
}

type HTTPRequestInput

type HTTPRequestInput struct {
	Method  string
	URL     string
	Headers map[string][]string
	Body    []byte
}

type HTTPRequestOutput

type HTTPRequestOutput struct {
	StatusCode int
	Body       []byte
	Headers    map[string][]string
}

func HTTPRequest

func HTTPRequest(req HTTPRequestInput) (HTTPRequestOutput, error)

HTTPRequest uses the host's HTTP client to make a request to the given URL.

type MarshaledAttestedObject

type MarshaledAttestedObject []byte

type TransitiveAttestation

type TransitiveAttestation string

type VerifyAttestationInput

type VerifyAttestationInput struct {
	EnclaveAttestedKey       EnclaveAttestation
	TransitiveAttestedClaims TransitiveAttestation
	AcceptableMeasures       []EnclaveMeasurement
}

type VerifyAttestationOutput

type VerifyAttestationOutput struct {
	RawClaims MarshaledAttestedObject
}

func VerifyAttestation

func VerifyAttestation(
	input VerifyAttestationInput,
) (VerifyAttestationOutput, error)

VerifyAttestation uses the host's attestation verification functionality to verify a transitive attestation from a Blocky attestation service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL