2024-09-26 18:01:49 -04:00
syntax = "proto3" ;
2024-11-26 22:05:50 -05:00
package svc.v1 ;
2024-09-26 18:01:49 -04:00
import "cosmos/msg/v1/msg.proto" ;
2024-11-26 22:05:50 -05:00
import "cosmos_proto/cosmos.proto" ;
2025-10-03 14:45:52 -04:00
import "gogoproto/gogo.proto" ;
import "svc/v1/genesis.proto" ;
2024-09-26 18:01:49 -04:00
2025-10-03 14:45:52 -04:00
option go_package = "github.com/sonr-io/sonr/x/svc/types" ;
2024-09-26 18:01:49 -04:00
// 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 );
2024-09-27 20:58:05 -04:00
2025-10-03 14:45:52 -04:00
// 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
2024-09-27 20:58:05 -04:00
rpc RegisterService ( MsgRegisterService ) returns ( MsgRegisterServiceResponse );
2024-09-26 18:01:49 -04:00
}
// 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.
2024-11-18 19:04:10 -05:00
string authority = 1 [( cosmos_proto.scalar ) = "cosmos.AddressString" ];
2024-09-26 18:01:49 -04:00
// params defines the parameters to update.
//
// NOTE: All parameters must be supplied.
2024-11-18 19:04:10 -05:00
Params params = 2 [( gogoproto.nullable ) = false ];
2024-09-26 18:01:49 -04:00
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParamsResponse {}
2024-09-27 20:58:05 -04:00
2025-10-03 14:45:52 -04:00
// 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
2024-09-27 20:58:05 -04:00
message MsgRegisterService {
2025-10-03 14:45:52 -04:00
option ( cosmos.msg.v1.signer ) = "creator" ;
2024-09-27 20:58:05 -04:00
2025-10-03 14:45:52 -04:00
// Address of the service owner
string creator = 1 [( cosmos_proto.scalar ) = "cosmos.AddressString" ];
// Unique identifier for the service
string service_id = 2 ;
2024-09-27 20:58:05 -04:00
2025-10-03 14:45:52 -04:00
// 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 ;
2024-09-27 20:58:05 -04:00
}
2025-10-03 14:45:52 -04:00
// MsgRegisterServiceResponse defines the response for service registration
2024-09-27 20:58:05 -04:00
message MsgRegisterServiceResponse {
2025-10-03 14:45:52 -04:00
// IPFS CID of the generated root capability
string root_capability_cid = 1 ;
// Service registration details
string service_id = 2 ;
2024-09-27 20:58:05 -04:00
}