types

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTeeAttestationRequest

func DecodeTeeAttestationRequest(attReq []byte) (verification.ITeeVerificationTeeAttestation, error)

DecodeTeeAttestationRequest decodes the attestation request bytes into the strongly typed struct.

func EncodeTeeAttestationRequest

func EncodeTeeAttestationRequest(req *verification.ITeeVerificationTeeAttestation) (hexutil.Bytes, error)

EncodeTeeAttestationRequest serializes the attestation request using the generated struct ABI.

func ParsePaymentInstruction

ParsePaymentInstruction decodes the payment instruction payload into the XRPL struct representation.

func ParsePubKey

func ParsePubKey(key PublicKey) (*ecdsa.PublicKey, error)

ParsePubKey converts the serialized public key into an ECDSA key.

func ParsePubKeyBytes

func ParsePubKeyBytes(key []byte) (*ecdsa.PublicKey, error)

ParsePubKeyBytes converts key that consists of concatenated X and Y coordinates into an ECDSA public key. Key is [X||Y] where X and Y are 32 bytes each.

func ParseVRFInstruction

ParseVRFInstruction decodes the VRF instruction payload into the shared go-flare-common struct representation.

func PubKeyToBytes

func PubKeyToBytes(key *ecdsa.PublicKey) []byte

PubKeyToBytes returns the concatenated x and y coordinates of the key.

Types

type Action

type Action struct {
	Data                       ActionData      `json:"data"`
	AdditionalVariableMessages []hexutil.Bytes `json:"additionalVariableMessages"`
	Timestamps                 []uint64        `json:"timestamps"`
	AdditionalActionData       hexutil.Bytes   `json:"additionalActionData"`
	Signatures                 []hexutil.Bytes `json:"signatures"`
}

type ActionData

type ActionData struct {
	ID            common.Hash   `json:"id"`
	Type          ActionType    `json:"type"`
	SubmissionTag SubmissionTag `json:"submissionTag"`
	Message       hexutil.Bytes `json:"message"`
}

type ActionInfo

type ActionInfo struct {
	QueueID       string        `json:"queueId"`
	ActionID      common.Hash   `json:"actionId"`
	SubmissionTag SubmissionTag `json:"submissionTag"`
}

type ActionResponse

type ActionResponse struct {
	Result         ActionResult  `json:"result"`
	Signature      hexutil.Bytes `json:"signature"`
	ProxySignature hexutil.Bytes `json:"proxySignature"`
}

type ActionResult

type ActionResult struct {
	ID            common.Hash   `json:"id"`
	SubmissionTag SubmissionTag `json:"submissionTag"`
	Status        uint8         `json:"status"`
	Log           string        `json:"log"`

	OPType                 common.Hash   `json:"opType"`
	OPCommand              common.Hash   `json:"opCommand"`
	AdditionalResultStatus hexutil.Bytes `json:"additionalResultStatus"`

	Version string        `json:"version"`
	Data    hexutil.Bytes `json:"data"`
}

The response received after queuing an action

type ActionType

type ActionType string
const (
	Instruction ActionType = "instruction"
	Direct      ActionType = "direct"
)

type ConfigureExtensionIDRequest

type ConfigureExtensionIDRequest struct {
	ExtensionID *common.Hash `json:"extensionId"`
}

type ConfigureInitialOwnerRequest

type ConfigureInitialOwnerRequest struct {
	Owner *common.Address `json:"owner"`
}

type ConfigureProxyURLRequest

type ConfigureProxyURLRequest struct {
	URL *string `json:"url"` // The pointer ensures {} and {"url": ""} unmarshal distinctly.

}

type DecryptRequest

type DecryptRequest struct {
	EncryptedMessage []byte `json:"encryptedMessage"`
}

type DecryptResponse

type DecryptResponse struct {
	DecryptedMessage []byte `json:"decryptedMessage"`
}

type DirectInstruction

type DirectInstruction struct {
	OPType    common.Hash   `json:"opType"`
	OPCommand common.Hash   `json:"opCommand"`
	Message   hexutil.Bytes `json:"message"`
}

type InitializePolicyRequest

type InitializePolicyRequest struct {
	InitialPolicyBytes []byte
	PublicKeys         []PublicKey
}

type MachineData

type MachineData struct {
	ExtensionID  common.Hash    `json:"extensionId"`
	InitialOwner common.Address `json:"initialOwner"`
	CodeHash     common.Hash    `json:"codeHash"`
	Platform     common.Hash    `json:"platform"`
	PublicKey    PublicKey      `json:"publicKey"`
}

