Skip to content
51 changes: 51 additions & 0 deletions pkg/capabilities/actions/confidentialrelay/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package confidentialrelay

const (
MethodSecretsGet = "confidential.secrets.get"
MethodCapabilityExec = "confidential.capability.execute"

DomainSecretsGet = "ConfidentialSecretsGet"
DomainCapabilityExec = "ConfidentialCapabilityExecute"
)

// SecretIdentifier identifies a secret by key and namespace.
type SecretIdentifier struct {
Key string `json:"key"`
Namespace string `json:"namespace"`
}

// SecretsRequestParams is the JSON-RPC params for "confidential.secrets.get".
type SecretsRequestParams struct {
WorkflowID string `json:"workflow_id"`
Secrets []SecretIdentifier `json:"secrets"`
EnclavePublicKey string `json:"enclave_public_key"`
Attestation string `json:"attestation,omitempty"`
}

// SecretEntry is a single secret in the relay DON's response.
type SecretEntry struct {
ID SecretIdentifier `json:"id"`
Ciphertext string `json:"ciphertext"`
EncryptedShares []string `json:"encrypted_shares"`
}

// SecretsResponseResult is the JSON-RPC result for "confidential.secrets.get".
type SecretsResponseResult struct {
Secrets []SecretEntry `json:"secrets"`
MasterPublicKey string `json:"master_public_key"`
Threshold int `json:"threshold"`
}

// CapabilityRequestParams is the JSON-RPC params for "confidential.capability.execute".
type CapabilityRequestParams struct {
WorkflowID string `json:"workflow_id"`
CapabilityID string `json:"capability_id"`
Payload string `json:"payload"`
Attestation string `json:"attestation,omitempty"`
}

// CapabilityResponseResult is the JSON-RPC result for "confidential.capability.execute".
type CapabilityResponseResult struct {
Payload string `json:"payload,omitempty"`
Error string `json:"error,omitempty"`
}
333 changes: 333 additions & 0 deletions pkg/capabilities/v2/actions/confidentialworkflow/client.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//go:generate go run ../../gen --pkg=github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/actions/confidentialworkflow --file=capabilities/compute/confidentialworkflow/v1alpha/client.proto
package confidentialworkflow
Loading
Loading