mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 04:57:08 +00:00
feature/migrate models (#16)
* feat: add new supported attestation formats to genesis * feat: refactor keyType to keytype enum * refactor: remove unused imports and code * refactor: update main.go to use src package * refactor: move web-related structs from to * refactor: move client middleware package to root * refactor: remove unused IndexedDB dependency * feat: update worker implementation to use * feat: add Caddyfile and Caddy configuration for vault service * refactor(config): move keyshare and address to Motr config * fix: validate service origin in AllocateVault * chore: remove IndexedDB configuration * feat: add support for IPNS-based vault access
This commit is contained in:
parent
6d8bd8fc85
commit
96e6486c43
@ -16,7 +16,6 @@ include_ext = ["go", "templ", "html", "pkl", "js", "mjs"]
|
||||
include_file = [
|
||||
"wrangler.toml",
|
||||
"Dockerfile",
|
||||
"Makefile",
|
||||
".goreleaser.yaml",
|
||||
"go.mod",
|
||||
"devbox.json",
|
||||
|
23
Makefile
23
Makefile
@ -299,15 +299,32 @@ sh-testnet: mod-tidy
|
||||
### templ & vault ###
|
||||
###############################################################################
|
||||
|
||||
.PHONY: dwn motr
|
||||
.PHONY: dwn motr xcaddy ipfs-cluster-start
|
||||
|
||||
dwn:
|
||||
@echo "(dwn) Building dwn.wasm -> IPFS Vault"
|
||||
GOOS=js GOARCH=wasm go build -o ./internal/vfs/app.wasm ./internal/dwn/wasm/main.go
|
||||
GOOS=js GOARCH=wasm go build -o ./internal/vfs/app.wasm ./internal/dwn/main.go
|
||||
|
||||
motr:
|
||||
@echo "(web) Building app.wasm -> Deploy to Cloudflare Workers"
|
||||
GOOS=js GOARCH=wasm go build -o ./web/build/app.wasm ./web/main.go
|
||||
GOOS=js GOARCH=wasm go build -o ./web/build/app.wasm ./web/src/main.go
|
||||
|
||||
xcaddy:
|
||||
@echo "(proxy) Building Cloudflare/Caddy proxy"
|
||||
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
|
||||
mkdir -p ./bin
|
||||
xcaddy build --with github.com/caddy-dns/cloudflare
|
||||
mv ./caddy ./bin/caddy
|
||||
./bin/caddy adapt > ./config/caddy/caddy.json
|
||||
|
||||
ipfs-cluster-start:
|
||||
@echo "(ipfs) Starting ipfs-cluster"
|
||||
ipfs-cluster-service init --consensus crdt
|
||||
ipfs-cluster-service daemon
|
||||
|
||||
caddy-start:
|
||||
@echo "(proxy) Starting caddy"
|
||||
./bin/caddy run --config ./config/caddy/caddy.json
|
||||
|
||||
###############################################################################
|
||||
### help ###
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2127,559 +2127,6 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
md_QueryServiceResponse protoreflect.MessageDescriptor
|
||||
fd_QueryServiceResponse_existing protoreflect.FieldDescriptor
|
||||
fd_QueryServiceResponse_service protoreflect.FieldDescriptor
|
||||
fd_QueryServiceResponse_txt_record protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_did_v1_query_proto_init()
|
||||
md_QueryServiceResponse = File_did_v1_query_proto.Messages().ByName("QueryServiceResponse")
|
||||
fd_QueryServiceResponse_existing = md_QueryServiceResponse.Fields().ByName("existing")
|
||||
fd_QueryServiceResponse_service = md_QueryServiceResponse.Fields().ByName("service")
|
||||
fd_QueryServiceResponse_txt_record = md_QueryServiceResponse.Fields().ByName("txt_record")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_QueryServiceResponse)(nil)
|
||||
|
||||
type fastReflection_QueryServiceResponse QueryServiceResponse
|
||||
|
||||
func (x *QueryServiceResponse) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_QueryServiceResponse)(x)
|
||||
}
|
||||
|
||||
func (x *QueryServiceResponse) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_did_v1_query_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
var _fastReflection_QueryServiceResponse_messageType fastReflection_QueryServiceResponse_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_QueryServiceResponse_messageType{}
|
||||
|
||||
type fastReflection_QueryServiceResponse_messageType struct{}
|
||||
|
||||
func (x fastReflection_QueryServiceResponse_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_QueryServiceResponse)(nil)
|
||||
}
|
||||
func (x fastReflection_QueryServiceResponse_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_QueryServiceResponse)
|
||||
}
|
||||
func (x fastReflection_QueryServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_QueryServiceResponse
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_QueryServiceResponse) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_QueryServiceResponse
|
||||
}
|
||||
|
||||
// Type returns the message type, which encapsulates both Go and protobuf
|
||||
// type information. If the Go type information is not needed,
|
||||
// it is recommended that the message descriptor be used instead.
|
||||
func (x *fastReflection_QueryServiceResponse) Type() protoreflect.MessageType {
|
||||
return _fastReflection_QueryServiceResponse_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_QueryServiceResponse) New() protoreflect.Message {
|
||||
return new(fastReflection_QueryServiceResponse)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_QueryServiceResponse) Interface() protoreflect.ProtoMessage {
|
||||
return (*QueryServiceResponse)(x)
|
||||
}
|
||||
|
||||
// Range iterates over every populated field in an undefined order,
|
||||
// calling f for each field descriptor and value encountered.
|
||||
// Range returns immediately if f returns false.
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current field descriptor.
|
||||
func (x *fastReflection_QueryServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.Existing != false {
|
||||
value := protoreflect.ValueOfBool(x.Existing)
|
||||
if !f(fd_QueryServiceResponse_existing, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Service != nil {
|
||||
value := protoreflect.ValueOfMessage(x.Service.ProtoReflect())
|
||||
if !f(fd_QueryServiceResponse_service, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.TxtRecord != "" {
|
||||
value := protoreflect.ValueOfString(x.TxtRecord)
|
||||
if !f(fd_QueryServiceResponse_txt_record, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
//
|
||||
// Some fields have the property of nullability where it is possible to
|
||||
// distinguish between the default value of a field and whether the field
|
||||
// was explicitly populated with the default value. Singular message fields,
|
||||
// member fields of a oneof, and proto2 scalar fields are nullable. Such
|
||||
// fields are populated only if explicitly set.
|
||||
//
|
||||
// In other cases (aside from the nullable cases above),
|
||||
// a proto3 scalar field is populated if it contains a non-zero value, and
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_QueryServiceResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "did.v1.QueryServiceResponse.existing":
|
||||
return x.Existing != false
|
||||
case "did.v1.QueryServiceResponse.service":
|
||||
return x.Service != nil
|
||||
case "did.v1.QueryServiceResponse.txt_record":
|
||||
return x.TxtRecord != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Clear clears the field such that a subsequent Has call reports false.
|
||||
//
|
||||
// Clearing an extension field clears both the extension type and value
|
||||
// associated with the given field number.
|
||||
//
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_QueryServiceResponse) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "did.v1.QueryServiceResponse.existing":
|
||||
x.Existing = false
|
||||
case "did.v1.QueryServiceResponse.service":
|
||||
x.Service = nil
|
||||
case "did.v1.QueryServiceResponse.txt_record":
|
||||
x.TxtRecord = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Get retrieves the value for a field.
|
||||
//
|
||||
// For unpopulated scalars, it returns the default value, where
|
||||
// the default value of a bytes scalar is guaranteed to be a copy.
|
||||
// For unpopulated composite types, it returns an empty, read-only view
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_QueryServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "did.v1.QueryServiceResponse.existing":
|
||||
value := x.Existing
|
||||
return protoreflect.ValueOfBool(value)
|
||||
case "did.v1.QueryServiceResponse.service":
|
||||
value := x.Service
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
case "did.v1.QueryServiceResponse.txt_record":
|
||||
value := x.TxtRecord
|
||||
return protoreflect.ValueOfString(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", descriptor.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Set stores the value for a field.
|
||||
//
|
||||
// For a field belonging to a oneof, it implicitly clears any other field
|
||||
// that may be currently set within the same oneof.
|
||||
// For extension fields, it implicitly stores the provided ExtensionType.
|
||||
// When setting a composite type, it is unspecified whether the stored value
|
||||
// aliases the source's memory in any way. If the composite value is an
|
||||
// empty, read-only value, then it panics.
|
||||
//
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_QueryServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "did.v1.QueryServiceResponse.existing":
|
||||
x.Existing = value.Bool()
|
||||
case "did.v1.QueryServiceResponse.service":
|
||||
x.Service = value.Message().Interface().(*ServiceInfo)
|
||||
case "did.v1.QueryServiceResponse.txt_record":
|
||||
x.TxtRecord = value.Interface().(string)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// Mutable returns a mutable reference to a composite type.
|
||||
//
|
||||
// If the field is unpopulated, it may allocate a composite value.
|
||||
// For a field belonging to a oneof, it implicitly clears any other field
|
||||
// that may be currently set within the same oneof.
|
||||
// For extension fields, it implicitly stores the provided ExtensionType
|
||||
// if not already stored.
|
||||
// It panics if the field does not contain a composite type.
|
||||
//
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_QueryServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "did.v1.QueryServiceResponse.service":
|
||||
if x.Service == nil {
|
||||
x.Service = new(ServiceInfo)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.Service.ProtoReflect())
|
||||
case "did.v1.QueryServiceResponse.existing":
|
||||
panic(fmt.Errorf("field existing of message did.v1.QueryServiceResponse is not mutable"))
|
||||
case "did.v1.QueryServiceResponse.txt_record":
|
||||
panic(fmt.Errorf("field txt_record of message did.v1.QueryServiceResponse is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// NewField returns a new value that is assignable to the field
|
||||
// for the given descriptor. For scalars, this returns the default value.
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_QueryServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "did.v1.QueryServiceResponse.existing":
|
||||
return protoreflect.ValueOfBool(false)
|
||||
case "did.v1.QueryServiceResponse.service":
|
||||
m := new(ServiceInfo)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
case "did.v1.QueryServiceResponse.txt_record":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName()))
|
||||
}
|
||||
}
|
||||
|
||||
// WhichOneof reports which field within the oneof is populated,
|
||||
// returning nil if none are populated.
|
||||
// It panics if the oneof descriptor does not belong to this message.
|
||||
func (x *fastReflection_QueryServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryServiceResponse", d.FullName()))
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
// GetUnknown retrieves the entire list of unknown fields.
|
||||
// The caller may only mutate the contents of the RawFields
|
||||
// if the mutated bytes are stored back into the message with SetUnknown.
|
||||
func (x *fastReflection_QueryServiceResponse) GetUnknown() protoreflect.RawFields {
|
||||
return x.unknownFields
|
||||
}
|
||||
|
||||
// SetUnknown stores an entire list of unknown fields.
|
||||
// The raw fields must be syntactically valid according to the wire format.
|
||||
// An implementation may panic if this is not the case.
|
||||
// Once stored, the caller must not mutate the content of the RawFields.
|
||||
// An empty RawFields may be passed to clear the fields.
|
||||
//
|
||||
// SetUnknown is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_QueryServiceResponse) SetUnknown(fields protoreflect.RawFields) {
|
||||
x.unknownFields = fields
|
||||
}
|
||||
|
||||
// IsValid reports whether the message is valid.
|
||||
//
|
||||
// An invalid message is an empty, read-only value.
|
||||
//
|
||||
// An invalid message often corresponds to a nil pointer of the concrete
|
||||
// message type, but the details are implementation dependent.
|
||||
// Validity is not part of the protobuf data model, and may not
|
||||
// be preserved in marshaling or other operations.
|
||||
func (x *fastReflection_QueryServiceResponse) IsValid() bool {
|
||||
return x != nil
|
||||
}
|
||||
|
||||
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
|
||||
// This method may return nil.
|
||||
//
|
||||
// The returned methods type is identical to
|
||||
// "google.golang.org/protobuf/runtime/protoiface".Methods.
|
||||
// Consult the protoiface package documentation for details.
|
||||
func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*QueryServiceResponse)
|
||||
if x == nil {
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: 0,
|
||||
}
|
||||
}
|
||||
options := runtime.SizeInputToOptions(input)
|
||||
_ = options
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
if x.Existing {
|
||||
n += 2
|
||||
}
|
||||
if x.Service != nil {
|
||||
l = options.Size(x.Service)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.TxtRecord)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: n,
|
||||
}
|
||||
}
|
||||
|
||||
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||
x := input.Message.Interface().(*QueryServiceResponse)
|
||||
if x == nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
options := runtime.MarshalInputToOptions(input)
|
||||
_ = options
|
||||
size := options.Size(x)
|
||||
dAtA := make([]byte, size)
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if x.unknownFields != nil {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.TxtRecord) > 0 {
|
||||
i -= len(x.TxtRecord)
|
||||
copy(dAtA[i:], x.TxtRecord)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxtRecord)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if x.Service != nil {
|
||||
encoded, err := options.Marshal(x.Service)
|
||||
if err != nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, err
|
||||
}
|
||||
i -= len(encoded)
|
||||
copy(dAtA[i:], encoded)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if x.Existing {
|
||||
i--
|
||||
if x.Existing {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
if input.Buf != nil {
|
||||
input.Buf = append(input.Buf, dAtA...)
|
||||
} else {
|
||||
input.Buf = dAtA
|
||||
}
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, nil
|
||||
}
|
||||
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
|
||||
x := input.Message.Interface().(*QueryServiceResponse)
|
||||
if x == nil {
|
||||
return protoiface.UnmarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Flags: input.Flags,
|
||||
}, nil
|
||||
}
|
||||
options := runtime.UnmarshalInputToOptions(input)
|
||||
_ = options
|
||||
dAtA := input.Buf
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Existing", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
x.Existing = bool(v != 0)
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if x.Service == nil {
|
||||
x.Service = &ServiceInfo{}
|
||||
}
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxtRecord", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.TxtRecord = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if !options.DiscardUnknown {
|
||||
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
|
||||
}
|
||||
return &protoiface.Methods{
|
||||
NoUnkeyedLiterals: struct{}{},
|
||||
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
|
||||
Size: size,
|
||||
Marshal: marshal,
|
||||
Unmarshal: unmarshal,
|
||||
Merge: nil,
|
||||
CheckInitialized: nil,
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
md_SyncRequest protoreflect.MessageDescriptor
|
||||
fd_SyncRequest_did protoreflect.FieldDescriptor
|
||||
@ -2700,7 +2147,7 @@ func (x *SyncRequest) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *SyncRequest) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_did_v1_query_proto_msgTypes[5]
|
||||
mi := &file_did_v1_query_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -3120,7 +2567,7 @@ func (x *SyncResponse) ProtoReflect() protoreflect.Message {
|
||||
}
|
||||
|
||||
func (x *SyncResponse) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_did_v1_query_proto_msgTypes[6]
|
||||
mi := &file_did_v1_query_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -3717,59 +3164,6 @@ func (x *QueryResolveResponse) GetDocument() *Document {
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
|
||||
type QueryServiceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// options is the PublicKeyCredentialAttestationOptions
|
||||
Existing bool `protobuf:"varint,1,opt,name=existing,proto3" json:"existing,omitempty"`
|
||||
Service *ServiceInfo `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
|
||||
TxtRecord string `protobuf:"bytes,3,opt,name=txt_record,json=txtRecord,proto3" json:"txt_record,omitempty"`
|
||||
}
|
||||
|
||||
func (x *QueryServiceResponse) Reset() {
|
||||
*x = QueryServiceResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_did_v1_query_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *QueryServiceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*QueryServiceResponse) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use QueryServiceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*QueryServiceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_did_v1_query_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *QueryServiceResponse) GetExisting() bool {
|
||||
if x != nil {
|
||||
return x.Existing
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *QueryServiceResponse) GetService() *ServiceInfo {
|
||||
if x != nil {
|
||||
return x.Service
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *QueryServiceResponse) GetTxtRecord() string {
|
||||
if x != nil {
|
||||
return x.TxtRecord
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// SyncRequest is the request type for the Sync RPC method.
|
||||
type SyncRequest struct {
|
||||
state protoimpl.MessageState
|
||||
@ -3782,7 +3176,7 @@ type SyncRequest struct {
|
||||
func (x *SyncRequest) Reset() {
|
||||
*x = SyncRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_did_v1_query_proto_msgTypes[5]
|
||||
mi := &file_did_v1_query_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -3796,7 +3190,7 @@ func (*SyncRequest) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SyncRequest) Descriptor() ([]byte, []int) {
|
||||
return file_did_v1_query_proto_rawDescGZIP(), []int{5}
|
||||
return file_did_v1_query_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SyncRequest) GetDid() string {
|
||||
@ -3818,7 +3212,7 @@ type SyncResponse struct {
|
||||
func (x *SyncResponse) Reset() {
|
||||
*x = SyncResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_did_v1_query_proto_msgTypes[6]
|
||||
mi := &file_did_v1_query_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -3832,7 +3226,7 @@ func (*SyncResponse) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SyncResponse) Descriptor() ([]byte, []int) {
|
||||
return file_did_v1_query_proto_rawDescGZIP(), []int{6}
|
||||
return file_did_v1_query_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *SyncResponse) GetSuccess() bool {
|
||||
@ -3848,75 +3242,60 @@ var file_did_v1_query_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x64, 0x69,
|
||||
0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63,
|
||||
0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63,
|
||||
0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69,
|
||||
0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64,
|
||||
0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22,
|
||||
0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x44,
|
||||
0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75,
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x07, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x74, 0x5f,
|
||||
0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x78,
|
||||
0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x1f, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x28, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
|
||||
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65,
|
||||
0x73, 0x73, 0x32, 0xc4, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64,
|
||||
0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65,
|
||||
0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51,
|
||||
0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69,
|
||||
0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x58, 0x0a,
|
||||
0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
|
||||
0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b,
|
||||
0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x12, 0x40, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12,
|
||||
0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79,
|
||||
0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x07, 0x22, 0x05, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
|
||||
0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02,
|
||||
0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06,
|
||||
0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69,
|
||||
0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
|
||||
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x22, 0x60, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64,
|
||||
0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73,
|
||||
0x65, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71,
|
||||
0x75, 0x65, 0x72, 0x79, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61,
|
||||
0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63,
|
||||
0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22,
|
||||
0x1f, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64,
|
||||
0x22, 0x28, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0xea, 0x01, 0x0a, 0x05, 0x51,
|
||||
0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14,
|
||||
0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, 0x72, 0x61,
|
||||
0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e,
|
||||
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f,
|
||||
0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x40, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x13, 0x2e,
|
||||
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x07,
|
||||
0x22, 0x05, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64,
|
||||
0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44,
|
||||
0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69,
|
||||
0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
|
||||
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -3931,38 +3310,33 @@ func file_did_v1_query_proto_rawDescGZIP() []byte {
|
||||
return file_did_v1_query_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_did_v1_query_proto_goTypes = []interface{}{
|
||||
(*QueryRequest)(nil), // 0: did.v1.QueryRequest
|
||||
(*QueryResponse)(nil), // 1: did.v1.QueryResponse
|
||||
(*QueryParamsResponse)(nil), // 2: did.v1.QueryParamsResponse
|
||||
(*QueryResolveResponse)(nil), // 3: did.v1.QueryResolveResponse
|
||||
(*QueryServiceResponse)(nil), // 4: did.v1.QueryServiceResponse
|
||||
(*SyncRequest)(nil), // 5: did.v1.SyncRequest
|
||||
(*SyncResponse)(nil), // 6: did.v1.SyncResponse
|
||||
(*Document)(nil), // 7: did.v1.Document
|
||||
(*Params)(nil), // 8: did.v1.Params
|
||||
(*ServiceInfo)(nil), // 9: did.v1.ServiceInfo
|
||||
(*SyncRequest)(nil), // 4: did.v1.SyncRequest
|
||||
(*SyncResponse)(nil), // 5: did.v1.SyncResponse
|
||||
(*Document)(nil), // 6: did.v1.Document
|
||||
(*Params)(nil), // 7: did.v1.Params
|
||||
}
|
||||
var file_did_v1_query_proto_depIdxs = []int32{
|
||||
7, // 0: did.v1.QueryResponse.document:type_name -> did.v1.Document
|
||||
8, // 1: did.v1.QueryResponse.params:type_name -> did.v1.Params
|
||||
8, // 2: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params
|
||||
7, // 3: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document
|
||||
9, // 4: did.v1.QueryServiceResponse.service:type_name -> did.v1.ServiceInfo
|
||||
0, // 5: did.v1.Query.Params:input_type -> did.v1.QueryRequest
|
||||
0, // 6: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest
|
||||
0, // 7: did.v1.Query.Service:input_type -> did.v1.QueryRequest
|
||||
5, // 8: did.v1.Query.Sync:input_type -> did.v1.SyncRequest
|
||||
2, // 9: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse
|
||||
3, // 10: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse
|
||||
4, // 11: did.v1.Query.Service:output_type -> did.v1.QueryServiceResponse
|
||||
6, // 12: did.v1.Query.Sync:output_type -> did.v1.SyncResponse
|
||||
9, // [9:13] is the sub-list for method output_type
|
||||
5, // [5:9] is the sub-list for method input_type
|
||||
5, // [5:5] is the sub-list for extension type_name
|
||||
5, // [5:5] is the sub-list for extension extendee
|
||||
0, // [0:5] is the sub-list for field type_name
|
||||
6, // 0: did.v1.QueryResponse.document:type_name -> did.v1.Document
|
||||
7, // 1: did.v1.QueryResponse.params:type_name -> did.v1.Params
|
||||
7, // 2: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params
|
||||
6, // 3: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document
|
||||
0, // 4: did.v1.Query.Params:input_type -> did.v1.QueryRequest
|
||||
0, // 5: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest
|
||||
4, // 6: did.v1.Query.Sync:input_type -> did.v1.SyncRequest
|
||||
2, // 7: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse
|
||||
3, // 8: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse
|
||||
5, // 9: did.v1.Query.Sync:output_type -> did.v1.SyncResponse
|
||||
7, // [7:10] is the sub-list for method output_type
|
||||
4, // [4:7] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_did_v1_query_proto_init() }
|
||||
@ -3971,7 +3345,6 @@ func file_did_v1_query_proto_init() {
|
||||
return
|
||||
}
|
||||
file_did_v1_genesis_proto_init()
|
||||
file_did_v1_models_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_did_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryRequest); i {
|
||||
@ -4022,18 +3395,6 @@ func file_did_v1_query_proto_init() {
|
||||
}
|
||||
}
|
||||
file_did_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryServiceResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_did_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -4045,7 +3406,7 @@ func file_did_v1_query_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_did_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_did_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -4064,7 +3425,7 @@ func file_did_v1_query_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_did_v1_query_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
@ -21,7 +21,6 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
const (
|
||||
Query_Params_FullMethodName = "/did.v1.Query/Params"
|
||||
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
|
||||
Query_Service_FullMethodName = "/did.v1.Query/Service"
|
||||
Query_Sync_FullMethodName = "/did.v1.Query/Sync"
|
||||
)
|
||||
|
||||
@ -33,10 +32,6 @@ type QueryClient interface {
|
||||
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
// Resolve queries the DID document by its id.
|
||||
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
|
||||
// Service returns associated ServiceInfo for a given Origin
|
||||
// if the servie is not found, a fingerprint is generated to be used
|
||||
// as a TXT record in DNS. v=sonr, o=origin, p=protocol
|
||||
Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error)
|
||||
// Sync queries the DID document by its id. And returns the required PKL information
|
||||
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
|
||||
}
|
||||
@ -67,15 +62,6 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) {
|
||||
out := new(QueryServiceResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) {
|
||||
out := new(SyncResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...)
|
||||
@ -93,10 +79,6 @@ type QueryServer interface {
|
||||
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
|
||||
// Resolve queries the DID document by its id.
|
||||
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
|
||||
// Service returns associated ServiceInfo for a given Origin
|
||||
// if the servie is not found, a fingerprint is generated to be used
|
||||
// as a TXT record in DNS. v=sonr, o=origin, p=protocol
|
||||
Service(context.Context, *QueryRequest) (*QueryServiceResponse, error)
|
||||
// Sync queries the DID document by its id. And returns the required PKL information
|
||||
Sync(context.Context, *SyncRequest) (*SyncResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
@ -112,9 +94,6 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryPa
|
||||
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Service not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
|
||||
}
|
||||
@ -167,24 +146,6 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Service(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Service_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Service(ctx, req.(*QueryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SyncRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -218,10 +179,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Resolve",
|
||||
Handler: _Query_Resolve_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Service",
|
||||
Handler: _Query_Service_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Sync",
|
||||
Handler: _Query_Sync_Handler,
|
||||
|
@ -17,9 +17,9 @@ type AliasTable interface {
|
||||
Has(ctx context.Context, id string) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, id string) (*Alias, error)
|
||||
HasByDidAlias(ctx context.Context, did string, alias string) (found bool, err error)
|
||||
// GetByDidAlias returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByDidAlias(ctx context.Context, did string, alias string) (*Alias, error)
|
||||
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
|
||||
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Alias, error)
|
||||
List(ctx context.Context, prefixKey AliasIndexKey, opts ...ormlist.Option) (AliasIterator, error)
|
||||
ListRange(ctx context.Context, from, to AliasIndexKey, opts ...ormlist.Option) (AliasIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey AliasIndexKey) error
|
||||
@ -60,21 +60,21 @@ func (this AliasIdIndexKey) WithId(id string) AliasIdIndexKey {
|
||||
return this
|
||||
}
|
||||
|
||||
type AliasDidAliasIndexKey struct {
|
||||
type AliasSubjectOriginIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x AliasDidAliasIndexKey) id() uint32 { return 1 }
|
||||
func (x AliasDidAliasIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AliasDidAliasIndexKey) aliasIndexKey() {}
|
||||
func (x AliasSubjectOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x AliasSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AliasSubjectOriginIndexKey) aliasIndexKey() {}
|
||||
|
||||
func (this AliasDidAliasIndexKey) WithDid(did string) AliasDidAliasIndexKey {
|
||||
this.vs = []interface{}{did}
|
||||
func (this AliasSubjectOriginIndexKey) WithSubject(subject string) AliasSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this AliasDidAliasIndexKey) WithDidAlias(did string, alias string) AliasDidAliasIndexKey {
|
||||
this.vs = []interface{}{did, alias}
|
||||
func (this AliasSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) AliasSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject, origin}
|
||||
return this
|
||||
}
|
||||
|
||||
@ -114,18 +114,18 @@ func (this aliasTable) Get(ctx context.Context, id string) (*Alias, error) {
|
||||
return &alias, nil
|
||||
}
|
||||
|
||||
func (this aliasTable) HasByDidAlias(ctx context.Context, did string, alias string) (found bool, err error) {
|
||||
func (this aliasTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
did,
|
||||
alias,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
}
|
||||
|
||||
func (this aliasTable) GetByDidAlias(ctx context.Context, did string, alias string) (*Alias, error) {
|
||||
func (this aliasTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Alias, error) {
|
||||
var alias Alias
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &alias,
|
||||
did,
|
||||
alias,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -174,12 +174,21 @@ type ControllerTable interface {
|
||||
Has(ctx context.Context, id string) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, id string) (*Controller, error)
|
||||
HasByAddress(ctx context.Context, address string) (found bool, err error)
|
||||
// GetByAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByAddress(ctx context.Context, address string) (*Controller, error)
|
||||
HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error)
|
||||
// GetBySonrAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error)
|
||||
HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error)
|
||||
// GetByEthAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error)
|
||||
HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error)
|
||||
// GetByBtcAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error)
|
||||
HasByVaultCid(ctx context.Context, vault_cid string) (found bool, err error)
|
||||
// GetByVaultCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByVaultCid(ctx context.Context, vault_cid string) (*Controller, error)
|
||||
HasByStatusVaultCid(ctx context.Context, status string, vault_cid string) (found bool, err error)
|
||||
// GetByStatusVaultCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByStatusVaultCid(ctx context.Context, status string, vault_cid string) (*Controller, error)
|
||||
List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error)
|
||||
ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error
|
||||
@ -220,16 +229,42 @@ func (this ControllerIdIndexKey) WithId(id string) ControllerIdIndexKey {
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerAddressIndexKey struct {
|
||||
type ControllerSonrAddressIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerAddressIndexKey) id() uint32 { return 1 }
|
||||
func (x ControllerAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerAddressIndexKey) controllerIndexKey() {}
|
||||
func (x ControllerSonrAddressIndexKey) id() uint32 { return 1 }
|
||||
func (x ControllerSonrAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerSonrAddressIndexKey) controllerIndexKey() {}
|
||||
|
||||
func (this ControllerAddressIndexKey) WithAddress(address string) ControllerAddressIndexKey {
|
||||
this.vs = []interface{}{address}
|
||||
func (this ControllerSonrAddressIndexKey) WithSonrAddress(sonr_address string) ControllerSonrAddressIndexKey {
|
||||
this.vs = []interface{}{sonr_address}
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerEthAddressIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerEthAddressIndexKey) id() uint32 { return 2 }
|
||||
func (x ControllerEthAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerEthAddressIndexKey) controllerIndexKey() {}
|
||||
|
||||
func (this ControllerEthAddressIndexKey) WithEthAddress(eth_address string) ControllerEthAddressIndexKey {
|
||||
this.vs = []interface{}{eth_address}
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerBtcAddressIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerBtcAddressIndexKey) id() uint32 { return 3 }
|
||||
func (x ControllerBtcAddressIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerBtcAddressIndexKey) controllerIndexKey() {}
|
||||
|
||||
func (this ControllerBtcAddressIndexKey) WithBtcAddress(btc_address string) ControllerBtcAddressIndexKey {
|
||||
this.vs = []interface{}{btc_address}
|
||||
return this
|
||||
}
|
||||
|
||||
@ -237,7 +272,7 @@ type ControllerVaultCidIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerVaultCidIndexKey) id() uint32 { return 2 }
|
||||
func (x ControllerVaultCidIndexKey) id() uint32 { return 4 }
|
||||
func (x ControllerVaultCidIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerVaultCidIndexKey) controllerIndexKey() {}
|
||||
|
||||
@ -246,19 +281,24 @@ func (this ControllerVaultCidIndexKey) WithVaultCid(vault_cid string) Controller
|
||||
return this
|
||||
}
|
||||
|
||||
type ControllerStatusIndexKey struct {
|
||||
type ControllerStatusVaultCidIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ControllerStatusIndexKey) id() uint32 { return 3 }
|
||||
func (x ControllerStatusIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerStatusIndexKey) controllerIndexKey() {}
|
||||
func (x ControllerStatusVaultCidIndexKey) id() uint32 { return 5 }
|
||||
func (x ControllerStatusVaultCidIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ControllerStatusVaultCidIndexKey) controllerIndexKey() {}
|
||||
|
||||
func (this ControllerStatusIndexKey) WithStatus(status string) ControllerStatusIndexKey {
|
||||
func (this ControllerStatusVaultCidIndexKey) WithStatus(status string) ControllerStatusVaultCidIndexKey {
|
||||
this.vs = []interface{}{status}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this ControllerStatusVaultCidIndexKey) WithStatusVaultCid(status string, vault_cid string) ControllerStatusVaultCidIndexKey {
|
||||
this.vs = []interface{}{status, vault_cid}
|
||||
return this
|
||||
}
|
||||
|
||||
type controllerTable struct {
|
||||
table ormtable.Table
|
||||
}
|
||||
@ -295,16 +335,56 @@ func (this controllerTable) Get(ctx context.Context, id string) (*Controller, er
|
||||
return &controller, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByAddress(ctx context.Context, address string) (found bool, err error) {
|
||||
func (this controllerTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
address,
|
||||
sonr_address,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByAddress(ctx context.Context, address string) (*Controller, error) {
|
||||
func (this controllerTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
address,
|
||||
sonr_address,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
||||
eth_address,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
eth_address,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx,
|
||||
btc_address,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
btc_address,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -316,14 +396,36 @@ func (this controllerTable) GetByAddress(ctx context.Context, address string) (*
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByVaultCid(ctx context.Context, vault_cid string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
||||
return this.table.GetIndexByID(4).(ormtable.UniqueIndex).Has(ctx,
|
||||
vault_cid,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByVaultCid(ctx context.Context, vault_cid string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
vault_cid,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &controller, nil
|
||||
}
|
||||
|
||||
func (this controllerTable) HasByStatusVaultCid(ctx context.Context, status string, vault_cid string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(5).(ormtable.UniqueIndex).Has(ctx,
|
||||
status,
|
||||
vault_cid,
|
||||
)
|
||||
}
|
||||
|
||||
func (this controllerTable) GetByStatusVaultCid(ctx context.Context, status string, vault_cid string) (*Controller, error) {
|
||||
var controller Controller
|
||||
found, err := this.table.GetIndexByID(5).(ormtable.UniqueIndex).Get(ctx, &controller,
|
||||
status,
|
||||
vault_cid,
|
||||
)
|
||||
if err != nil {
|
||||
@ -373,9 +475,15 @@ type VerificationTable interface {
|
||||
Has(ctx context.Context, id string) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, id string) (*Verification, error)
|
||||
HasByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (found bool, err error)
|
||||
// GetByControllerMethodIssuerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (*Verification, error)
|
||||
HasByIssuerSubject(ctx context.Context, issuer string, subject string) (found bool, err error)
|
||||
// GetByIssuerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByIssuerSubject(ctx context.Context, issuer string, subject string) (*Verification, error)
|
||||
HasByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (found bool, err error)
|
||||
// GetByControllerDidMethodIssuer returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (*Verification, error)
|
||||
HasByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (found bool, err error)
|
||||
// GetByVerificationTypeSubjectIssuer returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (*Verification, error)
|
||||
List(ctx context.Context, prefixKey VerificationIndexKey, opts ...ormlist.Option) (VerificationIterator, error)
|
||||
ListRange(ctx context.Context, from, to VerificationIndexKey, opts ...ormlist.Option) (VerificationIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey VerificationIndexKey) error
|
||||
@ -416,31 +524,67 @@ func (this VerificationIdIndexKey) WithId(id string) VerificationIdIndexKey {
|
||||
return this
|
||||
}
|
||||
|
||||
type VerificationControllerMethodIssuerSubjectIndexKey struct {
|
||||
type VerificationIssuerSubjectIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x VerificationControllerMethodIssuerSubjectIndexKey) id() uint32 { return 1 }
|
||||
func (x VerificationControllerMethodIssuerSubjectIndexKey) values() []interface{} { return x.vs }
|
||||
func (x VerificationControllerMethodIssuerSubjectIndexKey) verificationIndexKey() {}
|
||||
func (x VerificationIssuerSubjectIndexKey) id() uint32 { return 1 }
|
||||
func (x VerificationIssuerSubjectIndexKey) values() []interface{} { return x.vs }
|
||||
func (x VerificationIssuerSubjectIndexKey) verificationIndexKey() {}
|
||||
|
||||
func (this VerificationControllerMethodIssuerSubjectIndexKey) WithController(controller string) VerificationControllerMethodIssuerSubjectIndexKey {
|
||||
func (this VerificationIssuerSubjectIndexKey) WithIssuer(issuer string) VerificationIssuerSubjectIndexKey {
|
||||
this.vs = []interface{}{issuer}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this VerificationIssuerSubjectIndexKey) WithIssuerSubject(issuer string, subject string) VerificationIssuerSubjectIndexKey {
|
||||
this.vs = []interface{}{issuer, subject}
|
||||
return this
|
||||
}
|
||||
|
||||
type VerificationControllerDidMethodIssuerIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x VerificationControllerDidMethodIssuerIndexKey) id() uint32 { return 2 }
|
||||
func (x VerificationControllerDidMethodIssuerIndexKey) values() []interface{} { return x.vs }
|
||||
func (x VerificationControllerDidMethodIssuerIndexKey) verificationIndexKey() {}
|
||||
|
||||
func (this VerificationControllerDidMethodIssuerIndexKey) WithController(controller string) VerificationControllerDidMethodIssuerIndexKey {
|
||||
this.vs = []interface{}{controller}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this VerificationControllerMethodIssuerSubjectIndexKey) WithControllerMethod(controller string, method DIDNamespace) VerificationControllerMethodIssuerSubjectIndexKey {
|
||||
this.vs = []interface{}{controller, method}
|
||||
func (this VerificationControllerDidMethodIssuerIndexKey) WithControllerDidMethod(controller string, did_method string) VerificationControllerDidMethodIssuerIndexKey {
|
||||
this.vs = []interface{}{controller, did_method}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this VerificationControllerMethodIssuerSubjectIndexKey) WithControllerMethodIssuer(controller string, method DIDNamespace, issuer string) VerificationControllerMethodIssuerSubjectIndexKey {
|
||||
this.vs = []interface{}{controller, method, issuer}
|
||||
func (this VerificationControllerDidMethodIssuerIndexKey) WithControllerDidMethodIssuer(controller string, did_method string, issuer string) VerificationControllerDidMethodIssuerIndexKey {
|
||||
this.vs = []interface{}{controller, did_method, issuer}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this VerificationControllerMethodIssuerSubjectIndexKey) WithControllerMethodIssuerSubject(controller string, method DIDNamespace, issuer string, subject string) VerificationControllerMethodIssuerSubjectIndexKey {
|
||||
this.vs = []interface{}{controller, method, issuer, subject}
|
||||
type VerificationVerificationTypeSubjectIssuerIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x VerificationVerificationTypeSubjectIssuerIndexKey) id() uint32 { return 3 }
|
||||
func (x VerificationVerificationTypeSubjectIssuerIndexKey) values() []interface{} { return x.vs }
|
||||
func (x VerificationVerificationTypeSubjectIssuerIndexKey) verificationIndexKey() {}
|
||||
|
||||
func (this VerificationVerificationTypeSubjectIssuerIndexKey) WithVerificationType(verification_type string) VerificationVerificationTypeSubjectIssuerIndexKey {
|
||||
this.vs = []interface{}{verification_type}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this VerificationVerificationTypeSubjectIssuerIndexKey) WithVerificationTypeSubject(verification_type string, subject string) VerificationVerificationTypeSubjectIssuerIndexKey {
|
||||
this.vs = []interface{}{verification_type, subject}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this VerificationVerificationTypeSubjectIssuerIndexKey) WithVerificationTypeSubjectIssuer(verification_type string, subject string, issuer string) VerificationVerificationTypeSubjectIssuerIndexKey {
|
||||
this.vs = []interface{}{verification_type, subject, issuer}
|
||||
return this
|
||||
}
|
||||
|
||||
@ -480,20 +624,16 @@ func (this verificationTable) Get(ctx context.Context, id string) (*Verification
|
||||
return &verification, nil
|
||||
}
|
||||
|
||||
func (this verificationTable) HasByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (found bool, err error) {
|
||||
func (this verificationTable) HasByIssuerSubject(ctx context.Context, issuer string, subject string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
controller,
|
||||
method,
|
||||
issuer,
|
||||
subject,
|
||||
)
|
||||
}
|
||||
|
||||
func (this verificationTable) GetByControllerMethodIssuerSubject(ctx context.Context, controller string, method DIDNamespace, issuer string, subject string) (*Verification, error) {
|
||||
func (this verificationTable) GetByIssuerSubject(ctx context.Context, issuer string, subject string) (*Verification, error) {
|
||||
var verification Verification
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &verification,
|
||||
controller,
|
||||
method,
|
||||
issuer,
|
||||
subject,
|
||||
)
|
||||
@ -506,6 +646,54 @@ func (this verificationTable) GetByControllerMethodIssuerSubject(ctx context.Con
|
||||
return &verification, nil
|
||||
}
|
||||
|
||||
func (this verificationTable) HasByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx,
|
||||
controller,
|
||||
did_method,
|
||||
issuer,
|
||||
)
|
||||
}
|
||||
|
||||
func (this verificationTable) GetByControllerDidMethodIssuer(ctx context.Context, controller string, did_method string, issuer string) (*Verification, error) {
|
||||
var verification Verification
|
||||
found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &verification,
|
||||
controller,
|
||||
did_method,
|
||||
issuer,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &verification, nil
|
||||
}
|
||||
|
||||
func (this verificationTable) HasByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx,
|
||||
verification_type,
|
||||
subject,
|
||||
issuer,
|
||||
)
|
||||
}
|
||||
|
||||
func (this verificationTable) GetByVerificationTypeSubjectIssuer(ctx context.Context, verification_type string, subject string, issuer string) (*Verification, error) {
|
||||
var verification Verification
|
||||
found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &verification,
|
||||
verification_type,
|
||||
subject,
|
||||
issuer,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &verification, nil
|
||||
}
|
||||
|
||||
func (this verificationTable) List(ctx context.Context, prefixKey VerificationIndexKey, opts ...ormlist.Option) (VerificationIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return VerificationIterator{it}, err
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1484,11 +1484,11 @@ func (x *fastReflection_MsgAllocateVault) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
|
||||
var (
|
||||
md_MsgAllocateVaultResponse protoreflect.MessageDescriptor
|
||||
fd_MsgAllocateVaultResponse_cid protoreflect.FieldDescriptor
|
||||
fd_MsgAllocateVaultResponse_expiry_block protoreflect.FieldDescriptor
|
||||
fd_MsgAllocateVaultResponse_registration_options protoreflect.FieldDescriptor
|
||||
fd_MsgAllocateVaultResponse_localhost protoreflect.FieldDescriptor
|
||||
md_MsgAllocateVaultResponse protoreflect.MessageDescriptor
|
||||
fd_MsgAllocateVaultResponse_cid protoreflect.FieldDescriptor
|
||||
fd_MsgAllocateVaultResponse_expiry_block protoreflect.FieldDescriptor
|
||||
fd_MsgAllocateVaultResponse_token protoreflect.FieldDescriptor
|
||||
fd_MsgAllocateVaultResponse_localhost protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -1496,7 +1496,7 @@ func init() {
|
||||
md_MsgAllocateVaultResponse = File_did_v1_tx_proto.Messages().ByName("MsgAllocateVaultResponse")
|
||||
fd_MsgAllocateVaultResponse_cid = md_MsgAllocateVaultResponse.Fields().ByName("cid")
|
||||
fd_MsgAllocateVaultResponse_expiry_block = md_MsgAllocateVaultResponse.Fields().ByName("expiry_block")
|
||||
fd_MsgAllocateVaultResponse_registration_options = md_MsgAllocateVaultResponse.Fields().ByName("registration_options")
|
||||
fd_MsgAllocateVaultResponse_token = md_MsgAllocateVaultResponse.Fields().ByName("token")
|
||||
fd_MsgAllocateVaultResponse_localhost = md_MsgAllocateVaultResponse.Fields().ByName("localhost")
|
||||
}
|
||||
|
||||
@ -1577,9 +1577,9 @@ func (x *fastReflection_MsgAllocateVaultResponse) Range(f func(protoreflect.Fiel
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.RegistrationOptions != "" {
|
||||
value := protoreflect.ValueOfString(x.RegistrationOptions)
|
||||
if !f(fd_MsgAllocateVaultResponse_registration_options, value) {
|
||||
if x.Token != "" {
|
||||
value := protoreflect.ValueOfString(x.Token)
|
||||
if !f(fd_MsgAllocateVaultResponse_token, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -1608,8 +1608,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Has(fd protoreflect.FieldDescr
|
||||
return x.Cid != ""
|
||||
case "did.v1.MsgAllocateVaultResponse.expiry_block":
|
||||
return x.ExpiryBlock != int64(0)
|
||||
case "did.v1.MsgAllocateVaultResponse.registration_options":
|
||||
return x.RegistrationOptions != ""
|
||||
case "did.v1.MsgAllocateVaultResponse.token":
|
||||
return x.Token != ""
|
||||
case "did.v1.MsgAllocateVaultResponse.localhost":
|
||||
return x.Localhost != false
|
||||
default:
|
||||
@ -1632,8 +1632,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Clear(fd protoreflect.FieldDes
|
||||
x.Cid = ""
|
||||
case "did.v1.MsgAllocateVaultResponse.expiry_block":
|
||||
x.ExpiryBlock = int64(0)
|
||||
case "did.v1.MsgAllocateVaultResponse.registration_options":
|
||||
x.RegistrationOptions = ""
|
||||
case "did.v1.MsgAllocateVaultResponse.token":
|
||||
x.Token = ""
|
||||
case "did.v1.MsgAllocateVaultResponse.localhost":
|
||||
x.Localhost = false
|
||||
default:
|
||||
@ -1658,8 +1658,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Get(descriptor protoreflect.Fi
|
||||
case "did.v1.MsgAllocateVaultResponse.expiry_block":
|
||||
value := x.ExpiryBlock
|
||||
return protoreflect.ValueOfInt64(value)
|
||||
case "did.v1.MsgAllocateVaultResponse.registration_options":
|
||||
value := x.RegistrationOptions
|
||||
case "did.v1.MsgAllocateVaultResponse.token":
|
||||
value := x.Token
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "did.v1.MsgAllocateVaultResponse.localhost":
|
||||
value := x.Localhost
|
||||
@ -1688,8 +1688,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Set(fd protoreflect.FieldDescr
|
||||
x.Cid = value.Interface().(string)
|
||||
case "did.v1.MsgAllocateVaultResponse.expiry_block":
|
||||
x.ExpiryBlock = value.Int()
|
||||
case "did.v1.MsgAllocateVaultResponse.registration_options":
|
||||
x.RegistrationOptions = value.Interface().(string)
|
||||
case "did.v1.MsgAllocateVaultResponse.token":
|
||||
x.Token = value.Interface().(string)
|
||||
case "did.v1.MsgAllocateVaultResponse.localhost":
|
||||
x.Localhost = value.Bool()
|
||||
default:
|
||||
@ -1716,8 +1716,8 @@ func (x *fastReflection_MsgAllocateVaultResponse) Mutable(fd protoreflect.FieldD
|
||||
panic(fmt.Errorf("field cid of message did.v1.MsgAllocateVaultResponse is not mutable"))
|
||||
case "did.v1.MsgAllocateVaultResponse.expiry_block":
|
||||
panic(fmt.Errorf("field expiry_block of message did.v1.MsgAllocateVaultResponse is not mutable"))
|
||||
case "did.v1.MsgAllocateVaultResponse.registration_options":
|
||||
panic(fmt.Errorf("field registration_options of message did.v1.MsgAllocateVaultResponse is not mutable"))
|
||||
case "did.v1.MsgAllocateVaultResponse.token":
|
||||
panic(fmt.Errorf("field token of message did.v1.MsgAllocateVaultResponse is not mutable"))
|
||||
case "did.v1.MsgAllocateVaultResponse.localhost":
|
||||
panic(fmt.Errorf("field localhost of message did.v1.MsgAllocateVaultResponse is not mutable"))
|
||||
default:
|
||||
@ -1737,7 +1737,7 @@ func (x *fastReflection_MsgAllocateVaultResponse) NewField(fd protoreflect.Field
|
||||
return protoreflect.ValueOfString("")
|
||||
case "did.v1.MsgAllocateVaultResponse.expiry_block":
|
||||
return protoreflect.ValueOfInt64(int64(0))
|
||||
case "did.v1.MsgAllocateVaultResponse.registration_options":
|
||||
case "did.v1.MsgAllocateVaultResponse.token":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "did.v1.MsgAllocateVaultResponse.localhost":
|
||||
return protoreflect.ValueOfBool(false)
|
||||
@ -1817,7 +1817,7 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met
|
||||
if x.ExpiryBlock != 0 {
|
||||
n += 1 + runtime.Sov(uint64(x.ExpiryBlock))
|
||||
}
|
||||
l = len(x.RegistrationOptions)
|
||||
l = len(x.Token)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
@ -1863,10 +1863,10 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if len(x.RegistrationOptions) > 0 {
|
||||
i -= len(x.RegistrationOptions)
|
||||
copy(dAtA[i:], x.RegistrationOptions)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.RegistrationOptions)))
|
||||
if len(x.Token) > 0 {
|
||||
i -= len(x.Token)
|
||||
copy(dAtA[i:], x.Token)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
@ -1984,7 +1984,7 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met
|
||||
}
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RegistrationOptions", wireType)
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@ -2012,7 +2012,7 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.RegistrationOptions = string(dAtA[iNdEx:postIndex])
|
||||
x.Token = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
@ -3639,12 +3639,94 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac
|
||||
}
|
||||
}
|
||||
|
||||
var _ protoreflect.Map = (*_MsgAuthorizeService_3_map)(nil)
|
||||
|
||||
type _MsgAuthorizeService_3_map struct {
|
||||
m *map[string]string
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) Len() int {
|
||||
if x.m == nil {
|
||||
return 0
|
||||
}
|
||||
return len(*x.m)
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) {
|
||||
if x.m == nil {
|
||||
return
|
||||
}
|
||||
for k, v := range *x.m {
|
||||
mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k))
|
||||
mapValue := protoreflect.ValueOfString(v)
|
||||
if !f(mapKey, mapValue) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) Has(key protoreflect.MapKey) bool {
|
||||
if x.m == nil {
|
||||
return false
|
||||
}
|
||||
keyUnwrapped := key.String()
|
||||
concreteValue := keyUnwrapped
|
||||
_, ok := (*x.m)[concreteValue]
|
||||
return ok
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) Clear(key protoreflect.MapKey) {
|
||||
if x.m == nil {
|
||||
return
|
||||
}
|
||||
keyUnwrapped := key.String()
|
||||
concreteKey := keyUnwrapped
|
||||
delete(*x.m, concreteKey)
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) Get(key protoreflect.MapKey) protoreflect.Value {
|
||||
if x.m == nil {
|
||||
return protoreflect.Value{}
|
||||
}
|
||||
keyUnwrapped := key.String()
|
||||
concreteKey := keyUnwrapped
|
||||
v, ok := (*x.m)[concreteKey]
|
||||
if !ok {
|
||||
return protoreflect.Value{}
|
||||
}
|
||||
return protoreflect.ValueOfString(v)
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) Set(key protoreflect.MapKey, value protoreflect.Value) {
|
||||
if !key.IsValid() || !value.IsValid() {
|
||||
panic("invalid key or value provided")
|
||||
}
|
||||
keyUnwrapped := key.String()
|
||||
concreteKey := keyUnwrapped
|
||||
valueUnwrapped := value.String()
|
||||
concreteValue := valueUnwrapped
|
||||
(*x.m)[concreteKey] = concreteValue
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value {
|
||||
panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message")
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) NewValue() protoreflect.Value {
|
||||
v := ""
|
||||
return protoreflect.ValueOfString(v)
|
||||
}
|
||||
|
||||
func (x *_MsgAuthorizeService_3_map) IsValid() bool {
|
||||
return x.m != nil
|
||||
}
|
||||
|
||||
var (
|
||||
md_MsgAuthorizeService protoreflect.MessageDescriptor
|
||||
fd_MsgAuthorizeService_controller protoreflect.FieldDescriptor
|
||||
fd_MsgAuthorizeService_origin protoreflect.FieldDescriptor
|
||||
fd_MsgAuthorizeService_scopes protoreflect.FieldDescriptor
|
||||
fd_MsgAuthorizeService_token protoreflect.FieldDescriptor
|
||||
md_MsgAuthorizeService protoreflect.MessageDescriptor
|
||||
fd_MsgAuthorizeService_controller protoreflect.FieldDescriptor
|
||||
fd_MsgAuthorizeService_origin protoreflect.FieldDescriptor
|
||||
fd_MsgAuthorizeService_permissions protoreflect.FieldDescriptor
|
||||
fd_MsgAuthorizeService_token protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -3652,7 +3734,7 @@ func init() {
|
||||
md_MsgAuthorizeService = File_did_v1_tx_proto.Messages().ByName("MsgAuthorizeService")
|
||||
fd_MsgAuthorizeService_controller = md_MsgAuthorizeService.Fields().ByName("controller")
|
||||
fd_MsgAuthorizeService_origin = md_MsgAuthorizeService.Fields().ByName("origin")
|
||||
fd_MsgAuthorizeService_scopes = md_MsgAuthorizeService.Fields().ByName("scopes")
|
||||
fd_MsgAuthorizeService_permissions = md_MsgAuthorizeService.Fields().ByName("permissions")
|
||||
fd_MsgAuthorizeService_token = md_MsgAuthorizeService.Fields().ByName("token")
|
||||
}
|
||||
|
||||
@ -3733,9 +3815,9 @@ func (x *fastReflection_MsgAuthorizeService) Range(f func(protoreflect.FieldDesc
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Scopes != nil {
|
||||
value := protoreflect.ValueOfMessage(x.Scopes.ProtoReflect())
|
||||
if !f(fd_MsgAuthorizeService_scopes, value) {
|
||||
if len(x.Permissions) != 0 {
|
||||
value := protoreflect.ValueOfMap(&_MsgAuthorizeService_3_map{m: &x.Permissions})
|
||||
if !f(fd_MsgAuthorizeService_permissions, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -3764,8 +3846,8 @@ func (x *fastReflection_MsgAuthorizeService) Has(fd protoreflect.FieldDescriptor
|
||||
return x.Controller != ""
|
||||
case "did.v1.MsgAuthorizeService.origin":
|
||||
return x.Origin != ""
|
||||
case "did.v1.MsgAuthorizeService.scopes":
|
||||
return x.Scopes != nil
|
||||
case "did.v1.MsgAuthorizeService.permissions":
|
||||
return len(x.Permissions) != 0
|
||||
case "did.v1.MsgAuthorizeService.token":
|
||||
return x.Token != ""
|
||||
default:
|
||||
@ -3788,8 +3870,8 @@ func (x *fastReflection_MsgAuthorizeService) Clear(fd protoreflect.FieldDescript
|
||||
x.Controller = ""
|
||||
case "did.v1.MsgAuthorizeService.origin":
|
||||
x.Origin = ""
|
||||
case "did.v1.MsgAuthorizeService.scopes":
|
||||
x.Scopes = nil
|
||||
case "did.v1.MsgAuthorizeService.permissions":
|
||||
x.Permissions = nil
|
||||
case "did.v1.MsgAuthorizeService.token":
|
||||
x.Token = ""
|
||||
default:
|
||||
@ -3814,9 +3896,12 @@ func (x *fastReflection_MsgAuthorizeService) Get(descriptor protoreflect.FieldDe
|
||||
case "did.v1.MsgAuthorizeService.origin":
|
||||
value := x.Origin
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "did.v1.MsgAuthorizeService.scopes":
|
||||
value := x.Scopes
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
case "did.v1.MsgAuthorizeService.permissions":
|
||||
if len(x.Permissions) == 0 {
|
||||
return protoreflect.ValueOfMap(&_MsgAuthorizeService_3_map{})
|
||||
}
|
||||
mapValue := &_MsgAuthorizeService_3_map{m: &x.Permissions}
|
||||
return protoreflect.ValueOfMap(mapValue)
|
||||
case "did.v1.MsgAuthorizeService.token":
|
||||
value := x.Token
|
||||
return protoreflect.ValueOfString(value)
|
||||
@ -3844,8 +3929,10 @@ func (x *fastReflection_MsgAuthorizeService) Set(fd protoreflect.FieldDescriptor
|
||||
x.Controller = value.Interface().(string)
|
||||
case "did.v1.MsgAuthorizeService.origin":
|
||||
x.Origin = value.Interface().(string)
|
||||
case "did.v1.MsgAuthorizeService.scopes":
|
||||
x.Scopes = value.Message().Interface().(*Permissions)
|
||||
case "did.v1.MsgAuthorizeService.permissions":
|
||||
mv := value.Map()
|
||||
cmv := mv.(*_MsgAuthorizeService_3_map)
|
||||
x.Permissions = *cmv.m
|
||||
case "did.v1.MsgAuthorizeService.token":
|
||||
x.Token = value.Interface().(string)
|
||||
default:
|
||||
@ -3868,11 +3955,12 @@ func (x *fastReflection_MsgAuthorizeService) Set(fd protoreflect.FieldDescriptor
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_MsgAuthorizeService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "did.v1.MsgAuthorizeService.scopes":
|
||||
if x.Scopes == nil {
|
||||
x.Scopes = new(Permissions)
|
||||
case "did.v1.MsgAuthorizeService.permissions":
|
||||
if x.Permissions == nil {
|
||||
x.Permissions = make(map[string]string)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.Scopes.ProtoReflect())
|
||||
value := &_MsgAuthorizeService_3_map{m: &x.Permissions}
|
||||
return protoreflect.ValueOfMap(value)
|
||||
case "did.v1.MsgAuthorizeService.controller":
|
||||
panic(fmt.Errorf("field controller of message did.v1.MsgAuthorizeService is not mutable"))
|
||||
case "did.v1.MsgAuthorizeService.origin":
|
||||
@ -3896,9 +3984,9 @@ func (x *fastReflection_MsgAuthorizeService) NewField(fd protoreflect.FieldDescr
|
||||
return protoreflect.ValueOfString("")
|
||||
case "did.v1.MsgAuthorizeService.origin":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "did.v1.MsgAuthorizeService.scopes":
|
||||
m := new(Permissions)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
case "did.v1.MsgAuthorizeService.permissions":
|
||||
m := make(map[string]string)
|
||||
return protoreflect.ValueOfMap(&_MsgAuthorizeService_3_map{m: &m})
|
||||
case "did.v1.MsgAuthorizeService.token":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
@ -3978,9 +4066,26 @@ func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.Scopes != nil {
|
||||
l = options.Size(x.Scopes)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
if len(x.Permissions) > 0 {
|
||||
SiZeMaP := func(k string, v string) {
|
||||
mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize))
|
||||
}
|
||||
if options.Deterministic {
|
||||
sortme := make([]string, 0, len(x.Permissions))
|
||||
for k := range x.Permissions {
|
||||
sortme = append(sortme, k)
|
||||
}
|
||||
sort.Strings(sortme)
|
||||
for _, k := range sortme {
|
||||
v := x.Permissions[k]
|
||||
SiZeMaP(k, v)
|
||||
}
|
||||
} else {
|
||||
for k, v := range x.Permissions {
|
||||
SiZeMaP(k, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
l = len(x.Token)
|
||||
if l > 0 {
|
||||
@ -4022,19 +4127,48 @@ func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods
|
||||
i--
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if x.Scopes != nil {
|
||||
encoded, err := options.Marshal(x.Scopes)
|
||||
if err != nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, err
|
||||
if len(x.Permissions) > 0 {
|
||||
MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) {
|
||||
baseI := i
|
||||
i -= len(v)
|
||||
copy(dAtA[i:], v)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(v)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
i -= len(k)
|
||||
copy(dAtA[i:], k)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(k)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
return protoiface.MarshalOutput{}, nil
|
||||
}
|
||||
if options.Deterministic {
|
||||
keysForPermissions := make([]string, 0, len(x.Permissions))
|
||||
for k := range x.Permissions {
|
||||
keysForPermissions = append(keysForPermissions, string(k))
|
||||
}
|
||||
sort.Slice(keysForPermissions, func(i, j int) bool {
|
||||
return keysForPermissions[i] < keysForPermissions[j]
|
||||
})
|
||||
for iNdEx := len(keysForPermissions) - 1; iNdEx >= 0; iNdEx-- {
|
||||
v := x.Permissions[string(keysForPermissions[iNdEx])]
|
||||
out, err := MaRsHaLmAp(keysForPermissions[iNdEx], v)
|
||||
if err != nil {
|
||||
return out, err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for k := range x.Permissions {
|
||||
v := x.Permissions[k]
|
||||
out, err := MaRsHaLmAp(k, v)
|
||||
if err != nil {
|
||||
return out, err
|
||||
}
|
||||
}
|
||||
}
|
||||
i -= len(encoded)
|
||||
copy(dAtA[i:], encoded)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(x.Origin) > 0 {
|
||||
i -= len(x.Origin)
|
||||
@ -4165,7 +4299,7 @@ func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType)
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@ -4192,12 +4326,103 @@ func (x *fastReflection_MsgAuthorizeService) ProtoMethods() *protoiface.Methods
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if x.Scopes == nil {
|
||||
x.Scopes = &Permissions{}
|
||||
if x.Permissions == nil {
|
||||
x.Permissions = make(map[string]string)
|
||||
}
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scopes); err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
var mapkey string
|
||||
var mapvalue string
|
||||
for iNdEx < postIndex {
|
||||
entryPreIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
if fieldNum == 1 {
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postStringIndexmapkey > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
} else if fieldNum == 2 {
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postStringIndexmapvalue > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
} else {
|
||||
iNdEx = entryPreIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if (iNdEx + skippy) > postIndex {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
x.Permissions[mapkey] = mapvalue
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
@ -5879,7 +6104,7 @@ type MsgAllocateVaultResponse struct {
|
||||
// ExpiryBlock is the block number at which the vault will expire.
|
||||
ExpiryBlock int64 `protobuf:"varint,2,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"`
|
||||
// RegistrationOptions is a json string of the PublicKeyCredentialCreationOptions for WebAuthn
|
||||
RegistrationOptions string `protobuf:"bytes,3,opt,name=registration_options,json=registrationOptions,proto3" json:"registration_options,omitempty"`
|
||||
Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
|
||||
// IsLocalhost is a flag to indicate if the vault is localhost
|
||||
Localhost bool `protobuf:"varint,4,opt,name=localhost,proto3" json:"localhost,omitempty"`
|
||||
}
|
||||
@ -5918,9 +6143,9 @@ func (x *MsgAllocateVaultResponse) GetExpiryBlock() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *MsgAllocateVaultResponse) GetRegistrationOptions() string {
|
||||
func (x *MsgAllocateVaultResponse) GetToken() string {
|
||||
if x != nil {
|
||||
return x.RegistrationOptions
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@ -6062,7 +6287,7 @@ type MsgAuthorizeService struct {
|
||||
// Origin is the origin of the request in wildcard form.
|
||||
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||
// Permissions is the scope of the service.
|
||||
Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"`
|
||||
Permissions map[string]string `protobuf:"bytes,3,rep,name=permissions,proto3" json:"permissions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// token is the macron token to authenticate the operation.
|
||||
Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
@ -6101,9 +6326,9 @@ func (x *MsgAuthorizeService) GetOrigin() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MsgAuthorizeService) GetScopes() *Permissions {
|
||||
func (x *MsgAuthorizeService) GetPermissions() map[string]string {
|
||||
if x != nil {
|
||||
return x.Scopes
|
||||
return x.Permissions
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -6258,134 +6483,137 @@ var file_did_v1_tx_proto_rawDesc = []byte{
|
||||
0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64,
|
||||
0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65,
|
||||
0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d,
|
||||
0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61,
|
||||
0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52,
|
||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00,
|
||||
0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e,
|
||||
0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19,
|
||||
0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4d, 0x73,
|
||||
0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x36,
|
||||
0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74,
|
||||
0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61,
|
||||
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xa0, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67,
|
||||
0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72,
|
||||
0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65,
|
||||
0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65,
|
||||
0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x15,
|
||||
0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
||||
0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0c, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c,
|
||||
0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x76,
|
||||
0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03,
|
||||
0x28, 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
||||
0x79, 0x22, 0x81, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65,
|
||||
0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a,
|
||||
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, 0x64, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08,
|
||||
0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xbb, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74,
|
||||
0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a,
|
||||
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12,
|
||||
0x2b, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||
0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2,
|
||||
0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f,
|
||||
0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22,
|
||||
0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
|
||||
0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xa8, 0x03, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x10, 0x41,
|
||||
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
|
||||
0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68,
|
||||
0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x23, 0x2e, 0x64,
|
||||
0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
||||
0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75,
|
||||
0x6c, 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41,
|
||||
0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x20, 0x2e, 0x64,
|
||||
0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74,
|
||||
0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a,
|
||||
0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
|
||||
0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x4d, 0x73,
|
||||
0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a,
|
||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68,
|
||||
0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09,
|
||||
0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f,
|
||||
0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74,
|
||||
0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4,
|
||||
0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
||||
0x79, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f,
|
||||
0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69,
|
||||
0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63,
|
||||
0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63,
|
||||
0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f,
|
||||
0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79,
|
||||
0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x6c,
|
||||
0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09,
|
||||
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x22, 0xc3, 0x01, 0x0a, 0x15, 0x4d, 0x73,
|
||||
0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67,
|
||||
0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c,
|
||||
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65,
|
||||
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e,
|
||||
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||
0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80,
|
||||
0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e,
|
||||
0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72,
|
||||
0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31,
|
||||
0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44,
|
||||
0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02,
|
||||
0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
|
||||
0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52,
|
||||
0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6b,
|
||||
0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09,
|
||||
0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65, 0x72,
|
||||
0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c,
|
||||
0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a,
|
||||
0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22,
|
||||
0x81, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72,
|
||||
0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41,
|
||||
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63,
|
||||
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||
0x02, 0x38, 0x01, 0x22, 0x9e, 0x02, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f,
|
||||
0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72,
|
||||
0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x4e, 0x0a,
|
||||
0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41,
|
||||
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||
0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x1a, 0x3e, 0x0a, 0x10, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||
0x02, 0x38, 0x01, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f,
|
||||
0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18,
|
||||
0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65,
|
||||
0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a,
|
||||
0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72,
|
||||
0x22, 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xa8, 0x03, 0x0a, 0x03, 0x4d,
|
||||
0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61,
|
||||
0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69,
|
||||
0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x10,
|
||||
0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74,
|
||||
0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x23, 0x2e,
|
||||
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
|
||||
0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61,
|
||||
0x75, 0x6c, 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67,
|
||||
0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x20, 0x2e,
|
||||
0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61,
|
||||
0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x5a, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72,
|
||||
0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
|
||||
0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
|
||||
0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||
0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
|
||||
0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52,
|
||||
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a,
|
||||
0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73,
|
||||
0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05,
|
||||
0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64,
|
||||
0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e,
|
||||
0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76,
|
||||
0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06,
|
||||
0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2,
|
||||
0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -6400,7 +6628,7 @@ func file_did_v1_tx_proto_rawDescGZIP() []byte {
|
||||
return file_did_v1_tx_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_did_v1_tx_proto_goTypes = []interface{}{
|
||||
(*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams
|
||||
(*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse
|
||||
@ -6413,14 +6641,14 @@ var file_did_v1_tx_proto_goTypes = []interface{}{
|
||||
(*MsgRegisterService)(nil), // 8: did.v1.MsgRegisterService
|
||||
(*MsgRegisterServiceResponse)(nil), // 9: did.v1.MsgRegisterServiceResponse
|
||||
nil, // 10: did.v1.MsgRegisterControllerResponse.AccountsEntry
|
||||
(*Params)(nil), // 11: did.v1.Params
|
||||
(*Permissions)(nil), // 12: did.v1.Permissions
|
||||
nil, // 11: did.v1.MsgAuthorizeService.PermissionsEntry
|
||||
(*Params)(nil), // 12: did.v1.Params
|
||||
(*Service)(nil), // 13: did.v1.Service
|
||||
}
|
||||
var file_did_v1_tx_proto_depIdxs = []int32{
|
||||
11, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params
|
||||
12, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params
|
||||
10, // 1: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry
|
||||
12, // 2: did.v1.MsgAuthorizeService.scopes:type_name -> did.v1.Permissions
|
||||
11, // 2: did.v1.MsgAuthorizeService.permissions:type_name -> did.v1.MsgAuthorizeService.PermissionsEntry
|
||||
13, // 3: did.v1.MsgRegisterService.service:type_name -> did.v1.Service
|
||||
0, // 4: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams
|
||||
6, // 5: did.v1.Msg.AuthorizeService:input_type -> did.v1.MsgAuthorizeService
|
||||
@ -6445,7 +6673,6 @@ func file_did_v1_tx_proto_init() {
|
||||
return
|
||||
}
|
||||
file_did_v1_genesis_proto_init()
|
||||
file_did_v1_models_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_did_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MsgUpdateParams); i {
|
||||
@ -6574,7 +6801,7 @@ func file_did_v1_tx_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_did_v1_tx_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 11,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
33
caddyfile
Normal file
33
caddyfile
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
email team@sonr.id
|
||||
}
|
||||
|
||||
# Vaults at vault.sonr.id
|
||||
vault.sonr.id {
|
||||
tls {
|
||||
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
|
||||
# Match paths that are bech32 addresses
|
||||
@vault path_regexp vaultPath ^/([a-z0-9]{42})(/.*|)$
|
||||
|
||||
handle @vault {
|
||||
# Rewrite to IPFS gateway format
|
||||
uri replace /{re.vaultPath.0} /ipns/{re.vaultPath.1}{re.vaultPath.2}
|
||||
|
||||
# Proxy to IPFS gateway
|
||||
reverse_proxy http://localhost:8080
|
||||
}
|
||||
|
||||
file_server
|
||||
|
||||
header {
|
||||
Content-Type .wasm application/wasm
|
||||
Service-Worker-Allowed "/"
|
||||
# Add any other necessary headers
|
||||
}
|
||||
|
||||
# Optional: Enable compression
|
||||
encode zstd gzip
|
||||
}
|
141
config/caddy/caddy.json
Normal file
141
config/caddy/caddy.json
Normal file
@ -0,0 +1,141 @@
|
||||
{
|
||||
"apps": {
|
||||
"http": {
|
||||
"servers": {
|
||||
"srv0": {
|
||||
"listen": [
|
||||
":443"
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"match": [
|
||||
{
|
||||
"host": [
|
||||
"vault.sonr.id"
|
||||
]
|
||||
}
|
||||
],
|
||||
"handle": [
|
||||
{
|
||||
"handler": "subroute",
|
||||
"routes": [
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "headers",
|
||||
"response": {
|
||||
"replace": {
|
||||
"Content-Type": [
|
||||
{
|
||||
"replace": "application/wasm",
|
||||
"search_regexp": ".wasm"
|
||||
}
|
||||
]
|
||||
},
|
||||
"set": {
|
||||
"Service-Worker-Allowed": [
|
||||
"/"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"encodings": {
|
||||
"gzip": {},
|
||||
"zstd": {}
|
||||
},
|
||||
"handler": "encode",
|
||||
"prefer": [
|
||||
"zstd",
|
||||
"gzip"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "subroute",
|
||||
"routes": [
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "rewrite",
|
||||
"uri_substring": [
|
||||
{
|
||||
"find": "/{http.regexp.vaultPath.0}",
|
||||
"replace": "/ipns/{http.regexp.vaultPath.1}{http.regexp.vaultPath.2}"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"handler": "reverse_proxy",
|
||||
"upstreams": [
|
||||
{
|
||||
"dial": "localhost:8080"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"match": [
|
||||
{
|
||||
"path_regexp": {
|
||||
"name": "vaultPath",
|
||||
"pattern": "^/([a-z0-9]{42})(/.*|)$"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"handle": [
|
||||
{
|
||||
"handler": "file_server",
|
||||
"hide": [
|
||||
"./Caddyfile"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"terminal": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tls": {
|
||||
"automation": {
|
||||
"policies": [
|
||||
{
|
||||
"subjects": [
|
||||
"vault.sonr.id"
|
||||
],
|
||||
"issuers": [
|
||||
{
|
||||
"challenges": {
|
||||
"dns": {
|
||||
"provider": {
|
||||
"api_token": "{env.CLOUDFLARE_API_TOKEN}",
|
||||
"name": "cloudflare"
|
||||
},
|
||||
"resolvers": [
|
||||
"1.1.1.1"
|
||||
]
|
||||
}
|
||||
},
|
||||
"email": "team@sonr.id",
|
||||
"module": "acme"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -6,9 +6,5 @@ type Config struct {
|
||||
|
||||
Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"`
|
||||
|
||||
Keyshare *string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
|
||||
Address *string `pkl:"address" json:"address,omitempty"`
|
||||
|
||||
Vault *IndexedDB `pkl:"vault" json:"vault,omitempty"`
|
||||
Motr *Motr `pkl:"motr" json:"motr,omitempty"`
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
package dwn
|
||||
|
||||
type IPFS struct {
|
||||
ApiUrl string `pkl:"apiUrl"`
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
|
||||
GatewayUrl string `pkl:"gatewayUrl"`
|
||||
GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"`
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
// Code generated from Pkl module `dwn`. DO NOT EDIT.
|
||||
package dwn
|
||||
|
||||
type IndexedDB struct {
|
||||
Name string `pkl:"name"`
|
||||
|
||||
Version int `pkl:"version"`
|
||||
}
|
10
config/dwn/Motr.pkl.go
Normal file
10
config/dwn/Motr.pkl.go
Normal file
@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `dwn`. DO NOT EDIT.
|
||||
package dwn
|
||||
|
||||
type Motr struct {
|
||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
||||
|
||||
Address string `pkl:"address" json:"address,omitempty"`
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
}
|
@ -2,11 +2,13 @@
|
||||
package dwn
|
||||
|
||||
type Sonr struct {
|
||||
ApiUrl string `pkl:"apiUrl"`
|
||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
||||
|
||||
GrpcUrl string `pkl:"grpcUrl"`
|
||||
GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"`
|
||||
|
||||
RpcUrl string `pkl:"rpcUrl"`
|
||||
RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"`
|
||||
|
||||
WebSocketUrl string `pkl:"webSocketUrl"`
|
||||
WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"`
|
||||
|
||||
ChainId string `pkl:"chainId" json:"chainId,omitempty"`
|
||||
}
|
||||
|
@ -8,5 +8,5 @@ func init() {
|
||||
pkl.RegisterMapping("dwn#Config", Config{})
|
||||
pkl.RegisterMapping("dwn#IPFS", IPFS{})
|
||||
pkl.RegisterMapping("dwn#Sonr", Sonr{})
|
||||
pkl.RegisterMapping("dwn#IndexedDB", IndexedDB{})
|
||||
pkl.RegisterMapping("dwn#Motr", Motr{})
|
||||
}
|
||||
|
@ -20,30 +20,43 @@ class Config {
|
||||
sonr: Sonr
|
||||
|
||||
@JsonField
|
||||
keyshare: JSON?
|
||||
|
||||
@JsonField
|
||||
address: String?
|
||||
|
||||
@JsonField
|
||||
vault: IndexedDB
|
||||
}
|
||||
|
||||
class IndexedDB {
|
||||
name: String = "vault"
|
||||
version: Int = 1
|
||||
motr: Motr
|
||||
}
|
||||
|
||||
class IPFS {
|
||||
@JsonField
|
||||
apiUrl: String
|
||||
|
||||
@JsonField
|
||||
gatewayUrl: String
|
||||
}
|
||||
|
||||
class Motr {
|
||||
@JsonField
|
||||
keyshare: JSON
|
||||
|
||||
@JsonField
|
||||
address: String
|
||||
|
||||
@JsonField
|
||||
origin: String
|
||||
}
|
||||
|
||||
class Sonr {
|
||||
@JsonField
|
||||
apiUrl: String
|
||||
|
||||
@JsonField
|
||||
grpcUrl: String
|
||||
|
||||
@JsonField
|
||||
rpcUrl: String
|
||||
|
||||
@JsonField
|
||||
webSocketUrl: String
|
||||
|
||||
@JsonField
|
||||
chainId: String
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/vfs/models" }
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/orm" }
|
||||
|
||||
module models
|
||||
module orm
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
@ -15,7 +15,6 @@ typealias ChainCode = UInt
|
||||
typealias Scope = String
|
||||
|
||||
typealias Hex = String
|
||||
typealias UTF8 = String
|
||||
|
||||
class PrimaryKey extends go.Field {
|
||||
structTags {
|
||||
@ -30,6 +29,28 @@ class JsonField extends go.Field {
|
||||
}
|
||||
}
|
||||
|
||||
// Enums
|
||||
typealias AssetType = "native"|"wrapped"|"staking"|"pool"|"ibc"|"cw20"
|
||||
|
||||
typealias DIDMethod = "ipfs"|"sonr"|"bitcoin"|"ethereum"|"ibc"|"webauthn"|"dwn"|"service"
|
||||
|
||||
typealias KeyAlgorithm = "es256"|"es384"|"es512"|"eddsa"|"es256k"|"ecdsa"
|
||||
|
||||
typealias KeyCurve = "p256"|"p384"|"p521"|"x25519"|"x448"|"ed25519"|"ed448"|"secp256k1"|"bls12381"|"keccak256"
|
||||
|
||||
typealias KeyEncoding = "raw"|"hex"|"multibase"
|
||||
|
||||
typealias KeyRole = "authentication"|"assertion"|"delegation"|"invocation"
|
||||
|
||||
typealias KeyType = "octet"|"elliptic"|"rsa"|"symmetric"|"hmac"|"mpc"|"zk"|"webauthn"|"bip32"
|
||||
|
||||
typealias KeyShareRole = "user"|"validator"
|
||||
|
||||
typealias PermissionGrant = "none"|"read"|"write"|"verify"|"broadcast"|"admin"
|
||||
|
||||
typealias PermissionScope = "profile"|"metadata"|"permissions"|"wallets"|"transactions"|"user"|"validator"
|
||||
|
||||
|
||||
class Account {
|
||||
@PrimaryKey
|
||||
id: DID
|
||||
@ -109,6 +130,12 @@ class Credential {
|
||||
@JsonField
|
||||
origin: String
|
||||
|
||||
@JsonField
|
||||
label: String?
|
||||
|
||||
@JsonField
|
||||
deviceId: String?
|
||||
|
||||
@JsonField
|
||||
credentialId: Base64
|
||||
|
||||
@ -143,6 +170,26 @@ class Credential {
|
||||
updatedAt: String?
|
||||
}
|
||||
|
||||
class JWK {
|
||||
@JsonField
|
||||
kty: String
|
||||
|
||||
@JsonField
|
||||
crv: String
|
||||
|
||||
@JsonField
|
||||
x: String
|
||||
|
||||
@JsonField
|
||||
y: String
|
||||
|
||||
@JsonField
|
||||
n: String
|
||||
|
||||
@JsonField
|
||||
e: String
|
||||
}
|
||||
|
||||
class Grant {
|
||||
@PrimaryKey
|
||||
id: UInt
|
||||
@ -188,7 +235,13 @@ class Keyshare {
|
||||
|
||||
class PublicKey {
|
||||
@PrimaryKey
|
||||
id: DID
|
||||
role: KeyRole
|
||||
algorithm: KeyAlgorithm
|
||||
encoding: KeyEncoding
|
||||
curve: KeyCurve
|
||||
key_type: KeyType
|
||||
raw: Base58
|
||||
jwk: JWK
|
||||
}
|
||||
|
||||
class Profile {
|
||||
@ -218,3 +271,6 @@ class Profile {
|
||||
}
|
||||
|
||||
|
||||
db_name: String = "vault"
|
||||
db_version: Int = 1
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/vfs/txns" }
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/orm/transactions" }
|
||||
|
||||
module txns
|
||||
module transactions
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
@ -25,15 +25,6 @@ class Proposal {
|
||||
description: String
|
||||
}
|
||||
|
||||
class SWT {
|
||||
origin: String
|
||||
location: String
|
||||
identifier: String
|
||||
scopes: List<String>
|
||||
properties: Map<String, String>
|
||||
expiryBlock: Int
|
||||
}
|
||||
|
||||
/// Gov module messages
|
||||
class MsgGovSubmitProposal extends Msg {
|
||||
typeUrl = "/cosmos.gov.v1beta1.MsgSubmitProposal"
|
||||
|
72
config/pkl/web.pkl
Normal file
72
config/pkl/web.pkl
Normal file
@ -0,0 +1,72 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/internal/orm/browser" }
|
||||
|
||||
module browser
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
class PublicKeyCredentialRequestOptions {
|
||||
challenge: String
|
||||
timeout: Int
|
||||
rpId: String
|
||||
allowCredentials: List<PublicKeyCredentialDescriptor>
|
||||
userVerification: String
|
||||
extensions: List<PublicKeyCredentialParameters>
|
||||
}
|
||||
|
||||
class PublicKeyCredentialDescriptor {
|
||||
id: String
|
||||
transports: List<String>
|
||||
type: String
|
||||
}
|
||||
|
||||
class PublicKeyCredentialParameters {
|
||||
type: String
|
||||
alg: Int?
|
||||
}
|
||||
|
||||
class AuthenticatorSelectionCriteria {
|
||||
authenticatorAttachment: String
|
||||
requireResidentKey: Boolean
|
||||
userVerification: String
|
||||
}
|
||||
|
||||
|
||||
class PublicKeyCredentialCreationOptions {
|
||||
rp: RpEntity
|
||||
user: UserEntity
|
||||
challenge: String
|
||||
pubKeyCredParams: List<PublicKeyCredentialParameters>
|
||||
timeout: Int
|
||||
excludeCredentials: List<PublicKeyCredentialDescriptor>
|
||||
authenticatorSelection: AuthenticatorSelectionCriteria?
|
||||
attestation: String
|
||||
extensions: List<PublicKeyCredentialParameters>
|
||||
}
|
||||
|
||||
class RpEntity {
|
||||
id: String
|
||||
name: String?
|
||||
icon: String?
|
||||
}
|
||||
|
||||
class UserEntity {
|
||||
id: String
|
||||
displayName: String?
|
||||
name: String?
|
||||
}
|
||||
|
||||
class SWT {
|
||||
origin: String
|
||||
location: String
|
||||
identifier: String
|
||||
scopes: List<String>
|
||||
properties: Map<String, String>
|
||||
expiryBlock: Int
|
||||
}
|
10
devbox.json
10
devbox.json
@ -9,8 +9,11 @@
|
||||
"commitizen@latest"
|
||||
],
|
||||
"env": {
|
||||
"CLOUDFLARE_API_TOKEN": "$CLOUDFLARE_API_TOKEN",
|
||||
"PROJECT_DIR": "$HOME/ghq/github.com/onsonr/sonr",
|
||||
"PROJECT_BIN": "$PROJECT_DIR/bin",
|
||||
"GOPATH": "$HOME/go",
|
||||
"PATH": "$HOME/go/bin:$PATH",
|
||||
"PATH": "$HOME/go/bin:$PROJECT_BIN:$PATH",
|
||||
"CHAIN_ID": "sonr-testnet-1",
|
||||
"DENOM": "usnr",
|
||||
"KEYRING": "test",
|
||||
@ -39,6 +42,7 @@
|
||||
"gen:pkl": [
|
||||
"go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/dwn.pkl",
|
||||
"go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/orm.pkl",
|
||||
"go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/web.pkl",
|
||||
"go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/txns.pkl"
|
||||
],
|
||||
"gen:templ": [
|
||||
@ -47,7 +51,11 @@
|
||||
"dev": [
|
||||
"air"
|
||||
],
|
||||
"start-proxy": [
|
||||
"./bin/caddy run --config ./config/caddy/caddy.conf"
|
||||
],
|
||||
"testnet": [
|
||||
"make xcaddy",
|
||||
"devbox services up"
|
||||
]
|
||||
}
|
||||
|
11
go.mod
11
go.mod
@ -54,7 +54,6 @@ require (
|
||||
github.com/charmbracelet/huh v0.5.3
|
||||
github.com/charmbracelet/lipgloss v0.13.0
|
||||
github.com/cometbft/cometbft v0.38.8
|
||||
github.com/cosmos/btcutil v1.0.5
|
||||
github.com/cosmos/cosmos-db v1.0.2
|
||||
github.com/cosmos/cosmos-proto v1.0.0-beta.5
|
||||
github.com/cosmos/cosmos-sdk v0.50.5
|
||||
@ -72,9 +71,8 @@ require (
|
||||
github.com/ipfs/kubo v0.29.0
|
||||
github.com/joho/godotenv v1.5.1
|
||||
github.com/labstack/echo/v4 v4.10.2
|
||||
github.com/mr-tron/base58 v1.2.0
|
||||
github.com/nlepage/go-js-promise v1.0.0
|
||||
github.com/onsonr/crypto v1.31.0
|
||||
github.com/onsonr/crypto v1.32.0
|
||||
github.com/segmentio/ksuid v1.0.4
|
||||
github.com/spf13/cast v1.6.0
|
||||
github.com/spf13/cobra v1.8.0
|
||||
@ -89,9 +87,7 @@ require (
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4
|
||||
google.golang.org/grpc v1.64.0
|
||||
google.golang.org/protobuf v1.34.2
|
||||
gopkg.in/macaroon-bakery.v2 v2.3.0
|
||||
gopkg.in/macaroon.v2 v2.1.0
|
||||
lukechampine.com/blake3 v1.3.0
|
||||
)
|
||||
|
||||
require (
|
||||
@ -100,7 +96,6 @@ require (
|
||||
cloud.google.com/go/iam v1.1.6 // indirect
|
||||
cloud.google.com/go/storage v1.38.0 // indirect
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9 // indirect
|
||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
|
||||
github.com/99designs/keyring v1.2.1 // indirect
|
||||
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
|
||||
@ -135,6 +130,7 @@ require (
|
||||
github.com/cometbft/cometbft-db v0.9.1 // indirect
|
||||
github.com/consensys/bavard v0.1.13 // indirect
|
||||
github.com/consensys/gnark-crypto v0.12.1 // indirect
|
||||
github.com/cosmos/btcutil v1.0.5 // indirect
|
||||
github.com/cosmos/go-bip39 v1.0.0 // indirect
|
||||
github.com/cosmos/gogogateway v1.2.0 // indirect
|
||||
github.com/cosmos/iavl v1.1.2 // indirect
|
||||
@ -267,6 +263,7 @@ require (
|
||||
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mmcloughlin/addchain v0.4.0 // indirect
|
||||
github.com/mr-tron/base58 v1.2.0 // indirect
|
||||
github.com/mtibben/percent v0.2.1 // indirect
|
||||
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
|
||||
github.com/muesli/cancelreader v0.2.2 // indirect
|
||||
@ -349,11 +346,11 @@ require (
|
||||
google.golang.org/api v0.169.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect
|
||||
gopkg.in/errgo.v1 v1.0.1 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
gotest.tools/v3 v3.5.1 // indirect
|
||||
lukechampine.com/blake3 v1.3.0 // indirect
|
||||
nhooyr.io/websocket v1.8.10 // indirect
|
||||
pgregory.net/rapid v1.1.0 // indirect
|
||||
rsc.io/tmplfunc v0.0.3 // indirect
|
||||
|
33
go.sum
33
go.sum
@ -803,9 +803,6 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
|
||||
git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc=
|
||||
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
|
||||
git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9 h1:Ahny8Ud1LjVMMAlt8utUFKhhxJtwBAualvsbc/Sk7cE=
|
||||
git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA=
|
||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs=
|
||||
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4=
|
||||
github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M=
|
||||
@ -1150,9 +1147,6 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu
|
||||
github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
|
||||
github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=
|
||||
github.com/frankban/quicktest v1.0.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k=
|
||||
github.com/frankban/quicktest v1.1.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k=
|
||||
github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20=
|
||||
github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k=
|
||||
github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
|
||||
@ -1198,7 +1192,6 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-macaroon-bakery/macaroonpb v1.0.0/go.mod h1:UzrGOcbiwTXISFP2XDLDPjfhMINZa+fX/7A2lMd31zc=
|
||||
github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
|
||||
github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M=
|
||||
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
|
||||
@ -1285,7 +1278,6 @@ github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
|
||||
github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
|
||||
github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
@ -1606,12 +1598,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1
|
||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/juju/mgotest v1.0.1/go.mod h1:vTaDufYul+Ps8D7bgseHjq87X8eu0ivlKLp9mVc/Bfc=
|
||||
github.com/juju/postgrestest v1.1.0/go.mod h1:/n17Y2T6iFozzXwSCO0JYJ5gSiz2caEtSwAjh/uLXDM=
|
||||
github.com/juju/qthttptest v0.0.1/go.mod h1://LCf/Ls22/rPw2u1yWukUJvYtfPY4nYpWUl2uZhryo=
|
||||
github.com/juju/schema v1.0.0/go.mod h1:Y+ThzXpUJ0E7NYYocAbuvJ7vTivXfrof/IfRPq/0abI=
|
||||
github.com/juju/webbrowser v0.0.0-20160309143629-54b8c57083b4/go.mod h1:G6PCelgkM6cuvyD10iYJsjLBsSadVXtJ+nBxFAxE2BU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
|
||||
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
@ -1654,8 +1640,6 @@ github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3
|
||||
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
|
||||
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
|
||||
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw=
|
||||
github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
|
||||
@ -1851,8 +1835,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
|
||||
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
|
||||
github.com/onsonr/crypto v1.31.0 h1:kI5oNIQ84bOfICqJBIxJxPguEPfLPe+kUD6x2QHZTa4=
|
||||
github.com/onsonr/crypto v1.31.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0=
|
||||
github.com/onsonr/crypto v1.32.0 h1:3XxItjoYg4vLuTU7uvpbIl/MTk2tb6L43SSO9RFcEXc=
|
||||
github.com/onsonr/crypto v1.32.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||
github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=
|
||||
@ -1969,7 +1953,6 @@ github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qq
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
@ -2207,7 +2190,6 @@ go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEb
|
||||
golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
@ -2302,7 +2284,6 @@ golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
|
||||
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
|
||||
golang.org/x/net v0.0.0-20150829230318-ea47fc708ee3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
@ -2444,7 +2425,6 @@ golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -2607,7 +2587,6 @@ golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
@ -3032,20 +3011,12 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
|
||||
gopkg.in/errgo.v1 v1.0.0/go.mod h1:CxwszS/Xz1C49Ucd2i6Zil5UToP1EmyrFhKaMVbg1mk=
|
||||
gopkg.in/errgo.v1 v1.0.1 h1:oQFRXzZ7CkBGdm1XZm/EbQYaYNNEElNBOd09M6cqNso=
|
||||
gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/httprequest.v1 v1.2.0/go.mod h1:T61ZUaJLpMnzvoJDO03ZD8yRXD4nZzBeDoW5e9sffjg=
|
||||
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||
gopkg.in/juju/environschema.v1 v1.0.0/go.mod h1:WTgU3KXKCVoO9bMmG/4KHzoaRvLeoxfjArpgd1MGWFA=
|
||||
gopkg.in/macaroon-bakery.v2 v2.3.0 h1:b40knPgPTke1QLTE8BSYeH7+R/hiIozB1A8CTLYN0Ic=
|
||||
gopkg.in/macaroon-bakery.v2 v2.3.0/go.mod h1:/8YhtPARXeRzbpEPLmRB66+gQE8/pzBBkWwg7Vz/guc=
|
||||
gopkg.in/macaroon.v2 v2.1.0 h1:HZcsjBCzq9t0eBPMKqTN/uSN6JOm78ZJ2INbqcBQOUI=
|
||||
gopkg.in/macaroon.v2 v2.1.0/go.mod h1:OUb+TQP/OP0WOerC2Jp/3CwhIKyIa9kQjuc7H24e6/o=
|
||||
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
|
@ -1,17 +0,0 @@
|
||||
package dwn
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/internal/dwn/front"
|
||||
"github.com/onsonr/sonr/internal/dwn/handlers"
|
||||
"github.com/onsonr/sonr/internal/dwn/middleware"
|
||||
)
|
||||
|
||||
// NewServer creates a new dwn server using echo
|
||||
func NewServer() *echo.Echo {
|
||||
e := echo.New()
|
||||
e.Use(middleware.UseSession)
|
||||
front.RegisterViews(e)
|
||||
handlers.RegisterState(e)
|
||||
return e
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package state
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@ -8,16 +8,16 @@ import (
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func CheckSubjectIsValid(e echo.Context) error {
|
||||
func checkSubjectIsValid(e echo.Context) error {
|
||||
credentialID := e.FormValue("credentialID")
|
||||
return e.JSON(200, credentialID)
|
||||
}
|
||||
|
||||
func HandleCredentialAssertion(e echo.Context) error {
|
||||
func handleCredentialAssertion(e echo.Context) error {
|
||||
return e.JSON(200, "HandleCredentialAssertion")
|
||||
}
|
||||
|
||||
func HandleCredentialCreation(e echo.Context) error {
|
||||
func handleCredentialCreation(e echo.Context) error {
|
||||
// Get the serialized credential data from the form
|
||||
credentialDataJSON := e.FormValue("credentialData")
|
||||
|
1
internal/dwn/handlers/manifest.go
Normal file
1
internal/dwn/handlers/manifest.go
Normal file
@ -0,0 +1 @@
|
||||
package handlers
|
@ -1,22 +1,22 @@
|
||||
package state
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
||||
func GrantAuthorization(e echo.Context) error {
|
||||
func grantAuthorization(e echo.Context) error {
|
||||
// Implement authorization endpoint using passkey authentication
|
||||
// Store session data in cache
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetJWKS(e echo.Context) error {
|
||||
func getJWKS(e echo.Context) error {
|
||||
// Implement token endpoint
|
||||
// Use cached session data for validation
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetToken(e echo.Context) error {
|
||||
func getToken(e echo.Context) error {
|
||||
// Implement token endpoint
|
||||
// Use cached session data for validation
|
||||
return nil
|
@ -2,19 +2,18 @@ package handlers
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/internal/dwn/handlers/state"
|
||||
middleware "github.com/onsonr/sonr/internal/dwn/middleware"
|
||||
)
|
||||
|
||||
func RegisterState(e *echo.Echo) {
|
||||
g := e.Group("state")
|
||||
g.POST("/login/:identifier", state.HandleCredentialAssertion)
|
||||
g.POST("/login/:identifier", handleCredentialAssertion)
|
||||
// g.GET("/discovery", state.GetDiscovery)
|
||||
g.GET("/jwks", state.GetJWKS)
|
||||
g.GET("/token", state.GetToken)
|
||||
g.POST("/:origin/grant/:subject", state.GrantAuthorization)
|
||||
g.POST("/register/:subject", state.HandleCredentialCreation)
|
||||
g.POST("/register/:subject/check", state.CheckSubjectIsValid)
|
||||
g.GET("/jwks", getJWKS)
|
||||
g.GET("/token", getToken)
|
||||
g.POST("/:origin/grant/:subject", grantAuthorization)
|
||||
g.POST("/register/:subject", handleCredentialCreation)
|
||||
g.POST("/register/:subject/check", checkSubjectIsValid)
|
||||
}
|
||||
|
||||
func RegisterSync(e *echo.Echo) {
|
||||
|
@ -1 +0,0 @@
|
||||
package sync
|
@ -1 +0,0 @@
|
||||
package sync
|
1
internal/dwn/handlers/wellknown.go
Normal file
1
internal/dwn/handlers/wellknown.go
Normal file
@ -0,0 +1 @@
|
||||
package handlers
|
@ -6,10 +6,11 @@ package middleware
|
||||
import (
|
||||
"github.com/donseba/go-htmx"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/config/dwn"
|
||||
"github.com/onsonr/sonr/internal/dwn/middleware/jsexc"
|
||||
)
|
||||
|
||||
type Browser struct {
|
||||
type Client struct {
|
||||
echo.Context
|
||||
isMobile bool
|
||||
userAgent string
|
||||
@ -23,13 +24,12 @@ type Browser struct {
|
||||
// WebAPIs
|
||||
indexedDB jsexc.IndexedDBAPI
|
||||
localStorage jsexc.LocalStorageAPI
|
||||
push jsexc.PushAPI
|
||||
sessionStorage jsexc.SessionStorageAPI
|
||||
}
|
||||
|
||||
func UseNavigator(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
func UseNavigator(next echo.HandlerFunc, cnfg *dwn.Config) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
cc := jsexc.NewNavigator(c)
|
||||
cc := jsexc.NewNavigator(c, cnfg)
|
||||
return next(cc)
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package middleware
|
||||
|
||||
type RequestHeaders struct {
|
||||
Authorization *string `header:"Authorization"`
|
@ -8,6 +8,7 @@ import (
|
||||
"syscall/js"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/config/dwn"
|
||||
)
|
||||
|
||||
type Navigator struct {
|
||||
@ -16,7 +17,7 @@ type Navigator struct {
|
||||
hasCredentials bool
|
||||
}
|
||||
|
||||
func NewNavigator(c echo.Context) *Navigator {
|
||||
func NewNavigator(c echo.Context, cnfg *dwn.Config) *Navigator {
|
||||
navigator := js.Global().Get("navigator")
|
||||
credentials := navigator.Get("credentials")
|
||||
hasCredentials := !credentials.IsUndefined()
|
||||
|
@ -1,6 +0,0 @@
|
||||
//go:build js && wasm
|
||||
// +build js,wasm
|
||||
|
||||
package jsexc
|
||||
|
||||
type PushAPI interface{}
|
@ -1,37 +0,0 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package jsexc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"syscall/js"
|
||||
|
||||
promise "github.com/nlepage/go-js-promise"
|
||||
)
|
||||
|
||||
// Request builds and returns the equivalent http.Request
|
||||
func Request(r js.Value) *http.Request {
|
||||
jsBody := js.Global().Get("Uint8Array").New(promise.Await(r.Call("arrayBuffer")))
|
||||
body := make([]byte, jsBody.Get("length").Int())
|
||||
js.CopyBytesToGo(body, jsBody)
|
||||
|
||||
req := httptest.NewRequest(
|
||||
r.Get("method").String(),
|
||||
r.Get("url").String(),
|
||||
bytes.NewBuffer(body),
|
||||
)
|
||||
|
||||
headersIt := r.Get("headers").Call("entries")
|
||||
for {
|
||||
e := headersIt.Call("next")
|
||||
if e.Get("done").Bool() {
|
||||
break
|
||||
}
|
||||
v := e.Get("value")
|
||||
req.Header.Set(v.Index(0).String(), v.Index(1).String())
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package jsexc
|
||||
|
||||
import (
|
||||
"io"
|
||||
"net/http/httptest"
|
||||
"syscall/js"
|
||||
)
|
||||
|
||||
// ResponseRecorder uses httptest.ResponseRecorder to build a JS Response
|
||||
type ResponseRecorder struct {
|
||||
*httptest.ResponseRecorder
|
||||
}
|
||||
|
||||
// NewResponseRecorder returns a new ResponseRecorder
|
||||
func NewResponseRecorder() ResponseRecorder {
|
||||
return ResponseRecorder{httptest.NewRecorder()}
|
||||
}
|
||||
|
||||
// JSResponse builds and returns the equivalent JS Response
|
||||
func (rr ResponseRecorder) JSResponse() js.Value {
|
||||
res := rr.Result()
|
||||
|
||||
body := js.Undefined()
|
||||
if res.ContentLength != 0 {
|
||||
b, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
body = js.Global().Get("Uint8Array").New(len(b))
|
||||
js.CopyBytesToJS(body, b)
|
||||
}
|
||||
|
||||
init := make(map[string]interface{}, 2)
|
||||
|
||||
if res.StatusCode != 0 {
|
||||
init["status"] = res.StatusCode
|
||||
}
|
||||
|
||||
if len(res.Header) != 0 {
|
||||
headers := make(map[string]interface{}, len(res.Header))
|
||||
for k := range res.Header {
|
||||
headers[k] = res.Header.Get(k)
|
||||
}
|
||||
init["headers"] = headers
|
||||
}
|
||||
|
||||
return js.Global().Get("Response").New(body, init)
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package jsexc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
"syscall/js"
|
||||
|
||||
promise "github.com/nlepage/go-js-promise"
|
||||
)
|
||||
|
||||
// Serve serves HTTP requests using handler or http.DefaultServeMux if handler is nil.
|
||||
func Serve(handler http.Handler) func() {
|
||||
h := handler
|
||||
if h == nil {
|
||||
h = http.DefaultServeMux
|
||||
}
|
||||
|
||||
prefix := js.Global().Get("wasmhttp").Get("path").String()
|
||||
for strings.HasSuffix(prefix, "/") {
|
||||
prefix = strings.TrimSuffix(prefix, "/")
|
||||
}
|
||||
|
||||
if prefix != "" {
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle(prefix+"/", http.StripPrefix(prefix, h))
|
||||
h = mux
|
||||
}
|
||||
|
||||
cb := js.FuncOf(func(_ js.Value, args []js.Value) interface{} {
|
||||
resPromise, resolve, reject := promise.New()
|
||||
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
if err, ok := r.(error); ok {
|
||||
reject(fmt.Sprintf("wasmhttp: panic: %+v\n", err))
|
||||
} else {
|
||||
reject(fmt.Sprintf("wasmhttp: panic: %v\n", r))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
res := NewResponseRecorder()
|
||||
|
||||
h.ServeHTTP(res, Request(args[0]))
|
||||
|
||||
resolve(res.JSResponse())
|
||||
}()
|
||||
|
||||
return resPromise
|
||||
})
|
||||
|
||||
js.Global().Get("wasmhttp").Call("setHandler", cb)
|
||||
|
||||
return cb.Release
|
||||
}
|
128
internal/dwn/middleware/jsexc/server.go
Normal file
128
internal/dwn/middleware/jsexc/server.go
Normal file
@ -0,0 +1,128 @@
|
||||
//go:build js && wasm
|
||||
|
||||
package jsexc
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"syscall/js"
|
||||
|
||||
promise "github.com/nlepage/go-js-promise"
|
||||
)
|
||||
|
||||
// Serve serves HTTP requests using handler or http.DefaultServeMux if handler is nil.
|
||||
func Serve(handler http.Handler) func() {
|
||||
h := handler
|
||||
if h == nil {
|
||||
h = http.DefaultServeMux
|
||||
}
|
||||
|
||||
prefix := js.Global().Get("wasmhttp").Get("path").String()
|
||||
for strings.HasSuffix(prefix, "/") {
|
||||
prefix = strings.TrimSuffix(prefix, "/")
|
||||
}
|
||||
|
||||
if prefix != "" {
|
||||
mux := http.NewServeMux()
|
||||
mux.Handle(prefix+"/", http.StripPrefix(prefix, h))
|
||||
h = mux
|
||||
}
|
||||
|
||||
cb := js.FuncOf(func(_ js.Value, args []js.Value) interface{} {
|
||||
resPromise, resolve, reject := promise.New()
|
||||
|
||||
go func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
if err, ok := r.(error); ok {
|
||||
reject(fmt.Sprintf("wasmhttp: panic: %+v\n", err))
|
||||
} else {
|
||||
reject(fmt.Sprintf("wasmhttp: panic: %v\n", r))
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
res := NewResponseRecorder()
|
||||
|
||||
h.ServeHTTP(res, Request(args[0]))
|
||||
|
||||
resolve(res.JSResponse())
|
||||
}()
|
||||
|
||||
return resPromise
|
||||
})
|
||||
|
||||
js.Global().Get("wasmhttp").Call("setHandler", cb)
|
||||
|
||||
return cb.Release
|
||||
}
|
||||
|
||||
// Request builds and returns the equivalent http.Request
|
||||
func Request(r js.Value) *http.Request {
|
||||
jsBody := js.Global().Get("Uint8Array").New(promise.Await(r.Call("arrayBuffer")))
|
||||
body := make([]byte, jsBody.Get("length").Int())
|
||||
js.CopyBytesToGo(body, jsBody)
|
||||
|
||||
req := httptest.NewRequest(
|
||||
r.Get("method").String(),
|
||||
r.Get("url").String(),
|
||||
bytes.NewBuffer(body),
|
||||
)
|
||||
|
||||
headersIt := r.Get("headers").Call("entries")
|
||||
for {
|
||||
e := headersIt.Call("next")
|
||||
if e.Get("done").Bool() {
|
||||
break
|
||||
}
|
||||
v := e.Get("value")
|
||||
req.Header.Set(v.Index(0).String(), v.Index(1).String())
|
||||
}
|
||||
|
||||
return req
|
||||
}
|
||||
|
||||
// ResponseRecorder uses httptest.ResponseRecorder to build a JS Response
|
||||
type ResponseRecorder struct {
|
||||
*httptest.ResponseRecorder
|
||||
}
|
||||
|
||||
// NewResponseRecorder returns a new ResponseRecorder
|
||||
func NewResponseRecorder() ResponseRecorder {
|
||||
return ResponseRecorder{httptest.NewRecorder()}
|
||||
}
|
||||
|
||||
// JSResponse builds and returns the equivalent JS Response
|
||||
func (rr ResponseRecorder) JSResponse() js.Value {
|
||||
res := rr.Result()
|
||||
|
||||
body := js.Undefined()
|
||||
if res.ContentLength != 0 {
|
||||
b, err := io.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
body = js.Global().Get("Uint8Array").New(len(b))
|
||||
js.CopyBytesToJS(body, b)
|
||||
}
|
||||
|
||||
init := make(map[string]interface{}, 2)
|
||||
|
||||
if res.StatusCode != 0 {
|
||||
init["status"] = res.StatusCode
|
||||
}
|
||||
|
||||
if len(res.Header) != 0 {
|
||||
headers := make(map[string]interface{}, len(res.Header))
|
||||
for k := range res.Header {
|
||||
headers[k] = res.Header.Get(k)
|
||||
}
|
||||
init["headers"] = headers
|
||||
}
|
||||
|
||||
return js.Global().Get("Response").New(body, init)
|
||||
}
|
@ -4,20 +4,19 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/onsonr/sonr/internal/dwn/middleware/client"
|
||||
"gopkg.in/macaroon.v2"
|
||||
)
|
||||
|
||||
// GetSession returns the current Session
|
||||
func GetSession(c echo.Context) *client.Session {
|
||||
return c.(*client.Session)
|
||||
func GetSession(c echo.Context) *Session {
|
||||
return c.(*Session)
|
||||
}
|
||||
|
||||
// UseSession establishes a Session Cookie.
|
||||
func UseSession(next echo.HandlerFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
sc := client.NewSession(c)
|
||||
headers := new(client.RequestHeaders)
|
||||
sc := initSession(c)
|
||||
headers := new(RequestHeaders)
|
||||
sc.Bind(headers)
|
||||
return next(sc)
|
||||
}
|
||||
@ -46,7 +45,7 @@ func MacaroonMiddleware(secretKeyStr string, location string) echo.MiddlewareFun
|
||||
|
||||
// Verify the macaroon
|
||||
err = token.Verify(secretKey, func(caveat string) error {
|
||||
for _, c := range client.MacroonCaveats {
|
||||
for _, c := range MacroonCaveats {
|
||||
if c.String() == caveat {
|
||||
return nil
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@ -22,7 +22,7 @@ func (c *Session) ID() string {
|
||||
return ReadCookie(c, "session")
|
||||
}
|
||||
|
||||
func NewSession(c echo.Context) *Session {
|
||||
func initSession(c echo.Context) *Session {
|
||||
s := &Session{Context: c}
|
||||
if val := ReadCookie(c, "session"); val == "" {
|
||||
id := ksuid.New().String()
|
@ -1,4 +1,4 @@
|
||||
package client
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"fmt"
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Account struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Asset struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Chain struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Credential struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
||||
@ -12,6 +12,10 @@ type Credential struct {
|
||||
|
||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
||||
|
||||
Label *string `pkl:"label" json:"label,omitempty"`
|
||||
|
||||
DeviceId *string `pkl:"deviceId" json:"deviceId,omitempty"`
|
||||
|
||||
CredentialId string `pkl:"credentialId" json:"credentialId,omitempty"`
|
||||
|
||||
PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"`
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Grant struct {
|
||||
Id uint `pkl:"id" json:"id,omitempty" query:"id"`
|
16
internal/orm/JWK.pkl.go
Normal file
16
internal/orm/JWK.pkl.go
Normal file
@ -0,0 +1,16 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type JWK struct {
|
||||
Kty string `pkl:"kty" json:"kty,omitempty"`
|
||||
|
||||
Crv string `pkl:"crv" json:"crv,omitempty"`
|
||||
|
||||
X string `pkl:"x" json:"x,omitempty"`
|
||||
|
||||
Y string `pkl:"y" json:"y,omitempty"`
|
||||
|
||||
N string `pkl:"n" json:"n,omitempty"`
|
||||
|
||||
E string `pkl:"e" json:"e,omitempty"`
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Keyshare struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,11 +7,14 @@ import (
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Models struct {
|
||||
type Orm struct {
|
||||
DbName string `pkl:"db_name"`
|
||||
|
||||
DbVersion int `pkl:"db_version"`
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Models
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Models, err error) {
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Orm
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Orm, err error) {
|
||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -26,9 +29,9 @@ func LoadFromPath(ctx context.Context, path string) (ret *Models, err error) {
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Models
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Models, error) {
|
||||
var ret Models
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Orm
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Orm, error) {
|
||||
var ret Orm
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `models`. DO NOT EDIT.
|
||||
package models
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
type Profile struct {
|
||||
Id string `pkl:"id" json:"id,omitempty" query:"id"`
|
26
internal/orm/PublicKey.pkl.go
Normal file
26
internal/orm/PublicKey.pkl.go
Normal file
@ -0,0 +1,26 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/internal/orm/keyalgorithm"
|
||||
"github.com/onsonr/sonr/internal/orm/keycurve"
|
||||
"github.com/onsonr/sonr/internal/orm/keyencoding"
|
||||
"github.com/onsonr/sonr/internal/orm/keyrole"
|
||||
"github.com/onsonr/sonr/internal/orm/keytype"
|
||||
)
|
||||
|
||||
type PublicKey struct {
|
||||
Role keyrole.KeyRole `pkl:"role" json:"role,omitempty" query:"role"`
|
||||
|
||||
Algorithm keyalgorithm.KeyAlgorithm `pkl:"algorithm"`
|
||||
|
||||
Encoding keyencoding.KeyEncoding `pkl:"encoding"`
|
||||
|
||||
Curve keycurve.KeyCurve `pkl:"curve"`
|
||||
|
||||
KeyType keytype.KeyType `pkl:"key_type"`
|
||||
|
||||
Raw string `pkl:"raw"`
|
||||
|
||||
Jwk *JWK `pkl:"jwk"`
|
||||
}
|
46
internal/orm/assettype/AssetType.pkl.go
Normal file
46
internal/orm/assettype/AssetType.pkl.go
Normal file
@ -0,0 +1,46 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package assettype
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type AssetType string
|
||||
|
||||
const (
|
||||
Native AssetType = "native"
|
||||
Wrapped AssetType = "wrapped"
|
||||
Staking AssetType = "staking"
|
||||
Pool AssetType = "pool"
|
||||
Ibc AssetType = "ibc"
|
||||
Cw20 AssetType = "cw20"
|
||||
)
|
||||
|
||||
// String returns the string representation of AssetType
|
||||
func (rcv AssetType) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(AssetType)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for AssetType.
|
||||
func (rcv *AssetType) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "native":
|
||||
*rcv = Native
|
||||
case "wrapped":
|
||||
*rcv = Wrapped
|
||||
case "staking":
|
||||
*rcv = Staking
|
||||
case "pool":
|
||||
*rcv = Pool
|
||||
case "ibc":
|
||||
*rcv = Ibc
|
||||
case "cw20":
|
||||
*rcv = Cw20
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid AssetType`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
@ -1,25 +1,75 @@
|
||||
package builder
|
||||
package orm
|
||||
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha512"
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"math/big"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/onsonr/sonr/x/did/types"
|
||||
"github.com/onsonr/sonr/internal/orm/didmethod"
|
||||
)
|
||||
|
||||
type ChainCode uint32
|
||||
|
||||
func GetChainCode(m didmethod.DIDMethod) ChainCode {
|
||||
switch m {
|
||||
case didmethod.Bitcoin:
|
||||
return 0 // 0
|
||||
case didmethod.Ethereum:
|
||||
return 64 // 60
|
||||
case didmethod.Ibc:
|
||||
return 118 // 118
|
||||
case didmethod.Sonr:
|
||||
return 703 // 703
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
func FormatAddress(pubKey *PublicKey, m didmethod.DIDMethod) (string, error) {
|
||||
hexPubKey, err := hex.DecodeString(pubKey.Raw)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// switch m {
|
||||
// case didmethod.Bitcoin:
|
||||
// return bech32.Encode("bc", pubKey.Bytes())
|
||||
//
|
||||
// case didmethod.Ethereum:
|
||||
// epk, err := pubKey.ECDSA()
|
||||
// if err != nil {
|
||||
// return "", err
|
||||
// }
|
||||
// return ComputeEthAddress(*epk), nil
|
||||
//
|
||||
// case didmethod.Sonr:
|
||||
// return bech32.Encode("idx", hexPubKey)
|
||||
//
|
||||
// case didmethod.Ibc:
|
||||
// return bech32.Encode("cosmos", hexPubKey)
|
||||
//
|
||||
// }
|
||||
return string(hexPubKey), nil
|
||||
}
|
||||
|
||||
// ComputeAccountPublicKey computes the public key of a child key given the extended public key, chain code, and index.
|
||||
func computeBip32AccountPublicKey(extPubKey PublicKey, chainCode types.ChainCode, index int) (*types.PubKey, error) {
|
||||
func ComputeBip32AccountPublicKey(extPubKey PublicKey, chainCode ChainCode, index int) (*PublicKey, error) {
|
||||
// Check if the index is a hardened child key
|
||||
if chainCode&0x80000000 != 0 && index < 0 {
|
||||
return nil, errors.New("invalid index")
|
||||
}
|
||||
|
||||
hexPubKey, err := hex.DecodeString(extPubKey.Raw)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Serialize the public key
|
||||
pubKey, err := btcec.ParsePubKey(extPubKey.GetRaw())
|
||||
pubKey, err := btcec.ParsePubKey(hexPubKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -54,12 +104,8 @@ func computeBip32AccountPublicKey(extPubKey PublicKey, chainCode types.ChainCode
|
||||
ly := newBigIntFieldVal(childY)
|
||||
|
||||
// Create the child public key
|
||||
childPubKey := btcec.NewPublicKey(lx, ly)
|
||||
pk, err := types.NewPublicKey(childPubKey.SerializeCompressed(), types.ChainCodeKeyInfos[chainCode])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return pk, nil
|
||||
_ = btcec.NewPublicKey(lx, ly)
|
||||
return &PublicKey{}, nil
|
||||
}
|
||||
|
||||
// newBigIntFieldVal creates a new field value from a big integer.
|
10
internal/orm/browser/AuthenticatorSelectionCriteria.pkl.go
Normal file
10
internal/orm/browser/AuthenticatorSelectionCriteria.pkl.go
Normal file
@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type AuthenticatorSelectionCriteria struct {
|
||||
AuthenticatorAttachment string `pkl:"authenticatorAttachment"`
|
||||
|
||||
RequireResidentKey bool `pkl:"requireResidentKey"`
|
||||
|
||||
UserVerification string `pkl:"userVerification"`
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -7,11 +7,11 @@ import (
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Txns struct {
|
||||
type Browser struct {
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Txns
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Txns, err error) {
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Browser
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Browser, err error) {
|
||||
evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -26,9 +26,9 @@ func LoadFromPath(ctx context.Context, path string) (ret *Txns, err error) {
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Txns
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Txns, error) {
|
||||
var ret Txns
|
||||
// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Browser
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Browser, error) {
|
||||
var ret Browser
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type PublicKeyCredentialCreationOptions struct {
|
||||
Rp *RpEntity `pkl:"rp"`
|
||||
|
||||
User *UserEntity `pkl:"user"`
|
||||
|
||||
Challenge string `pkl:"challenge"`
|
||||
|
||||
PubKeyCredParams []*PublicKeyCredentialParameters `pkl:"pubKeyCredParams"`
|
||||
|
||||
Timeout int `pkl:"timeout"`
|
||||
|
||||
ExcludeCredentials []*PublicKeyCredentialDescriptor `pkl:"excludeCredentials"`
|
||||
|
||||
AuthenticatorSelection *AuthenticatorSelectionCriteria `pkl:"authenticatorSelection"`
|
||||
|
||||
Attestation string `pkl:"attestation"`
|
||||
|
||||
Extensions []*PublicKeyCredentialParameters `pkl:"extensions"`
|
||||
}
|
10
internal/orm/browser/PublicKeyCredentialDescriptor.pkl.go
Normal file
10
internal/orm/browser/PublicKeyCredentialDescriptor.pkl.go
Normal file
@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type PublicKeyCredentialDescriptor struct {
|
||||
Id string `pkl:"id"`
|
||||
|
||||
Transports []string `pkl:"transports"`
|
||||
|
||||
Type string `pkl:"type"`
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type PublicKeyCredentialParameters struct {
|
||||
Type string `pkl:"type"`
|
||||
|
||||
Alg *int `pkl:"alg"`
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type PublicKeyCredentialRequestOptions struct {
|
||||
Challenge string `pkl:"challenge"`
|
||||
|
||||
Timeout int `pkl:"timeout"`
|
||||
|
||||
RpId string `pkl:"rpId"`
|
||||
|
||||
AllowCredentials []*PublicKeyCredentialDescriptor `pkl:"allowCredentials"`
|
||||
|
||||
UserVerification string `pkl:"userVerification"`
|
||||
|
||||
Extensions []*PublicKeyCredentialParameters `pkl:"extensions"`
|
||||
}
|
10
internal/orm/browser/RpEntity.pkl.go
Normal file
10
internal/orm/browser/RpEntity.pkl.go
Normal file
@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type RpEntity struct {
|
||||
Id string `pkl:"id"`
|
||||
|
||||
Name *string `pkl:"name"`
|
||||
|
||||
Icon *string `pkl:"icon"`
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type SWT struct {
|
||||
Origin string `pkl:"origin"`
|
10
internal/orm/browser/UserEntity.pkl.go
Normal file
10
internal/orm/browser/UserEntity.pkl.go
Normal file
@ -0,0 +1,10 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
type UserEntity struct {
|
||||
Id string `pkl:"id"`
|
||||
|
||||
DisplayName *string `pkl:"displayName"`
|
||||
|
||||
Name *string `pkl:"name"`
|
||||
}
|
16
internal/orm/browser/init.pkl.go
Normal file
16
internal/orm/browser/init.pkl.go
Normal file
@ -0,0 +1,16 @@
|
||||
// Code generated from Pkl module `browser`. DO NOT EDIT.
|
||||
package browser
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("browser", Browser{})
|
||||
pkl.RegisterMapping("browser#PublicKeyCredentialRequestOptions", PublicKeyCredentialRequestOptions{})
|
||||
pkl.RegisterMapping("browser#PublicKeyCredentialDescriptor", PublicKeyCredentialDescriptor{})
|
||||
pkl.RegisterMapping("browser#PublicKeyCredentialParameters", PublicKeyCredentialParameters{})
|
||||
pkl.RegisterMapping("browser#AuthenticatorSelectionCriteria", AuthenticatorSelectionCriteria{})
|
||||
pkl.RegisterMapping("browser#PublicKeyCredentialCreationOptions", PublicKeyCredentialCreationOptions{})
|
||||
pkl.RegisterMapping("browser#RpEntity", RpEntity{})
|
||||
pkl.RegisterMapping("browser#UserEntity", UserEntity{})
|
||||
pkl.RegisterMapping("browser#SWT", SWT{})
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package builder
|
||||
package orm
|
||||
|
||||
import (
|
||||
"github.com/onsonr/sonr/x/did/types"
|
56
internal/orm/credential.go
Normal file
56
internal/orm/credential.go
Normal file
@ -0,0 +1,56 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
|
||||
"github.com/go-webauthn/webauthn/protocol"
|
||||
)
|
||||
|
||||
// NewCredential will return a credential pointer on successful validation of a registration response.
|
||||
func NewCredential(c *protocol.ParsedCredentialCreationData, origin, handle string) *Credential {
|
||||
return &Credential{
|
||||
Subject: handle,
|
||||
Origin: origin,
|
||||
AttestationType: c.Response.AttestationObject.Format,
|
||||
CredentialId: BytesToBase64(c.Response.AttestationObject.AuthData.AttData.CredentialID),
|
||||
PublicKey: BytesToBase64(c.Response.AttestationObject.AuthData.AttData.CredentialPublicKey),
|
||||
Transport: NormalizeTransports(c.Response.Transports),
|
||||
SignCount: uint(c.Response.AttestationObject.AuthData.Counter),
|
||||
UserPresent: c.Response.AttestationObject.AuthData.Flags.HasUserPresent(),
|
||||
UserVerified: c.Response.AttestationObject.AuthData.Flags.HasUserVerified(),
|
||||
BackupEligible: c.Response.AttestationObject.AuthData.Flags.HasBackupEligible(),
|
||||
BackupState: c.Response.AttestationObject.AuthData.Flags.HasAttestedCredentialData(),
|
||||
}
|
||||
}
|
||||
|
||||
func BytesToBase64(b []byte) string {
|
||||
return base64.RawURLEncoding.EncodeToString(b)
|
||||
}
|
||||
|
||||
func Base64ToBytes(b string) ([]byte, error) {
|
||||
return base64.RawURLEncoding.DecodeString(b)
|
||||
}
|
||||
|
||||
// Descriptor converts a Credential into a protocol.CredentialDescriptor.
|
||||
func (c *Credential) Descriptor() protocol.CredentialDescriptor {
|
||||
id, err := base64.RawURLEncoding.DecodeString(c.CredentialId)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return protocol.CredentialDescriptor{
|
||||
Type: protocol.PublicKeyCredentialType,
|
||||
CredentialID: id,
|
||||
Transport: ConvertTransports(c.Transport),
|
||||
AttestationType: c.AttestationType,
|
||||
}
|
||||
}
|
||||
|
||||
// This is a signal that the authenticator may be cloned, see CloneWarning above for more information.
|
||||
func (a *Credential) UpdateCounter(authDataCount uint) {
|
||||
if authDataCount <= a.SignCount && (authDataCount != 0 || a.SignCount != 0) {
|
||||
a.CloneWarning = true
|
||||
return
|
||||
}
|
||||
|
||||
a.SignCount = authDataCount
|
||||
}
|
52
internal/orm/didmethod/DIDMethod.pkl.go
Normal file
52
internal/orm/didmethod/DIDMethod.pkl.go
Normal file
@ -0,0 +1,52 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package didmethod
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type DIDMethod string
|
||||
|
||||
const (
|
||||
Ipfs DIDMethod = "ipfs"
|
||||
Sonr DIDMethod = "sonr"
|
||||
Bitcoin DIDMethod = "bitcoin"
|
||||
Ethereum DIDMethod = "ethereum"
|
||||
Ibc DIDMethod = "ibc"
|
||||
Webauthn DIDMethod = "webauthn"
|
||||
Dwn DIDMethod = "dwn"
|
||||
Service DIDMethod = "service"
|
||||
)
|
||||
|
||||
// String returns the string representation of DIDMethod
|
||||
func (rcv DIDMethod) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(DIDMethod)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for DIDMethod.
|
||||
func (rcv *DIDMethod) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "ipfs":
|
||||
*rcv = Ipfs
|
||||
case "sonr":
|
||||
*rcv = Sonr
|
||||
case "bitcoin":
|
||||
*rcv = Bitcoin
|
||||
case "ethereum":
|
||||
*rcv = Ethereum
|
||||
case "ibc":
|
||||
*rcv = Ibc
|
||||
case "webauthn":
|
||||
*rcv = Webauthn
|
||||
case "dwn":
|
||||
*rcv = Dwn
|
||||
case "service":
|
||||
*rcv = Service
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid DIDMethod`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
17
internal/orm/init.pkl.go
Normal file
17
internal/orm/init.pkl.go
Normal file
@ -0,0 +1,17 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package orm
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
||||
func init() {
|
||||
pkl.RegisterMapping("orm", Orm{})
|
||||
pkl.RegisterMapping("orm#Account", Account{})
|
||||
pkl.RegisterMapping("orm#Asset", Asset{})
|
||||
pkl.RegisterMapping("orm#Chain", Chain{})
|
||||
pkl.RegisterMapping("orm#Credential", Credential{})
|
||||
pkl.RegisterMapping("orm#JWK", JWK{})
|
||||
pkl.RegisterMapping("orm#Grant", Grant{})
|
||||
pkl.RegisterMapping("orm#Keyshare", Keyshare{})
|
||||
pkl.RegisterMapping("orm#PublicKey", PublicKey{})
|
||||
pkl.RegisterMapping("orm#Profile", Profile{})
|
||||
}
|
111
internal/orm/jwk.go
Normal file
111
internal/orm/jwk.go
Normal file
@ -0,0 +1,111 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-webauthn/webauthn/protocol"
|
||||
"github.com/go-webauthn/webauthn/protocol/webauthncose"
|
||||
)
|
||||
|
||||
func FormatEC2PublicKey(key *webauthncose.EC2PublicKeyData) (*JWK, error) {
|
||||
curve, err := GetCOSECurveName(key.Curve)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
jwkMap := map[string]interface{}{
|
||||
"kty": "EC",
|
||||
"crv": curve,
|
||||
"x": base64.RawURLEncoding.EncodeToString(key.XCoord),
|
||||
"y": base64.RawURLEncoding.EncodeToString(key.YCoord),
|
||||
}
|
||||
|
||||
return MapToJWK(jwkMap)
|
||||
}
|
||||
|
||||
func FormatRSAPublicKey(key *webauthncose.RSAPublicKeyData) (*JWK, error) {
|
||||
jwkMap := map[string]interface{}{
|
||||
"kty": "RSA",
|
||||
"n": base64.RawURLEncoding.EncodeToString(key.Modulus),
|
||||
"e": base64.RawURLEncoding.EncodeToString(key.Exponent),
|
||||
}
|
||||
|
||||
return MapToJWK(jwkMap)
|
||||
}
|
||||
|
||||
func FormatOKPPublicKey(key *webauthncose.OKPPublicKeyData) (*JWK, error) {
|
||||
curve, err := GetOKPCurveName(key.Curve)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
jwkMap := map[string]interface{}{
|
||||
"kty": "OKP",
|
||||
"crv": curve,
|
||||
"x": base64.RawURLEncoding.EncodeToString(key.XCoord),
|
||||
}
|
||||
|
||||
return MapToJWK(jwkMap)
|
||||
}
|
||||
|
||||
func MapToJWK(m map[string]interface{}) (*JWK, error) {
|
||||
jwk := &JWK{}
|
||||
for k, v := range m {
|
||||
switch k {
|
||||
case "kty":
|
||||
jwk.Kty = v.(string)
|
||||
case "crv":
|
||||
jwk.Crv = v.(string)
|
||||
case "x":
|
||||
jwk.X = v.(string)
|
||||
case "y":
|
||||
jwk.Y = v.(string)
|
||||
case "n":
|
||||
jwk.N = v.(string)
|
||||
case "e":
|
||||
jwk.E = v.(string)
|
||||
}
|
||||
}
|
||||
return jwk, nil
|
||||
}
|
||||
|
||||
func GetCOSECurveName(curveID int64) (string, error) {
|
||||
switch curveID {
|
||||
case int64(webauthncose.P256):
|
||||
return "P-256", nil
|
||||
case int64(webauthncose.P384):
|
||||
return "P-384", nil
|
||||
case int64(webauthncose.P521):
|
||||
return "P-521", nil
|
||||
default:
|
||||
return "", fmt.Errorf("unknown curve ID: %d", curveID)
|
||||
}
|
||||
}
|
||||
|
||||
func GetOKPCurveName(curveID int64) (string, error) {
|
||||
switch curveID {
|
||||
case int64(webauthncose.Ed25519):
|
||||
return "Ed25519", nil
|
||||
default:
|
||||
return "", fmt.Errorf("unknown OKP curve ID: %d", curveID)
|
||||
}
|
||||
}
|
||||
|
||||
// ConvertTransports converts the transports from strings to protocol.AuthenticatorTransport
|
||||
func ConvertTransports(transports []string) []protocol.AuthenticatorTransport {
|
||||
tss := make([]protocol.AuthenticatorTransport, len(transports))
|
||||
for i, t := range transports {
|
||||
tss[i] = protocol.AuthenticatorTransport(t)
|
||||
}
|
||||
return tss
|
||||
}
|
||||
|
||||
// NormalizeTransports returns the transports as strings
|
||||
func NormalizeTransports(transports []protocol.AuthenticatorTransport) []string {
|
||||
tss := make([]string, len(transports))
|
||||
for i, t := range transports {
|
||||
tss[i] = string(t)
|
||||
}
|
||||
return tss
|
||||
}
|
22
internal/orm/keyalg.go
Normal file
22
internal/orm/keyalg.go
Normal file
@ -0,0 +1,22 @@
|
||||
package orm
|
||||
|
||||
import "github.com/onsonr/sonr/internal/orm/keyalgorithm"
|
||||
|
||||
type COSEAlgorithmIdentifier int
|
||||
|
||||
func GetCoseIdentifier(alg keyalgorithm.KeyAlgorithm) COSEAlgorithmIdentifier {
|
||||
switch alg {
|
||||
case keyalgorithm.Es256:
|
||||
return COSEAlgorithmIdentifier(-7)
|
||||
case keyalgorithm.Es384:
|
||||
return COSEAlgorithmIdentifier(-35)
|
||||
case keyalgorithm.Es512:
|
||||
return COSEAlgorithmIdentifier(-36)
|
||||
case keyalgorithm.Eddsa:
|
||||
return COSEAlgorithmIdentifier(-8)
|
||||
case keyalgorithm.Es256k:
|
||||
return COSEAlgorithmIdentifier(-10)
|
||||
default:
|
||||
return COSEAlgorithmIdentifier(0)
|
||||
}
|
||||
}
|
46
internal/orm/keyalgorithm/KeyAlgorithm.pkl.go
Normal file
46
internal/orm/keyalgorithm/KeyAlgorithm.pkl.go
Normal file
@ -0,0 +1,46 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keyalgorithm
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyAlgorithm string
|
||||
|
||||
const (
|
||||
Es256 KeyAlgorithm = "es256"
|
||||
Es384 KeyAlgorithm = "es384"
|
||||
Es512 KeyAlgorithm = "es512"
|
||||
Eddsa KeyAlgorithm = "eddsa"
|
||||
Es256k KeyAlgorithm = "es256k"
|
||||
Ecdsa KeyAlgorithm = "ecdsa"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyAlgorithm
|
||||
func (rcv KeyAlgorithm) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyAlgorithm)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyAlgorithm.
|
||||
func (rcv *KeyAlgorithm) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "es256":
|
||||
*rcv = Es256
|
||||
case "es384":
|
||||
*rcv = Es384
|
||||
case "es512":
|
||||
*rcv = Es512
|
||||
case "eddsa":
|
||||
*rcv = Eddsa
|
||||
case "es256k":
|
||||
*rcv = Es256k
|
||||
case "ecdsa":
|
||||
*rcv = Ecdsa
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyAlgorithm`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
58
internal/orm/keycurve/KeyCurve.pkl.go
Normal file
58
internal/orm/keycurve/KeyCurve.pkl.go
Normal file
@ -0,0 +1,58 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keycurve
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyCurve string
|
||||
|
||||
const (
|
||||
P256 KeyCurve = "p256"
|
||||
P384 KeyCurve = "p384"
|
||||
P521 KeyCurve = "p521"
|
||||
X25519 KeyCurve = "x25519"
|
||||
X448 KeyCurve = "x448"
|
||||
Ed25519 KeyCurve = "ed25519"
|
||||
Ed448 KeyCurve = "ed448"
|
||||
Secp256k1 KeyCurve = "secp256k1"
|
||||
Bls12381 KeyCurve = "bls12381"
|
||||
Keccak256 KeyCurve = "keccak256"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyCurve
|
||||
func (rcv KeyCurve) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyCurve)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyCurve.
|
||||
func (rcv *KeyCurve) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "p256":
|
||||
*rcv = P256
|
||||
case "p384":
|
||||
*rcv = P384
|
||||
case "p521":
|
||||
*rcv = P521
|
||||
case "x25519":
|
||||
*rcv = X25519
|
||||
case "x448":
|
||||
*rcv = X448
|
||||
case "ed25519":
|
||||
*rcv = Ed25519
|
||||
case "ed448":
|
||||
*rcv = Ed448
|
||||
case "secp256k1":
|
||||
*rcv = Secp256k1
|
||||
case "bls12381":
|
||||
*rcv = Bls12381
|
||||
case "keccak256":
|
||||
*rcv = Keccak256
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyCurve`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
37
internal/orm/keyencoding/KeyEncoding.pkl.go
Normal file
37
internal/orm/keyencoding/KeyEncoding.pkl.go
Normal file
@ -0,0 +1,37 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keyencoding
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyEncoding string
|
||||
|
||||
const (
|
||||
Raw KeyEncoding = "raw"
|
||||
Hex KeyEncoding = "hex"
|
||||
Multibase KeyEncoding = "multibase"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyEncoding
|
||||
func (rcv KeyEncoding) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyEncoding)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyEncoding.
|
||||
func (rcv *KeyEncoding) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "raw":
|
||||
*rcv = Raw
|
||||
case "hex":
|
||||
*rcv = Hex
|
||||
case "multibase":
|
||||
*rcv = Multibase
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyEncoding`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
40
internal/orm/keyrole/KeyRole.pkl.go
Normal file
40
internal/orm/keyrole/KeyRole.pkl.go
Normal file
@ -0,0 +1,40 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keyrole
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyRole string
|
||||
|
||||
const (
|
||||
Authentication KeyRole = "authentication"
|
||||
Assertion KeyRole = "assertion"
|
||||
Delegation KeyRole = "delegation"
|
||||
Invocation KeyRole = "invocation"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyRole
|
||||
func (rcv KeyRole) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyRole)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyRole.
|
||||
func (rcv *KeyRole) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "authentication":
|
||||
*rcv = Authentication
|
||||
case "assertion":
|
||||
*rcv = Assertion
|
||||
case "delegation":
|
||||
*rcv = Delegation
|
||||
case "invocation":
|
||||
*rcv = Invocation
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyRole`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
34
internal/orm/keysharerole/KeyShareRole.pkl.go
Normal file
34
internal/orm/keysharerole/KeyShareRole.pkl.go
Normal file
@ -0,0 +1,34 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keysharerole
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyShareRole string
|
||||
|
||||
const (
|
||||
User KeyShareRole = "user"
|
||||
Validator KeyShareRole = "validator"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyShareRole
|
||||
func (rcv KeyShareRole) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyShareRole)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyShareRole.
|
||||
func (rcv *KeyShareRole) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "user":
|
||||
*rcv = User
|
||||
case "validator":
|
||||
*rcv = Validator
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyShareRole`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
55
internal/orm/keytype/KeyType.pkl.go
Normal file
55
internal/orm/keytype/KeyType.pkl.go
Normal file
@ -0,0 +1,55 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package keytype
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type KeyType string
|
||||
|
||||
const (
|
||||
Octet KeyType = "octet"
|
||||
Elliptic KeyType = "elliptic"
|
||||
Rsa KeyType = "rsa"
|
||||
Symmetric KeyType = "symmetric"
|
||||
Hmac KeyType = "hmac"
|
||||
Mpc KeyType = "mpc"
|
||||
Zk KeyType = "zk"
|
||||
Webauthn KeyType = "webauthn"
|
||||
Bip32 KeyType = "bip32"
|
||||
)
|
||||
|
||||
// String returns the string representation of KeyType
|
||||
func (rcv KeyType) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(KeyType)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for KeyType.
|
||||
func (rcv *KeyType) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "octet":
|
||||
*rcv = Octet
|
||||
case "elliptic":
|
||||
*rcv = Elliptic
|
||||
case "rsa":
|
||||
*rcv = Rsa
|
||||
case "symmetric":
|
||||
*rcv = Symmetric
|
||||
case "hmac":
|
||||
*rcv = Hmac
|
||||
case "mpc":
|
||||
*rcv = Mpc
|
||||
case "zk":
|
||||
*rcv = Zk
|
||||
case "webauthn":
|
||||
*rcv = Webauthn
|
||||
case "bip32":
|
||||
*rcv = Bip32
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid KeyType`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
46
internal/orm/permissiongrant/PermissionGrant.pkl.go
Normal file
46
internal/orm/permissiongrant/PermissionGrant.pkl.go
Normal file
@ -0,0 +1,46 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package permissiongrant
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type PermissionGrant string
|
||||
|
||||
const (
|
||||
None PermissionGrant = "none"
|
||||
Read PermissionGrant = "read"
|
||||
Write PermissionGrant = "write"
|
||||
Verify PermissionGrant = "verify"
|
||||
Broadcast PermissionGrant = "broadcast"
|
||||
Admin PermissionGrant = "admin"
|
||||
)
|
||||
|
||||
// String returns the string representation of PermissionGrant
|
||||
func (rcv PermissionGrant) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(PermissionGrant)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for PermissionGrant.
|
||||
func (rcv *PermissionGrant) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "none":
|
||||
*rcv = None
|
||||
case "read":
|
||||
*rcv = Read
|
||||
case "write":
|
||||
*rcv = Write
|
||||
case "verify":
|
||||
*rcv = Verify
|
||||
case "broadcast":
|
||||
*rcv = Broadcast
|
||||
case "admin":
|
||||
*rcv = Admin
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid PermissionGrant`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
49
internal/orm/permissionscope/PermissionScope.pkl.go
Normal file
49
internal/orm/permissionscope/PermissionScope.pkl.go
Normal file
@ -0,0 +1,49 @@
|
||||
// Code generated from Pkl module `orm`. DO NOT EDIT.
|
||||
package permissionscope
|
||||
|
||||
import (
|
||||
"encoding"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type PermissionScope string
|
||||
|
||||
const (
|
||||
Profile PermissionScope = "profile"
|
||||
Metadata PermissionScope = "metadata"
|
||||
Permissions PermissionScope = "permissions"
|
||||
Wallets PermissionScope = "wallets"
|
||||
Transactions PermissionScope = "transactions"
|
||||
User PermissionScope = "user"
|
||||
Validator PermissionScope = "validator"
|
||||
)
|
||||
|
||||
// String returns the string representation of PermissionScope
|
||||
func (rcv PermissionScope) String() string {
|
||||
return string(rcv)
|
||||
}
|
||||
|
||||
var _ encoding.BinaryUnmarshaler = new(PermissionScope)
|
||||
|
||||
// UnmarshalBinary implements encoding.BinaryUnmarshaler for PermissionScope.
|
||||
func (rcv *PermissionScope) UnmarshalBinary(data []byte) error {
|
||||
switch str := string(data); str {
|
||||
case "profile":
|
||||
*rcv = Profile
|
||||
case "metadata":
|
||||
*rcv = Metadata
|
||||
case "permissions":
|
||||
*rcv = Permissions
|
||||
case "wallets":
|
||||
*rcv = Wallets
|
||||
case "transactions":
|
||||
*rcv = Transactions
|
||||
case "user":
|
||||
*rcv = User
|
||||
case "validator":
|
||||
*rcv = Validator
|
||||
default:
|
||||
return fmt.Errorf(`illegal: "%s" is not a valid PermissionScope`, str)
|
||||
}
|
||||
return nil
|
||||
}
|
26
internal/orm/publickey.go
Normal file
26
internal/orm/publickey.go
Normal file
@ -0,0 +1,26 @@
|
||||
package orm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-webauthn/webauthn/protocol/webauthncose"
|
||||
)
|
||||
|
||||
// ExtractWebAuthnPublicKey parses the raw public key bytes and returns a JWK representation
|
||||
func ExtractWebAuthnPublicKey(keyBytes []byte) (*JWK, error) {
|
||||
key, err := webauthncose.ParsePublicKey(keyBytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse public key: %w", err)
|
||||
}
|
||||
|
||||
switch k := key.(type) {
|
||||
case *webauthncose.EC2PublicKeyData:
|
||||
return FormatEC2PublicKey(k)
|
||||
case *webauthncose.RSAPublicKeyData:
|
||||
return FormatRSAPublicKey(k)
|
||||
case *webauthncose.OKPPublicKeyData:
|
||||
return FormatOKPPublicKey(k)
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported key type")
|
||||
}
|
||||
}
|
6
internal/orm/transactions/Msg.pkl.go
Normal file
6
internal/orm/transactions/Msg.pkl.go
Normal file
@ -0,0 +1,6 @@
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
type Msg interface {
|
||||
GetTypeUrl() string
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
type MsgGovVote interface {
|
||||
Msg
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
type MsgGroupVote interface {
|
||||
Msg
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
import "github.com/apple/pkl-go/pkl"
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated from Pkl module `txns`. DO NOT EDIT.
|
||||
package txns
|
||||
// Code generated from Pkl module `transactions`. DO NOT EDIT.
|
||||
package transactions
|
||||
|
||||
// Base class for all proposals
|
||||
type Proposal struct {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user