func (*MachineData) Hash

func (md *MachineData) Hash() (common.Hash, error)

type MultiSignedPolicy

type MultiSignedPolicy struct {
	PolicyBytes []byte
	Signatures  [][]byte
}

type OpID

type OpID struct {
	OPType    common.Hash `json:"opType"`
	OPCommand common.Hash `json:"opCommand"`
}

func GetOpID

func GetOpID(a *Action) (OpID, error)

GetOpID extracts OpID from the action.

func (OpID) String

func (i OpID) String() string

String returns the textual representation of the operation identifiers.

type ProveRandomnessResponse

type ProveRandomnessResponse struct {
	WalletID common.Hash      `json:"walletId"`
	KeyID    uint64           `json:"keyId"`
	Nonce    hexutil.Bytes    `json:"nonce"`
	Proof    walletsvrf.Proof `json:"proof"`
}

type PublicKey

type PublicKey struct {
	X common.Hash `json:"x"`
	Y common.Hash `json:"y"`
}

func PubKeyToStruct

func PubKeyToStruct(key *ecdsa.PublicKey) PublicKey

PubKeyToStruct converts an ECDSA public key into the fixed-size struct form.

type RewardingData

type RewardingData struct {
	VoteSequence   VoteSequence  `json:"voteSequence"`
	AdditionalData hexutil.Bytes `json:"additionalData"`
	Version        string        `json:"version"`
	Signature      hexutil.Bytes `json:"signature"` // TEE signature of voteHash
}

type SignRequest

type SignRequest struct {
	Message []byte `json:"message"`
}

type SignResponse

type SignResponse struct {
	Message   []byte `json:"message"`
	Signature []byte `json:"signature"`
}

type SignedTeeInfoResponse

type SignedTeeInfoResponse struct {
	TeeInfoResponse
	ProxySignature hexutil.Bytes `json:"proxySignature"`
}

type SubmissionTag

type SubmissionTag string
const (
	// Submission tags for instruction action
	Threshold SubmissionTag = "threshold"
	End       SubmissionTag = "end"
	Submit    SubmissionTag = "submit"
)

type TeeInfo

type TeeInfo struct {
	Challenge                common.Hash `json:"challenge"`
	PublicKey                PublicKey   `json:"publicKey"`
	InitialSigningPolicyID   uint32      `json:"initialSigningPolicyId"`
	InitialSigningPolicyHash common.Hash `json:"initialSigningPolicyHash"`
	LastSigningPolicyID      uint32      `json:"lastSigningPolicyId"`
	LastSigningPolicyHash    common.Hash `json:"lastSigningPolicyHash"`
	State                    TeeState    `json:"state"`
	TeeTimestamp             uint64      `json:"teeTimestamp"`
}

func (*TeeInfo) Hash

func (ti *TeeInfo) Hash() ([]byte, error)

Hash encodes and hashes the TEE attestation payload.

type TeeInfoRequest

type TeeInfoRequest struct {
	Challenge common.Hash
}

type TeeInfoResponse

type TeeInfoResponse struct {
	TeeInfo       TeeInfo       `json:"teeInfo"`
	MachineData   MachineData   `json:"machineData"`
	DataSignature hexutil.Bytes `json:"dataSignature"`
	Attestation   hexutil.Bytes `json:"attestation"`
}

type TeeState

type TeeState struct {
	SystemState        hexutil.Bytes `json:"systemState"`
	SystemStateVersion common.Hash   `json:"systemStateVersion"`
	State              hexutil.Bytes `json:"state"`
	StateVersion       common.Hash   `json:"stateVersion"`
}

type UpdatePolicyRequest

type UpdatePolicyRequest struct {
	NewPolicy  MultiSignedPolicy
	PublicKeys []PublicKey
}

type VoteSequence

type VoteSequence struct {
	VoteHash                        common.Hash     `json:"voteHash"`
	InstructionID                   common.Hash     `json:"instructionId"`
	InstructionHash                 common.Hash     `json:"instructionHash"`
	RewardEpochID                   uint32          `json:"rewardEpochId"`
	TeeID                           common.Address  `json:"teeId"`
	Signatures                      []hexutil.Bytes `json:"signatures"` // Signatures of the signers and cosigners
	AdditionalVariableMessageHashes []common.Hash   `json:"additionalVariableMessageHashes"`
	Timestamps                      []uint64        `json:"timestamps"`
}

type XRPSignResponse

type XRPSignResponse []map[string]any

Jump to

Keyboard shortcuts

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