// Copyright 2025 AGNTCY Contributors (https://github.com/agntcy) // SPDX-License-Identifier: Apache-2.0 syntax = "proto3"; package agntcy.identity.node.v1alpha1; import "agntcy/identity/core/v1alpha1/id.proto"; import "agntcy/identity/core/v1alpha1/issuer.proto"; import "agntcy/identity/core/v1alpha1/vc.proto"; import "google/api/annotations.proto"; import "protoc-gen-openapiv2/options/annotations.proto"; // Package-wide variables from generator "generated". option go_package = "github.com/agntcy/identity/api/server/agntcy/identity/node/v1alpha1;identity_node_sdk_go"; // IdService is the service that provides ID operations. service IdService { option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {name: "IdService"}; // Generate an Id and its corresponding ResolverMetadata for the specified Issuer rpc Generate(GenerateRequest) returns (GenerateResponse) { option (google.api.http) = { post: "/v1alpha1/id/generate" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { operation_id: "GenerateId"; summary: "Generate an Id and its corresponding ResolverMetadata for a specified Issuer"; }; } // Resolve a specified Id to its corresponding ResolverMetadata rpc Resolve(ResolveRequest) returns (ResolveResponse) { option (google.api.http) = { post: "/v1alpha1/id/resolve" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { operation_id: "ResolveId"; summary: "Resolve an Id to its corresponding ResolverMetadata"; }; } } // Generate an Id and its corresponding ResolverMetadata for the specified Issuer // For external IdPs, the Issuer should be provided with a Proof of ownership // of the Issuer's provided id message GenerateRequest { // The Issuer details agntcy.identity.core.v1alpha1.Issuer issuer = 1; // Optional Proof of ownership of the Issuer's provided id // This should be provided when the Issuer is provided by an external IdP // Example: a signed JWT optional agntcy.identity.core.v1alpha1.Proof proof = 2; } // Returns the Generated Id and its corresponding ResolverMetadata message GenerateResponse { // The ResolverMetadata corresponding to the generated Id agntcy.identity.core.v1alpha1.ResolverMetadata resolver_metadata = 1; } // Resolve a specified Id to its corresponding ResolverMetadata message ResolveRequest { // Id is the identifier. string id = 1; } // Returns the ResolverMetadata corresponding to the specified Id message ResolveResponse { // The ResolverMetadata resolved from the Id agntcy.identity.core.v1alpha1.ResolverMetadata resolver_metadata = 1; }