Files
sonr/proto/svc/v1/tx.proto
Prad NukalaandGitHub 13e6c3e84d Master (#1262)
* clear

* feat: Add everything

* fix: Commenht
2025-10-03 14:45:52 -04:00

125 lines
3.9 KiB
Protocol Buffer

syntax = "proto3";
package svc.v1;
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "svc/v1/genesis.proto";
option go_package = "github.com/sonr-io/sonr/x/svc/types";
// Msg defines the Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
// InitiateDomainVerification starts the domain verification process
//
// {{.MethodDescriptorProto.Name}} is a call with the method(s) {{$first := true}}{{range .Bindings}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{.HTTPMethod}}{{end}} within the "{{.Service.Name}}" service.
// It takes in "{{.RequestType.Name}}" and returns a "{{.ResponseType.Name}}".
//
// {{import "svc_docs.md"}}
rpc InitiateDomainVerification(MsgInitiateDomainVerification) returns (MsgInitiateDomainVerificationResponse);
// VerifyDomain completes domain verification by checking DNS TXT records
rpc VerifyDomain(MsgVerifyDomain) returns (MsgVerifyDomainResponse);
// RegisterService registers a new service with verified domain binding
rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse);
}
// MsgUpdateParams is the Msg/UpdateParams request type.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// params defines the parameters to update.
//
// NOTE: All parameters must be supplied.
Params params = 2 [(gogoproto.nullable) = false];
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParamsResponse {}
// MsgInitiateDomainVerification initiates domain ownership verification
message MsgInitiateDomainVerification {
option (cosmos.msg.v1.signer) = "creator";
// Address of the user initiating domain verification
string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Domain to be verified (e.g., "example.com")
string domain = 2;
}
// MsgInitiateDomainVerificationResponse defines the response for domain
// verification initiation
message MsgInitiateDomainVerificationResponse {
// Verification token to be placed in DNS TXT record
string verification_token = 1;
// Instructions for DNS TXT record setup
string dns_instruction = 2;
}
// MsgVerifyDomain verifies domain ownership by checking DNS TXT records
message MsgVerifyDomain {
option (cosmos.msg.v1.signer) = "creator";
// Address of the user verifying domain ownership
string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Domain to be verified
string domain = 2;
}
// MsgVerifyDomainResponse defines the response for domain verification
message MsgVerifyDomainResponse {
// Whether verification was successful
bool verified = 1;
// Message describing verification result
string message = 2;
}
// MsgRegisterService registers a new service with verified domain binding
message MsgRegisterService {
option (cosmos.msg.v1.signer) = "creator";
// Address of the service owner
string creator = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// Unique identifier for the service
string service_id = 2;
// Verified domain to bind to this service
string domain = 3;
// List of permissions requested for this service
repeated string requested_permissions = 4;
// UCAN delegation chain for authorization (JWT-encoded)
string ucan_delegation_chain = 5;
}
// MsgRegisterServiceResponse defines the response for service registration
message MsgRegisterServiceResponse {
// IPFS CID of the generated root capability
string root_capability_cid = 1;
// Service registration details
string service_id = 2;
}