diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index daf54b777..8a7d52c0b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,11 +5,13 @@ WORKDIR /code USER root:root RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code USER ${DEVBOX_USER}:${DEVBOX_USER} + +# Copy devbox configuration files COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock - - RUN devbox run -- echo "Installed Packages." - RUN devbox shellenv --init-hook >> ~/.profile + + + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 705e87a92..b7b194219 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,11 +4,6 @@ "dockerfile": "./Dockerfile", "context": ".." }, - "features": { - "ghcr.io/devcontainers/features/sshd:1": { - "version": "latest" - } - }, "customizations": { "vscode": { "settings": {}, @@ -17,5 +12,78 @@ ] } }, - "remoteUser": "devbox" -} + "remoteUser": "devbox", + "forwardPorts": [ + 1317, + 26657, + 9090, + 3000, + 80, + 5000 + ], + "portsAttributes": { + "1317": { + "label": "sonr-api", + "onAutoForward": "notify" + }, + "26657": { + "label": "sonr-rpc", + "onAutoForward": "notify" + }, + "9090": { + "label": "sonr-grpc", + "onAutoForward": "silent" + }, + "3000": { + "label": "hway-frontend", + "onAutoForward": "silent" + }, + "80": { + "label": "ipfs-gateway", + "onAutoForward": "silent" + }, + "5000": { + "label": "ipfs-api", + "onAutoForward": "silent" + } + }, + "features": { + "ghcr.io/michidk/devcontainers-features/bun:1": { + "version": "latest" + }, + "ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh:0": { + "version": "latest" + }, + "ghcr.io/guiyomh/features/golangci-lint:0": { + "version": "latest" + }, + "ghcr.io/meaningful-ooo/devcontainer-features/homebrew:2": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/github-cli:1": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/go:1": { + "version": "latest", + "go": "1.23" + }, + "ghcr.io/devcontainers/features/rust:1": { + "version": "latest", + "rust": "1.73" + }, + "ghcr.io/jpawlowski/devcontainer-features/codespaces-dotfiles:1": { + "version": "latest" + }, + "ghcr.io/duduribeiro/devcontainer-features/neovim:1": { + "version": "latest" + }, + "ghcr.io/dlouwers/devcontainer-features/devbox:1": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/sshd:1": { + "version": "latest" + } + } diff --git a/.gitignore b/.gitignore index cc5d07498..ca18b3888 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Binaries .data +schemas *.exe *.exe~ *.dll diff --git a/Makefile b/Makefile index 37d9ab10d..489b87c1b 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,7 @@ endif install: go.sum go install -mod=readonly $(BUILD_FLAGS) ./cmd/sonrd + go install -mod=readonly $(BUILD_FLAGS) ./cmd/hway ######################################## ### Tools & dependencies @@ -294,15 +295,17 @@ sh-testnet: mod-tidy ############################################################################### ### generation ### ############################################################################### -.PHONY: pkl-gen styles-gen templ-gen +.PHONY: pkl-gen tailwind-gen templ-gen pkl-gen: go install github.com/apple/pkl-go/cmd/pkl-gen-go@latest - pkl-gen-go pkl/base.types/Ctx.pkl - pkl-gen-go pkl/base.types/DWN.pkl - pkl-gen-go pkl/base.types/ORM.pkl + pkl-gen-go pkl/sonr.motr/ATN.pkl + pkl-gen-go pkl/sonr.hway/Ctx.pkl + pkl-gen-go pkl/sonr.hway/Gate.pkl + pkl-gen-go pkl/sonr.motr/DWN.pkl + pkl-gen-go pkl/sonr.hway/ORM.pkl -styles-gen: +tailwind-gen: sh ./scripts/tailwindgen.sh templ-gen: diff --git a/api/did/v1/genesis.pulsar.go b/api/did/v1/genesis.pulsar.go index ac24273bc..0047ed7e1 100644 --- a/api/did/v1/genesis.pulsar.go +++ b/api/did/v1/genesis.pulsar.go @@ -1553,6 +1553,362 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } } +var ( + md_Params protoreflect.MessageDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_Params = File_did_v1_genesis_proto.Messages().ByName("Params") +} + +var _ protoreflect.Message = (*fastReflection_Params)(nil) + +type fastReflection_Params Params + +func (x *Params) ProtoReflect() protoreflect.Message { + return (*fastReflection_Params)(x) +} + +func (x *Params) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[2] + 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_Params_messageType fastReflection_Params_messageType +var _ protoreflect.MessageType = fastReflection_Params_messageType{} + +type fastReflection_Params_messageType struct{} + +func (x fastReflection_Params_messageType) Zero() protoreflect.Message { + return (*fastReflection_Params)(nil) +} +func (x fastReflection_Params_messageType) New() protoreflect.Message { + return new(fastReflection_Params) +} +func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { + return md_Params +} + +// 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_Params) Type() protoreflect.MessageType { + return _fastReflection_Params_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Params) New() protoreflect.Message { + return new(fastReflection_Params) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { + return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_Params) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) + } + panic(fmt.Errorf("message did.v1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) + } + panic(fmt.Errorf("message did.v1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) + } + panic(fmt.Errorf("message did.v1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) + } + panic(fmt.Errorf("message did.v1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) + } + panic(fmt.Errorf("message did.v1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) + } + panic(fmt.Errorf("message did.v1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Params) + 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.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().(*Params) + 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 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().(*Params) + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -1687,45 +2043,73 @@ func (x *Document) GetService() []string { return nil } +// Params defines the set of module parameters. +type Params struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *Params) Reset() { + *x = Params{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Params) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Params) ProtoMessage() {} + +// Deprecated: Use Params.ProtoReflect.Descriptor instead. +func (*Params) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{2} +} + var File_did_v1_genesis_proto protoreflect.FileDescriptor var file_did_v1_genesis_proto_rawDesc = []byte{ 0x0a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 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, 0x3c, 0x0a, 0x0c, - 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 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, 0x42, 0x04, 0xc8, 0xde, - 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x08, 0x44, - 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, - 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, - 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x7c, - 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 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, + 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, + 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 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, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x91, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, + 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, + 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, + 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x21, 0x0a, 0x06, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, + 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x7c, 0x0a, 0x0a, + 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 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 ( @@ -1740,7 +2124,7 @@ func file_did_v1_genesis_proto_rawDescGZIP() []byte { return file_did_v1_genesis_proto_rawDescData } -var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_did_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: did.v1.GenesisState (*Document)(nil), // 1: did.v1.Document @@ -1760,7 +2144,6 @@ func file_did_v1_genesis_proto_init() { if File_did_v1_genesis_proto != nil { return } - file_did_v1_params_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { @@ -1786,6 +2169,18 @@ func file_did_v1_genesis_proto_init() { return nil } } + file_did_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Params); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1793,7 +2188,7 @@ func file_did_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/params.pulsar.go b/api/did/v1/params.pulsar.go deleted file mode 100644 index e3667ff35..000000000 --- a/api/did/v1/params.pulsar.go +++ /dev/null @@ -1,1750 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package didv1 - -import ( - _ "cosmossdk.io/api/amino" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sort "sort" - sync "sync" -) - -var _ protoreflect.Map = (*_Params_2_map)(nil) - -type _Params_2_map struct { - m *map[string]*KeyInfo -} - -func (x *_Params_2_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Params_2_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.ValueOfMessage(v.ProtoReflect()) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Params_2_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 *_Params_2_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Params_2_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.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Params_2_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.Message() - concreteValue := valueUnwrapped.Interface().(*KeyInfo) - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Params_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if ok { - return protoreflect.ValueOfMessage(v.ProtoReflect()) - } - newValue := new(KeyInfo) - (*x.m)[concreteKey] = newValue - return protoreflect.ValueOfMessage(newValue.ProtoReflect()) -} - -func (x *_Params_2_map) NewValue() protoreflect.Value { - v := new(KeyInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Params_2_map) IsValid() bool { - return x.m != nil -} - -var _ protoreflect.List = (*_Params_4_list)(nil) - -type _Params_4_list struct { - list *[]string -} - -func (x *_Params_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Params_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Params_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Params_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Params_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Params at list field AttestationFormats as it is not of Message kind")) -} - -func (x *_Params_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Params_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Params_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_allowed_public_keys protoreflect.FieldDescriptor - fd_Params_conveyance_preference protoreflect.FieldDescriptor - fd_Params_attestation_formats protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_params_proto_init() - md_Params = File_did_v1_params_proto.Messages().ByName("Params") - fd_Params_allowed_public_keys = md_Params.Fields().ByName("allowed_public_keys") - fd_Params_conveyance_preference = md_Params.Fields().ByName("conveyance_preference") - fd_Params_attestation_formats = md_Params.Fields().ByName("attestation_formats") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_params_proto_msgTypes[0] - 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_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// 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_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AllowedPublicKeys) != 0 { - value := protoreflect.ValueOfMap(&_Params_2_map{m: &x.AllowedPublicKeys}) - if !f(fd_Params_allowed_public_keys, value) { - return - } - } - if x.ConveyancePreference != "" { - value := protoreflect.ValueOfString(x.ConveyancePreference) - if !f(fd_Params_conveyance_preference, value) { - return - } - } - if len(x.AttestationFormats) != 0 { - value := protoreflect.ValueOfList(&_Params_4_list{list: &x.AttestationFormats}) - if !f(fd_Params_attestation_formats, 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_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Params.allowed_public_keys": - return len(x.AllowedPublicKeys) != 0 - case "did.v1.Params.conveyance_preference": - return x.ConveyancePreference != "" - case "did.v1.Params.attestation_formats": - return len(x.AttestationFormats) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) - } - panic(fmt.Errorf("message did.v1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Params.allowed_public_keys": - x.AllowedPublicKeys = nil - case "did.v1.Params.conveyance_preference": - x.ConveyancePreference = "" - case "did.v1.Params.attestation_formats": - x.AttestationFormats = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) - } - panic(fmt.Errorf("message did.v1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Params.allowed_public_keys": - if len(x.AllowedPublicKeys) == 0 { - return protoreflect.ValueOfMap(&_Params_2_map{}) - } - mapValue := &_Params_2_map{m: &x.AllowedPublicKeys} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Params.conveyance_preference": - value := x.ConveyancePreference - return protoreflect.ValueOfString(value) - case "did.v1.Params.attestation_formats": - if len(x.AttestationFormats) == 0 { - return protoreflect.ValueOfList(&_Params_4_list{}) - } - listValue := &_Params_4_list{list: &x.AttestationFormats} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) - } - panic(fmt.Errorf("message did.v1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Params.allowed_public_keys": - mv := value.Map() - cmv := mv.(*_Params_2_map) - x.AllowedPublicKeys = *cmv.m - case "did.v1.Params.conveyance_preference": - x.ConveyancePreference = value.Interface().(string) - case "did.v1.Params.attestation_formats": - lv := value.List() - clv := lv.(*_Params_4_list) - x.AttestationFormats = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) - } - panic(fmt.Errorf("message did.v1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Params.allowed_public_keys": - if x.AllowedPublicKeys == nil { - x.AllowedPublicKeys = make(map[string]*KeyInfo) - } - value := &_Params_2_map{m: &x.AllowedPublicKeys} - return protoreflect.ValueOfMap(value) - case "did.v1.Params.attestation_formats": - if x.AttestationFormats == nil { - x.AttestationFormats = []string{} - } - value := &_Params_4_list{list: &x.AttestationFormats} - return protoreflect.ValueOfList(value) - case "did.v1.Params.conveyance_preference": - panic(fmt.Errorf("field conveyance_preference of message did.v1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) - } - panic(fmt.Errorf("message did.v1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Params.allowed_public_keys": - m := make(map[string]*KeyInfo) - return protoreflect.ValueOfMap(&_Params_2_map{m: &m}) - case "did.v1.Params.conveyance_preference": - return protoreflect.ValueOfString("") - case "did.v1.Params.attestation_formats": - list := []string{} - return protoreflect.ValueOfList(&_Params_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) - } - panic(fmt.Errorf("message did.v1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.AllowedPublicKeys) > 0 { - SiZeMaP := func(k string, v *KeyInfo) { - l := 0 - if v != nil { - l = options.Size(v) - } - l += 1 + runtime.Sov(uint64(l)) - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.AllowedPublicKeys)) - for k := range x.AllowedPublicKeys { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.AllowedPublicKeys[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.AllowedPublicKeys { - SiZeMaP(k, v) - } - } - } - l = len(x.ConveyancePreference) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.AttestationFormats) > 0 { - for _, s := range x.AttestationFormats { - l = len(s) - 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().(*Params) - 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.AttestationFormats) > 0 { - for iNdEx := len(x.AttestationFormats) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.AttestationFormats[iNdEx]) - copy(dAtA[i:], x.AttestationFormats[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationFormats[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.ConveyancePreference) > 0 { - i -= len(x.ConveyancePreference) - copy(dAtA[i:], x.ConveyancePreference) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConveyancePreference))) - i-- - dAtA[i] = 0x1a - } - if len(x.AllowedPublicKeys) > 0 { - MaRsHaLmAp := func(k string, v *KeyInfo) (protoiface.MarshalOutput, error) { - baseI := i - encoded, err := options.Marshal(v) - 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 - 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] = 0x12 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForAllowedPublicKeys := make([]string, 0, len(x.AllowedPublicKeys)) - for k := range x.AllowedPublicKeys { - keysForAllowedPublicKeys = append(keysForAllowedPublicKeys, string(k)) - } - sort.Slice(keysForAllowedPublicKeys, func(i, j int) bool { - return keysForAllowedPublicKeys[i] < keysForAllowedPublicKeys[j] - }) - for iNdEx := len(keysForAllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { - v := x.AllowedPublicKeys[string(keysForAllowedPublicKeys[iNdEx])] - out, err := MaRsHaLmAp(keysForAllowedPublicKeys[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.AllowedPublicKeys { - v := x.AllowedPublicKeys[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - 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().(*Params) - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedPublicKeys", 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.AllowedPublicKeys == nil { - x.AllowedPublicKeys = make(map[string]*KeyInfo) - } - var mapkey string - var mapvalue *KeyInfo - 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 mapmsglen 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++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postmsgIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = &KeyInfo{} - if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postmsgIndex - } 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.AllowedPublicKeys[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", 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.ConveyancePreference = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", 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.AttestationFormats = append(x.AttestationFormats, 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_KeyInfo protoreflect.MessageDescriptor - fd_KeyInfo_role protoreflect.FieldDescriptor - fd_KeyInfo_algorithm protoreflect.FieldDescriptor - fd_KeyInfo_encoding protoreflect.FieldDescriptor - fd_KeyInfo_curve protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_params_proto_init() - md_KeyInfo = File_did_v1_params_proto.Messages().ByName("KeyInfo") - fd_KeyInfo_role = md_KeyInfo.Fields().ByName("role") - fd_KeyInfo_algorithm = md_KeyInfo.Fields().ByName("algorithm") - fd_KeyInfo_encoding = md_KeyInfo.Fields().ByName("encoding") - fd_KeyInfo_curve = md_KeyInfo.Fields().ByName("curve") -} - -var _ protoreflect.Message = (*fastReflection_KeyInfo)(nil) - -type fastReflection_KeyInfo KeyInfo - -func (x *KeyInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_KeyInfo)(x) -} - -func (x *KeyInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_params_proto_msgTypes[1] - 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_KeyInfo_messageType fastReflection_KeyInfo_messageType -var _ protoreflect.MessageType = fastReflection_KeyInfo_messageType{} - -type fastReflection_KeyInfo_messageType struct{} - -func (x fastReflection_KeyInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_KeyInfo)(nil) -} -func (x fastReflection_KeyInfo_messageType) New() protoreflect.Message { - return new(fastReflection_KeyInfo) -} -func (x fastReflection_KeyInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_KeyInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_KeyInfo) Descriptor() protoreflect.MessageDescriptor { - return md_KeyInfo -} - -// 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_KeyInfo) Type() protoreflect.MessageType { - return _fastReflection_KeyInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_KeyInfo) New() protoreflect.Message { - return new(fastReflection_KeyInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_KeyInfo) Interface() protoreflect.ProtoMessage { - return (*KeyInfo)(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_KeyInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Role != "" { - value := protoreflect.ValueOfString(x.Role) - if !f(fd_KeyInfo_role, value) { - return - } - } - if x.Algorithm != "" { - value := protoreflect.ValueOfString(x.Algorithm) - if !f(fd_KeyInfo_algorithm, value) { - return - } - } - if x.Encoding != "" { - value := protoreflect.ValueOfString(x.Encoding) - if !f(fd_KeyInfo_encoding, value) { - return - } - } - if x.Curve != "" { - value := protoreflect.ValueOfString(x.Curve) - if !f(fd_KeyInfo_curve, 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_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.KeyInfo.role": - return x.Role != "" - case "did.v1.KeyInfo.algorithm": - return x.Algorithm != "" - case "did.v1.KeyInfo.encoding": - return x.Encoding != "" - case "did.v1.KeyInfo.curve": - return x.Curve != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) - } - panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.KeyInfo.role": - x.Role = "" - case "did.v1.KeyInfo.algorithm": - x.Algorithm = "" - case "did.v1.KeyInfo.encoding": - x.Encoding = "" - case "did.v1.KeyInfo.curve": - x.Curve = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) - } - panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.KeyInfo.role": - value := x.Role - return protoreflect.ValueOfString(value) - case "did.v1.KeyInfo.algorithm": - value := x.Algorithm - return protoreflect.ValueOfString(value) - case "did.v1.KeyInfo.encoding": - value := x.Encoding - return protoreflect.ValueOfString(value) - case "did.v1.KeyInfo.curve": - value := x.Curve - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) - } - panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.KeyInfo.role": - x.Role = value.Interface().(string) - case "did.v1.KeyInfo.algorithm": - x.Algorithm = value.Interface().(string) - case "did.v1.KeyInfo.encoding": - x.Encoding = value.Interface().(string) - case "did.v1.KeyInfo.curve": - x.Curve = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) - } - panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.KeyInfo.role": - panic(fmt.Errorf("field role of message did.v1.KeyInfo is not mutable")) - case "did.v1.KeyInfo.algorithm": - panic(fmt.Errorf("field algorithm of message did.v1.KeyInfo is not mutable")) - case "did.v1.KeyInfo.encoding": - panic(fmt.Errorf("field encoding of message did.v1.KeyInfo is not mutable")) - case "did.v1.KeyInfo.curve": - panic(fmt.Errorf("field curve of message did.v1.KeyInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) - } - panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.KeyInfo.role": - return protoreflect.ValueOfString("") - case "did.v1.KeyInfo.algorithm": - return protoreflect.ValueOfString("") - case "did.v1.KeyInfo.encoding": - return protoreflect.ValueOfString("") - case "did.v1.KeyInfo.curve": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) - } - panic(fmt.Errorf("message did.v1.KeyInfo 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_KeyInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.KeyInfo", 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_KeyInfo) 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_KeyInfo) 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_KeyInfo) 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_KeyInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*KeyInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Role) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Algorithm) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Encoding) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Curve) - 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().(*KeyInfo) - 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.Curve) > 0 { - i -= len(x.Curve) - copy(dAtA[i:], x.Curve) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Curve))) - i-- - dAtA[i] = 0x22 - } - if len(x.Encoding) > 0 { - i -= len(x.Encoding) - copy(dAtA[i:], x.Encoding) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Encoding))) - i-- - dAtA[i] = 0x1a - } - if len(x.Algorithm) > 0 { - i -= len(x.Algorithm) - copy(dAtA[i:], x.Algorithm) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Algorithm))) - i-- - dAtA[i] = 0x12 - } - if len(x.Role) > 0 { - i -= len(x.Role) - copy(dAtA[i:], x.Role) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role))) - i-- - dAtA[i] = 0xa - } - 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().(*KeyInfo) - 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: KeyInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", 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.Role = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", 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.Algorithm = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoding", 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.Encoding = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Curve", 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.Curve = 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, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: did/v1/params.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Params defines the set of module parameters. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Whitelisted Key Types - AllowedPublicKeys map[string]*KeyInfo `protobuf:"bytes,2,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // ConveyancePreference defines the conveyance preference - ConveyancePreference string `protobuf:"bytes,3,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` - // AttestationFormats defines the attestation formats - AttestationFormats []string `protobuf:"bytes,4,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_did_v1_params_proto_rawDescGZIP(), []int{0} -} - -func (x *Params) GetAllowedPublicKeys() map[string]*KeyInfo { - if x != nil { - return x.AllowedPublicKeys - } - return nil -} - -func (x *Params) GetConveyancePreference() string { - if x != nil { - return x.ConveyancePreference - } - return "" -} - -func (x *Params) GetAttestationFormats() []string { - if x != nil { - return x.AttestationFormats - } - return nil -} - -// KeyInfo defines information for accepted PubKey types -type KeyInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // e.g., "ES256", "EdDSA", "ES256K" - Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` // e.g., "hex", "base64", "multibase" - Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` // e.g., "P256", "P384", "P521", "X25519", "X448", -} - -func (x *KeyInfo) Reset() { - *x = KeyInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_params_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyInfo) ProtoMessage() {} - -// Deprecated: Use KeyInfo.ProtoReflect.Descriptor instead. -func (*KeyInfo) Descriptor() ([]byte, []int) { - return file_did_v1_params_proto_rawDescGZIP(), []int{1} -} - -func (x *KeyInfo) GetRole() string { - if x != nil { - return x.Role - } - return "" -} - -func (x *KeyInfo) GetAlgorithm() string { - if x != nil { - return x.Algorithm - } - return "" -} - -func (x *KeyInfo) GetEncoding() string { - if x != nil { - return x.Encoding - } - return "" -} - -func (x *KeyInfo) GetCurve() string { - if x != nil { - return x.Curve - } - return "" -} - -var File_did_v1_params_proto protoreflect.FileDescriptor - -var file_did_v1_params_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, - 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 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, 0xb5, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x55, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x41, - 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x76, - 0x65, 0x79, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x61, - 0x6e, 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x0a, - 0x13, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x61, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x1a, 0x55, - 0x0a, 0x16, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, - 0x65, 0x79, 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, 0x25, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, - 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x6d, - 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x1c, 0x0a, - 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x42, 0x7b, 0x0a, - 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 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 ( - file_did_v1_params_proto_rawDescOnce sync.Once - file_did_v1_params_proto_rawDescData = file_did_v1_params_proto_rawDesc -) - -func file_did_v1_params_proto_rawDescGZIP() []byte { - file_did_v1_params_proto_rawDescOnce.Do(func() { - file_did_v1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_params_proto_rawDescData) - }) - return file_did_v1_params_proto_rawDescData -} - -var file_did_v1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_did_v1_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: did.v1.Params - (*KeyInfo)(nil), // 1: did.v1.KeyInfo - nil, // 2: did.v1.Params.AllowedPublicKeysEntry -} -var file_did_v1_params_proto_depIdxs = []int32{ - 2, // 0: did.v1.Params.allowed_public_keys:type_name -> did.v1.Params.AllowedPublicKeysEntry - 1, // 1: did.v1.Params.AllowedPublicKeysEntry.value:type_name -> did.v1.KeyInfo - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_did_v1_params_proto_init() } -func file_did_v1_params_proto_init() { - if File_did_v1_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_did_v1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_did_v1_params_proto_goTypes, - DependencyIndexes: file_did_v1_params_proto_depIdxs, - MessageInfos: file_did_v1_params_proto_msgTypes, - }.Build() - File_did_v1_params_proto = out.File - file_did_v1_params_proto_rawDesc = nil - file_did_v1_params_proto_goTypes = nil - file_did_v1_params_proto_depIdxs = nil -} diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index fea2ff863..386703491 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -4112,74 +4112,73 @@ 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, 0x70, 0x61, 0x72, 0x61, 0x6d, - 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, 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, 0x7e, 0x0a, 0x10, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 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, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x31, 0x0a, 0x11, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, - 0x9e, 0x01, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 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, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x22, 0x2b, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x32, 0x93, 0x02, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x53, 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, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x64, - 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x54, 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, 0x15, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x69, - 0x64, 0x7d, 0x12, 0x5f, 0x0a, 0x06, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, - 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x79, 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, + 0x65, 0x74, 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, 0x7e, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x69, 0x67, 0x6e, 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, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x31, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x12, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 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, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x2b, 0x0a, 0x13, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x32, 0x93, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x53, 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, + 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x54, 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, 0x15, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0f, 0x12, 0x0d, + 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x5f, 0x0a, + 0x06, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x14, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, + 0x31, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 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 ( @@ -4228,7 +4227,6 @@ func file_did_v1_query_proto_init() { return } file_did_v1_genesis_proto_init() - file_did_v1_params_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryRequest); i { diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index e8fdc7d63..d74584bec 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -7128,149 +7128,148 @@ 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, 0x70, 0x61, 0x72, 0x61, - 0x6d, 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, 0xe6, - 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 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, 0xe6, 0x01, 0x0a, 0x15, 0x4d, 0x73, + 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 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, 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, 0x1c, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, + 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, + 0xbc, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 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, 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, 0x1c, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, + 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, + 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, + 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x46, + 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 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, 0x22, 0xfd, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, + 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 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, 0x0c, 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, 0x49, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, + 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 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, 0x1c, 0x0a, 0x09, - 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, - 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, - 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x4c, 0x69, - 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 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, 0x22, 0xbc, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, - 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 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, 0x1c, 0x0a, - 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6d, - 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x22, 0x46, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, - 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0xfd, 0x01, 0x0a, 0x0c, - 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x2e, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, - 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x3b, 0x0a, - 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x0c, 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, 0x49, 0x0a, 0x14, 0x4d, - 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 0x17, 0x0a, - 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x6e, - 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 0x23, 0x0a, 0x0d, 0x61, 0x73, 0x73, 0x65, 0x72, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, - 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, - 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, - 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0xba, - 0x01, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x44, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, - 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x1f, 0x4d, - 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 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, 0x32, 0xf5, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x3f, 0x0a, - 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, - 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, - 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, - 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x4c, + 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, + 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, + 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, + 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0xba, 0x01, 0x0a, 0x17, 0x4d, 0x73, + 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, + 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, - 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, + 0x6e, 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, 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, + 0x32, 0xf5, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x3f, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x54, 0x78, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x1a, 0x1c, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, + 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, + 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x25, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, + 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x14, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x55, 0x6e, 0x6c, 0x69, 0x6e, - 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, - 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x14, 0x55, 0x6e, - 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0x27, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 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, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 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 ( @@ -7330,7 +7329,6 @@ func file_did_v1_tx_proto_init() { return } file_did_v1_genesis_proto_init() - file_did_v1_params_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgLinkAuthentication); i { diff --git a/api/dwn/v1/genesis.pulsar.go b/api/dwn/v1/genesis.pulsar.go index cb51912b1..c4a280a5e 100644 --- a/api/dwn/v1/genesis.pulsar.go +++ b/api/dwn/v1/genesis.pulsar.go @@ -11,6 +11,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" + sort "sort" sync "sync" ) @@ -449,19 +450,205 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.Map = (*_Params_1_map)(nil) + +type _Params_1_map struct { + m *map[string]*KeyInfo +} + +func (x *_Params_1_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Params_1_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.ValueOfMessage(v.ProtoReflect()) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Params_1_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 *_Params_1_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Params_1_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.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_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.Message() + concreteValue := valueUnwrapped.Interface().(*KeyInfo) + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Params_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if ok { + return protoreflect.ValueOfMessage(v.ProtoReflect()) + } + newValue := new(KeyInfo) + (*x.m)[concreteKey] = newValue + return protoreflect.ValueOfMessage(newValue.ProtoReflect()) +} + +func (x *_Params_1_map) NewValue() protoreflect.Value { + v := new(KeyInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_map) IsValid() bool { + return x.m != nil +} + +var _ protoreflect.List = (*_Params_3_list)(nil) + +type _Params_3_list struct { + list *[]string +} + +func (x *_Params_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Params_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Params_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Params at list field AttestationFormats as it is not of Message kind")) +} + +func (x *_Params_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Params_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Params_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Params_5_list)(nil) + +type _Params_5_list struct { + list *[]string +} + +func (x *_Params_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Params_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Params_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Params at list field AllowedOperators as it is not of Message kind")) +} + +func (x *_Params_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Params_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Params_5_list) IsValid() bool { + return x.list != nil +} + var ( - md_Params protoreflect.MessageDescriptor - fd_Params_ipfs_active protoreflect.FieldDescriptor - fd_Params_local_registration_enabled protoreflect.FieldDescriptor - fd_Params_schema protoreflect.FieldDescriptor + md_Params protoreflect.MessageDescriptor + fd_Params_allowed_public_keys protoreflect.FieldDescriptor + fd_Params_conveyance_preference protoreflect.FieldDescriptor + fd_Params_attestation_formats protoreflect.FieldDescriptor + fd_Params_schema protoreflect.FieldDescriptor + fd_Params_allowed_operators protoreflect.FieldDescriptor ) func init() { file_dwn_v1_genesis_proto_init() md_Params = File_dwn_v1_genesis_proto.Messages().ByName("Params") - fd_Params_ipfs_active = md_Params.Fields().ByName("ipfs_active") - fd_Params_local_registration_enabled = md_Params.Fields().ByName("local_registration_enabled") + fd_Params_allowed_public_keys = md_Params.Fields().ByName("allowed_public_keys") + fd_Params_conveyance_preference = md_Params.Fields().ByName("conveyance_preference") + fd_Params_attestation_formats = md_Params.Fields().ByName("attestation_formats") fd_Params_schema = md_Params.Fields().ByName("schema") + fd_Params_allowed_operators = md_Params.Fields().ByName("allowed_operators") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -529,15 +716,21 @@ func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.IpfsActive != false { - value := protoreflect.ValueOfBool(x.IpfsActive) - if !f(fd_Params_ipfs_active, value) { + if len(x.AllowedPublicKeys) != 0 { + value := protoreflect.ValueOfMap(&_Params_1_map{m: &x.AllowedPublicKeys}) + if !f(fd_Params_allowed_public_keys, value) { return } } - if x.LocalRegistrationEnabled != false { - value := protoreflect.ValueOfBool(x.LocalRegistrationEnabled) - if !f(fd_Params_local_registration_enabled, value) { + if x.ConveyancePreference != "" { + value := protoreflect.ValueOfString(x.ConveyancePreference) + if !f(fd_Params_conveyance_preference, value) { + return + } + } + if len(x.AttestationFormats) != 0 { + value := protoreflect.ValueOfList(&_Params_3_list{list: &x.AttestationFormats}) + if !f(fd_Params_attestation_formats, value) { return } } @@ -547,6 +740,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if len(x.AllowedOperators) != 0 { + value := protoreflect.ValueOfList(&_Params_5_list{list: &x.AllowedOperators}) + if !f(fd_Params_allowed_operators, value) { + return + } + } } // Has reports whether a field is populated. @@ -562,12 +761,16 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "dwn.v1.Params.ipfs_active": - return x.IpfsActive != false - case "dwn.v1.Params.local_registration_enabled": - return x.LocalRegistrationEnabled != false + case "dwn.v1.Params.allowed_public_keys": + return len(x.AllowedPublicKeys) != 0 + case "dwn.v1.Params.conveyance_preference": + return x.ConveyancePreference != "" + case "dwn.v1.Params.attestation_formats": + return len(x.AttestationFormats) != 0 case "dwn.v1.Params.schema": return x.Schema != nil + case "dwn.v1.Params.allowed_operators": + return len(x.AllowedOperators) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Params")) @@ -584,12 +787,16 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "dwn.v1.Params.ipfs_active": - x.IpfsActive = false - case "dwn.v1.Params.local_registration_enabled": - x.LocalRegistrationEnabled = false + case "dwn.v1.Params.allowed_public_keys": + x.AllowedPublicKeys = nil + case "dwn.v1.Params.conveyance_preference": + x.ConveyancePreference = "" + case "dwn.v1.Params.attestation_formats": + x.AttestationFormats = nil case "dwn.v1.Params.schema": x.Schema = nil + case "dwn.v1.Params.allowed_operators": + x.AllowedOperators = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Params")) @@ -606,15 +813,30 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "dwn.v1.Params.ipfs_active": - value := x.IpfsActive - return protoreflect.ValueOfBool(value) - case "dwn.v1.Params.local_registration_enabled": - value := x.LocalRegistrationEnabled - return protoreflect.ValueOfBool(value) + case "dwn.v1.Params.allowed_public_keys": + if len(x.AllowedPublicKeys) == 0 { + return protoreflect.ValueOfMap(&_Params_1_map{}) + } + mapValue := &_Params_1_map{m: &x.AllowedPublicKeys} + return protoreflect.ValueOfMap(mapValue) + case "dwn.v1.Params.conveyance_preference": + value := x.ConveyancePreference + return protoreflect.ValueOfString(value) + case "dwn.v1.Params.attestation_formats": + if len(x.AttestationFormats) == 0 { + return protoreflect.ValueOfList(&_Params_3_list{}) + } + listValue := &_Params_3_list{list: &x.AttestationFormats} + return protoreflect.ValueOfList(listValue) case "dwn.v1.Params.schema": value := x.Schema return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "dwn.v1.Params.allowed_operators": + if len(x.AllowedOperators) == 0 { + return protoreflect.ValueOfList(&_Params_5_list{}) + } + listValue := &_Params_5_list{list: &x.AllowedOperators} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Params")) @@ -635,12 +857,22 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "dwn.v1.Params.ipfs_active": - x.IpfsActive = value.Bool() - case "dwn.v1.Params.local_registration_enabled": - x.LocalRegistrationEnabled = value.Bool() + case "dwn.v1.Params.allowed_public_keys": + mv := value.Map() + cmv := mv.(*_Params_1_map) + x.AllowedPublicKeys = *cmv.m + case "dwn.v1.Params.conveyance_preference": + x.ConveyancePreference = value.Interface().(string) + case "dwn.v1.Params.attestation_formats": + lv := value.List() + clv := lv.(*_Params_3_list) + x.AttestationFormats = *clv.list case "dwn.v1.Params.schema": x.Schema = value.Message().Interface().(*Schema) + case "dwn.v1.Params.allowed_operators": + lv := value.List() + clv := lv.(*_Params_5_list) + x.AllowedOperators = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Params")) @@ -661,15 +893,31 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "dwn.v1.Params.allowed_public_keys": + if x.AllowedPublicKeys == nil { + x.AllowedPublicKeys = make(map[string]*KeyInfo) + } + value := &_Params_1_map{m: &x.AllowedPublicKeys} + return protoreflect.ValueOfMap(value) + case "dwn.v1.Params.attestation_formats": + if x.AttestationFormats == nil { + x.AttestationFormats = []string{} + } + value := &_Params_3_list{list: &x.AttestationFormats} + return protoreflect.ValueOfList(value) case "dwn.v1.Params.schema": if x.Schema == nil { x.Schema = new(Schema) } return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - case "dwn.v1.Params.ipfs_active": - panic(fmt.Errorf("field ipfs_active of message dwn.v1.Params is not mutable")) - case "dwn.v1.Params.local_registration_enabled": - panic(fmt.Errorf("field local_registration_enabled of message dwn.v1.Params is not mutable")) + case "dwn.v1.Params.allowed_operators": + if x.AllowedOperators == nil { + x.AllowedOperators = []string{} + } + value := &_Params_5_list{list: &x.AllowedOperators} + return protoreflect.ValueOfList(value) + case "dwn.v1.Params.conveyance_preference": + panic(fmt.Errorf("field conveyance_preference of message dwn.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Params")) @@ -683,13 +931,20 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "dwn.v1.Params.ipfs_active": - return protoreflect.ValueOfBool(false) - case "dwn.v1.Params.local_registration_enabled": - return protoreflect.ValueOfBool(false) + case "dwn.v1.Params.allowed_public_keys": + m := make(map[string]*KeyInfo) + return protoreflect.ValueOfMap(&_Params_1_map{m: &m}) + case "dwn.v1.Params.conveyance_preference": + return protoreflect.ValueOfString("") + case "dwn.v1.Params.attestation_formats": + list := []string{} + return protoreflect.ValueOfList(&_Params_3_list{list: &list}) case "dwn.v1.Params.schema": m := new(Schema) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "dwn.v1.Params.allowed_operators": + list := []string{} + return protoreflect.ValueOfList(&_Params_5_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Params")) @@ -759,16 +1014,52 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.IpfsActive { - n += 2 + if len(x.AllowedPublicKeys) > 0 { + SiZeMaP := func(k string, v *KeyInfo) { + l := 0 + if v != nil { + l = options.Size(v) + } + l += 1 + runtime.Sov(uint64(l)) + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.AllowedPublicKeys)) + for k := range x.AllowedPublicKeys { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.AllowedPublicKeys[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.AllowedPublicKeys { + SiZeMaP(k, v) + } + } } - if x.LocalRegistrationEnabled { - n += 2 + l = len(x.ConveyancePreference) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.AttestationFormats) > 0 { + for _, s := range x.AttestationFormats { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.Schema != nil { l = options.Size(x.Schema) n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.AllowedOperators) > 0 { + for _, s := range x.AllowedOperators { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -798,6 +1089,15 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.AllowedOperators) > 0 { + for iNdEx := len(x.AllowedOperators) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.AllowedOperators[iNdEx]) + copy(dAtA[i:], x.AllowedOperators[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AllowedOperators[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } if x.Schema != nil { encoded, err := options.Marshal(x.Schema) if err != nil { @@ -812,25 +1112,71 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if x.LocalRegistrationEnabled { - i-- - if x.LocalRegistrationEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(x.AttestationFormats) > 0 { + for iNdEx := len(x.AttestationFormats) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.AttestationFormats[iNdEx]) + copy(dAtA[i:], x.AttestationFormats[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationFormats[iNdEx]))) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x10 } - if x.IpfsActive { + if len(x.ConveyancePreference) > 0 { + i -= len(x.ConveyancePreference) + copy(dAtA[i:], x.ConveyancePreference) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ConveyancePreference))) i-- - if x.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0x12 + } + if len(x.AllowedPublicKeys) > 0 { + MaRsHaLmAp := func(k string, v *KeyInfo) (protoiface.MarshalOutput, error) { + baseI := i + encoded, err := options.Marshal(v) + 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 + 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] = 0xa + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForAllowedPublicKeys := make([]string, 0, len(x.AllowedPublicKeys)) + for k := range x.AllowedPublicKeys { + keysForAllowedPublicKeys = append(keysForAllowedPublicKeys, string(k)) + } + sort.Slice(keysForAllowedPublicKeys, func(i, j int) bool { + return keysForAllowedPublicKeys[i] < keysForAllowedPublicKeys[j] + }) + for iNdEx := len(keysForAllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { + v := x.AllowedPublicKeys[string(keysForAllowedPublicKeys[iNdEx])] + out, err := MaRsHaLmAp(keysForAllowedPublicKeys[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.AllowedPublicKeys { + v := x.AllowedPublicKeys[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } } - i-- - dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -882,10 +1228,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedPublicKeys", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -895,17 +1241,126 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - x.IpfsActive = bool(v != 0) + 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.AllowedPublicKeys == nil { + x.AllowedPublicKeys = make(map[string]*KeyInfo) + } + var mapkey string + var mapvalue *KeyInfo + 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 mapmsglen 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++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postmsgIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = &KeyInfo{} + if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postmsgIndex + } 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.AllowedPublicKeys[mapkey] = mapvalue + iNdEx = postIndex case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LocalRegistrationEnabled", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -915,12 +1370,56 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - x.LocalRegistrationEnabled = bool(v != 0) + 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.ConveyancePreference = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", 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.AttestationFormats = append(x.AttestationFormats, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) @@ -957,6 +1456,38 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedOperators", 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.AllowedOperators = append(x.AllowedOperators, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1664,6 +2195,618 @@ func (x *fastReflection_Capability) ProtoMethods() *protoiface.Methods { } } +var ( + md_KeyInfo protoreflect.MessageDescriptor + fd_KeyInfo_role protoreflect.FieldDescriptor + fd_KeyInfo_algorithm protoreflect.FieldDescriptor + fd_KeyInfo_encoding protoreflect.FieldDescriptor + fd_KeyInfo_curve protoreflect.FieldDescriptor +) + +func init() { + file_dwn_v1_genesis_proto_init() + md_KeyInfo = File_dwn_v1_genesis_proto.Messages().ByName("KeyInfo") + fd_KeyInfo_role = md_KeyInfo.Fields().ByName("role") + fd_KeyInfo_algorithm = md_KeyInfo.Fields().ByName("algorithm") + fd_KeyInfo_encoding = md_KeyInfo.Fields().ByName("encoding") + fd_KeyInfo_curve = md_KeyInfo.Fields().ByName("curve") +} + +var _ protoreflect.Message = (*fastReflection_KeyInfo)(nil) + +type fastReflection_KeyInfo KeyInfo + +func (x *KeyInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_KeyInfo)(x) +} + +func (x *KeyInfo) slowProtoReflect() protoreflect.Message { + mi := &file_dwn_v1_genesis_proto_msgTypes[3] + 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_KeyInfo_messageType fastReflection_KeyInfo_messageType +var _ protoreflect.MessageType = fastReflection_KeyInfo_messageType{} + +type fastReflection_KeyInfo_messageType struct{} + +func (x fastReflection_KeyInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_KeyInfo)(nil) +} +func (x fastReflection_KeyInfo_messageType) New() protoreflect.Message { + return new(fastReflection_KeyInfo) +} +func (x fastReflection_KeyInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_KeyInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_KeyInfo) Descriptor() protoreflect.MessageDescriptor { + return md_KeyInfo +} + +// 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_KeyInfo) Type() protoreflect.MessageType { + return _fastReflection_KeyInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_KeyInfo) New() protoreflect.Message { + return new(fastReflection_KeyInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_KeyInfo) Interface() protoreflect.ProtoMessage { + return (*KeyInfo)(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_KeyInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Role != "" { + value := protoreflect.ValueOfString(x.Role) + if !f(fd_KeyInfo_role, value) { + return + } + } + if x.Algorithm != "" { + value := protoreflect.ValueOfString(x.Algorithm) + if !f(fd_KeyInfo_algorithm, value) { + return + } + } + if x.Encoding != "" { + value := protoreflect.ValueOfString(x.Encoding) + if !f(fd_KeyInfo_encoding, value) { + return + } + } + if x.Curve != "" { + value := protoreflect.ValueOfString(x.Curve) + if !f(fd_KeyInfo_curve, 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_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "dwn.v1.KeyInfo.role": + return x.Role != "" + case "dwn.v1.KeyInfo.algorithm": + return x.Algorithm != "" + case "dwn.v1.KeyInfo.encoding": + return x.Encoding != "" + case "dwn.v1.KeyInfo.curve": + return x.Curve != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.KeyInfo")) + } + panic(fmt.Errorf("message dwn.v1.KeyInfo 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_KeyInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "dwn.v1.KeyInfo.role": + x.Role = "" + case "dwn.v1.KeyInfo.algorithm": + x.Algorithm = "" + case "dwn.v1.KeyInfo.encoding": + x.Encoding = "" + case "dwn.v1.KeyInfo.curve": + x.Curve = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.KeyInfo")) + } + panic(fmt.Errorf("message dwn.v1.KeyInfo 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_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "dwn.v1.KeyInfo.role": + value := x.Role + return protoreflect.ValueOfString(value) + case "dwn.v1.KeyInfo.algorithm": + value := x.Algorithm + return protoreflect.ValueOfString(value) + case "dwn.v1.KeyInfo.encoding": + value := x.Encoding + return protoreflect.ValueOfString(value) + case "dwn.v1.KeyInfo.curve": + value := x.Curve + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.KeyInfo")) + } + panic(fmt.Errorf("message dwn.v1.KeyInfo 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_KeyInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "dwn.v1.KeyInfo.role": + x.Role = value.Interface().(string) + case "dwn.v1.KeyInfo.algorithm": + x.Algorithm = value.Interface().(string) + case "dwn.v1.KeyInfo.encoding": + x.Encoding = value.Interface().(string) + case "dwn.v1.KeyInfo.curve": + x.Curve = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.KeyInfo")) + } + panic(fmt.Errorf("message dwn.v1.KeyInfo 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_KeyInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "dwn.v1.KeyInfo.role": + panic(fmt.Errorf("field role of message dwn.v1.KeyInfo is not mutable")) + case "dwn.v1.KeyInfo.algorithm": + panic(fmt.Errorf("field algorithm of message dwn.v1.KeyInfo is not mutable")) + case "dwn.v1.KeyInfo.encoding": + panic(fmt.Errorf("field encoding of message dwn.v1.KeyInfo is not mutable")) + case "dwn.v1.KeyInfo.curve": + panic(fmt.Errorf("field curve of message dwn.v1.KeyInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.KeyInfo")) + } + panic(fmt.Errorf("message dwn.v1.KeyInfo 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_KeyInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "dwn.v1.KeyInfo.role": + return protoreflect.ValueOfString("") + case "dwn.v1.KeyInfo.algorithm": + return protoreflect.ValueOfString("") + case "dwn.v1.KeyInfo.encoding": + return protoreflect.ValueOfString("") + case "dwn.v1.KeyInfo.curve": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.KeyInfo")) + } + panic(fmt.Errorf("message dwn.v1.KeyInfo 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_KeyInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in dwn.v1.KeyInfo", 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_KeyInfo) 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_KeyInfo) 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_KeyInfo) 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_KeyInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*KeyInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Role) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Algorithm) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Encoding) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Curve) + 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().(*KeyInfo) + 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.Curve) > 0 { + i -= len(x.Curve) + copy(dAtA[i:], x.Curve) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Curve))) + i-- + dAtA[i] = 0x22 + } + if len(x.Encoding) > 0 { + i -= len(x.Encoding) + copy(dAtA[i:], x.Encoding) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Encoding))) + i-- + dAtA[i] = 0x1a + } + if len(x.Algorithm) > 0 { + i -= len(x.Algorithm) + copy(dAtA[i:], x.Algorithm) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Algorithm))) + i-- + dAtA[i] = 0x12 + } + if len(x.Role) > 0 { + i -= len(x.Role) + copy(dAtA[i:], x.Role) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role))) + i-- + dAtA[i] = 0xa + } + 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().(*KeyInfo) + 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: KeyInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", 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.Role = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", 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.Algorithm = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoding", 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.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Curve", 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.Curve = 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_Resource protoreflect.MessageDescriptor fd_Resource_kind protoreflect.FieldDescriptor @@ -1686,7 +2829,7 @@ func (x *Resource) ProtoReflect() protoreflect.Message { } func (x *Resource) slowProtoReflect() protoreflect.Message { - mi := &file_dwn_v1_genesis_proto_msgTypes[3] + mi := &file_dwn_v1_genesis_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2186,7 +3329,7 @@ func (x *Schema) ProtoReflect() protoreflect.Message { } func (x *Schema) slowProtoReflect() protoreflect.Message { - mi := &file_dwn_v1_genesis_proto_msgTypes[4] + mi := &file_dwn_v1_genesis_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3184,9 +4327,14 @@ type Params struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - IpfsActive bool `protobuf:"varint,1,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - LocalRegistrationEnabled bool `protobuf:"varint,2,opt,name=local_registration_enabled,json=localRegistrationEnabled,proto3" json:"local_registration_enabled,omitempty"` - Schema *Schema `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` + // Whitelisted Key Types + AllowedPublicKeys map[string]*KeyInfo `protobuf:"bytes,1,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // ConveyancePreference defines the conveyance preference + ConveyancePreference string `protobuf:"bytes,2,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` + // AttestationFormats defines the attestation formats + AttestationFormats []string `protobuf:"bytes,3,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` + Schema *Schema `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` + AllowedOperators []string `protobuf:"bytes,5,rep,name=allowed_operators,json=allowedOperators,proto3" json:"allowed_operators,omitempty"` } func (x *Params) Reset() { @@ -3209,18 +4357,25 @@ func (*Params) Descriptor() ([]byte, []int) { return file_dwn_v1_genesis_proto_rawDescGZIP(), []int{1} } -func (x *Params) GetIpfsActive() bool { +func (x *Params) GetAllowedPublicKeys() map[string]*KeyInfo { if x != nil { - return x.IpfsActive + return x.AllowedPublicKeys } - return false + return nil } -func (x *Params) GetLocalRegistrationEnabled() bool { +func (x *Params) GetConveyancePreference() string { if x != nil { - return x.LocalRegistrationEnabled + return x.ConveyancePreference } - return false + return "" +} + +func (x *Params) GetAttestationFormats() []string { + if x != nil { + return x.AttestationFormats + } + return nil } func (x *Params) GetSchema() *Schema { @@ -3230,6 +4385,13 @@ func (x *Params) GetSchema() *Schema { return nil } +func (x *Params) GetAllowedOperators() []string { + if x != nil { + return x.AllowedOperators + } + return nil +} + // Capability reprensents the available capabilities of a decentralized web node type Capability struct { state protoimpl.MessageState @@ -3290,6 +4452,66 @@ func (x *Capability) GetResources() []string { return nil } +// KeyInfo defines information for accepted PubKey types +type KeyInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // e.g., "ES256", "EdDSA", "ES256K" + Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` // e.g., "hex", "base64", "multibase" + Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` // e.g., "P256", "P384", "P521", "X25519", "X448", +} + +func (x *KeyInfo) Reset() { + *x = KeyInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_dwn_v1_genesis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyInfo) ProtoMessage() {} + +// Deprecated: Use KeyInfo.ProtoReflect.Descriptor instead. +func (*KeyInfo) Descriptor() ([]byte, []int) { + return file_dwn_v1_genesis_proto_rawDescGZIP(), []int{3} +} + +func (x *KeyInfo) GetRole() string { + if x != nil { + return x.Role + } + return "" +} + +func (x *KeyInfo) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *KeyInfo) GetEncoding() string { + if x != nil { + return x.Encoding + } + return "" +} + +func (x *KeyInfo) GetCurve() string { + if x != nil { + return x.Curve + } + return "" +} + // Resource reprensents the available resources of a decentralized web node type Resource struct { state protoimpl.MessageState @@ -3303,7 +4525,7 @@ type Resource struct { func (x *Resource) Reset() { *x = Resource{} if protoimpl.UnsafeEnabled { - mi := &file_dwn_v1_genesis_proto_msgTypes[3] + mi := &file_dwn_v1_genesis_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3317,7 +4539,7 @@ func (*Resource) ProtoMessage() {} // Deprecated: Use Resource.ProtoReflect.Descriptor instead. func (*Resource) Descriptor() ([]byte, []int) { - return file_dwn_v1_genesis_proto_rawDescGZIP(), []int{3} + return file_dwn_v1_genesis_proto_rawDescGZIP(), []int{4} } func (x *Resource) GetKind() string { @@ -3355,7 +4577,7 @@ type Schema struct { func (x *Schema) Reset() { *x = Schema{} if protoimpl.UnsafeEnabled { - mi := &file_dwn_v1_genesis_proto_msgTypes[4] + mi := &file_dwn_v1_genesis_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3369,7 +4591,7 @@ func (*Schema) ProtoMessage() {} // Deprecated: Use Schema.ProtoReflect.Descriptor instead. func (*Schema) Descriptor() ([]byte, []int) { - return file_dwn_v1_genesis_proto_rawDescGZIP(), []int{4} + return file_dwn_v1_genesis_proto_rawDescGZIP(), []int{5} } func (x *Schema) GetVersion() int32 { @@ -3453,53 +4675,74 @@ var file_dwn_v1_genesis_proto_rawDesc = []byte{ 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, - 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x26, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x22, 0x78, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, - 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x0a, 0x08, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, - 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x77, 0x6e, 0x2e, 0x76, - 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 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, 0x77, - 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x77, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, - 0xaa, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x77, 0x6e, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8c, 0x03, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x55, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, + 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x41, 0x6c, + 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x76, 0x65, + 0x79, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x79, 0x61, 0x6e, + 0x63, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x13, + 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x61, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x73, 0x12, 0x26, 0x0a, + 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, + 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x1a, 0x55, 0x0a, 0x16, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 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, 0x25, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, + 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x78, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, + 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x6d, + 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x1c, 0x0a, + 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x22, 0x3a, 0x0a, + 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, + 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, + 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, + 0x66, 0x69, 0x6c, 0x65, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x77, 0x6e, 0x2e, + 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 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, + 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x77, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, + 0x58, 0xaa, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x77, 0x6e, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x77, 0x6e, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3514,22 +4757,26 @@ func file_dwn_v1_genesis_proto_rawDescGZIP() []byte { return file_dwn_v1_genesis_proto_rawDescData } -var file_dwn_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_dwn_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_dwn_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: dwn.v1.GenesisState (*Params)(nil), // 1: dwn.v1.Params (*Capability)(nil), // 2: dwn.v1.Capability - (*Resource)(nil), // 3: dwn.v1.Resource - (*Schema)(nil), // 4: dwn.v1.Schema + (*KeyInfo)(nil), // 3: dwn.v1.KeyInfo + (*Resource)(nil), // 4: dwn.v1.Resource + (*Schema)(nil), // 5: dwn.v1.Schema + nil, // 6: dwn.v1.Params.AllowedPublicKeysEntry } var file_dwn_v1_genesis_proto_depIdxs = []int32{ 1, // 0: dwn.v1.GenesisState.params:type_name -> dwn.v1.Params - 4, // 1: dwn.v1.Params.schema:type_name -> dwn.v1.Schema - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 6, // 1: dwn.v1.Params.allowed_public_keys:type_name -> dwn.v1.Params.AllowedPublicKeysEntry + 5, // 2: dwn.v1.Params.schema:type_name -> dwn.v1.Schema + 3, // 3: dwn.v1.Params.AllowedPublicKeysEntry.value:type_name -> dwn.v1.KeyInfo + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] 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_dwn_v1_genesis_proto_init() } @@ -3575,7 +4822,7 @@ func file_dwn_v1_genesis_proto_init() { } } file_dwn_v1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Resource); i { + switch v := v.(*KeyInfo); i { case 0: return &v.state case 1: @@ -3587,6 +4834,18 @@ func file_dwn_v1_genesis_proto_init() { } } file_dwn_v1_genesis_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Resource); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dwn_v1_genesis_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Schema); i { case 0: return &v.state @@ -3605,7 +4864,7 @@ func file_dwn_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dwn_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/cmd/hway/main.go b/cmd/hway/main.go index e68068cd4..c244e3793 100644 --- a/cmd/hway/main.go +++ b/cmd/hway/main.go @@ -2,15 +2,20 @@ package main import ( _ "embed" - "log" + "fmt" "net/http" + "github.com/ipfs/kubo/client/rpc" "github.com/labstack/echo/v4" - "github.com/onsonr/sonr/pkg/common/middleware/response" - "github.com/onsonr/sonr/pkg/common/middleware/session" - "github.com/onsonr/sonr/pkg/webapp/pages/home" - "github.com/onsonr/sonr/pkg/webapp/pages/login" - "github.com/onsonr/sonr/pkg/webapp/pages/register" + "github.com/labstack/echo/v4/middleware" + "github.com/onsonr/sonr/pkg/common/session" + "github.com/onsonr/sonr/pkg/gateway" + "github.com/onsonr/sonr/pkg/webui/landing" + + gatewaymiddleware "github.com/onsonr/sonr/pkg/gateway/middleware" + // TODO: Integrate TigerBeetle + // _ "github.com/tigerbeetle/tigerbeetle-go" + // _ "github.com/tigerbeetle/tigerbeetle-go/pkg/types" ) type ( @@ -20,16 +25,62 @@ type ( ) func main() { - // Setup - e := echo.New() - e.Use(session.HwayMiddleware()) - - // Add Gateway Specific Routes - e.GET("/", response.Templ(home.Page())) - e.GET("/register", response.Templ(register.Page())) - e.GET("/login", response.Templ(login.Page())) - - if err := e.Start(":3000"); err != http.ErrServerClosed { - log.Fatal(err) + // Setup Echo + hosts := map[string]*Host{} + api, err := rpc.NewLocalApi() + if err != nil { + panic(err) } + + //--------- + // Website + //--------- + site := echo.New() + site.Use(middleware.Logger()) + site.Use(middleware.Recover()) + site.Use(session.HwayMiddleware()) + landing.RegisterRoutes(site) + hosts["localhost:3000"] = &Host{Echo: site} + + //--------- + // Gateway + //--------- + highway := echo.New() + highway.Use(middleware.Logger()) + highway.Use(middleware.Recover()) + highway.Use(gatewaymiddleware.IPFSMiddleware(api)) + gateway.RegisterRoutes(highway) + hosts["auth.localhost:3000"] = &Host{Echo: highway} + + // Server + e := echo.New() + e.Use(middleware.CORSWithConfig(middleware.CORSConfig{ + AllowOrigins: []string{"*"}, + AllowMethods: []string{http.MethodGet, http.MethodPut, http.MethodPost, http.MethodDelete, http.MethodOptions}, + })) + + e.Any("/*", func(c echo.Context) (err error) { + req := c.Request() + res := c.Response() + + host := hosts[req.Host] + if host != nil { + host.Echo.ServeHTTP(res, req) + return nil + } + + // Default to site for unmatched hosts + site.ServeHTTP(res, req) + return nil + }) + + // Log startup information using Echo's logger + fmt.Println("\n----------------------------------") + fmt.Println("Server Configuration:") + fmt.Println("\nAvailable endpoints:") + fmt.Println("➜ http://localhost:3000 (main site)") + fmt.Println("➜ http://to.localhost:3000/QmHash/... (IPFS content)") + fmt.Println("----------------------------------") + + e.Logger.Fatal(e.Start(":3000")) } diff --git a/cmd/hway/styles.css b/cmd/hway/styles.css deleted file mode 100644 index 2e3888049..000000000 --- a/cmd/hway/styles.css +++ /dev/null @@ -1,3503 +0,0 @@ -@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Inter+Tight:ital,wght@0,500;0,600;0,700;1,700&display=fallback"); - -/* src/css/styles.css */ - -*, ::before, ::after{ - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; - --motion-origin-scale-x: 1; - --motion-origin-scale-y: 1; - --motion-origin-translate-x: 0; - --motion-origin-translate-y: 0; - --motion-origin-rotate: 0; - --motion-origin-blur: 0; - --motion-origin-grayscale: 0; - --motion-origin-opacity: 1; - --motion-origin-background-color: ; - --motion-origin-text-color: ; - --motion-end-scale-x: 1; - --motion-end-scale-y: 1; - --motion-end-translate-x: 0; - --motion-end-translate-y: 0; - --motion-end-rotate: 0; - --motion-end-blur: 0; - --motion-end-grayscale: 0; - --motion-end-opacity: 1; - --motion-end-background-color: ; - --motion-end-text-color: ; - --motion-duration: 750ms; - --motion-timing: var(--motion-default-timing); - --motion-perceptual-duration-multiplier: 1; - --motion-delay: 0ms; - --motion-scale-duration: var(--motion-duration); - --motion-scale-timing: var(--motion-timing); - --motion-scale-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-scale-delay: var(--motion-delay); - --motion-translate-duration: var(--motion-duration); - --motion-translate-timing: var(--motion-timing); - --motion-translate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-translate-delay: var(--motion-delay); - --motion-rotate-duration: var(--motion-duration); - --motion-rotate-timing: var(--motion-timing); - --motion-rotate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-rotate-delay: var(--motion-delay); - --motion-filter-duration: var(--motion-duration); - --motion-filter-timing: var(--motion-timing); - --motion-filter-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-filter-delay: var(--motion-delay); - --motion-opacity-duration: var(--motion-duration); - --motion-opacity-timing: var(--motion-timing); - --motion-opacity-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-opacity-delay: var(--motion-delay); - --motion-background-color-duration: var(--motion-duration); - --motion-background-color-timing: var(--motion-timing); - --motion-background-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-background-color-delay: var(--motion-delay); - --motion-text-color-duration: var(--motion-duration); - --motion-text-color-timing: var(--motion-timing); - --motion-text-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-text-color-delay: var(--motion-delay); - --motion-scale-in-animation: none; - --motion-translate-in-animation: none; - --motion-rotate-in-animation: none; - --motion-filter-in-animation: none; - --motion-opacity-in-animation: none; - --motion-background-color-in-animation: none; - --motion-text-color-in-animation: none; - --motion-scale-out-animation: none; - --motion-translate-out-animation: none; - --motion-rotate-out-animation: none; - --motion-filter-out-animation: none; - --motion-opacity-out-animation: none; - --motion-background-color-out-animation: none; - --motion-text-color-out-animation: none; - --motion-all-enter-animations: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation); - --motion-all-exit-animations: var(--motion-scale-out-animation), var(--motion-translate-out-animation), var(--motion-rotate-out-animation), var(--motion-filter-out-animation), var(--motion-opacity-out-animation), var(--motion-background-color-out-animation), var(--motion-text-color-out-animation); -} - -::backdrop{ - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; - --tw-contain-size: ; - --tw-contain-layout: ; - --tw-contain-paint: ; - --tw-contain-style: ; - --motion-origin-scale-x: 1; - --motion-origin-scale-y: 1; - --motion-origin-translate-x: 0; - --motion-origin-translate-y: 0; - --motion-origin-rotate: 0; - --motion-origin-blur: 0; - --motion-origin-grayscale: 0; - --motion-origin-opacity: 1; - --motion-origin-background-color: ; - --motion-origin-text-color: ; - --motion-end-scale-x: 1; - --motion-end-scale-y: 1; - --motion-end-translate-x: 0; - --motion-end-translate-y: 0; - --motion-end-rotate: 0; - --motion-end-blur: 0; - --motion-end-grayscale: 0; - --motion-end-opacity: 1; - --motion-end-background-color: ; - --motion-end-text-color: ; - --motion-duration: 750ms; - --motion-timing: var(--motion-default-timing); - --motion-perceptual-duration-multiplier: 1; - --motion-delay: 0ms; - --motion-scale-duration: var(--motion-duration); - --motion-scale-timing: var(--motion-timing); - --motion-scale-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-scale-delay: var(--motion-delay); - --motion-translate-duration: var(--motion-duration); - --motion-translate-timing: var(--motion-timing); - --motion-translate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-translate-delay: var(--motion-delay); - --motion-rotate-duration: var(--motion-duration); - --motion-rotate-timing: var(--motion-timing); - --motion-rotate-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-rotate-delay: var(--motion-delay); - --motion-filter-duration: var(--motion-duration); - --motion-filter-timing: var(--motion-timing); - --motion-filter-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-filter-delay: var(--motion-delay); - --motion-opacity-duration: var(--motion-duration); - --motion-opacity-timing: var(--motion-timing); - --motion-opacity-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-opacity-delay: var(--motion-delay); - --motion-background-color-duration: var(--motion-duration); - --motion-background-color-timing: var(--motion-timing); - --motion-background-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-background-color-delay: var(--motion-delay); - --motion-text-color-duration: var(--motion-duration); - --motion-text-color-timing: var(--motion-timing); - --motion-text-color-perceptual-duration-multiplier: var(--motion-perceptual-duration-multiplier); - --motion-text-color-delay: var(--motion-delay); - --motion-scale-in-animation: none; - --motion-translate-in-animation: none; - --motion-rotate-in-animation: none; - --motion-filter-in-animation: none; - --motion-opacity-in-animation: none; - --motion-background-color-in-animation: none; - --motion-text-color-in-animation: none; - --motion-scale-out-animation: none; - --motion-translate-out-animation: none; - --motion-rotate-out-animation: none; - --motion-filter-out-animation: none; - --motion-opacity-out-animation: none; - --motion-background-color-out-animation: none; - --motion-text-color-out-animation: none; - --motion-all-enter-animations: var(--motion-scale-in-animation), var(--motion-translate-in-animation), var(--motion-rotate-in-animation), var(--motion-filter-in-animation), var(--motion-opacity-in-animation), var(--motion-background-color-in-animation), var(--motion-text-color-in-animation); - --motion-all-exit-animations: var(--motion-scale-out-animation), var(--motion-translate-out-animation), var(--motion-rotate-out-animation), var(--motion-filter-out-animation), var(--motion-opacity-out-animation), var(--motion-background-color-out-animation), var(--motion-text-color-out-animation); -} - -/* ! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com */ - -/* -1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) -2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) -*/ - -*, -::before, -::after { - box-sizing: border-box; - /* 1 */ - border-width: 0; - /* 2 */ - border-style: solid; - /* 2 */ - border-color: #e5e7eb; - /* 2 */ -} - -::before, -::after { - --tw-content: ''; -} - -/* -1. Use a consistent sensible line-height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -3. Use a more readable tab size. -4. Use the user's configured `sans` font-family by default. -5. Use the user's configured `sans` font-feature-settings by default. -6. Use the user's configured `sans` font-variation-settings by default. -7. Disable tap highlights on iOS -*/ - -html, -:host { - line-height: 1.5; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ - -moz-tab-size: 4; - /* 3 */ - -o-tab-size: 4; - tab-size: 4; - /* 3 */ - font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - /* 4 */ - font-feature-settings: normal; - /* 5 */ - font-variation-settings: normal; - /* 6 */ - -webkit-tap-highlight-color: transparent; - /* 7 */ -} - -/* -1. Remove the margin in all browsers. -2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. -*/ - -body { - margin: 0; - /* 1 */ - line-height: inherit; - /* 2 */ -} - -/* -1. Add the correct height in Firefox. -2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) -3. Ensure horizontal rules are visible by default. -*/ - -hr { - height: 0; - /* 1 */ - color: inherit; - /* 2 */ - border-top-width: 1px; - /* 3 */ -} - -/* -Add the correct text decoration in Chrome, Edge, and Safari. -*/ - -abbr:where([title]) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} - -/* -Remove the default font size and weight for headings. -*/ - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} - -/* -Reset links to optimize for opt-in styling instead of opt-out. -*/ - -a { - color: inherit; - text-decoration: inherit; -} - -/* -Add the correct font weight in Edge and Safari. -*/ - -b, -strong { - font-weight: bolder; -} - -/* -1. Use the user's configured `mono` font-family by default. -2. Use the user's configured `mono` font-feature-settings by default. -3. Use the user's configured `mono` font-variation-settings by default. -4. Correct the odd `em` font sizing in all browsers. -*/ - -code, -kbd, -samp, -pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - /* 1 */ - font-feature-settings: normal; - /* 2 */ - font-variation-settings: normal; - /* 3 */ - font-size: 1em; - /* 4 */ -} - -/* -Add the correct font size in all browsers. -*/ - -small { - font-size: 80%; -} - -/* -Prevent `sub` and `sup` elements from affecting the line height in all browsers. -*/ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* -1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) -3. Remove gaps between table borders by default. -*/ - -table { - text-indent: 0; - /* 1 */ - border-color: inherit; - /* 2 */ - border-collapse: collapse; - /* 3 */ -} - -/* -1. Change the font styles in all browsers. -2. Remove the margin in Firefox and Safari. -3. Remove default padding in all browsers. -*/ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-feature-settings: inherit; - /* 1 */ - font-variation-settings: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - font-weight: inherit; - /* 1 */ - line-height: inherit; - /* 1 */ - letter-spacing: inherit; - /* 1 */ - color: inherit; - /* 1 */ - margin: 0; - /* 2 */ - padding: 0; - /* 3 */ -} - -/* -Remove the inheritance of text transform in Edge and Firefox. -*/ - -button, -select { - text-transform: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Remove default button styles. -*/ - -button, -input:where([type='button']), -input:where([type='reset']), -input:where([type='submit']) { - -webkit-appearance: button; - /* 1 */ - background-color: transparent; - /* 2 */ - background-image: none; - /* 2 */ -} - -/* -Use the modern Firefox focus style for all focusable elements. -*/ - -:-moz-focusring { - outline: auto; -} - -/* -Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) -*/ - -:-moz-ui-invalid { - box-shadow: none; -} - -/* -Add the correct vertical alignment in Chrome and Firefox. -*/ - -progress { - vertical-align: baseline; -} - -/* -Correct the cursor style of increment and decrement buttons in Safari. -*/ - -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} - -/* -1. Correct the odd appearance in Chrome and Safari. -2. Correct the outline style in Safari. -*/ - -[type='search'] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/* -Remove the inner padding in Chrome and Safari on macOS. -*/ - -::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Change font properties to `inherit` in Safari. -*/ - -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* -Add the correct display in Chrome and Safari. -*/ - -summary { - display: list-item; -} - -/* -Removes the default spacing and border for appropriate elements. -*/ - -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} - -fieldset { - margin: 0; - padding: 0; -} - -legend { - padding: 0; -} - -ol, -ul, -menu { - list-style: none; - margin: 0; - padding: 0; -} - -/* -Reset default styling for dialogs. -*/ - -dialog { - padding: 0; -} - -/* -Prevent resizing textareas horizontally by default. -*/ - -textarea { - resize: vertical; -} - -/* -1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) -2. Set the default placeholder color to the user's configured gray 400 color. -*/ - -input::-moz-placeholder, textarea::-moz-placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -input::placeholder, -textarea::placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -/* -Set the default cursor for buttons. -*/ - -button, -[role="button"] { - cursor: pointer; -} - -/* -Make sure disabled buttons don't get the pointer cursor. -*/ - -:disabled { - cursor: default; -} - -/* -1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) -2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) - This can trigger a poorly considered lint error in some tools but is included by design. -*/ - -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; - /* 1 */ - vertical-align: middle; - /* 2 */ -} - -/* -Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) -*/ - -img, -video { - max-width: 100%; - height: auto; -} - -/* Make elements with the HTML hidden attribute stay hidden by default */ - -[hidden]:where(:not([hidden="until-found"])) { - display: none; -} - -[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select{ - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #fff; - border-color: #6b7280; - border-width: 1px; - border-radius: 0px; - padding-top: 0.5rem; - padding-right: 0.75rem; - padding-bottom: 0.5rem; - padding-left: 0.75rem; - font-size: 1rem; - line-height: 1.5rem; - --tw-shadow: 0 0 #0000; -} - -[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus{ - outline: 2px solid transparent; - outline-offset: 2px; - --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: #2563eb; - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); - border-color: #2563eb; -} - -input::-moz-placeholder, textarea::-moz-placeholder{ - color: #6b7280; - opacity: 1; -} - -input::placeholder,textarea::placeholder{ - color: #6b7280; - opacity: 1; -} - -::-webkit-datetime-edit-fields-wrapper{ - padding: 0; -} - -::-webkit-date-and-time-value{ - min-height: 1.5em; - text-align: inherit; -} - -::-webkit-datetime-edit{ - display: inline-flex; -} - -::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{ - padding-top: 0; - padding-bottom: 0; -} - -select{ - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); - background-position: right 0.5rem center; - background-repeat: no-repeat; - background-size: 1.5em 1.5em; - padding-right: 2.5rem; - -webkit-print-color-adjust: exact; - print-color-adjust: exact; -} - -[multiple],[size]:where(select:not([size="1"])){ - background-image: initial; - background-position: initial; - background-repeat: unset; - background-size: initial; - padding-right: 0.75rem; - -webkit-print-color-adjust: unset; - print-color-adjust: unset; -} - -[type='checkbox'],[type='radio']{ - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - padding: 0; - -webkit-print-color-adjust: exact; - print-color-adjust: exact; - display: inline-block; - vertical-align: middle; - background-origin: border-box; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - flex-shrink: 0; - height: 1rem; - width: 1rem; - color: #2563eb; - background-color: #fff; - border-color: #6b7280; - border-width: 1px; - --tw-shadow: 0 0 #0000; -} - -[type='checkbox']{ - border-radius: 0px; -} - -[type='radio']{ - border-radius: 100%; -} - -[type='checkbox']:focus,[type='radio']:focus{ - outline: 2px solid transparent; - outline-offset: 2px; - --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); - --tw-ring-offset-width: 2px; - --tw-ring-offset-color: #fff; - --tw-ring-color: #2563eb; - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); -} - -[type='checkbox']:checked,[type='radio']:checked{ - border-color: transparent; - background-color: currentColor; - background-size: 100% 100%; - background-position: center; - background-repeat: no-repeat; -} - -[type='checkbox']:checked{ - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); -} - -@media (forced-colors: active) { - [type='checkbox']:checked{ - -webkit-appearance: auto; - -moz-appearance: auto; - appearance: auto; - } -} - -[type='radio']:checked{ - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); -} - -@media (forced-colors: active) { - [type='radio']:checked{ - -webkit-appearance: auto; - -moz-appearance: auto; - appearance: auto; - } -} - -[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus{ - border-color: transparent; - background-color: currentColor; -} - -[type='checkbox']:indeterminate{ - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); - border-color: transparent; - background-color: currentColor; - background-size: 100% 100%; - background-position: center; - background-repeat: no-repeat; -} - -@media (forced-colors: active) { - [type='checkbox']:indeterminate{ - -webkit-appearance: auto; - -moz-appearance: auto; - appearance: auto; - } -} - -[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus{ - border-color: transparent; - background-color: currentColor; -} - -[type='file']{ - background: unset; - border-color: inherit; - border-width: 0; - border-radius: 0; - padding: 0; - font-size: unset; - line-height: inherit; -} - -[type='file']:focus{ - outline: 1px solid ButtonText; - outline: 1px auto -webkit-focus-ring-color; -} - -:root{ - --motion-default-timing: cubic-bezier(.165, .84, .44, 1); - --motion-bounce: linear(0, 0.004, 0.016, 0.035, 0.063, 0.098, 0.141 13.6%, 0.25, 0.391, 0.563, 0.765,1, 0.891 40.9%, 0.848, 0.813, 0.785, 0.766, 0.754, 0.75, 0.754, 0.766, 0.785,0.813, 0.848, 0.891 68.2%, 1 72.7%, 0.973, 0.953, 0.941, 0.938, 0.941, 0.953,0.973, 1, 0.988, 0.984, 0.988, 1); - --motion-spring-smooth: linear(0, 0.001 0.44%, 0.0045 0.94%, 0.0195 2.03%, 0.0446 3.19%, 0.0811 4.5%, 0.1598 6.82%, 0.3685 12.34%, 0.4693 15.17%, 0.5663, 0.6498 21.27%, 0.7215 24.39%, 0.7532 25.98%, 0.7829 27.65%, 0.8105, 0.8349 31.14%, 0.8573 32.95%, 0.8776 34.84%, 0.8964 36.87%, 0.9136 39.05%, 0.929 41.37%, 0.9421 43.77%, 0.9537 46.38%, 0.9636 49.14%, 0.9789 55.31%, 0.9888 62.35%, 0.9949 71.06%, 0.9982 82.52%, 0.9997 99.94%); - --motion-spring-snappy: linear(0, 0.0014, 0.0053 1.02%, 0.0126, 0.0227 2.18%, 0.0517 3.41%, 0.094 4.79%, 0.1865 7.26%, 0.4182 12.77%, 0.5246 15.46%, 0.6249, 0.7112, 0.7831 23.95%, 0.8146 25.4%, 0.844, 0.8699 28.45%, 0.8935, 0.9139 31.64%, 0.932, 0.9473, 0.9601 36.65%, 0.9714 38.47%, 0.9808 40.35%, 0.9948 44.49%, 1.0031 49.43%, 1.0057 53.35%, 1.0063 58.14%, 1.0014 80.78%, 1.0001 99.94%); - --motion-spring-bouncy: linear(0, 0.0018, 0.0069, 0.0151 1.74%, 0.0277 2.4%, 0.062 3.7%, 0.1115 5.15%, 0.2211 7.77%, 0.4778 13.21%, 0.5912 15.75%, 0.6987 18.44%, 0.7862 20.98%, 0.861 23.59%, 0.8926, 0.9205, 0.945 27.51%, 0.9671 28.89%, 0.9868, 1.003 31.79%, 1.0224 34.11%, 1.0358 36.58%, 1.0436 39.27%, 1.046 42.31%, 1.0446 44.71%, 1.0406 47.47%, 1.0118 61.84%, 1.0027 69.53%, 0.9981 80.49%, 0.9991 99.94%); - --motion-spring-bouncier: linear(0, 0.0023, 0.0088, 0.0194 1.59%, 0.035 2.17%, 0.078 3.33%, 0.1415 4.64%, 0.2054 5.75%, 0.2821 6.95%, 0.5912 11.45%, 0.7205 13.43%, 0.8393 15.45%, 0.936 17.39%, 0.9778, 1.015, 1.0477, 1.0759, 1.0998 22.22%, 1.1203, 1.1364, 1.1484 25.26%, 1.1586 26.61%, 1.1629 28.06%, 1.1613 29.56%, 1.1537 31.2%, 1.1434 32.6%, 1.1288 34.19%, 1.0508 41.29%, 1.0174 44.87%, 1.0025 46.89%, 0.9911 48.87%, 0.9826 50.9%, 0.9769 53.03%, 0.9735 56.02%, 0.9748 59.45%, 0.9964 72.64%, 1.0031 79.69%, 1.0042 86.83%, 1.0008 99.97%); - --motion-spring-bounciest: linear(0, 0.0032, 0.0131, 0.0294, 0.0524, 0.0824, 0.1192 1.54%, 0.2134 2.11%, 0.3102 2.59%, 0.4297 3.13%, 0.8732 4.95%, 1.0373, 1.1827 6.36%, 1.2972 7.01%, 1.3444, 1.3859, 1.4215, 1.4504, 1.4735, 1.4908, 1.5024, 1.5084 9.5%, 1.5091, 1.5061, 1.4993, 1.4886, 1.4745, 1.4565 11.11%, 1.4082 11.7%, 1.3585 12.2%, 1.295 12.77%, 1.0623 14.64%, 0.9773, 0.9031 16.08%, 0.8449 16.73%, 0.8014, 0.7701 17.95%, 0.7587, 0.7501, 0.7443, 0.7412 19.16%, 0.7421 19.68%, 0.7508 20.21%, 0.7672 20.77%, 0.7917 21.37%, 0.8169 21.87%, 0.8492 22.43%, 0.9681 24.32%, 1.0114, 1.0492 25.75%, 1.0789 26.41%, 1.1008, 1.1167, 1.1271, 1.1317 28.81%, 1.1314, 1.1271 29.87%, 1.1189 30.43%, 1.1063 31.03%, 1.0769 32.11%, 0.9941 34.72%, 0.9748 35.43%, 0.9597 36.09%, 0.9487, 0.9407, 0.9355, 0.933 38.46%, 0.9344 39.38%, 0.9421 40.38%, 0.9566 41.5%, 0.9989 44.12%, 1.0161 45.37%, 1.029 46.75%, 1.0341 48.1%, 1.0335 49.04%, 1.0295 50.05%, 1.0221 51.18%, 0.992 55.02%, 0.9854 56.38%, 0.9827 57.72%, 0.985 59.73%, 1.004 64.67%, 1.0088 67.34%, 1.0076 69.42%, 0.9981 74.28%, 0.9956 76.85%, 0.9961 79.06%, 1.0023 86.46%, 0.999 95.22%, 0.9994 100%); -} - -.container{ - width: 100%; -} - -@media (min-width: 640px){ - .container{ - max-width: 640px; - } -} - -@media (min-width: 768px){ - .container{ - max-width: 768px; - } -} - -@media (min-width: 1024px){ - .container{ - max-width: 1024px; - } -} - -@media (min-width: 1280px){ - .container{ - max-width: 1280px; - } -} - -@media (min-width: 1536px){ - .container{ - max-width: 1536px; - } -} - -.motion-preset-slide-up{ - --motion-origin-translate-y: 25%; - --motion-origin-opacity: 0; - --motion-opacity-in-animation: motion-opacity-in calc(var(--motion-opacity-duration) * var(--motion-opacity-perceptual-duration-multiplier)) var(--motion-opacity-timing) var(--motion-opacity-delay) both; - --motion-translate-in-animation: motion-translate-in calc(var(--motion-translate-duration) * var(--motion-translate-perceptual-duration-multiplier)) var(--motion-translate-timing) var(--motion-translate-delay) both; - animation: var(--motion-all-enter-animations); -} - -@keyframes RomboConfettiPop{ - 0%{ - opacity: 0; - transform: scale(1); - } - - 33%{ - opacity: 1; - transform: scale(1.15); - } - - 50%{ - transform: scale(0.975); - } - - 65%{ - transform: scale(1.025); - } - - 80%{ - transform: scale(0.99); - } - - 87%{ - transform: scale(1.01); - } - - 100%{ - opacity: 1; - transform: scale(1); - } -} - -@keyframes topfetti{ - 0%{ - background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%, 40% 90%, 55% 90%, 70% 90%; - } - - 50%{ - background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%, 50% 50%, 65% 20%, 90% 30%; - } - - 100%{ - background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%, 50% 40%, 65% 10%, 90% 20%; - background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; - } -} - -@keyframes bottomfetti{ - 0%{ - background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%,70% -10%, 70% 0%; - } - - 50%{ - background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%, 105% 0%; - } - - 100%{ - background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%, 110% 10%; - background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; - } -} - -.fixed{ - position: fixed; -} - -.absolute{ - position: absolute; -} - -.relative{ - position: relative; -} - -.inset-0{ - inset: 0px; -} - -.bottom-0{ - bottom: 0px; -} - -.left-0{ - left: 0px; -} - -.left-1\/2{ - left: 50%; -} - -.right-0{ - right: 0px; -} - -.top-0{ - top: 0px; -} - -.top-2{ - top: 0.5rem; -} - -.-z-10{ - z-index: -10; -} - -.z-10{ - z-index: 10; -} - -.z-20{ - z-index: 20; -} - -.z-30{ - z-index: 30; -} - -.z-40{ - z-index: 40; -} - -.z-50{ - z-index: 50; -} - -.z-\[99\]{ - z-index: 99; -} - -.order-first{ - order: -9999; -} - -.-m-2{ - margin: -0.5rem; -} - -.m-2{ - margin: 0.5rem; -} - -.mx-auto{ - margin-left: auto; - margin-right: auto; -} - -.mb-1{ - margin-bottom: 0.25rem; -} - -.mb-2{ - margin-bottom: 0.5rem; -} - -.mb-3{ - margin-bottom: 0.75rem; -} - -.mb-4{ - margin-bottom: 1rem; -} - -.mb-6{ - margin-bottom: 1.5rem; -} - -.mb-8{ - margin-bottom: 2rem; -} - -.ml-1{ - margin-left: 0.25rem; -} - -.ml-2{ - margin-left: 0.5rem; -} - -.ml-3{ - margin-left: 0.75rem; -} - -.mr-1{ - margin-right: 0.25rem; -} - -.mr-2{ - margin-right: 0.5rem; -} - -.mr-3{ - margin-right: 0.75rem; -} - -.mr-4{ - margin-right: 1rem; -} - -.mr-5{ - margin-right: 1.25rem; -} - -.mr-7{ - margin-right: 1.75rem; -} - -.mt-1{ - margin-top: 0.25rem; -} - -.mt-12{ - margin-top: 3rem; -} - -.mt-2{ - margin-top: 0.5rem; -} - -.mt-24{ - margin-top: 6rem; -} - -.mt-4{ - margin-top: 1rem; -} - -.mt-5{ - margin-top: 1.25rem; -} - -.mt-6{ - margin-top: 1.5rem; -} - -.box-content{ - box-sizing: content-box; -} - -.block{ - display: block; -} - -.flex{ - display: flex; -} - -.inline-flex{ - display: inline-flex; -} - -.grid{ - display: grid; -} - -.hidden{ - display: none; -} - -.h-0\.5{ - height: 0.125rem; -} - -.h-10{ - height: 2.5rem; -} - -.h-14{ - height: 3.5rem; -} - -.h-20{ - height: 5rem; -} - -.h-3{ - height: 0.75rem; -} - -.h-32{ - height: 8rem; -} - -.h-4{ - height: 1rem; -} - -.h-5{ - height: 1.25rem; -} - -.h-8{ - height: 2rem; -} - -.h-9{ - height: 2.25rem; -} - -.h-\[280px\]{ - height: 280px; -} - -.h-auto{ - height: auto; -} - -.h-full{ - height: 100%; -} - -.h-screen{ - height: 100vh; -} - -.min-h-screen{ - min-height: 100vh; -} - -.w-0{ - width: 0px; -} - -.w-1\/3{ - width: 33.333333%; -} - -.w-14{ - width: 3.5rem; -} - -.w-16{ - width: 4rem; -} - -.w-20{ - width: 5rem; -} - -.w-3{ - width: 0.75rem; -} - -.w-4{ - width: 1rem; -} - -.w-5{ - width: 1.25rem; -} - -.w-8{ - width: 2rem; -} - -.w-\[22rem\]{ - width: 22rem; -} - -.w-\[365px\]{ - width: 365px; -} - -.w-\[calc\(100\%\+1rem\)\]{ - width: calc(100% + 1rem); -} - -.w-\[full\]{ - width: full; -} - -.w-auto{ - width: auto; -} - -.w-fit{ - width: -moz-fit-content; - width: fit-content; -} - -.w-full{ - width: 100%; -} - -.w-screen{ - width: 100vw; -} - -.max-w-2xl{ - max-width: 42rem; -} - -.max-w-3xl{ - max-width: 48rem; -} - -.max-w-4xl{ - max-width: 56rem; -} - -.max-w-5xl{ - max-width: 64rem; -} - -.max-w-6xl{ - max-width: 72rem; -} - -.max-w-\[94rem\]{ - max-width: 94rem; -} - -.max-w-lg{ - max-width: 32rem; -} - -.max-w-md{ - max-width: 28rem; -} - -.max-w-screen-sm{ - max-width: 640px; -} - -.max-w-sm{ - max-width: 24rem; -} - -.max-w-xl{ - max-width: 36rem; -} - -.max-w-xs{ - max-width: 20rem; -} - -.flex-shrink-0{ - flex-shrink: 0; -} - -.shrink-0{ - flex-shrink: 0; -} - -.grow{ - flex-grow: 1; -} - -.-translate-x-0{ - --tw-translate-x: -0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-x-1\/2{ - --tw-translate-x: -50%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-x-4{ - --tw-translate-x: -1rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-x-7{ - --tw-translate-x: -1.75rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-x-8{ - --tw-translate-x: -2rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-x-px{ - --tw-translate-x: -1px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-y-4{ - --tw-translate-y: -1rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.-translate-y-px{ - --tw-translate-y: -1px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-x-0{ - --tw-translate-x: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-x-8{ - --tw-translate-x: 2rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-0{ - --tw-translate-y: 0px; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-1\/3{ - --tw-translate-y: 33.333333%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-24{ - --tw-translate-y: 6rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-3{ - --tw-translate-y: 0.75rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.translate-y-4{ - --tw-translate-y: 1rem; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.rotate-1{ - --tw-rotate: 1deg; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.scale-100{ - --tw-scale-x: 1; - --tw-scale-y: 1; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.scale-90{ - --tw-scale-x: .9; - --tw-scale-y: .9; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.transform{ - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -@keyframes infinite-scroll{ - from{ - transform: translateX(0); - } - - to{ - transform: translateX(-100%); - } -} - -.animate-infinite-scroll{ - animation: infinite-scroll 60s linear infinite; -} - -@keyframes infinite-scroll-inverse{ - from{ - transform: translateX(-100%); - } - - to{ - transform: translateX(0); - } -} - -.animate-infinite-scroll-inverse{ - animation: infinite-scroll-inverse 60s linear infinite; -} - -.cursor-default{ - cursor: default; -} - -.cursor-pointer{ - cursor: pointer; -} - -.grid-cols-2{ - grid-template-columns: repeat(2, minmax(0, 1fr)); -} - -.flex-row{ - flex-direction: row; -} - -.flex-col{ - flex-direction: column; -} - -.flex-col-reverse{ - flex-direction: column-reverse; -} - -.flex-wrap{ - flex-wrap: wrap; -} - -.flex-nowrap{ - flex-wrap: nowrap; -} - -.items-start{ - align-items: flex-start; -} - -.items-end{ - align-items: flex-end; -} - -.items-center{ - align-items: center; -} - -.justify-end{ - justify-content: flex-end; -} - -.justify-center{ - justify-content: center; -} - -.justify-between{ - justify-content: space-between; -} - -.gap-12{ - gap: 3rem; -} - -.gap-2{ - gap: 0.5rem; -} - -.gap-3{ - gap: 0.75rem; -} - -.gap-4{ - gap: 1rem; -} - -.gap-8{ - gap: 2rem; -} - -.gap-x-3{ - -moz-column-gap: 0.75rem; - column-gap: 0.75rem; -} - -.gap-y-3{ - row-gap: 0.75rem; -} - -.space-x-1 > :not([hidden]) ~ :not([hidden]){ - --tw-space-x-reverse: 0; - margin-right: calc(0.25rem * var(--tw-space-x-reverse)); - margin-left: calc(0.25rem * calc(1 - var(--tw-space-x-reverse))); -} - -.space-x-3 > :not([hidden]) ~ :not([hidden]){ - --tw-space-x-reverse: 0; - margin-right: calc(0.75rem * var(--tw-space-x-reverse)); - margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse))); -} - -.space-x-4 > :not([hidden]) ~ :not([hidden]){ - --tw-space-x-reverse: 0; - margin-right: calc(1rem * var(--tw-space-x-reverse)); - margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); -} - -.space-y-1 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); -} - -.space-y-1\.5 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.375rem * var(--tw-space-y-reverse)); -} - -.space-y-12 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(3rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(3rem * var(--tw-space-y-reverse)); -} - -.space-y-2 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); -} - -.space-y-4 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1rem * var(--tw-space-y-reverse)); -} - -.space-y-6 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(1.5rem * var(--tw-space-y-reverse)); -} - -.overflow-hidden{ - overflow: hidden; -} - -.rounded{ - border-radius: 0.25rem; -} - -.rounded-full{ - border-radius: 9999px; -} - -.rounded-lg{ - border-radius: 0.5rem; -} - -.rounded-md{ - border-radius: 0.375rem; -} - -.rounded-xl{ - border-radius: 0.75rem; -} - -.rounded-t-lg{ - border-top-left-radius: 0.5rem; - border-top-right-radius: 0.5rem; -} - -.border{ - border-width: 1px; -} - -.border-2{ - border-width: 2px; -} - -.border-\[2px\]{ - border-width: 2px; -} - -.border-t{ - border-top-width: 1px; -} - -.border-neutral-200\/60{ - border-color: rgb(229 229 229 / 0.6); -} - -.border-neutral-200\/70{ - border-color: rgb(229 229 229 / 0.7); -} - -.border-neutral-300{ - --tw-border-opacity: 1; - border-color: rgb(212 212 212 / var(--tw-border-opacity, 1)); -} - -.border-transparent{ - border-color: transparent; -} - -.border-white{ - --tw-border-opacity: 1; - border-color: rgb(255 255 255 / var(--tw-border-opacity, 1)); -} - -.border-zinc-200{ - --tw-border-opacity: 1; - border-color: rgb(228 228 231 / var(--tw-border-opacity, 1)); -} - -.border-zinc-300{ - --tw-border-opacity: 1; - border-color: rgb(212 212 216 / var(--tw-border-opacity, 1)); -} - -.border-zinc-600{ - --tw-border-opacity: 1; - border-color: rgb(82 82 91 / var(--tw-border-opacity, 1)); -} - -.bg-blue-600{ - --tw-bg-opacity: 1; - background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1)); -} - -.bg-neutral-50{ - --tw-bg-opacity: 1; - background-color: rgb(250 250 250 / var(--tw-bg-opacity, 1)); -} - -.bg-neutral-900{ - --tw-bg-opacity: 1; - background-color: rgb(23 23 23 / var(--tw-bg-opacity, 1)); -} - -.bg-neutral-950{ - --tw-bg-opacity: 1; - background-color: rgb(10 10 10 / var(--tw-bg-opacity, 1)); -} - -.bg-transparent{ - background-color: transparent; -} - -.bg-white{ - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); -} - -.bg-zinc-100{ - --tw-bg-opacity: 1; - background-color: rgb(244 244 245 / var(--tw-bg-opacity, 1)); -} - -.bg-zinc-50{ - --tw-bg-opacity: 1; - background-color: rgb(250 250 250 / var(--tw-bg-opacity, 1)); -} - -.bg-zinc-800{ - --tw-bg-opacity: 1; - background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1)); -} - -.bg-zinc-900{ - --tw-bg-opacity: 1; - background-color: rgb(24 24 27 / var(--tw-bg-opacity, 1)); -} - -.bg-opacity-90{ - --tw-bg-opacity: 0.9; -} - -.bg-gradient-to-r{ - background-image: linear-gradient(to right, var(--tw-gradient-stops)); -} - -.bg-gradient-to-t{ - background-image: linear-gradient(to top, var(--tw-gradient-stops)); -} - -.from-black{ - --tw-gradient-from: #000 var(--tw-gradient-from-position); - --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.from-zinc-100{ - --tw-gradient-from: #f4f4f5 var(--tw-gradient-from-position); - --tw-gradient-to: rgb(244 244 245 / 0) var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.from-zinc-500{ - --tw-gradient-from: #71717a var(--tw-gradient-from-position); - --tw-gradient-to: rgb(113 113 122 / 0) var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.via-zinc-900{ - --tw-gradient-to: rgb(24 24 27 / 0) var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), #18181b var(--tw-gradient-via-position), var(--tw-gradient-to); -} - -.to-white{ - --tw-gradient-to: #fff var(--tw-gradient-to-position); -} - -.to-zinc-900{ - --tw-gradient-to: #18181b var(--tw-gradient-to-position); -} - -.bg-cover{ - background-size: cover; -} - -.bg-clip-text{ - -webkit-background-clip: text; - background-clip: text; -} - -.fill-current{ - fill: currentColor; -} - -.fill-zinc-300{ - fill: #d4d4d8; -} - -.fill-zinc-400{ - fill: #a1a1aa; -} - -.object-cover{ - -o-object-fit: cover; - object-fit: cover; -} - -.object-left{ - -o-object-position: left; - object-position: left; -} - -.p-1{ - padding: 0.25rem; -} - -.p-4{ - padding: 1rem; -} - -.p-5{ - padding: 1.25rem; -} - -.p-6{ - padding: 1.5rem; -} - -.p-7{ - padding: 1.75rem; -} - -.px-0\.5{ - padding-left: 0.125rem; - padding-right: 0.125rem; -} - -.px-2{ - padding-left: 0.5rem; - padding-right: 0.5rem; -} - -.px-2\.5{ - padding-left: 0.625rem; - padding-right: 0.625rem; -} - -.px-3{ - padding-left: 0.75rem; - padding-right: 0.75rem; -} - -.px-3\.5{ - padding-left: 0.875rem; - padding-right: 0.875rem; -} - -.px-4{ - padding-left: 1rem; - padding-right: 1rem; -} - -.px-5{ - padding-left: 1.25rem; - padding-right: 1.25rem; -} - -.px-6{ - padding-left: 1.5rem; - padding-right: 1.5rem; -} - -.px-7{ - padding-left: 1.75rem; - padding-right: 1.75rem; -} - -.px-8{ - padding-left: 2rem; - padding-right: 2rem; -} - -.py-0\.5{ - padding-top: 0.125rem; - padding-bottom: 0.125rem; -} - -.py-1{ - padding-top: 0.25rem; - padding-bottom: 0.25rem; -} - -.py-12{ - padding-top: 3rem; - padding-bottom: 3rem; -} - -.py-2{ - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} - -.py-3{ - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} - -.py-4{ - padding-top: 1rem; - padding-bottom: 1rem; -} - -.py-5{ - padding-top: 1.25rem; - padding-bottom: 1.25rem; -} - -.py-6{ - padding-top: 1.5rem; - padding-bottom: 1.5rem; -} - -.py-8{ - padding-top: 2rem; - padding-bottom: 2rem; -} - -.py-px{ - padding-top: 1px; - padding-bottom: 1px; -} - -.pb-1{ - padding-bottom: 0.25rem; -} - -.pb-12{ - padding-bottom: 3rem; -} - -.pb-2{ - padding-bottom: 0.5rem; -} - -.pb-3{ - padding-bottom: 0.75rem; -} - -.pb-4{ - padding-bottom: 1rem; -} - -.pb-6{ - padding-bottom: 1.5rem; -} - -.pb-8{ - padding-bottom: 2rem; -} - -.pl-4{ - padding-left: 1rem; -} - -.pr-2{ - padding-right: 0.5rem; -} - -.pr-4{ - padding-right: 1rem; -} - -.pt-0{ - padding-top: 0px; -} - -.pt-2{ - padding-top: 0.5rem; -} - -.pt-32{ - padding-top: 8rem; -} - -.pt-6{ - padding-top: 1.5rem; -} - -.pt-8{ - padding-top: 2rem; -} - -.text-left{ - text-align: left; -} - -.text-center{ - text-align: center; -} - -.align-top{ - vertical-align: top; -} - -.font-inter{ - font-family: Inter, sans-serif; -} - -.font-inter-tight{ - font-family: Inter Tight, sans-serif; -} - -.font-sans{ - font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; -} - -.text-2xl{ - font-size: 1.5rem; - line-height: 1.415; - letter-spacing: -0.017em; -} - -.text-3xl{ - font-size: 2rem; - line-height: 1.3125; - letter-spacing: -0.017em; -} - -.text-4xl{ - font-size: 2.5rem; - line-height: 1.25; - letter-spacing: -0.017em; -} - -.text-\[0\.6rem\]{ - font-size: 0.6rem; -} - -.text-base{ - font-size: 1rem; - line-height: 1.5; - letter-spacing: -0.017em; -} - -.text-lg{ - font-size: 1.125rem; - line-height: 1.5; - letter-spacing: -0.017em; -} - -.text-sm{ - font-size: 0.875rem; - line-height: 1.5715; -} - -.text-xl{ - font-size: 1.25rem; - line-height: 1.5; - letter-spacing: -0.017em; -} - -.text-xs{ - font-size: 0.75rem; - line-height: 1.5; -} - -.font-bold{ - font-weight: 700; -} - -.font-extrabold{ - font-weight: 800; -} - -.font-medium{ - font-weight: 500; -} - -.font-normal{ - font-weight: 400; -} - -.font-semibold{ - font-weight: 600; -} - -.uppercase{ - text-transform: uppercase; -} - -.italic{ - font-style: italic; -} - -.not-italic{ - font-style: normal; -} - -.tabular-nums{ - --tw-numeric-spacing: tabular-nums; - font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction); -} - -.leading-none{ - line-height: 1; -} - -.tracking-tight{ - letter-spacing: -0.025em; -} - -.tracking-wide{ - letter-spacing: 0.025em; -} - -.text-blue-600{ - --tw-text-opacity: 1; - color: rgb(37 99 235 / var(--tw-text-opacity, 1)); -} - -.text-gray-400{ - --tw-text-opacity: 1; - color: rgb(156 163 175 / var(--tw-text-opacity, 1)); -} - -.text-gray-400\/70{ - color: rgb(156 163 175 / 0.7); -} - -.text-gray-500{ - --tw-text-opacity: 1; - color: rgb(107 114 128 / var(--tw-text-opacity, 1)); -} - -.text-gray-600{ - --tw-text-opacity: 1; - color: rgb(75 85 99 / var(--tw-text-opacity, 1)); -} - -.text-neutral-100{ - --tw-text-opacity: 1; - color: rgb(245 245 245 / var(--tw-text-opacity, 1)); -} - -.text-neutral-500{ - --tw-text-opacity: 1; - color: rgb(115 115 115 / var(--tw-text-opacity, 1)); -} - -.text-neutral-800{ - --tw-text-opacity: 1; - color: rgb(38 38 38 / var(--tw-text-opacity, 1)); -} - -.text-neutral-900{ - --tw-text-opacity: 1; - color: rgb(23 23 23 / var(--tw-text-opacity, 1)); -} - -.text-transparent{ - color: transparent; -} - -.text-white{ - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)); -} - -.text-zinc-100{ - --tw-text-opacity: 1; - color: rgb(244 244 245 / var(--tw-text-opacity, 1)); -} - -.text-zinc-200{ - --tw-text-opacity: 1; - color: rgb(228 228 231 / var(--tw-text-opacity, 1)); -} - -.text-zinc-400{ - --tw-text-opacity: 1; - color: rgb(161 161 170 / var(--tw-text-opacity, 1)); -} - -.text-zinc-500{ - --tw-text-opacity: 1; - color: rgb(113 113 122 / var(--tw-text-opacity, 1)); -} - -.text-zinc-600{ - --tw-text-opacity: 1; - color: rgb(82 82 91 / var(--tw-text-opacity, 1)); -} - -.text-zinc-700{ - --tw-text-opacity: 1; - color: rgb(63 63 70 / var(--tw-text-opacity, 1)); -} - -.text-zinc-800{ - --tw-text-opacity: 1; - color: rgb(39 39 42 / var(--tw-text-opacity, 1)); -} - -.text-zinc-900{ - --tw-text-opacity: 1; - color: rgb(24 24 27 / var(--tw-text-opacity, 1)); -} - -.underline{ - text-decoration-line: underline; -} - -.no-underline{ - text-decoration-line: none; -} - -.underline-offset-4{ - text-underline-offset: 4px; -} - -.antialiased{ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.opacity-0{ - opacity: 0; -} - -.opacity-100{ - opacity: 1; -} - -.opacity-60{ - opacity: 0.6; -} - -.opacity-70{ - opacity: 0.7; -} - -.opacity-90{ - opacity: 0.9; -} - -.mix-blend-exclusion{ - mix-blend-mode: exclusion; -} - -.shadow{ - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-2xl{ - --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); - --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-md{ - --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-sm{ - --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); - --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -} - -.shadow-zinc-950\/20{ - --tw-shadow-color: rgb(9 9 11 / 0.2); - --tw-shadow: var(--tw-shadow-colored); -} - -.drop-shadow-md{ - --tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06)); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.backdrop-blur-sm{ - --tw-backdrop-blur: blur(4px); - -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); - backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia); -} - -.transition{ - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.transition-colors{ - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.duration-100{ - transition-duration: 100ms; -} - -.duration-150{ - transition-duration: 150ms; -} - -.duration-200{ - transition-duration: 200ms; -} - -.duration-300{ - transition-duration: 300ms; -} - -.duration-500{ - transition-duration: 500ms; -} - -.duration-700{ - transition-duration: 700ms; -} - -.ease-in{ - transition-timing-function: cubic-bezier(0.4, 0, 1, 1); -} - -.ease-in-out{ - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); -} - -.ease-out{ - transition-timing-function: cubic-bezier(0, 0, 0.2, 1); -} - -@media screen and (prefers-reduced-motion: no-preference){ - @keyframes motion-scale-in{ - 0%{ - scale: var(--motion-origin-scale-x) var(--motion-origin-scale-y); - } - - 100%{ - scale: 1 1; - } - } - - @keyframes motion-scale-out{ - 0%{ - scale: 1 1; - } - - 100%{ - scale: var(--motion-end-scale-x) var(--motion-end-scale-y); - } - } - - @keyframes motion-translate-in{ - 0%{ - translate: var(--motion-origin-translate-x) var(--motion-origin-translate-y); - } - - 100%{ - translate: 0 0; - } - } - - @keyframes motion-translate-out{ - 0%{ - translate: 0 0; - } - - 100%{ - translate: var(--motion-end-translate-x) var(--motion-end-translate-y); - } - } - - @keyframes motion-rotate-in{ - 0%{ - rotate: var(--motion-origin-rotate); - } - - 100%{ - rotate: 0; - } - } - - @keyframes motion-rotate-out{ - 0%{ - rotate: 0; - } - - 100%{ - rotate: var(--motion-end-rotate); - } - } -} - -@keyframes motion-filter-in{ - 0%{ - filter: blur(var(--motion-origin-blur)) grayscale(var(--motion-origin-grayscale)); - } - - 100%{ - filter: blur(0) grayscale(0); - } -} - -@keyframes motion-filter-out{ - 0%{ - filter: blur(0) grayscale(0); - } - - 100%{ - filter: blur(var(--motion-end-blur)) grayscale(var(--motion-end-grayscale)); - } -} - -@keyframes motion-opacity-in{ - 0%{ - opacity: var(--motion-origin-opacity); - } -} - -@keyframes motion-opacity-out{ - 100%{ - opacity: var(--motion-end-opacity); - } -} - -@keyframes motion-background-color-in{ - 0%{ - background-color: var(--motion-origin-background-color); - } -} - -@keyframes motion-background-color-out{ - 100%{ - background-color: var(--motion-end-background-color); - } -} - -@keyframes motion-text-color-in{ - 0%{ - color: var(--motion-origin-text-color); - } -} - -@keyframes motion-text-color-out{ - 100%{ - color: var(--motion-end-text-color); - } -} - -.motion-scale-in-50{ - --motion-origin-scale-x: .5; - --motion-origin-scale-y: .5; - --motion-scale-in-animation: motion-scale-in calc(var(--motion-scale-duration) * var(--motion-scale-perceptual-duration-multiplier)) var(--motion-scale-timing) var(--motion-scale-delay) both; - animation: var(--motion-all-enter-animations); -} - -.motion-opacity-in-0{ - --motion-origin-opacity: 0.001; - --motion-opacity-in-animation: motion-opacity-in calc(var(--motion-opacity-duration) * var(--motion-opacity-perceptual-duration-multiplier)) var(--motion-opacity-timing) var(--motion-opacity-delay) both; - animation: var(--motion-all-enter-animations); -} - -.\[animation-delay\:-7\.5s\]{ - animation-delay: -7.5s; -} - -.\[background\:linear-gradient\(\#2E2E32\2c \#2E2E32\)_padding-box\2c linear-gradient\(120deg\2c theme\(colors\.zinc\.700\)\2c theme\(colors\.zinc\.700\/0\)\2c theme\(colors\.zinc\.700\)\)_border-box\]{ - background: linear-gradient(#2E2E32,#2E2E32) padding-box,linear-gradient(120deg,#3f3f46,rgb(63 63 70 / 0),#3f3f46) border-box; -} - -.\[background\:linear-gradient\(\#323237\2c \#323237\)_padding-box\2c linear-gradient\(120deg\2c theme\(colors\.zinc\.700\)\2c theme\(colors\.zinc\.700\/0\)\2c theme\(colors\.zinc\.700\)\)_border-box\]{ - background: linear-gradient(#323237,#323237) padding-box,linear-gradient(120deg,#3f3f46,rgb(63 63 70 / 0),#3f3f46) border-box; -} - -.\[background\:linear-gradient\(theme\(colors\.white\)\2c theme\(colors\.white\)\)_padding-box\2c linear-gradient\(120deg\2c theme\(colors\.zinc\.300\)\2c theme\(colors\.zinc\.100\)\2c theme\(colors\.zinc\.300\)\)_border-box\]{ - background: linear-gradient(#fff,#fff) padding-box,linear-gradient(120deg,#d4d4d8,#f4f4f5,#d4d4d8) border-box; -} - -.\[background\:linear-gradient\(theme\(colors\.white\)\2c theme\(colors\.zinc\.50\)\)_padding-box\2c linear-gradient\(120deg\2c theme\(colors\.zinc\.300\)\2c theme\(colors\.zinc\.100\)\2c theme\(colors\.zinc\.300\)\)_border-box\]{ - background: linear-gradient(#fff,#fafafa) padding-box,linear-gradient(120deg,#d4d4d8,#f4f4f5,#d4d4d8) border-box; -} - -.\[background\:linear-gradient\(theme\(colors\.zinc\.50\)\2c theme\(colors\.zinc\.50\)\)_padding-box\2c linear-gradient\(120deg\2c theme\(colors\.zinc\.300\)\2c theme\(colors\.zinc\.100\)\2c theme\(colors\.zinc\.300\)\)_border-box\]{ - background: linear-gradient(#fafafa,#fafafa) padding-box,linear-gradient(120deg,#d4d4d8,#f4f4f5,#d4d4d8) border-box; -} - -.\[background\:linear-gradient\(theme\(colors\.zinc\.800\)\2c theme\(colors\.zinc\.800\)\)_padding-box\2c linear-gradient\(120deg\2c theme\(colors\.zinc\.700\)\2c theme\(colors\.zinc\.700\/0\)\2c theme\(colors\.zinc\.700\)\)_border-box\]{ - background: linear-gradient(#27272a,#27272a) padding-box,linear-gradient(120deg,#3f3f46,rgb(63 63 70 / 0),#3f3f46) border-box; -} - -.\[mask-image\:_linear-gradient\(to_right\2c transparent_0\2c _black_28\%\2c _black_calc\(100\%-28\%\)\2c transparent_100\%\)\]{ - -webkit-mask-image: linear-gradient(to right,transparent 0, black 28%, black calc(100% - 28%),transparent 100%); - mask-image: linear-gradient(to right,transparent 0, black 28%, black calc(100% - 28%),transparent 100%); -} - -.\[mask-image\:linear-gradient\(to_right\2c transparent_8px\2c _theme\(colors\.white\/\.7\)_64px\2c _theme\(colors\.white\)_50\%\2c _theme\(colors\.white\/\.7\)_calc\(100\%-64px\)\2c _transparent_calc\(100\%-8px\)\)\]{ - -webkit-mask-image: linear-gradient(to right,transparent 8px, rgb(255 255 255 / .7) 64px, #fff 50%, rgb(255 255 255 / .7) calc(100% - 64px), transparent calc(100% - 8px)); - mask-image: linear-gradient(to right,transparent 8px, rgb(255 255 255 / .7) 64px, #fff 50%, rgb(255 255 255 / .7) calc(100% - 64px), transparent calc(100% - 8px)); -} - -/* See Alpine.js: https://github.com/alpinejs/alpine#x-cloak */ - -[x-cloak=""] { - display: none; -} - -/* Custom styles */ - -.form-input:focus, -.form-textarea:focus, -.form-multiselect:focus, -.form-select:focus, -.form-checkbox:focus, -.form-radio:focus{ - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -/* Hamburger button */ - -.hamburger svg > *:nth-child(1), -.hamburger svg > *:nth-child(2), -.hamburger svg > *:nth-child(3) { - transform-origin: center; - transform: rotate(0deg); -} - -.hamburger svg > *:nth-child(1) { - transition: - y 0.1s 0.25s ease-in, - transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19), - opacity 0.1s ease-in; -} - -.hamburger svg > *:nth-child(2) { - transition: transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19); -} - -.hamburger svg > *:nth-child(3) { - transition: - y 0.1s 0.25s ease-in, - transform 0.22s cubic-bezier(0.55, 0.055, 0.675, 0.19), - width 0.1s 0.25s ease-in; -} - -.hamburger.active svg > *:nth-child(1) { - opacity: 0; - y: 11; - transform: rotate(225deg); - transition: - y 0.1s ease-out, - transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1), - opacity 0.1s 0.12s ease-out; -} - -.hamburger.active svg > *:nth-child(2) { - transform: rotate(225deg); - transition: transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1); -} - -.hamburger.active svg > *:nth-child(3) { - y: 11; - transform: rotate(135deg); - transition: - y 0.1s ease-out, - transform 0.22s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1), - width 0.1s ease-out; -} - -/* Typography */ - -.h1{ - font-size: 3.25rem; - line-height: 1.2; - letter-spacing: -0.017em; - font-weight: 700; -} - -.h2{ - font-size: 2.5rem; - line-height: 1.25; - letter-spacing: -0.017em; - font-weight: 700; -} - -.h3{ - font-size: 2rem; - line-height: 1.3125; - letter-spacing: -0.017em; - font-weight: 700; -} - -.h4{ - font-size: 1.5rem; - line-height: 1.415; - letter-spacing: -0.017em; - font-weight: 700; -} - -@media (min-width: 768px) { - .h1{ - font-size: 3.75rem; - line-height: 1.1666; - letter-spacing: -0.017em; - } - - .h2{ - font-size: 3.25rem; - line-height: 1.2; - letter-spacing: -0.017em; - } - - .h3{ - font-size: 2.5rem; - line-height: 1.25; - letter-spacing: -0.017em; - } -} - -/* Buttons */ - -.btn, -.btn-sm{ - display: inline-flex; - align-items: center; - justify-content: center; - border-radius: 0.375rem; - border-width: 1px; - border-color: transparent; - font-size: 0.875rem; - line-height: 1.5715; - font-weight: 500; - letter-spacing: 0em; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; - transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.btn{ - padding-left: 1rem; - padding-right: 1rem; - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} - -.btn-sm{ - padding-left: 0.5rem; - padding-right: 0.5rem; - padding-top: 0.25rem; - padding-bottom: 0.25rem; -} - -/* Forms */ - -input[type="search"]::-webkit-search-decoration, -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-results-button, -input[type="search"]::-webkit-search-results-decoration { - -webkit-appearance: none; -} - -.form-input, -.form-textarea, -.form-multiselect, -.form-select, -.form-checkbox, -.form-radio{ - border-width: 1px; - --tw-border-opacity: 1; - border-color: rgb(228 228 231 / var(--tw-border-opacity, 1)); - --tw-bg-opacity: 1; - background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); - --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); - --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color); - box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); - --tw-shadow-color: rgb(0 0 0 / 0.05); - --tw-shadow: var(--tw-shadow-colored); -} - -.form-input:focus, -.form-textarea:focus, -.form-multiselect:focus, -.form-select:focus, -.form-checkbox:focus, -.form-radio:focus{ - --tw-border-opacity: 1; - border-color: rgb(161 161 170 / var(--tw-border-opacity, 1)); -} - -.form-input, -.form-textarea, -.form-multiselect, -.form-select, -.form-checkbox{ - border-radius: 0.25rem; -} - -.form-input, -.form-textarea, -.form-multiselect, -.form-select{ - padding-left: 1rem; - padding-right: 1rem; - padding-top: 0.5rem; - padding-bottom: 0.5rem; - font-size: 0.875rem; - line-height: 1.5715; - --tw-text-opacity: 1; - color: rgb(82 82 91 / var(--tw-text-opacity, 1)); -} - -.form-input::-moz-placeholder, .form-textarea::-moz-placeholder{ - --tw-placeholder-opacity: 1; - color: rgb(161 161 170 / var(--tw-placeholder-opacity, 1)); -} - -.form-input::placeholder, -.form-textarea::placeholder{ - --tw-placeholder-opacity: 1; - color: rgb(161 161 170 / var(--tw-placeholder-opacity, 1)); -} - -.form-select{ - padding-right: 2.5rem; -} - -.form-checkbox, -.form-radio{ - --tw-text-opacity: 1; - color: rgb(39 39 42 / var(--tw-text-opacity, 1)); -} - -.form-checkbox{ - border-radius: 0.125rem; -} - -/* Chrome, Safari and Opera */ - -.no-scrollbar::-webkit-scrollbar { - display: none; -} - -.no-scrollbar { - -ms-overflow-style: none; - /* IE and Edge */ - scrollbar-width: none; - /* Firefox */ -} - -.placeholder\:text-neutral-500::-moz-placeholder{ - --tw-text-opacity: 1; - color: rgb(115 115 115 / var(--tw-text-opacity, 1)); -} - -.placeholder\:text-neutral-500::placeholder{ - --tw-text-opacity: 1; - color: rgb(115 115 115 / var(--tw-text-opacity, 1)); -} - -.placeholder\:text-zinc-400::-moz-placeholder{ - --tw-text-opacity: 1; - color: rgb(161 161 170 / var(--tw-text-opacity, 1)); -} - -.placeholder\:text-zinc-400::placeholder{ - --tw-text-opacity: 1; - color: rgb(161 161 170 / var(--tw-text-opacity, 1)); -} - -.before\:pointer-events-none::before{ - content: var(--tw-content); - pointer-events: none; -} - -.before\:absolute::before{ - content: var(--tw-content); - position: absolute; -} - -.before\:inset-0::before{ - content: var(--tw-content); - inset: 0px; -} - -.before\:-top-12::before{ - content: var(--tw-content); - top: -3rem; -} - -.before\:-z-10::before{ - content: var(--tw-content); - z-index: -10; -} - -.before\:h-52::before{ - content: var(--tw-content); - height: 13rem; -} - -.before\:h-80::before{ - content: var(--tw-content); - height: 20rem; -} - -.before\:h-96::before{ - content: var(--tw-content); - height: 24rem; -} - -.before\:w-52::before{ - content: var(--tw-content); - width: 13rem; -} - -.before\:w-96::before{ - content: var(--tw-content); - width: 24rem; -} - -.before\:rounded-full::before{ - content: var(--tw-content); - border-radius: 9999px; -} - -.before\:bg-zinc-900::before{ - content: var(--tw-content); - --tw-bg-opacity: 1; - background-color: rgb(24 24 27 / var(--tw-bg-opacity, 1)); -} - -.before\:bg-gradient-to-b::before{ - content: var(--tw-content); - background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); -} - -.before\:from-zinc-100::before{ - content: var(--tw-content); - --tw-gradient-from: #f4f4f5 var(--tw-gradient-from-position); - --tw-gradient-to: rgb(244 244 245 / 0) var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.before\:opacity-\[\.08\]::before{ - content: var(--tw-content); - opacity: .08; -} - -.before\:opacity-\[\.15\]::before{ - content: var(--tw-content); - opacity: .15; -} - -.before\:blur-3xl::before{ - content: var(--tw-content); - --tw-blur: blur(64px); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.before\:content-\[\'\\0022\'\]::before{ - --tw-content: '\0022'; - content: var(--tw-content); -} - -.after\:pointer-events-none::after{ - content: var(--tw-content); - pointer-events: none; -} - -.after\:absolute::after{ - content: var(--tw-content); - position: absolute; -} - -.after\:right-0::after{ - content: var(--tw-content); - right: 0px; -} - -.after\:top-0::after{ - content: var(--tw-content); - top: 0px; -} - -.after\:top-1\/2::after{ - content: var(--tw-content); - top: 50%; -} - -.after\:hidden::after{ - content: var(--tw-content); - display: none; -} - -.after\:h-8::after{ - content: var(--tw-content); - height: 2rem; -} - -.after\:h-full::after{ - content: var(--tw-content); - height: 100%; -} - -.after\:w-96::after{ - content: var(--tw-content); - width: 24rem; -} - -.after\:w-px::after{ - content: var(--tw-content); - width: 1px; -} - -.after\:-translate-y-1\/2::after{ - content: var(--tw-content); - --tw-translate-y: -50%; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.after\:border-l::after{ - content: var(--tw-content); - border-left-width: 1px; -} - -.after\:border-dashed::after{ - content: var(--tw-content); - border-style: dashed; -} - -.after\:border-zinc-300::after{ - content: var(--tw-content); - --tw-border-opacity: 1; - border-color: rgb(212 212 216 / var(--tw-border-opacity, 1)); -} - -.after\:bg-gradient-to-l::after{ - content: var(--tw-content); - background-image: linear-gradient(to left, var(--tw-gradient-stops)); -} - -.after\:from-zinc-800::after{ - content: var(--tw-content); - --tw-gradient-from: #27272a var(--tw-gradient-from-position); - --tw-gradient-to: rgb(39 39 42 / 0) var(--tw-gradient-to-position); - --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); -} - -.after\:content-\[\'\\0022\'\]::after{ - --tw-content: '\0022'; - content: var(--tw-content); -} - -.last\:after\:hidden:last-child::after{ - content: var(--tw-content); - display: none; -} - -.hover\:bg-neutral-100:hover{ - --tw-bg-opacity: 1; - background-color: rgb(245 245 245 / var(--tw-bg-opacity, 1)); -} - -.hover\:bg-neutral-800:hover{ - --tw-bg-opacity: 1; - background-color: rgb(38 38 38 / var(--tw-bg-opacity, 1)); -} - -.hover\:bg-neutral-900:hover{ - --tw-bg-opacity: 1; - background-color: rgb(23 23 23 / var(--tw-bg-opacity, 1)); -} - -.hover\:bg-zinc-200:hover{ - --tw-bg-opacity: 1; - background-color: rgb(228 228 231 / var(--tw-bg-opacity, 1)); -} - -.hover\:bg-zinc-50:hover{ - --tw-bg-opacity: 1; - background-color: rgb(250 250 250 / var(--tw-bg-opacity, 1)); -} - -.hover\:bg-zinc-800:hover{ - --tw-bg-opacity: 1; - background-color: rgb(39 39 42 / var(--tw-bg-opacity, 1)); -} - -.hover\:text-neutral-900:hover{ - --tw-text-opacity: 1; - color: rgb(23 23 23 / var(--tw-text-opacity, 1)); -} - -.hover\:text-white:hover{ - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity, 1)); -} - -.hover\:text-zinc-300:hover{ - --tw-text-opacity: 1; - color: rgb(212 212 216 / var(--tw-text-opacity, 1)); -} - -.hover\:text-zinc-800:hover{ - --tw-text-opacity: 1; - color: rgb(39 39 42 / var(--tw-text-opacity, 1)); -} - -.hover\:text-zinc-900:hover{ - --tw-text-opacity: 1; - color: rgb(24 24 27 / var(--tw-text-opacity, 1)); -} - -.hover\:underline:hover{ - text-decoration-line: underline; -} - -.hover\:opacity-100:hover{ - opacity: 1; -} - -.focus\:border-neutral-300:focus{ - --tw-border-opacity: 1; - border-color: rgb(212 212 212 / var(--tw-border-opacity, 1)); -} - -.focus\:border-zinc-300:focus{ - --tw-border-opacity: 1; - border-color: rgb(212 212 216 / var(--tw-border-opacity, 1)); -} - -.focus\:no-underline:focus{ - text-decoration-line: none; -} - -.focus\:outline-none:focus{ - outline: 2px solid transparent; - outline-offset: 2px; -} - -.focus\:ring-2:focus{ - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -.focus\:ring-neutral-100:focus{ - --tw-ring-opacity: 1; - --tw-ring-color: rgb(245 245 245 / var(--tw-ring-opacity, 1)); -} - -.focus\:ring-neutral-400:focus{ - --tw-ring-opacity: 1; - --tw-ring-color: rgb(163 163 163 / var(--tw-ring-opacity, 1)); -} - -.focus\:ring-neutral-900:focus{ - --tw-ring-opacity: 1; - --tw-ring-color: rgb(23 23 23 / var(--tw-ring-opacity, 1)); -} - -.focus\:ring-offset-2:focus{ - --tw-ring-offset-width: 2px; -} - -.focus-visible\:outline-none:focus-visible{ - outline: 2px solid transparent; - outline-offset: 2px; -} - -.focus-visible\:ring-2:focus-visible{ - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); -} - -.focus-visible\:ring-offset-2:focus-visible{ - --tw-ring-offset-width: 2px; -} - -.disabled\:pointer-events-none:disabled{ - pointer-events: none; -} - -.disabled\:cursor-not-allowed:disabled{ - cursor: not-allowed; -} - -.disabled\:opacity-50:disabled{ - opacity: 0.5; -} - -.group:hover .group-hover\:w-full{ - width: 100%; -} - -.group:hover .group-hover\:-rotate-6{ - --tw-rotate: -6deg; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.group:hover .group-hover\:scale-150{ - --tw-scale-x: 1.5; - --tw-scale-y: 1.5; - transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); -} - -.group:hover .group-hover\:opacity-100{ - opacity: 1; -} - -.group:hover .group-hover\:\[animation-play-state\:paused\]{ - animation-play-state: paused; -} - -.peer:disabled ~ .peer-disabled\:cursor-not-allowed{ - cursor: not-allowed; -} - -.peer:disabled ~ .peer-disabled\:opacity-70{ - opacity: 0.7; -} - -@supports (overflow:clip){ - .supports-\[overflow\:clip\]\:overflow-clip{ - overflow: clip; - } -} - -@media not all and (min-width: 1024px){ - .max-lg\:w-32{ - width: 8rem; - } - - .max-lg\:after\:hidden::after{ - content: var(--tw-content); - display: none; - } -} - -@media not all and (min-width: 640px){ - .max-sm\:order-1{ - order: 1; - } -} - -@media (min-width: 640px){ - .sm\:col-span-2{ - grid-column: span 2 / span 2; - } - - .sm\:col-span-6{ - grid-column: span 6 / span 6; - } - - .sm\:mb-0{ - margin-bottom: 0px; - } - - .sm\:inline-flex{ - display: inline-flex; - } - - .sm\:h-auto{ - height: auto; - } - - .sm\:max-w-lg{ - max-width: 32rem; - } - - .sm\:max-w-none{ - max-width: none; - } - - .sm\:grid-cols-12{ - grid-template-columns: repeat(12, minmax(0, 1fr)); - } - - .sm\:grid-cols-2{ - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - - .sm\:flex-row{ - flex-direction: row; - } - - .sm\:justify-center{ - justify-content: center; - } - - .sm\:justify-between{ - justify-content: space-between; - } - - .sm\:gap-4{ - gap: 1rem; - } - - .sm\:space-x-2 > :not([hidden]) ~ :not([hidden]){ - --tw-space-x-reverse: 0; - margin-right: calc(0.5rem * var(--tw-space-x-reverse)); - margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse))); - } - - .sm\:space-x-4 > :not([hidden]) ~ :not([hidden]){ - --tw-space-x-reverse: 0; - margin-right: calc(1rem * var(--tw-space-x-reverse)); - margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse))); - } - - .sm\:space-y-0 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0px * var(--tw-space-y-reverse)); - } - - .sm\:rounded-lg{ - border-radius: 0.5rem; - } - - .sm\:object-contain{ - -o-object-fit: contain; - object-fit: contain; - } - - .sm\:px-6{ - padding-left: 1.5rem; - padding-right: 1.5rem; - } -} - -@media (min-width: 768px){ - .md\:top-6{ - top: 1.5rem; - } - - .md\:col-span-3{ - grid-column: span 3 / span 3; - } - - .md\:-mx-5{ - margin-left: -1.25rem; - margin-right: -1.25rem; - } - - .md\:mb-0{ - margin-bottom: 0px; - } - - .md\:max-w-none{ - max-width: none; - } - - .md\:grid-cols-3{ - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .md\:grid-cols-4{ - grid-template-columns: repeat(4, minmax(0, 1fr)); - } - - .md\:flex-row{ - flex-direction: row; - } - - .md\:justify-start{ - justify-content: flex-start; - } - - .md\:gap-0{ - gap: 0px; - } - - .md\:gap-4{ - gap: 1rem; - } - - .md\:gap-6{ - gap: 1.5rem; - } - - .md\:px-5{ - padding-left: 1.25rem; - padding-right: 1.25rem; - } - - .md\:py-12{ - padding-top: 3rem; - padding-bottom: 3rem; - } - - .md\:py-20{ - padding-top: 5rem; - padding-bottom: 5rem; - } - - .md\:pb-16{ - padding-bottom: 4rem; - } - - .md\:pb-20{ - padding-bottom: 5rem; - } - - .md\:pt-40{ - padding-top: 10rem; - } - - .md\:text-3xl{ - font-size: 2rem; - line-height: 1.3125; - letter-spacing: -0.017em; - } - - .md\:text-4xl{ - font-size: 2.5rem; - line-height: 1.25; - letter-spacing: -0.017em; - } - - .md\:text-5xl{ - font-size: 3.25rem; - line-height: 1.2; - letter-spacing: -0.017em; - } - - .md\:after\:block::after{ - content: var(--tw-content); - display: block; - } -} - -@media (min-width: 1024px){ - .lg\:col-span-2{ - grid-column: span 2 / span 2; - } - - .lg\:col-span-6{ - grid-column: span 6 / span 6; - } - - .lg\:mb-0{ - margin-bottom: 0px; - } - - .lg\:mt-32{ - margin-top: 8rem; - } - - .lg\:block{ - display: block; - } - - .lg\:flex{ - display: flex; - } - - .lg\:h-5{ - height: 1.25rem; - } - - .lg\:min-w-\[524px\]{ - min-width: 524px; - } - - .lg\:max-w-6xl{ - max-width: 72rem; - } - - .lg\:max-w-none{ - max-width: none; - } - - .lg\:grid-cols-3{ - grid-template-columns: repeat(3, minmax(0, 1fr)); - } - - .lg\:gap-16{ - gap: 4rem; - } - - .lg\:gap-8{ - gap: 2rem; - } - - .lg\:space-x-12 > :not([hidden]) ~ :not([hidden]){ - --tw-space-x-reverse: 0; - margin-right: calc(3rem * var(--tw-space-x-reverse)); - margin-left: calc(3rem * calc(1 - var(--tw-space-x-reverse))); - } - - .lg\:space-y-0 > :not([hidden]) ~ :not([hidden]){ - --tw-space-y-reverse: 0; - margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0px * var(--tw-space-y-reverse)); - } - - .lg\:p-24{ - padding: 6rem; - } - - .lg\:px-5{ - padding-left: 1.25rem; - padding-right: 1.25rem; - } - - .lg\:text-2xl{ - font-size: 1.5rem; - line-height: 1.415; - letter-spacing: -0.017em; - } - - .lg\:text-3xl{ - font-size: 2rem; - line-height: 1.3125; - letter-spacing: -0.017em; - } - - .lg\:text-xl{ - font-size: 1.25rem; - line-height: 1.5; - letter-spacing: -0.017em; - } -} - -@media (min-width: 1280px){ - .xl\:space-x-24 > :not([hidden]) ~ :not([hidden]){ - --tw-space-x-reverse: 0; - margin-right: calc(6rem * var(--tw-space-x-reverse)); - margin-left: calc(6rem * calc(1 - var(--tw-space-x-reverse))); - } -} - -.\[\&\>div\]\:mx-3>div{ - margin-left: 0.75rem; - margin-right: 0.75rem; -} - -.\[\&_\.active-breadcrumb\]\:font-medium .active-breadcrumb{ - font-weight: 500; -} - -.\[\&_\.active-breadcrumb\]\:text-neutral-600 .active-breadcrumb{ - --tw-text-opacity: 1; - color: rgb(82 82 82 / var(--tw-text-opacity, 1)); -} diff --git a/pkg/core/dwn/bridge/fetch.go b/cmd/motr/internal/fetch.go similarity index 99% rename from pkg/core/dwn/bridge/fetch.go rename to cmd/motr/internal/fetch.go index 0582faf0f..cde3fd96f 100644 --- a/pkg/core/dwn/bridge/fetch.go +++ b/cmd/motr/internal/fetch.go @@ -1,7 +1,7 @@ //go:build js && wasm // +build js,wasm -package bridge +package internal import ( "bytes" diff --git a/pkg/core/dwn/bridge/wasm.go b/cmd/motr/internal/wasm.go similarity index 97% rename from pkg/core/dwn/bridge/wasm.go rename to cmd/motr/internal/wasm.go index 3ca269fc5..6d381c151 100644 --- a/pkg/core/dwn/bridge/wasm.go +++ b/cmd/motr/internal/wasm.go @@ -1,7 +1,7 @@ //go:build js && wasm // +build js,wasm -package bridge +package internal import ( "encoding/base64" diff --git a/cmd/motr/main.go b/cmd/motr/main.go index 65413c8a5..a3e8aab37 100644 --- a/cmd/motr/main.go +++ b/cmd/motr/main.go @@ -4,23 +4,53 @@ package main import ( - "github.com/onsonr/sonr/pkg/core/dwn" - "github.com/onsonr/sonr/pkg/core/dwn/server" + "encoding/json" + "syscall/js" + + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/cmd/motr/internal" + "github.com/onsonr/sonr/pkg/common/session" + "github.com/onsonr/sonr/pkg/vault" + "github.com/onsonr/sonr/pkg/vault/types" ) var ( - env *dwn.Environment - config *dwn.Config - srv server.Server + env *types.Environment + config *types.Config err error ) -func main() { - // Load dwn config - if config, err = dwn.LoadJSONConfig(); err != nil { - panic(err) +func broadcastTx(this js.Value, args []js.Value) interface{} { + return nil +} + +func simulateTx(this js.Value, args []js.Value) interface{} { + return nil +} + +func processConfig(this js.Value, args []js.Value) interface{} { + if len(args) < 1 { + return nil } - srv = server.New(env, config) - srv.Serve() + configString := args[0].String() + if err := json.Unmarshal([]byte(configString), &config); err != nil { + println("Error parsing config:", err.Error()) + return nil + } + return nil +} + +func main() { + // Load dwn config + js.Global().Set("broadcastTx", js.FuncOf(broadcastTx)) + js.Global().Set("simulateTx", js.FuncOf(simulateTx)) + js.Global().Set("processConfig", js.FuncOf(processConfig)) + + e := echo.New() + e.Use(session.MotrMiddleware(config)) + e.Use(internal.WasmContextMiddleware) + vault.RegisterAPI(e) + + internal.ServeFetch(e) } diff --git a/crypto/accaddr/addr.go b/crypto/accaddr/addr.go new file mode 100644 index 000000000..50b2ad3ae --- /dev/null +++ b/crypto/accaddr/addr.go @@ -0,0 +1 @@ +package bip32 diff --git a/pkg/crypto/bip32/bip32.go b/crypto/accaddr/bip32.go similarity index 79% rename from pkg/crypto/bip32/bip32.go rename to crypto/accaddr/bip32.go index 3bc14cbeb..c840c753a 100644 --- a/pkg/crypto/bip32/bip32.go +++ b/crypto/accaddr/bip32.go @@ -10,11 +10,11 @@ import ( "github.com/btcsuite/btcd/btcec/v2" ) -// ComputePublicKey computes the public key of a child key given the extended public key, chain code, and index. -func ComputePublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, error) { +// ComputePublicKey computes the public key of a child key given the extended public key, chain code, coin type, and index. +func ComputePublicKey(extPubKey []byte, chainCode []byte, coinType uint32, index int) ([]byte, error) { // Check if the index is a hardened child key - if chainCode&0x80000000 != 0 && index < 0 { - return nil, errors.New("invalid index") + if uint32(index) >= HardenedOffset { + return nil, errors.New("cannot derive hardened child key from public key") } // Serialize the public key @@ -29,7 +29,7 @@ func ComputePublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, er binary.BigEndian.PutUint32(indexBytes, uint32(index)) // Compute the HMAC-SHA512 - mac := hmac.New(sha512.New, []byte{byte(chainCode)}) + mac := hmac.New(sha512.New, chainCode) mac.Write(pubKeyBytes) mac.Write(indexBytes) I := mac.Sum(nil) @@ -46,7 +46,7 @@ func ComputePublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, er return nil, errors.New("invalid child key") } - // Compute the child public key + // Compute the child public key: pubKey + IL * G ilx, ily := curve.ScalarBaseMult(IL) childX, childY := curve.Add(ilx, ily, pubKey.X(), pubKey.Y()) lx := newBigIntFieldVal(childX) diff --git a/crypto/accaddr/codec.go b/crypto/accaddr/codec.go new file mode 100644 index 000000000..f61aab4d7 --- /dev/null +++ b/crypto/accaddr/codec.go @@ -0,0 +1,18 @@ +package bip32 + +type CoinType uint32 + +const ( + // Hardened offset for BIP-44 derivation + HardenedOffset uint32 = 0x80000000 + + // Registered coin types for BIP-44 + CoinTypeBitcoin CoinType = CoinType(0 + HardenedOffset) + CoinTypeEthereum CoinType = CoinType(60 + HardenedOffset) + CoinTypeSonr CoinType = CoinType(703 + HardenedOffset) +) + +// Uint32 returns the coin type as a uint32. +func (c CoinType) Uint32() uint32 { + return uint32(c) +} diff --git a/pkg/crypto/accumulator/accumulator.go b/crypto/accumulator/accumulator.go similarity index 99% rename from pkg/crypto/accumulator/accumulator.go rename to crypto/accumulator/accumulator.go index b3e8a0a91..c3687628d 100755 --- a/pkg/crypto/accumulator/accumulator.go +++ b/crypto/accumulator/accumulator.go @@ -16,7 +16,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type structMarshal struct { diff --git a/pkg/crypto/accumulator/accumulator_test.go b/crypto/accumulator/accumulator_test.go similarity index 99% rename from pkg/crypto/accumulator/accumulator_test.go rename to crypto/accumulator/accumulator_test.go index 2a93ed941..65eb580b5 100755 --- a/pkg/crypto/accumulator/accumulator_test.go +++ b/crypto/accumulator/accumulator_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestNewAccumulator100(t *testing.T) { diff --git a/pkg/crypto/accumulator/key.go b/crypto/accumulator/key.go similarity index 99% rename from pkg/crypto/accumulator/key.go rename to crypto/accumulator/key.go index 32c5720bd..7b73a3f54 100755 --- a/pkg/crypto/accumulator/key.go +++ b/crypto/accumulator/key.go @@ -12,7 +12,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // SecretKey is the secret alpha only held by the accumulator manager. diff --git a/pkg/crypto/accumulator/key_test.go b/crypto/accumulator/key_test.go similarity index 98% rename from pkg/crypto/accumulator/key_test.go rename to crypto/accumulator/key_test.go index 72ee70647..75c8183e7 100755 --- a/pkg/crypto/accumulator/key_test.go +++ b/crypto/accumulator/key_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestSecretKeyMarshal(t *testing.T) { diff --git a/pkg/crypto/accumulator/lib.go b/crypto/accumulator/lib.go similarity index 98% rename from pkg/crypto/accumulator/lib.go rename to crypto/accumulator/lib.go index 4930ba18a..66c82662b 100755 --- a/pkg/crypto/accumulator/lib.go +++ b/crypto/accumulator/lib.go @@ -10,7 +10,7 @@ import ( "fmt" "math" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // dad constructs two polynomials - dA(x) and dD(x) diff --git a/pkg/crypto/accumulator/lib_test.go b/crypto/accumulator/lib_test.go similarity index 99% rename from pkg/crypto/accumulator/lib_test.go rename to crypto/accumulator/lib_test.go index 709a22216..b7ec55f3c 100755 --- a/pkg/crypto/accumulator/lib_test.go +++ b/crypto/accumulator/lib_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestEvaluatePolyG1(t *testing.T) { diff --git a/pkg/crypto/accumulator/proof.go b/crypto/accumulator/proof.go similarity index 99% rename from pkg/crypto/accumulator/proof.go rename to crypto/accumulator/proof.go index a32b665c7..9af282935 100755 --- a/pkg/crypto/accumulator/proof.go +++ b/crypto/accumulator/proof.go @@ -14,7 +14,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type proofParamsMarshal struct { diff --git a/pkg/crypto/accumulator/proof_test.go b/crypto/accumulator/proof_test.go similarity index 99% rename from pkg/crypto/accumulator/proof_test.go rename to crypto/accumulator/proof_test.go index eedbde88e..89d086ffc 100755 --- a/pkg/crypto/accumulator/proof_test.go +++ b/crypto/accumulator/proof_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestProofParamsMarshal(t *testing.T) { diff --git a/pkg/crypto/accumulator/witness.go b/crypto/accumulator/witness.go similarity index 99% rename from pkg/crypto/accumulator/witness.go rename to crypto/accumulator/witness.go index 585ee5d88..0be288136 100755 --- a/pkg/crypto/accumulator/witness.go +++ b/crypto/accumulator/witness.go @@ -12,7 +12,7 @@ import ( "git.sr.ht/~sircmpwn/go-bare" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // MembershipWitness contains the witness c and the value y respect to the accumulator state. diff --git a/pkg/crypto/accumulator/witness_test.go b/crypto/accumulator/witness_test.go similarity index 99% rename from pkg/crypto/accumulator/witness_test.go rename to crypto/accumulator/witness_test.go index bb0880c9b..317364a1c 100755 --- a/pkg/crypto/accumulator/witness_test.go +++ b/crypto/accumulator/witness_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func Test_Membership_Witness_New(t *testing.T) { diff --git a/pkg/crypto/bulletproof/generators.go b/crypto/bulletproof/generators.go similarity index 97% rename from pkg/crypto/bulletproof/generators.go rename to crypto/bulletproof/generators.go index 71d793c8a..31efd05f4 100755 --- a/pkg/crypto/bulletproof/generators.go +++ b/crypto/bulletproof/generators.go @@ -10,7 +10,7 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // generators contains a list of points to be used as generators for bulletproofs. diff --git a/pkg/crypto/bulletproof/generators_test.go b/crypto/bulletproof/generators_test.go similarity index 96% rename from pkg/crypto/bulletproof/generators_test.go rename to crypto/bulletproof/generators_test.go index b3d0ff6b5..35ca657ff 100755 --- a/pkg/crypto/bulletproof/generators_test.go +++ b/crypto/bulletproof/generators_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestGeneratorsHappyPath(t *testing.T) { diff --git a/pkg/crypto/bulletproof/helpers.go b/crypto/bulletproof/helpers.go similarity index 99% rename from pkg/crypto/bulletproof/helpers.go rename to crypto/bulletproof/helpers.go index f7b14ba1f..3be6431a8 100755 --- a/pkg/crypto/bulletproof/helpers.go +++ b/crypto/bulletproof/helpers.go @@ -9,7 +9,7 @@ package bulletproof import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // innerProduct takes two lists of scalars (a, b) and performs the dot product returning a single scalar. diff --git a/pkg/crypto/bulletproof/helpers_test.go b/crypto/bulletproof/helpers_test.go similarity index 97% rename from pkg/crypto/bulletproof/helpers_test.go rename to crypto/bulletproof/helpers_test.go index 1ab891ea6..10ec288b3 100755 --- a/pkg/crypto/bulletproof/helpers_test.go +++ b/crypto/bulletproof/helpers_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestInnerProductHappyPath(t *testing.T) { diff --git a/pkg/crypto/bulletproof/ipp_prover.go b/crypto/bulletproof/ipp_prover.go similarity index 99% rename from pkg/crypto/bulletproof/ipp_prover.go rename to crypto/bulletproof/ipp_prover.go index f059a9cca..53eb01834 100755 --- a/pkg/crypto/bulletproof/ipp_prover.go +++ b/crypto/bulletproof/ipp_prover.go @@ -11,7 +11,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // InnerProductProver is the struct used to create InnerProductProofs diff --git a/pkg/crypto/bulletproof/ipp_prover_test.go b/crypto/bulletproof/ipp_prover_test.go similarity index 98% rename from pkg/crypto/bulletproof/ipp_prover_test.go rename to crypto/bulletproof/ipp_prover_test.go index 6482adbdd..1199f178c 100755 --- a/pkg/crypto/bulletproof/ipp_prover_test.go +++ b/crypto/bulletproof/ipp_prover_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestIPPHappyPath(t *testing.T) { diff --git a/pkg/crypto/bulletproof/ipp_verifier.go b/crypto/bulletproof/ipp_verifier.go similarity index 99% rename from pkg/crypto/bulletproof/ipp_verifier.go rename to crypto/bulletproof/ipp_verifier.go index cdfbdf069..56977b51d 100755 --- a/pkg/crypto/bulletproof/ipp_verifier.go +++ b/crypto/bulletproof/ipp_verifier.go @@ -4,7 +4,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // InnerProductVerifier is the struct used to verify inner product proofs diff --git a/pkg/crypto/bulletproof/ipp_verifier_test.go b/crypto/bulletproof/ipp_verifier_test.go similarity index 98% rename from pkg/crypto/bulletproof/ipp_verifier_test.go rename to crypto/bulletproof/ipp_verifier_test.go index 2ef604529..84b2e2e61 100755 --- a/pkg/crypto/bulletproof/ipp_verifier_test.go +++ b/crypto/bulletproof/ipp_verifier_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestIPPVerifyHappyPath(t *testing.T) { diff --git a/pkg/crypto/bulletproof/range_batch_prover.go b/crypto/bulletproof/range_batch_prover.go similarity index 99% rename from pkg/crypto/bulletproof/range_batch_prover.go rename to crypto/bulletproof/range_batch_prover.go index 46413979a..0284ae7b6 100755 --- a/pkg/crypto/bulletproof/range_batch_prover.go +++ b/crypto/bulletproof/range_batch_prover.go @@ -6,7 +6,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // BatchProve proves that a list of scalars v are in the range n. diff --git a/pkg/crypto/bulletproof/range_batch_prover_test.go b/crypto/bulletproof/range_batch_prover_test.go similarity index 98% rename from pkg/crypto/bulletproof/range_batch_prover_test.go rename to crypto/bulletproof/range_batch_prover_test.go index d44e5365d..d781c2dbf 100755 --- a/pkg/crypto/bulletproof/range_batch_prover_test.go +++ b/crypto/bulletproof/range_batch_prover_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestRangeBatchProverHappyPath(t *testing.T) { diff --git a/pkg/crypto/bulletproof/range_batch_verifier.go b/crypto/bulletproof/range_batch_verifier.go similarity index 98% rename from pkg/crypto/bulletproof/range_batch_verifier.go rename to crypto/bulletproof/range_batch_verifier.go index f8057ccf9..e22161ccd 100755 --- a/pkg/crypto/bulletproof/range_batch_verifier.go +++ b/crypto/bulletproof/range_batch_verifier.go @@ -4,7 +4,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // VerifyBatched verifies a given batched range proof. diff --git a/pkg/crypto/bulletproof/range_batch_verifier_test.go b/crypto/bulletproof/range_batch_verifier_test.go similarity index 99% rename from pkg/crypto/bulletproof/range_batch_verifier_test.go rename to crypto/bulletproof/range_batch_verifier_test.go index 49e0e5e29..f9f6d554c 100755 --- a/pkg/crypto/bulletproof/range_batch_verifier_test.go +++ b/crypto/bulletproof/range_batch_verifier_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestRangeBatchVerifyHappyPath(t *testing.T) { diff --git a/pkg/crypto/bulletproof/range_prover.go b/crypto/bulletproof/range_prover.go similarity index 99% rename from pkg/crypto/bulletproof/range_prover.go rename to crypto/bulletproof/range_prover.go index 4f6dcd9b4..852a4f378 100755 --- a/pkg/crypto/bulletproof/range_prover.go +++ b/crypto/bulletproof/range_prover.go @@ -14,7 +14,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // RangeProver is the struct used to create RangeProofs diff --git a/pkg/crypto/bulletproof/range_prover_test.go b/crypto/bulletproof/range_prover_test.go similarity index 98% rename from pkg/crypto/bulletproof/range_prover_test.go rename to crypto/bulletproof/range_prover_test.go index a5deb8da1..333e02aec 100755 --- a/pkg/crypto/bulletproof/range_prover_test.go +++ b/crypto/bulletproof/range_prover_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestRangeProverHappyPath(t *testing.T) { diff --git a/pkg/crypto/bulletproof/range_verifier.go b/crypto/bulletproof/range_verifier.go similarity index 99% rename from pkg/crypto/bulletproof/range_verifier.go rename to crypto/bulletproof/range_verifier.go index 76c94e243..f17db1036 100755 --- a/pkg/crypto/bulletproof/range_verifier.go +++ b/crypto/bulletproof/range_verifier.go @@ -4,7 +4,7 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // RangeVerifier is the struct used to verify RangeProofs diff --git a/pkg/crypto/bulletproof/range_verifier_test.go b/crypto/bulletproof/range_verifier_test.go similarity index 98% rename from pkg/crypto/bulletproof/range_verifier_test.go rename to crypto/bulletproof/range_verifier_test.go index 3880ccfd4..2d5383c94 100755 --- a/pkg/crypto/bulletproof/range_verifier_test.go +++ b/crypto/bulletproof/range_verifier_test.go @@ -7,7 +7,7 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestRangeVerifyHappyPath(t *testing.T) { diff --git a/pkg/crypto/core/README.md b/crypto/core/README.md similarity index 100% rename from pkg/crypto/core/README.md rename to crypto/core/README.md diff --git a/pkg/crypto/core/commit.go b/crypto/core/commit.go similarity index 100% rename from pkg/crypto/core/commit.go rename to crypto/core/commit.go diff --git a/pkg/crypto/core/commit_test.go b/crypto/core/commit_test.go similarity index 100% rename from pkg/crypto/core/commit_test.go rename to crypto/core/commit_test.go diff --git a/pkg/crypto/core/curves/bls12377_curve.go b/crypto/core/curves/bls12377_curve.go similarity index 99% rename from pkg/crypto/core/curves/bls12377_curve.go rename to crypto/core/curves/bls12377_curve.go index 59bbee16b..8a41422f4 100755 --- a/pkg/crypto/core/curves/bls12377_curve.go +++ b/crypto/core/curves/bls12377_curve.go @@ -19,7 +19,7 @@ import ( bls12377 "github.com/consensys/gnark-crypto/ecc/bls12-377" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core" + "github.com/onsonr/sonr/crypto/core" ) // See 'r' = https://eprint.iacr.org/2018/962.pdf Figure 16 diff --git a/pkg/crypto/core/curves/bls12381_curve.go b/crypto/core/curves/bls12381_curve.go similarity index 99% rename from pkg/crypto/core/curves/bls12381_curve.go rename to crypto/core/curves/bls12381_curve.go index 71b270fb1..5fa0910a3 100755 --- a/pkg/crypto/core/curves/bls12381_curve.go +++ b/crypto/core/curves/bls12381_curve.go @@ -13,9 +13,9 @@ import ( "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/internal" ) var bls12381modulus = bhex("1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaab") diff --git a/pkg/crypto/core/curves/curve.go b/crypto/core/curves/curve.go similarity index 99% rename from pkg/crypto/core/curves/curve.go rename to crypto/core/curves/curve.go index 55e2f1956..af497eee2 100755 --- a/pkg/crypto/core/curves/curve.go +++ b/crypto/core/curves/curve.go @@ -16,7 +16,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) var ( diff --git a/pkg/crypto/core/curves/ec_point.go b/crypto/core/curves/ec_point.go similarity index 98% rename from pkg/crypto/core/curves/ec_point.go rename to crypto/core/curves/ec_point.go index 12ec61e1c..bfb0b0ec2 100755 --- a/pkg/crypto/core/curves/ec_point.go +++ b/crypto/core/curves/ec_point.go @@ -12,10 +12,10 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/core" + "github.com/onsonr/sonr/crypto/core" "github.com/dustinxie/ecc" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) var curveNameToID = map[string]byte{ diff --git a/pkg/crypto/core/curves/ec_point_test.go b/crypto/core/curves/ec_point_test.go similarity index 99% rename from pkg/crypto/core/curves/ec_point_test.go rename to crypto/core/curves/ec_point_test.go index c19b138ce..2199f11cb 100755 --- a/pkg/crypto/core/curves/ec_point_test.go +++ b/crypto/core/curves/ec_point_test.go @@ -15,8 +15,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core" - tt "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core" + tt "github.com/onsonr/sonr/crypto/internal" ) func TestIsIdentity(t *testing.T) { diff --git a/pkg/crypto/core/curves/ec_scalar.go b/crypto/core/curves/ec_scalar.go similarity index 98% rename from pkg/crypto/core/curves/ec_scalar.go rename to crypto/core/curves/ec_scalar.go index 3f7889722..3e193fb4d 100755 --- a/pkg/crypto/core/curves/ec_scalar.go +++ b/crypto/core/curves/ec_scalar.go @@ -18,9 +18,9 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/bwesterb/go-ristretto" - "github.com/onsonr/sonr/pkg/crypto/core" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/internal" ) type EcScalar interface { diff --git a/pkg/crypto/core/curves/ecdsa.go b/crypto/core/curves/ecdsa.go similarity index 100% rename from pkg/crypto/core/curves/ecdsa.go rename to crypto/core/curves/ecdsa.go diff --git a/pkg/crypto/core/curves/ed25519_curve.go b/crypto/core/curves/ed25519_curve.go similarity index 99% rename from pkg/crypto/core/curves/ed25519_curve.go rename to crypto/core/curves/ed25519_curve.go index 942c62cbc..5b101e91b 100755 --- a/pkg/crypto/core/curves/ed25519_curve.go +++ b/crypto/core/curves/ed25519_curve.go @@ -19,7 +19,7 @@ import ( "github.com/bwesterb/go-ristretto" ed "github.com/bwesterb/go-ristretto/edwards25519" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) type ScalarEd25519 struct { diff --git a/pkg/crypto/core/curves/ed25519_curve_test.go b/crypto/core/curves/ed25519_curve_test.go similarity index 99% rename from pkg/crypto/core/curves/ed25519_curve_test.go rename to crypto/core/curves/ed25519_curve_test.go index 4c60befc1..1c665f536 100755 --- a/pkg/crypto/core/curves/ed25519_curve_test.go +++ b/crypto/core/curves/ed25519_curve_test.go @@ -15,7 +15,7 @@ import ( ed "filippo.io/edwards25519" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) func TestScalarEd25519Random(t *testing.T) { diff --git a/pkg/crypto/core/curves/field.go b/crypto/core/curves/field.go similarity index 100% rename from pkg/crypto/core/curves/field.go rename to crypto/core/curves/field.go diff --git a/pkg/crypto/core/curves/field_test.go b/crypto/core/curves/field_test.go similarity index 100% rename from pkg/crypto/core/curves/field_test.go rename to crypto/core/curves/field_test.go diff --git a/pkg/crypto/core/curves/k256_bench_test.go b/crypto/core/curves/k256_bench_test.go similarity index 99% rename from pkg/crypto/core/curves/k256_bench_test.go rename to crypto/core/curves/k256_bench_test.go index 9d97910b2..94dd39ef6 100755 --- a/pkg/crypto/core/curves/k256_bench_test.go +++ b/crypto/core/curves/k256_bench_test.go @@ -9,8 +9,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" - mod "github.com/onsonr/sonr/pkg/crypto/core" - "github.com/onsonr/sonr/pkg/crypto/internal" + mod "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/crypto/internal" ) func BenchmarkK256(b *testing.B) { diff --git a/pkg/crypto/core/curves/k256_curve.go b/crypto/core/curves/k256_curve.go similarity index 97% rename from pkg/crypto/core/curves/k256_curve.go rename to crypto/core/curves/k256_curve.go index 3ad28148b..70132dc39 100755 --- a/pkg/crypto/core/curves/k256_curve.go +++ b/crypto/core/curves/k256_curve.go @@ -15,11 +15,11 @@ import ( "github.com/btcsuite/btcd/btcec/v2" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - secp256k1 "github.com/onsonr/sonr/pkg/crypto/core/curves/native/k256" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/k256/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/k256/fq" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + secp256k1 "github.com/onsonr/sonr/crypto/core/curves/native/k256" + "github.com/onsonr/sonr/crypto/core/curves/native/k256/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/k256/fq" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/curves/k256_curve_test.go b/crypto/core/curves/k256_curve_test.go similarity index 100% rename from pkg/crypto/core/curves/k256_curve_test.go rename to crypto/core/curves/k256_curve_test.go diff --git a/pkg/crypto/core/curves/native/bls12381/bls12381.go b/crypto/core/curves/native/bls12381/bls12381.go similarity index 96% rename from pkg/crypto/core/curves/native/bls12381/bls12381.go rename to crypto/core/curves/native/bls12381/bls12381.go index c4d53709e..4397bcbed 100755 --- a/pkg/crypto/core/curves/native/bls12381/bls12381.go +++ b/crypto/core/curves/native/bls12381/bls12381.go @@ -3,7 +3,7 @@ package bls12381 import ( "math/bits" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) var fqModulusBytes = [native.FieldBytes]byte{0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x5b, 0xfe, 0xff, 0x02, 0xa4, 0xbd, 0x53, 0x05, 0xd8, 0xa1, 0x09, 0x08, 0xd8, 0x39, 0x33, 0x48, 0x7d, 0x9d, 0x29, 0x53, 0xa7, 0xed, 0x73} diff --git a/pkg/crypto/core/curves/native/bls12381/fp.go b/crypto/core/curves/native/bls12381/fp.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/fp.go rename to crypto/core/curves/native/bls12381/fp.go index 3891ef990..5391686ee 100755 --- a/pkg/crypto/core/curves/native/bls12381/fp.go +++ b/crypto/core/curves/native/bls12381/fp.go @@ -6,8 +6,8 @@ import ( "io" "math/big" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) // fp field element mod p diff --git a/pkg/crypto/core/curves/native/bls12381/fp12.go b/crypto/core/curves/native/bls12381/fp12.go similarity index 100% rename from pkg/crypto/core/curves/native/bls12381/fp12.go rename to crypto/core/curves/native/bls12381/fp12.go diff --git a/pkg/crypto/core/curves/native/bls12381/fp12_test.go b/crypto/core/curves/native/bls12381/fp12_test.go similarity index 100% rename from pkg/crypto/core/curves/native/bls12381/fp12_test.go rename to crypto/core/curves/native/bls12381/fp12_test.go diff --git a/pkg/crypto/core/curves/native/bls12381/fp2.go b/crypto/core/curves/native/bls12381/fp2.go similarity index 100% rename from pkg/crypto/core/curves/native/bls12381/fp2.go rename to crypto/core/curves/native/bls12381/fp2.go diff --git a/pkg/crypto/core/curves/native/bls12381/fp2_test.go b/crypto/core/curves/native/bls12381/fp2_test.go similarity index 100% rename from pkg/crypto/core/curves/native/bls12381/fp2_test.go rename to crypto/core/curves/native/bls12381/fp2_test.go diff --git a/pkg/crypto/core/curves/native/bls12381/fp6.go b/crypto/core/curves/native/bls12381/fp6.go similarity index 100% rename from pkg/crypto/core/curves/native/bls12381/fp6.go rename to crypto/core/curves/native/bls12381/fp6.go diff --git a/pkg/crypto/core/curves/native/bls12381/fp6_test.go b/crypto/core/curves/native/bls12381/fp6_test.go similarity index 100% rename from pkg/crypto/core/curves/native/bls12381/fp6_test.go rename to crypto/core/curves/native/bls12381/fp6_test.go diff --git a/pkg/crypto/core/curves/native/bls12381/fp_test.go b/crypto/core/curves/native/bls12381/fp_test.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/fp_test.go rename to crypto/core/curves/native/bls12381/fp_test.go index 6ad685a77..6152ada0c 100755 --- a/pkg/crypto/core/curves/native/bls12381/fp_test.go +++ b/crypto/core/curves/native/bls12381/fp_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) func TestFpSetOne(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/bls12381/fq.go b/crypto/core/curves/native/bls12381/fq.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/fq.go rename to crypto/core/curves/native/bls12381/fq.go index f925beb5b..9ecf00ef1 100755 --- a/pkg/crypto/core/curves/native/bls12381/fq.go +++ b/crypto/core/curves/native/bls12381/fq.go @@ -5,7 +5,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) type Fq [native.FieldLimbs]uint64 diff --git a/pkg/crypto/core/curves/native/bls12381/fq_test.go b/crypto/core/curves/native/bls12381/fq_test.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/fq_test.go rename to crypto/core/curves/native/bls12381/fq_test.go index 0ff2e322c..f291e63ff 100755 --- a/pkg/crypto/core/curves/native/bls12381/fq_test.go +++ b/crypto/core/curves/native/bls12381/fq_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) func TestFqSetOne(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/bls12381/g1.go b/crypto/core/curves/native/bls12381/g1.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/g1.go rename to crypto/core/curves/native/bls12381/g1.go index 96180077f..6f7425c0f 100755 --- a/pkg/crypto/core/curves/native/bls12381/g1.go +++ b/crypto/core/curves/native/bls12381/g1.go @@ -7,8 +7,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/curves/native/bls12381/g1_test.go b/crypto/core/curves/native/bls12381/g1_test.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/g1_test.go rename to crypto/core/curves/native/bls12381/g1_test.go index 441ab0927..e8ab16463 100755 --- a/pkg/crypto/core/curves/native/bls12381/g1_test.go +++ b/crypto/core/curves/native/bls12381/g1_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) func TestG1IsOnCurve(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/bls12381/g2.go b/crypto/core/curves/native/bls12381/g2.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/g2.go rename to crypto/core/curves/native/bls12381/g2.go index 0278290a9..ac45d8105 100755 --- a/pkg/crypto/core/curves/native/bls12381/g2.go +++ b/crypto/core/curves/native/bls12381/g2.go @@ -7,8 +7,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/curves/native/bls12381/g2_test.go b/crypto/core/curves/native/bls12381/g2_test.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/g2_test.go rename to crypto/core/curves/native/bls12381/g2_test.go index cfdcf128d..faee647d6 100755 --- a/pkg/crypto/core/curves/native/bls12381/g2_test.go +++ b/crypto/core/curves/native/bls12381/g2_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) func TestG2IsOnCurve(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/bls12381/gt.go b/crypto/core/curves/native/bls12381/gt.go similarity index 99% rename from pkg/crypto/core/curves/native/bls12381/gt.go rename to crypto/core/curves/native/bls12381/gt.go index 5c48d5179..fb23ac4a8 100755 --- a/pkg/crypto/core/curves/native/bls12381/gt.go +++ b/crypto/core/curves/native/bls12381/gt.go @@ -3,8 +3,8 @@ package bls12381 import ( "io" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) // GtFieldBytes is the number of bytes needed to represent this field diff --git a/pkg/crypto/core/curves/native/bls12381/pairings.go b/crypto/core/curves/native/bls12381/pairings.go similarity index 100% rename from pkg/crypto/core/curves/native/bls12381/pairings.go rename to crypto/core/curves/native/bls12381/pairings.go diff --git a/pkg/crypto/core/curves/native/bls12381/pairings_test.go b/crypto/core/curves/native/bls12381/pairings_test.go similarity index 95% rename from pkg/crypto/core/curves/native/bls12381/pairings_test.go rename to crypto/core/curves/native/bls12381/pairings_test.go index fccb1d601..f253b0945 100755 --- a/pkg/crypto/core/curves/native/bls12381/pairings_test.go +++ b/crypto/core/curves/native/bls12381/pairings_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) func TestSinglePairing(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/field.go b/crypto/core/curves/native/field.go similarity index 99% rename from pkg/crypto/core/curves/native/field.go rename to crypto/core/curves/native/field.go index c29d0f82e..6a6d0a883 100755 --- a/pkg/crypto/core/curves/native/field.go +++ b/crypto/core/curves/native/field.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) // FieldLimbs is the number of limbs needed to represent this field diff --git a/pkg/crypto/core/curves/native/hash2field.go b/crypto/core/curves/native/hash2field.go similarity index 100% rename from pkg/crypto/core/curves/native/hash2field.go rename to crypto/core/curves/native/hash2field.go diff --git a/pkg/crypto/core/curves/native/isogeny.go b/crypto/core/curves/native/isogeny.go similarity index 100% rename from pkg/crypto/core/curves/native/isogeny.go rename to crypto/core/curves/native/isogeny.go diff --git a/pkg/crypto/core/curves/native/k256/fp/fp.go b/crypto/core/curves/native/k256/fp/fp.go similarity index 99% rename from pkg/crypto/core/curves/native/k256/fp/fp.go rename to crypto/core/curves/native/k256/fp/fp.go index 8d70837de..8f9cc4459 100755 --- a/pkg/crypto/core/curves/native/k256/fp/fp.go +++ b/crypto/core/curves/native/k256/fp/fp.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) var ( diff --git a/pkg/crypto/core/curves/native/k256/fp/fp_test.go b/crypto/core/curves/native/k256/fp/fp_test.go similarity index 98% rename from pkg/crypto/core/curves/native/k256/fp/fp_test.go rename to crypto/core/curves/native/k256/fp/fp_test.go index 701e706f2..3016d7a13 100755 --- a/pkg/crypto/core/curves/native/k256/fp/fp_test.go +++ b/crypto/core/curves/native/k256/fp/fp_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) func TestFpSetOne(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/k256/fp/secp256k1_fp.go b/crypto/core/curves/native/k256/fp/secp256k1_fp.go similarity index 100% rename from pkg/crypto/core/curves/native/k256/fp/secp256k1_fp.go rename to crypto/core/curves/native/k256/fp/secp256k1_fp.go diff --git a/pkg/crypto/core/curves/native/k256/fq/fq.go b/crypto/core/curves/native/k256/fq/fq.go similarity index 99% rename from pkg/crypto/core/curves/native/k256/fq/fq.go rename to crypto/core/curves/native/k256/fq/fq.go index da8196c9f..59aebecaf 100755 --- a/pkg/crypto/core/curves/native/k256/fq/fq.go +++ b/crypto/core/curves/native/k256/fq/fq.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) var ( diff --git a/pkg/crypto/core/curves/native/k256/fq/fq_test.go b/crypto/core/curves/native/k256/fq/fq_test.go similarity index 99% rename from pkg/crypto/core/curves/native/k256/fq/fq_test.go rename to crypto/core/curves/native/k256/fq/fq_test.go index deff77bc1..8416e8dc2 100755 --- a/pkg/crypto/core/curves/native/k256/fq/fq_test.go +++ b/crypto/core/curves/native/k256/fq/fq_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) func TestFqSetOne(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/k256/fq/secp256k1_fq.go b/crypto/core/curves/native/k256/fq/secp256k1_fq.go similarity index 100% rename from pkg/crypto/core/curves/native/k256/fq/secp256k1_fq.go rename to crypto/core/curves/native/k256/fq/secp256k1_fq.go diff --git a/pkg/crypto/core/curves/native/k256/point.go b/crypto/core/curves/native/k256/point.go similarity index 98% rename from pkg/crypto/core/curves/native/k256/point.go rename to crypto/core/curves/native/k256/point.go index 0958eff93..8b9951839 100755 --- a/pkg/crypto/core/curves/native/k256/point.go +++ b/crypto/core/curves/native/k256/point.go @@ -3,9 +3,9 @@ package k256 import ( "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/k256/fp" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/k256/fp" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/curves/native/k256/point_test.go b/crypto/core/curves/native/k256/point_test.go similarity index 73% rename from pkg/crypto/core/curves/native/k256/point_test.go rename to crypto/core/curves/native/k256/point_test.go index 0336bd1ba..4bbeec1cc 100755 --- a/pkg/crypto/core/curves/native/k256/point_test.go +++ b/crypto/core/curves/native/k256/point_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/k256" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/k256" ) func TestK256PointArithmetic_Hash(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/osswu.go b/crypto/core/curves/native/osswu.go similarity index 100% rename from pkg/crypto/core/curves/native/osswu.go rename to crypto/core/curves/native/osswu.go diff --git a/pkg/crypto/core/curves/native/p256/fp/fp.go b/crypto/core/curves/native/p256/fp/fp.go similarity index 98% rename from pkg/crypto/core/curves/native/p256/fp/fp.go rename to crypto/core/curves/native/p256/fp/fp.go index c5c1b84c9..6ef6d1314 100755 --- a/pkg/crypto/core/curves/native/p256/fp/fp.go +++ b/crypto/core/curves/native/p256/fp/fp.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) var ( diff --git a/pkg/crypto/core/curves/native/p256/fp/fp_test.go b/crypto/core/curves/native/p256/fp/fp_test.go similarity index 99% rename from pkg/crypto/core/curves/native/p256/fp/fp_test.go rename to crypto/core/curves/native/p256/fp/fp_test.go index 97b950b48..a198ae189 100755 --- a/pkg/crypto/core/curves/native/p256/fp/fp_test.go +++ b/crypto/core/curves/native/p256/fp/fp_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) func TestFpSetOne(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/p256/fp/p256_fp.go b/crypto/core/curves/native/p256/fp/p256_fp.go similarity index 100% rename from pkg/crypto/core/curves/native/p256/fp/p256_fp.go rename to crypto/core/curves/native/p256/fp/p256_fp.go diff --git a/pkg/crypto/core/curves/native/p256/fq/fq.go b/crypto/core/curves/native/p256/fq/fq.go similarity index 99% rename from pkg/crypto/core/curves/native/p256/fq/fq.go rename to crypto/core/curves/native/p256/fq/fq.go index 6d4cd2bbb..d3f8fd993 100755 --- a/pkg/crypto/core/curves/native/p256/fq/fq.go +++ b/crypto/core/curves/native/p256/fq/fq.go @@ -10,7 +10,7 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native" ) var ( diff --git a/pkg/crypto/core/curves/native/p256/fq/fq_test.go b/crypto/core/curves/native/p256/fq/fq_test.go similarity index 99% rename from pkg/crypto/core/curves/native/p256/fq/fq_test.go rename to crypto/core/curves/native/p256/fq/fq_test.go index 577912558..df0683334 100755 --- a/pkg/crypto/core/curves/native/p256/fq/fq_test.go +++ b/crypto/core/curves/native/p256/fq/fq_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/internal" ) func TestFqSetOne(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/p256/fq/p256_fq.go b/crypto/core/curves/native/p256/fq/p256_fq.go similarity index 100% rename from pkg/crypto/core/curves/native/p256/fq/p256_fq.go rename to crypto/core/curves/native/p256/fq/p256_fq.go diff --git a/pkg/crypto/core/curves/native/p256/point.go b/crypto/core/curves/native/p256/point.go similarity index 98% rename from pkg/crypto/core/curves/native/p256/point.go rename to crypto/core/curves/native/p256/point.go index ddc981db9..917efbb86 100755 --- a/pkg/crypto/core/curves/native/p256/point.go +++ b/crypto/core/curves/native/p256/point.go @@ -3,9 +3,9 @@ package p256 import ( "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/p256/fp" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/p256/fp" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/curves/native/p256/point_test.go b/crypto/core/curves/native/p256/point_test.go similarity index 77% rename from pkg/crypto/core/curves/native/p256/point_test.go rename to crypto/core/curves/native/p256/point_test.go index 650e39492..8ed346f3d 100755 --- a/pkg/crypto/core/curves/native/p256/point_test.go +++ b/crypto/core/curves/native/p256/point_test.go @@ -6,10 +6,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/p256" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/p256/fp" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/p256" + "github.com/onsonr/sonr/crypto/core/curves/native/p256/fp" ) func TestP256PointArithmetic_Double(t *testing.T) { diff --git a/pkg/crypto/core/curves/native/pasta/README.md b/crypto/core/curves/native/pasta/README.md similarity index 100% rename from pkg/crypto/core/curves/native/pasta/README.md rename to crypto/core/curves/native/pasta/README.md diff --git a/pkg/crypto/core/curves/native/pasta/fp/fp.go b/crypto/core/curves/native/pasta/fp/fp.go similarity index 99% rename from pkg/crypto/core/curves/native/pasta/fp/fp.go rename to crypto/core/curves/native/pasta/fp/fp.go index 25b3045c2..6154b900c 100755 --- a/pkg/crypto/core/curves/native/pasta/fp/fp.go +++ b/crypto/core/curves/native/pasta/fp/fp.go @@ -11,7 +11,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) type Fp fiat_pasta_fp_montgomery_domain_field_element diff --git a/pkg/crypto/core/curves/native/pasta/fp/fp_test.go b/crypto/core/curves/native/pasta/fp/fp_test.go similarity index 100% rename from pkg/crypto/core/curves/native/pasta/fp/fp_test.go rename to crypto/core/curves/native/pasta/fp/fp_test.go diff --git a/pkg/crypto/core/curves/native/pasta/fp/pasta_fp.go b/crypto/core/curves/native/pasta/fp/pasta_fp.go similarity index 100% rename from pkg/crypto/core/curves/native/pasta/fp/pasta_fp.go rename to crypto/core/curves/native/pasta/fp/pasta_fp.go diff --git a/pkg/crypto/core/curves/native/pasta/fq/fq.go b/crypto/core/curves/native/pasta/fq/fq.go similarity index 99% rename from pkg/crypto/core/curves/native/pasta/fq/fq.go rename to crypto/core/curves/native/pasta/fq/fq.go index aa89e5efb..e0e9a74b4 100755 --- a/pkg/crypto/core/curves/native/pasta/fq/fq.go +++ b/crypto/core/curves/native/pasta/fq/fq.go @@ -11,7 +11,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) type Fq fiat_pasta_fq_montgomery_domain_field_element diff --git a/pkg/crypto/core/curves/native/pasta/fq/fq_test.go b/crypto/core/curves/native/pasta/fq/fq_test.go similarity index 100% rename from pkg/crypto/core/curves/native/pasta/fq/fq_test.go rename to crypto/core/curves/native/pasta/fq/fq_test.go diff --git a/pkg/crypto/core/curves/native/pasta/fq/pasta_fq.go b/crypto/core/curves/native/pasta/fq/pasta_fq.go similarity index 100% rename from pkg/crypto/core/curves/native/pasta/fq/pasta_fq.go rename to crypto/core/curves/native/pasta/fq/pasta_fq.go diff --git a/pkg/crypto/core/curves/native/pasta/pallas.go b/crypto/core/curves/native/pasta/pallas.go similarity index 100% rename from pkg/crypto/core/curves/native/pasta/pallas.go rename to crypto/core/curves/native/pasta/pallas.go diff --git a/pkg/crypto/core/curves/native/point.go b/crypto/core/curves/native/point.go similarity index 100% rename from pkg/crypto/core/curves/native/point.go rename to crypto/core/curves/native/point.go diff --git a/pkg/crypto/core/curves/p256_bench_test.go b/crypto/core/curves/p256_bench_test.go similarity index 99% rename from pkg/crypto/core/curves/p256_bench_test.go rename to crypto/core/curves/p256_bench_test.go index f2c2c8903..3799c3cc3 100755 --- a/pkg/crypto/core/curves/p256_bench_test.go +++ b/crypto/core/curves/p256_bench_test.go @@ -16,7 +16,7 @@ import ( "math/big" "testing" - "github.com/onsonr/sonr/pkg/crypto/core" + "github.com/onsonr/sonr/crypto/core" ) func BenchmarkP256(b *testing.B) { diff --git a/pkg/crypto/core/curves/p256_curve.go b/crypto/core/curves/p256_curve.go similarity index 97% rename from pkg/crypto/core/curves/p256_curve.go rename to crypto/core/curves/p256_curve.go index 15930c051..363515557 100755 --- a/pkg/crypto/core/curves/p256_curve.go +++ b/crypto/core/curves/p256_curve.go @@ -13,11 +13,11 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - p256n "github.com/onsonr/sonr/pkg/crypto/core/curves/native/p256" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/p256/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/p256/fq" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + p256n "github.com/onsonr/sonr/crypto/core/curves/native/p256" + "github.com/onsonr/sonr/crypto/core/curves/native/p256/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/p256/fq" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/curves/p256_curve_test.go b/crypto/core/curves/p256_curve_test.go similarity index 100% rename from pkg/crypto/core/curves/p256_curve_test.go rename to crypto/core/curves/p256_curve_test.go diff --git a/pkg/crypto/core/curves/pallas_curve.go b/crypto/core/curves/pallas_curve.go similarity index 99% rename from pkg/crypto/core/curves/pallas_curve.go rename to crypto/core/curves/pallas_curve.go index 2f1e4d488..b0cd1de7b 100755 --- a/pkg/crypto/core/curves/pallas_curve.go +++ b/crypto/core/curves/pallas_curve.go @@ -18,8 +18,8 @@ import ( "golang.org/x/crypto/blake2b" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) var ( diff --git a/pkg/crypto/core/curves/pallas_curve_test.go b/crypto/core/curves/pallas_curve_test.go similarity index 96% rename from pkg/crypto/core/curves/pallas_curve_test.go rename to crypto/core/curves/pallas_curve_test.go index c372e6c60..f97ec028d 100755 --- a/pkg/crypto/core/curves/pallas_curve_test.go +++ b/crypto/core/curves/pallas_curve_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) func TestPointPallasAddDoubleMul(t *testing.T) { diff --git a/pkg/crypto/core/curves/secp256k1/secp256k1.go b/crypto/core/curves/secp256k1/secp256k1.go similarity index 100% rename from pkg/crypto/core/curves/secp256k1/secp256k1.go rename to crypto/core/curves/secp256k1/secp256k1.go diff --git a/pkg/crypto/core/curves/sp256_curve.go b/crypto/core/curves/sp256_curve.go similarity index 100% rename from pkg/crypto/core/curves/sp256_curve.go rename to crypto/core/curves/sp256_curve.go diff --git a/pkg/crypto/core/hash.go b/crypto/core/hash.go similarity index 99% rename from pkg/crypto/core/hash.go rename to crypto/core/hash.go index ec3680101..f48429170 100755 --- a/pkg/crypto/core/hash.go +++ b/crypto/core/hash.go @@ -18,7 +18,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "golang.org/x/crypto/hkdf" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) type HashField struct { diff --git a/pkg/crypto/core/hash_test.go b/crypto/core/hash_test.go similarity index 100% rename from pkg/crypto/core/hash_test.go rename to crypto/core/hash_test.go diff --git a/pkg/crypto/core/mod.go b/crypto/core/mod.go similarity index 98% rename from pkg/crypto/core/mod.go rename to crypto/core/mod.go index a9ae15cb7..c6aae6a2e 100755 --- a/pkg/crypto/core/mod.go +++ b/crypto/core/mod.go @@ -16,7 +16,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/mod_test.go b/crypto/core/mod_test.go similarity index 99% rename from pkg/crypto/core/mod_test.go rename to crypto/core/mod_test.go index 3114ad51b..1e0483a63 100755 --- a/pkg/crypto/core/mod_test.go +++ b/crypto/core/mod_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/core/primes.go b/crypto/core/primes.go similarity index 100% rename from pkg/crypto/core/primes.go rename to crypto/core/primes.go diff --git a/pkg/crypto/core/protocol/protocol.go b/crypto/core/protocol/protocol.go similarity index 100% rename from pkg/crypto/core/protocol/protocol.go rename to crypto/core/protocol/protocol.go diff --git a/pkg/crypto/daed/aes_siv.go b/crypto/daed/aes_siv.go similarity index 100% rename from pkg/crypto/daed/aes_siv.go rename to crypto/daed/aes_siv.go diff --git a/pkg/crypto/daed/aes_siv_test.go b/crypto/daed/aes_siv_test.go similarity index 98% rename from pkg/crypto/daed/aes_siv_test.go rename to crypto/daed/aes_siv_test.go index 5831bb19f..335c30d71 100644 --- a/pkg/crypto/daed/aes_siv_test.go +++ b/crypto/daed/aes_siv_test.go @@ -8,8 +8,8 @@ import ( "path/filepath" "testing" - subtle "github.com/onsonr/sonr/pkg/crypto/daed" - "github.com/onsonr/sonr/pkg/crypto/subtle/random" + subtle "github.com/onsonr/sonr/crypto/daed" + "github.com/onsonr/sonr/crypto/subtle/random" ) type testData struct { diff --git a/crypto/didkey/key.go b/crypto/didkey/key.go new file mode 100644 index 000000000..e21216195 --- /dev/null +++ b/crypto/didkey/key.go @@ -0,0 +1,148 @@ +package didkey + +import ( + "crypto/ed25519" + "crypto/rsa" + "crypto/x509" + "fmt" + "strings" + + "github.com/libp2p/go-libp2p-core/crypto" + mb "github.com/multiformats/go-multibase" + varint "github.com/multiformats/go-varint" +) + +const ( + // KeyPrefix indicates a decentralized identifier that uses the key method + KeyPrefix = "did:key" + // MulticodecKindRSAPubKey rsa-x509-pub https://github.com/multiformats/multicodec/pull/226 + MulticodecKindRSAPubKey = 0x1205 + // MulticodecKindEd25519PubKey ed25519-pub + MulticodecKindEd25519PubKey = 0xed + // MulticodecKindSecp256k1PubKey secp256k1-pub + MulticodecKindSecp256k1PubKey = 0x1206 +) + +// ID is a DID:key identifier +type ID struct { + crypto.PubKey +} + +// NewID constructs an Identifier from a public key +func NewID(pub crypto.PubKey) (ID, error) { + switch pub.Type() { + case crypto.Ed25519, crypto.RSA, crypto.Secp256k1: + return ID{PubKey: pub}, nil + default: + return ID{}, fmt.Errorf("unsupported key type: %s", pub.Type()) + } +} + +// MulticodecType indicates the type for this multicodec +func (id ID) MulticodecType() uint64 { + switch id.Type() { + case crypto.RSA: + return MulticodecKindRSAPubKey + case crypto.Ed25519: + return MulticodecKindEd25519PubKey + case crypto.Secp256k1: + return MulticodecKindSecp256k1PubKey + default: + panic("unexpected crypto type") + } +} + +// String returns this did:key formatted as a string +func (id ID) String() string { + raw, err := id.Raw() + if err != nil { + return "" + } + + t := id.MulticodecType() + size := varint.UvarintSize(t) + data := make([]byte, size+len(raw)) + n := varint.PutUvarint(data, t) + copy(data[n:], raw) + + b58BKeyStr, err := mb.Encode(mb.Base58BTC, data) + if err != nil { + return "" + } + + return fmt.Sprintf("%s:%s", KeyPrefix, b58BKeyStr) +} + +// VerifyKey returns the backing implementation for a public key, one of: +// *rsa.PublicKey, ed25519.PublicKey +func (id ID) VerifyKey() (interface{}, error) { + rawPubBytes, err := id.PubKey.Raw() + if err != nil { + return nil, err + } + switch id.PubKey.Type() { + case crypto.RSA: + verifyKeyiface, err := x509.ParsePKIXPublicKey(rawPubBytes) + if err != nil { + return nil, err + } + verifyKey, ok := verifyKeyiface.(*rsa.PublicKey) + if !ok { + return nil, fmt.Errorf("public key is not an RSA key. got type: %T", verifyKeyiface) + } + return verifyKey, nil + case crypto.Ed25519: + return ed25519.PublicKey(rawPubBytes), nil + case crypto.Secp256k1: + return rawPubBytes, nil + default: + return nil, fmt.Errorf("unrecognized Public Key type: %s", id.PubKey.Type()) + } +} + +// Parse turns a string into a key method ID +func Parse(keystr string) (ID, error) { + var id ID + if !strings.HasPrefix(keystr, KeyPrefix) { + return id, fmt.Errorf("decentralized identifier is not a 'key' type") + } + + keystr = strings.TrimPrefix(keystr, KeyPrefix+":") + + enc, data, err := mb.Decode(keystr) + if err != nil { + return id, fmt.Errorf("decoding multibase: %w", err) + } + + if enc != mb.Base58BTC { + return id, fmt.Errorf("unexpected multibase encoding: %s", mb.EncodingToStr[enc]) + } + + keyType, n, err := varint.FromUvarint(data) + if err != nil { + return id, err + } + + switch keyType { + case MulticodecKindRSAPubKey: + pub, err := crypto.UnmarshalRsaPublicKey(data[n:]) + if err != nil { + return id, err + } + return ID{pub}, nil + case MulticodecKindEd25519PubKey: + pub, err := crypto.UnmarshalEd25519PublicKey(data[n:]) + if err != nil { + return id, err + } + return ID{pub}, nil + case MulticodecKindSecp256k1PubKey: + pub, err := crypto.UnmarshalSecp256k1PublicKey(data[n:]) + if err != nil { + return id, err + } + return ID{pub}, nil + } + + return id, fmt.Errorf("unrecognized key type multicodec prefix: %x", data[0]) +} diff --git a/crypto/didkey/resolver.go b/crypto/didkey/resolver.go new file mode 100644 index 000000000..37adbf3f8 --- /dev/null +++ b/crypto/didkey/resolver.go @@ -0,0 +1,132 @@ +package didkey + +import ( + "context" + "fmt" + + "github.com/golang-jwt/jwt" + "github.com/ucan-wg/go-ucan" + "github.com/ucan-wg/go-ucan/didkey" +) + +// DIDPubKeyResolver turns did:key Decentralized IDentifiers into a public key, +// possibly using a network request +type DIDPubKeyResolver interface { + ResolveDIDKey(ctx context.Context, did string) (ID, error) +} + +// TokenParser parses a raw string into a Token +type TokenParser struct { + ap ucan.AttenuationConstructorFunc + cidr ucan.CIDBytesResolver + didr DIDPubKeyResolver +} + +// NewTokenParser constructs a token parser +func NewTokenParser(ap ucan.AttenuationConstructorFunc, didr DIDPubKeyResolver, cidr ucan.CIDBytesResolver) *TokenParser { + return &TokenParser{ + ap: ap, + cidr: cidr, + didr: didr, + } +} + +// ParseAndVerify will parse, validate and return a token +func (p *TokenParser) ParseAndVerify(ctx context.Context, raw string) (*ucan.Token, error) { + return p.parseAndVerify(ctx, raw, nil) +} + +func (p *TokenParser) parseAndVerify(ctx context.Context, raw string, _ *ucan.Token) (*ucan.Token, error) { + tok, err := jwt.Parse(raw, p.matchVerifyKeyFunc(ctx)) + if err != nil { + return nil, fmt.Errorf("parsing UCAN: %w", err) + } + + mc, ok := tok.Claims.(jwt.MapClaims) + if !ok { + return nil, fmt.Errorf("parser fail") + } + + var iss didkey.ID + // TODO(b5): we're double parsing here b/c the jwt lib we're using doesn't expose + // an API (that I know of) for storing parsed issuer / audience + if issStr, ok := mc["iss"].(string); ok { + iss, err = didkey.Parse(issStr) + if err != nil { + return nil, err + } + } else { + return nil, fmt.Errorf(`"iss" key is not in claims`) + } + + var aud didkey.ID + // TODO(b5): we're double parsing here b/c the jwt lib we're using doesn't expose + // an API (that I know of) for storing parsed issuer / audience + if audStr, ok := mc["aud"].(string); ok { + aud, err = didkey.Parse(audStr) + if err != nil { + return nil, err + } + } else { + return nil, fmt.Errorf(`"aud" key is not in claims`) + } + + var att ucan.Attenuations + if acci, ok := mc[ucan.AttKey].([]interface{}); ok { + for i, a := range acci { + if mapv, ok := a.(map[string]interface{}); ok { + a, err := p.ap(mapv) + if err != nil { + return nil, err + } + att = append(att, a) + } else { + return nil, fmt.Errorf(`"att[%d]" is not an object`, i) + } + } + } else { + return nil, fmt.Errorf(`"att" key is not an array`) + } + + var prf []ucan.Proof + if prfi, ok := mc[ucan.PrfKey].([]interface{}); ok { + for i, a := range prfi { + if pStr, ok := a.(string); ok { + prf = append(prf, ucan.Proof(pStr)) + } else { + return nil, fmt.Errorf(`"prf[%d]" is not a string`, i) + } + } + } else if mc[ucan.PrfKey] != nil { + return nil, fmt.Errorf(`"prf" key is not an array`) + } + + return &ucan.Token{ + Raw: raw, + Issuer: iss, + Audience: aud, + Attenuations: att, + Proofs: prf, + }, nil +} + +func (p *TokenParser) matchVerifyKeyFunc(ctx context.Context) func(tok *jwt.Token) (interface{}, error) { + return func(tok *jwt.Token) (interface{}, error) { + mc, ok := tok.Claims.(jwt.MapClaims) + if !ok { + return nil, fmt.Errorf("parser fail") + } + + iss, ok := mc["iss"].(string) + if !ok { + return nil, fmt.Errorf(`"iss" claims key is required`) + } + + id, err := p.didr.ResolveDIDKey(ctx, iss) + if err != nil { + return nil, err + } + + return id.VerifyKey() + } +} diff --git a/pkg/crypto/dkg/frost/README.md b/crypto/dkg/frost/README.md similarity index 100% rename from pkg/crypto/dkg/frost/README.md rename to crypto/dkg/frost/README.md diff --git a/pkg/crypto/dkg/frost/dkg_round1.go b/crypto/dkg/frost/dkg_round1.go similarity index 96% rename from pkg/crypto/dkg/frost/dkg_round1.go rename to crypto/dkg/frost/dkg_round1.go index 7af575091..277abcb2a 100755 --- a/pkg/crypto/dkg/frost/dkg_round1.go +++ b/crypto/dkg/frost/dkg_round1.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" - "github.com/onsonr/sonr/pkg/crypto/sharing" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/crypto/sharing" ) // Round1Bcast are values that are broadcast to all other participants diff --git a/pkg/crypto/dkg/frost/dkg_round2.go b/crypto/dkg/frost/dkg_round2.go similarity index 96% rename from pkg/crypto/dkg/frost/dkg_round2.go rename to crypto/dkg/frost/dkg_round2.go index 16cd6691a..ce680926e 100755 --- a/pkg/crypto/dkg/frost/dkg_round2.go +++ b/crypto/dkg/frost/dkg_round2.go @@ -9,9 +9,9 @@ package frost import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" - "github.com/onsonr/sonr/pkg/crypto/sharing" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/crypto/sharing" ) // Round2Bcast are values that are broadcast to all other participants diff --git a/pkg/crypto/dkg/frost/dkg_rounds_test.go b/crypto/dkg/frost/dkg_rounds_test.go similarity index 98% rename from pkg/crypto/dkg/frost/dkg_rounds_test.go rename to crypto/dkg/frost/dkg_rounds_test.go index 2c60514bc..3592ec80e 100755 --- a/pkg/crypto/dkg/frost/dkg_rounds_test.go +++ b/crypto/dkg/frost/dkg_rounds_test.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/sharing" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/sharing" ) var ( diff --git a/pkg/crypto/dkg/frost/participant.go b/crypto/dkg/frost/participant.go similarity index 92% rename from pkg/crypto/dkg/frost/participant.go rename to crypto/dkg/frost/participant.go index 5742059cd..c9ef4fc06 100755 --- a/pkg/crypto/dkg/frost/participant.go +++ b/crypto/dkg/frost/participant.go @@ -10,9 +10,9 @@ package frost import ( "strconv" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" - "github.com/onsonr/sonr/pkg/crypto/sharing" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/crypto/sharing" ) type DkgParticipant struct { diff --git a/pkg/crypto/dkg/gennaro/README.md b/crypto/dkg/gennaro/README.md similarity index 100% rename from pkg/crypto/dkg/gennaro/README.md rename to crypto/dkg/gennaro/README.md diff --git a/pkg/crypto/dkg/gennaro/participant.go b/crypto/dkg/gennaro/participant.go similarity index 95% rename from pkg/crypto/dkg/gennaro/participant.go rename to crypto/dkg/gennaro/participant.go index 04c1848c5..2c76e1d10 100755 --- a/pkg/crypto/dkg/gennaro/participant.go +++ b/crypto/dkg/gennaro/participant.go @@ -11,9 +11,9 @@ import ( "crypto/elliptic" "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) // Participant is a DKG player that contains information needed to perform DKG rounds diff --git a/pkg/crypto/dkg/gennaro/participant_test.go b/crypto/dkg/gennaro/participant_test.go similarity index 92% rename from pkg/crypto/dkg/gennaro/participant_test.go rename to crypto/dkg/gennaro/participant_test.go index 715cd7476..1088767c8 100755 --- a/pkg/crypto/dkg/gennaro/participant_test.go +++ b/crypto/dkg/gennaro/participant_test.go @@ -13,8 +13,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) var testGenerator, _ = curves.NewScalarBaseMult(btcec.S256(), big.NewInt(3333)) diff --git a/pkg/crypto/dkg/gennaro/round1.go b/crypto/dkg/gennaro/round1.go similarity index 93% rename from pkg/crypto/dkg/gennaro/round1.go rename to crypto/dkg/gennaro/round1.go index 1a8ad140e..e693ebfd4 100755 --- a/pkg/crypto/dkg/gennaro/round1.go +++ b/crypto/dkg/gennaro/round1.go @@ -10,9 +10,9 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/core" - "github.com/onsonr/sonr/pkg/crypto/internal" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/crypto/internal" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) // Round1Bcast are the values that are broadcast to all other participants diff --git a/pkg/crypto/dkg/gennaro/round2.go b/crypto/dkg/gennaro/round2.go similarity index 95% rename from pkg/crypto/dkg/gennaro/round2.go rename to crypto/dkg/gennaro/round2.go index 422272791..07e453023 100755 --- a/pkg/crypto/dkg/gennaro/round2.go +++ b/crypto/dkg/gennaro/round2.go @@ -9,8 +9,8 @@ package gennaro import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/internal" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/internal" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) type Round2Bcast = []*v1.ShareVerifier diff --git a/pkg/crypto/dkg/gennaro/round3.go b/crypto/dkg/gennaro/round3.go similarity index 95% rename from pkg/crypto/dkg/gennaro/round3.go rename to crypto/dkg/gennaro/round3.go index b6321989e..205e6d278 100755 --- a/pkg/crypto/dkg/gennaro/round3.go +++ b/crypto/dkg/gennaro/round3.go @@ -9,8 +9,8 @@ package gennaro import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/internal" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/internal" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) // Round3Bcast contains values that will be broadcast to other participants. diff --git a/pkg/crypto/dkg/gennaro/round4.go b/crypto/dkg/gennaro/round4.go similarity index 90% rename from pkg/crypto/dkg/gennaro/round4.go rename to crypto/dkg/gennaro/round4.go index 9cd7c201e..998c5edbf 100755 --- a/pkg/crypto/dkg/gennaro/round4.go +++ b/crypto/dkg/gennaro/round4.go @@ -9,10 +9,10 @@ package gennaro import ( "math/big" - "github.com/onsonr/sonr/pkg/crypto/core" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) // Round4 computes the public shares used by tECDSA during signing diff --git a/pkg/crypto/dkg/gennaro/rounds_test.go b/crypto/dkg/gennaro/rounds_test.go similarity index 99% rename from pkg/crypto/dkg/gennaro/rounds_test.go rename to crypto/dkg/gennaro/rounds_test.go index f756a9642..ad9715ca8 100755 --- a/pkg/crypto/dkg/gennaro/rounds_test.go +++ b/crypto/dkg/gennaro/rounds_test.go @@ -13,8 +13,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) func TestParticipantRound1Works(t *testing.T) { diff --git a/pkg/crypto/dkg/gennaro2p/README.md b/crypto/dkg/gennaro2p/README.md similarity index 100% rename from pkg/crypto/dkg/gennaro2p/README.md rename to crypto/dkg/gennaro2p/README.md diff --git a/pkg/crypto/dkg/gennaro2p/genarro2p.go b/crypto/dkg/gennaro2p/genarro2p.go similarity index 96% rename from pkg/crypto/dkg/gennaro2p/genarro2p.go rename to crypto/dkg/gennaro2p/genarro2p.go index 11fcff5da..1b1e3930c 100755 --- a/pkg/crypto/dkg/gennaro2p/genarro2p.go +++ b/crypto/dkg/gennaro2p/genarro2p.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/dkg/gennaro" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/dkg/gennaro" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) const threshold = 2 diff --git a/pkg/crypto/dkg/gennaro2p/genarro2p_test.go b/crypto/dkg/gennaro2p/genarro2p_test.go similarity index 97% rename from pkg/crypto/dkg/gennaro2p/genarro2p_test.go rename to crypto/dkg/gennaro2p/genarro2p_test.go index 9826f5153..5fe61d933 100755 --- a/pkg/crypto/dkg/gennaro2p/genarro2p_test.go +++ b/crypto/dkg/gennaro2p/genarro2p_test.go @@ -15,8 +15,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) var ( diff --git a/pkg/crypto/ecies/encrypt.go b/crypto/ecies/encrypt.go similarity index 100% rename from pkg/crypto/ecies/encrypt.go rename to crypto/ecies/encrypt.go diff --git a/pkg/crypto/ecies/keys.go b/crypto/ecies/keys.go similarity index 95% rename from pkg/crypto/ecies/keys.go rename to crypto/ecies/keys.go index 8d02d84cf..458a0803e 100644 --- a/pkg/crypto/ecies/keys.go +++ b/crypto/ecies/keys.go @@ -9,7 +9,7 @@ import ( eciesgo "github.com/ecies/go/v2" "lukechampine.com/blake3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type PrivateKey = eciesgo.PrivateKey diff --git a/pkg/crypto/ecies/keys_test.go b/crypto/ecies/keys_test.go similarity index 91% rename from pkg/crypto/ecies/keys_test.go rename to crypto/ecies/keys_test.go index 25d652402..d162e370c 100644 --- a/pkg/crypto/ecies/keys_test.go +++ b/crypto/ecies/keys_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/onsonr/sonr/pkg/crypto/ecies" + "github.com/onsonr/sonr/crypto/ecies" ) func TestGenerateKey(t *testing.T) { diff --git a/pkg/crypto/internal/err.go b/crypto/internal/err.go similarity index 100% rename from pkg/crypto/internal/err.go rename to crypto/internal/err.go diff --git a/pkg/crypto/internal/hash.go b/crypto/internal/hash.go similarity index 100% rename from pkg/crypto/internal/hash.go rename to crypto/internal/hash.go diff --git a/pkg/crypto/internal/hash_test.go b/crypto/internal/hash_test.go similarity index 100% rename from pkg/crypto/internal/hash_test.go rename to crypto/internal/hash_test.go diff --git a/pkg/crypto/internal/point.go b/crypto/internal/point.go similarity index 100% rename from pkg/crypto/internal/point.go rename to crypto/internal/point.go diff --git a/pkg/crypto/internal/testutils.go b/crypto/internal/testutils.go similarity index 100% rename from pkg/crypto/internal/testutils.go rename to crypto/internal/testutils.go diff --git a/crypto/mpc/encrypt.go b/crypto/mpc/encrypt.go new file mode 100644 index 000000000..840d7544c --- /dev/null +++ b/crypto/mpc/encrypt.go @@ -0,0 +1,90 @@ +package mpc + +import ( + "encoding/json" + "io" +) + +type exportData struct { + Address string `json:"addr"` + PubKey []byte `json:"pubKey"` + ValData []byte `json:"val"` + UserData []byte `json:"user"` +} + +func (e *exportData) Marshal() ([]byte, error) { + return json.Marshal(e) +} + +func (e *exportData) Unmarshal(data []byte) error { + return json.Unmarshal(data, e) +} + +func ImportKeyset(secret []byte, dat File) (Keyset, error) { + data, err := io.ReadAll(dat) + if err != nil { + return nil, err + } + var ed exportData + err = ed.Unmarshal(data) + if err != nil { + return nil, err + } + user, val, err := loadShareFromExportData(&ed) + if err != nil { + return nil, err + } + k := keyset{ + user: user, + val: val, + } + return k, nil +} + +func (k keyset) Export(client IPFSClient, secret []byte) (ExportedKeyset, error) { + valData, err := k.val.Marshal() + if err != nil { + return nil, err + } + userData, err := k.user.Marshal() + if err != nil { + return nil, err + } + addr, err := ComputeSonrAddr(k.val.PublicKey) + if err != nil { + return nil, err + } + ed := exportData{ + Address: addr, + PubKey: k.val.PublicKey, + ValData: valData, + UserData: userData, + } + return ed.Marshal() +} + +func loadShareFromExportData(data *exportData) (*UserKeyshare, *ValKeyshare, error) { + var ( + valMsg Message + userMsg Message + ) + err := json.Unmarshal(data.UserData, &userMsg) + if err != nil { + return nil, nil, err + } + err = json.Unmarshal(data.ValData, &valMsg) + if err != nil { + return nil, nil, err + } + user := &UserKeyshare{ + Message: userMsg, + Role: 2, + PublicKey: data.PubKey, + } + val := &ValKeyshare{ + Message: valMsg, + Role: 1, + PublicKey: data.PubKey, + } + return user, val, nil +} diff --git a/pkg/crypto/mpc/jwt.go b/crypto/mpc/jwt.go similarity index 93% rename from pkg/crypto/mpc/jwt.go rename to crypto/mpc/jwt.go index 7741034b1..015bc8119 100644 --- a/pkg/crypto/mpc/jwt.go +++ b/crypto/mpc/jwt.go @@ -11,11 +11,11 @@ import ( // MPCSigningMethod implements the SigningMethod interface for MPC-based signing type MPCSigningMethod struct { Name string - ks keyshareSource + ks ucanKeyshare } -// newMPCSigningMethod creates a new MPC signing method with the given keyshare source -func newMPCSigningMethod(name string, ks keyshareSource) *MPCSigningMethod { +// NewJWTSigningMethod creates a new MPC signing method with the given keyshare source +func NewJWTSigningMethod(name string, ks ucanKeyshare) *MPCSigningMethod { return &MPCSigningMethod{ Name: name, ks: ks, diff --git a/pkg/crypto/mpc/utils.go b/crypto/mpc/keyset.go similarity index 82% rename from pkg/crypto/mpc/utils.go rename to crypto/mpc/keyset.go index caacdb5d1..13aa8b57f 100644 --- a/pkg/crypto/mpc/utils.go +++ b/crypto/mpc/keyset.go @@ -6,11 +6,38 @@ import ( "math/big" "github.com/cosmos/cosmos-sdk/types/bech32" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" + "github.com/ipfs/boxo/files" + "github.com/ipfs/kubo/client/rpc" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" "golang.org/x/crypto/sha3" ) +type ( + ExportedKeyset = []byte + IPFSClient = *rpc.HttpApi + File = files.File +) + +type Keyset interface { + Val() *ValKeyshare + User() *UserKeyshare + Export(client IPFSClient, secret []byte) (ExportedKeyset, error) +} + +type keyset struct { + val *ValKeyshare + user *UserKeyshare +} + +func (k keyset) Val() *ValKeyshare { + return k.val +} + +func (k keyset) User() *UserKeyshare { + return k.user +} + func ComputeIssuerDID(pk []byte) (string, string, error) { addr, err := ComputeSonrAddr(pk) if err != nil { diff --git a/pkg/crypto/mpc/mpc.go b/crypto/mpc/protocol.go similarity index 88% rename from pkg/crypto/mpc/mpc.go rename to crypto/mpc/protocol.go index 43e5ac075..8471bc528 100644 --- a/pkg/crypto/mpc/mpc.go +++ b/crypto/mpc/protocol.go @@ -5,13 +5,13 @@ import ( "errors" "math/big" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1" ) // NewKeyshareSource generates a new MPC keyshare -func NewKeyshareSource() (KeyshareSource, error) { +func NewKeyset() (Keyset, error) { curve := curves.K256() valKs := dklsv1.NewAliceDkg(curve, protocol.Version1) userKs := dklsv1.NewBobDkg(curve, protocol.Version1) @@ -35,7 +35,7 @@ func NewKeyshareSource() (KeyshareSource, error) { if err != nil { return nil, err } - return createKeyshareSource(valShare, userShare) + return keyset{val: valShare, user: userShare}, nil } // RunSignProtocol runs the MPC signing protocol @@ -52,7 +52,7 @@ func RunSignProtocol(signFuncVal SignFunc, signFuncUser SignFunc) (Signature, er } // RunRefreshProtocol runs the MPC refresh protocol -func RunRefreshProtocol(refreshFuncVal RefreshFunc, refreshFuncUser RefreshFunc) (KeyshareSource, error) { +func RunRefreshProtocol(refreshFuncVal RefreshFunc, refreshFuncUser RefreshFunc) (Keyset, error) { aErr, bErr := runIteratedProtocol(refreshFuncVal, refreshFuncUser) if err := checkIteratedErrors(aErr, bErr); err != nil { return nil, err @@ -73,7 +73,7 @@ func RunRefreshProtocol(refreshFuncVal RefreshFunc, refreshFuncUser RefreshFunc) if err != nil { return nil, err } - return createKeyshareSource(valShare, userShare) + return keyset{val: valShare, user: userShare}, nil } // SerializeSecp256k1Signature serializes an ECDSA signature into a byte slice diff --git a/crypto/mpc/pubkey.go b/crypto/mpc/pubkey.go new file mode 100644 index 000000000..9629d3dac --- /dev/null +++ b/crypto/mpc/pubkey.go @@ -0,0 +1,70 @@ +package mpc + +import ( + "bytes" + "crypto/ecdsa" + "fmt" + + cometcrypto "github.com/cometbft/cometbft/crypto" +) + +type PublicKeyType string + +const ( + PublicKeyTypeRaw PublicKeyType = "secp256k1" + PublicKeyTypeCosmos PublicKeyType = "cosmos" + PublicKeyTypeBitcoin PublicKeyType = "bitcoin" + PublicKeyTypeEthereum PublicKeyType = "ethereum" + PublicKeyTypeSonr PublicKeyType = "sonr" +) + +type ECDSAPublicKey *ecdsa.PublicKey + +type PublicKey interface { + Address() cometcrypto.Address + Bytes() []byte + DID() string + VerifySignature(msg []byte, sig []byte) bool + Equals(cometcrypto.PubKey) bool + Type() string +} + +type rootPublicKey struct { + data []byte + kind string +} + +func (k rootPublicKey) Address() cometcrypto.Address { + return cometcrypto.AddressHash(k.data) +} + +func (k rootPublicKey) Bytes() []byte { + return k.data +} + +func (k rootPublicKey) DID() string { + return fmt.Sprintf("did:sonr:%s", k.Address()) +} + +func (k rootPublicKey) VerifySignature(msg []byte, sig []byte) bool { + ok, err := VerifySignature(k.data, msg, sig) + if err != nil { + return false + } + return ok +} + +func (k rootPublicKey) Equals(other cometcrypto.PubKey) bool { + return bytes.Equal(k.data, other.Bytes()) +} + +func (k rootPublicKey) Type() string { + return k.kind +} + +func createPublicKey(pk []byte, kind string) PublicKey { + return rootPublicKey{ + data: pk, + kind: kind, + } +} diff --git a/crypto/mpc/share.go b/crypto/mpc/share.go new file mode 100644 index 000000000..2bfbdca8b --- /dev/null +++ b/crypto/mpc/share.go @@ -0,0 +1,187 @@ +package mpc + +import ( + "crypto/ecdsa" + "encoding/json" + "errors" + + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1" + "golang.org/x/crypto/sha3" +) + +var ErrInvalidKeyshareRole = errors.New("invalid keyshare role") + +type Role int + +const ( + RoleUnknown Role = iota + RoleUser + RoleValidator +) + +func (r Role) IsUser() bool { + return r == RoleUser +} + +func (r Role) IsValidator() bool { + return r == RoleValidator +} + +// Message is the protocol.Message that is used for MPC +type Message *protocol.Message + +type Signature *curves.EcdsaSignature + +// RefreshFunc is the type for the refresh function +type RefreshFunc interface { + protocol.Iterator +} + +// SignFunc is the type for the sign function +type SignFunc interface { + protocol.Iterator +} + +type ValKeyshare struct { + Message Message `json:"message"` + Role int `json:"role"` // 1 for validator, 2 for user + PublicKey []byte `json:"public-key"` +} + +func NewValKeyshare(msg Message) (*ValKeyshare, error) { + valShare, err := dklsv1.DecodeAliceDkgResult(msg) + if err != nil { + return nil, err + } + return &ValKeyshare{ + Message: msg, + Role: 1, + PublicKey: valShare.PublicKey.ToAffineUncompressed(), + }, nil +} + +func (v *ValKeyshare) GetPayloads() map[string][]byte { + return v.Message.Payloads +} + +func (v *ValKeyshare) GetMetadata() map[string]string { + return v.Message.Metadata +} + +func (v *ValKeyshare) GetPublicKey() []byte { + return v.PublicKey +} + +func (v *ValKeyshare) GetProtocol() string { + return v.Message.Protocol +} + +func (v *ValKeyshare) GetRole() int32 { + return int32(v.Role) +} + +func (v *ValKeyshare) GetVersion() uint32 { + return uint32(v.Message.Version) +} + +func (v *ValKeyshare) ECDSAPublicKey() (*ecdsa.PublicKey, error) { + return ComputeEcdsaPublicKey(v.PublicKey) +} + +func (v *ValKeyshare) ExtractMessage() *protocol.Message { + return &protocol.Message{ + Payloads: v.GetPayloads(), + Metadata: v.GetMetadata(), + Protocol: v.GetProtocol(), + Version: uint(v.GetVersion()), + } +} + +func (v *ValKeyshare) RefreshFunc() (RefreshFunc, error) { + curve := curves.K256() + return dklsv1.NewAliceRefresh(curve, v.ExtractMessage(), protocol.Version1) +} + +func (v *ValKeyshare) SignFunc(msg []byte) (SignFunc, error) { + curve := curves.K256() + return dklsv1.NewAliceSign(curve, sha3.New256(), msg, v.ExtractMessage(), protocol.Version1) +} + +func (v *ValKeyshare) Marshal() ([]byte, error) { + return json.Marshal(v.Message) +} + +type UserKeyshare struct { + Message Message `json:"message"` // BobOutput + Role int `json:"role"` // 2 for user, 1 for validator + PublicKey []byte `json:"public-key"` +} + +func NewUserKeyshare(msg Message) (*UserKeyshare, error) { + out, err := dklsv1.DecodeBobDkgResult(msg) + if err != nil { + return nil, err + } + return &UserKeyshare{ + Message: msg, + Role: 2, + PublicKey: out.PublicKey.ToAffineUncompressed(), + }, nil +} + +func (u *UserKeyshare) GetPayloads() map[string][]byte { + return u.Message.Payloads +} + +func (u *UserKeyshare) GetMetadata() map[string]string { + return u.Message.Metadata +} + +func (u *UserKeyshare) GetPublicKey() []byte { + return u.PublicKey +} + +func (u *UserKeyshare) GetProtocol() string { + return u.Message.Protocol +} + +func (u *UserKeyshare) GetRole() int32 { + return int32(u.Role) +} + +func (u *UserKeyshare) GetVersion() uint32 { + return uint32(u.Message.Version) +} + +func (u *UserKeyshare) ECDSAPublicKey() (*ecdsa.PublicKey, error) { + return ComputeEcdsaPublicKey(u.PublicKey) +} + +func (u *UserKeyshare) ExtractMessage() *protocol.Message { + return &protocol.Message{ + Payloads: u.GetPayloads(), + Metadata: u.GetMetadata(), + Protocol: u.GetProtocol(), + Version: uint(u.GetVersion()), + } +} + +func (u *UserKeyshare) RefreshFunc() (RefreshFunc, error) { + curve := curves.K256() + return dklsv1.NewBobRefresh(curve, u.ExtractMessage(), protocol.Version1) +} + +func (u *UserKeyshare) SignFunc(msg []byte) (SignFunc, error) { + curve := curves.K256() + return dklsv1.NewBobSign(curve, sha3.New256(), msg, u.ExtractMessage(), protocol.Version1) +} + +func (u *UserKeyshare) Marshal() ([]byte, error) { + jsonBytes, err := json.Marshal(u.Message) + if err != nil { + return nil, err + } + return jsonBytes, nil +} diff --git a/pkg/crypto/mpc/source.go b/crypto/mpc/source.go similarity index 53% rename from pkg/crypto/mpc/source.go rename to crypto/mpc/source.go index d29bab935..1662d21c4 100644 --- a/pkg/crypto/mpc/source.go +++ b/crypto/mpc/source.go @@ -1,10 +1,14 @@ package mpc import ( + "context" "fmt" "time" + "github.com/onsonr/sonr/crypto/didkey" + "github.com/onsonr/sonr/x/dwn/types/attns" "github.com/ucan-wg/go-ucan" + "lukechampine.com/blake3" ) type KeyshareSource interface { @@ -12,19 +16,22 @@ type KeyshareSource interface { Address() string Issuer() string - DefaultOriginToken() (*Token, error) - PublicKey() []byte - TokenParser() *ucan.TokenParser + ChainCode() ([]byte, error) + OriginToken() (*Token, error) + PublicKey() PublicKey SignData(data []byte) ([]byte, error) VerifyData(data []byte, sig []byte) (bool, error) + UCANParser() *didkey.TokenParser } -func createKeyshareSource(val *ValKeyshare, user *UserKeyshare) (KeyshareSource, error) { +func NewSource(ks Keyset) (KeyshareSource, error) { + val := ks.Val() + user := ks.User() iss, addr, err := ComputeIssuerDID(val.GetPublicKey()) if err != nil { return nil, err } - return keyshareSource{ + return ucanKeyshare{ userShare: user, valShare: val, addr: addr, @@ -33,31 +40,65 @@ func createKeyshareSource(val *ValKeyshare, user *UserKeyshare) (KeyshareSource, } // Address returns the address of the keyshare -func (k keyshareSource) Address() string { +func (k ucanKeyshare) Address() string { return k.addr } // Issuer returns the DID of the issuer of the keyshare -func (k keyshareSource) Issuer() string { +func (k ucanKeyshare) Issuer() string { return k.issuerDID } +// ChainCode returns the chain code of the keyshare +func (k ucanKeyshare) ChainCode() ([]byte, error) { + sig, err := k.SignData([]byte(k.addr)) + if err != nil { + return nil, err + } + hash := blake3.Sum256(sig) + // Return the first 32 bytes of the hash + return hash[:32], nil +} + // PublicKey returns the public key of the keyshare -func (k keyshareSource) PublicKey() []byte { - return k.valShare.PublicKey +func (k ucanKeyshare) PublicKey() PublicKey { + return createPublicKey(k.valShare.PublicKey, "secp256k1") } // DefaultOriginToken returns a default token with the keyshare's issuer as the audience -func (k keyshareSource) DefaultOriginToken() (*Token, error) { - caps := NewSmartAccountCapabilities() - att := CreateSmartAccountAttenuations(caps, k.addr) +func (k ucanKeyshare) OriginToken() (*Token, error) { + att := attns.CreateSmartAccountAttenuations(k.addr) zero := time.Time{} return k.NewOriginToken(k.issuerDID, att, nil, zero, zero) } +func (k ucanKeyshare) SignData(data []byte) ([]byte, error) { + // Create signing functions + signFunc, err := k.userShare.SignFunc(data) + if err != nil { + return nil, fmt.Errorf("failed to create sign function: %w", err) + } + + valSignFunc, err := k.valShare.SignFunc(data) + if err != nil { + return nil, fmt.Errorf("failed to create validator sign function: %w", err) + } + + // Run the signing protocol + sig, err := RunSignProtocol(valSignFunc, signFunc) + if err != nil { + return nil, fmt.Errorf("failed to run sign protocol: %w", err) + } + return SerializeSignature(sig) +} + +func (k ucanKeyshare) VerifyData(data []byte, sig []byte) (bool, error) { + return VerifySignature(k.userShare.PublicKey, data, sig) +} + // TokenParser returns a token parser that can be used to parse tokens -func (k keyshareSource) TokenParser() *ucan.TokenParser { - caps := NewSmartAccountCapabilities() +func (k ucanKeyshare) UCANParser() *didkey.TokenParser { + caps := attns.AttentuationSmartAccount.GetCapabilities() ac := func(m map[string]interface{}) (ucan.Attenuation, error) { var ( cap string @@ -83,30 +124,15 @@ func (k keyshareSource) TokenParser() *ucan.TokenParser { } store := ucan.NewMemTokenStore() - return ucan.NewTokenParser(ac, ucan.StringDIDPubKeyResolver{}, store.(ucan.CIDBytesResolver)) + return didkey.NewTokenParser(ac, customDIDPubKeyResolver{}, store.(ucan.CIDBytesResolver)) } -func (k keyshareSource) SignData(data []byte) ([]byte, error) { +// customDIDPubKeyResolver implements the DIDPubKeyResolver interface without +// any network backing. Works if the key string given contains the public key +// itself +type customDIDPubKeyResolver struct{} - // Create signing functions - signFunc, err := k.userShare.SignFunc(data) - if err != nil { - return nil, fmt.Errorf("failed to create sign function: %w", err) - } - - valSignFunc, err := k.valShare.SignFunc(data) - if err != nil { - return nil, fmt.Errorf("failed to create validator sign function: %w", err) - } - - // Run the signing protocol - sig, err := RunSignProtocol(valSignFunc, signFunc) - if err != nil { - return nil, fmt.Errorf("failed to run sign protocol: %w", err) - } - return SerializeSignature(sig) -} - -func (k keyshareSource) VerifyData(data []byte, sig []byte) (bool, error) { - return VerifySignature(k.userShare.PublicKey, data, sig) +// ResolveDIDKey extracts a public key from a did:key string +func (customDIDPubKeyResolver) ResolveDIDKey(ctx context.Context, didStr string) (didkey.ID, error) { + return didkey.Parse(didStr) } diff --git a/pkg/crypto/mpc/ucan.go b/crypto/mpc/ucan.go similarity index 76% rename from pkg/crypto/mpc/ucan.go rename to crypto/mpc/ucan.go index a7555d660..a7da8b9c5 100644 --- a/pkg/crypto/mpc/ucan.go +++ b/crypto/mpc/ucan.go @@ -26,7 +26,7 @@ var ( CapKey = ucan.CapKey ) -type keyshareSource struct { +type ucanKeyshare struct { userShare *UserKeyshare valShare *ValKeyshare @@ -34,19 +34,19 @@ type keyshareSource struct { issuerDID string } -func (k keyshareSource) NewOriginToken(audienceDID string, att Attenuations, fct []Fact, notBefore, expires time.Time) (*ucan.Token, error) { +func (k ucanKeyshare) NewOriginToken(audienceDID string, att Attenuations, fct []Fact, notBefore, expires time.Time) (*ucan.Token, error) { return k.newToken(audienceDID, nil, att, fct, notBefore, expires) } -func (k keyshareSource) NewAttenuatedToken(parent *Token, audienceDID string, att ucan.Attenuations, fct []ucan.Fact, nbf, exp time.Time) (*Token, error) { +func (k ucanKeyshare) NewAttenuatedToken(parent *Token, audienceDID string, att ucan.Attenuations, fct []ucan.Fact, nbf, exp time.Time) (*Token, error) { if !parent.Attenuations.Contains(att) { return nil, fmt.Errorf("scope of ucan attenuations must be less than it's parent") } return k.newToken(audienceDID, append(parent.Proofs, Proof(parent.Raw)), att, fct, nbf, exp) } -func (k keyshareSource) newToken(audienceDID string, prf []Proof, att Attenuations, fct []Fact, nbf, exp time.Time) (*ucan.Token, error) { - t := jwt.New(newMPCSigningMethod("MPC256", k)) +func (k ucanKeyshare) newToken(audienceDID string, prf []Proof, att Attenuations, fct []Fact, nbf, exp time.Time) (*ucan.Token, error) { + t := jwt.New(NewJWTSigningMethod("MPC256", k)) // if _, err := did.Parse(audienceDID); err != nil { // return nil, fmt.Errorf("invalid audience DID: %w", err) diff --git a/pkg/crypto/ot/base/simplest/ot.go b/crypto/ot/base/simplest/ot.go similarity index 99% rename from pkg/crypto/ot/base/simplest/ot.go rename to crypto/ot/base/simplest/ot.go index 7df60c827..d8d98b178 100755 --- a/pkg/crypto/ot/base/simplest/ot.go +++ b/crypto/ot/base/simplest/ot.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/zkp/schnorr" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/zkp/schnorr" ) const ( diff --git a/pkg/crypto/ot/base/simplest/ot_test.go b/crypto/ot/base/simplest/ot_test.go similarity index 93% rename from pkg/crypto/ot/base/simplest/ot_test.go rename to crypto/ot/base/simplest/ot_test.go index 054693bf1..b3b803b73 100755 --- a/pkg/crypto/ot/base/simplest/ot_test.go +++ b/crypto/ot/base/simplest/ot_test.go @@ -14,9 +14,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/ottest" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/ottest" ) func TestOtOnMultipleCurves(t *testing.T) { diff --git a/pkg/crypto/ot/base/simplest/stream.go b/crypto/ot/base/simplest/stream.go similarity index 97% rename from pkg/crypto/ot/base/simplest/stream.go rename to crypto/ot/base/simplest/stream.go index 15066955d..7e7495ab3 100755 --- a/pkg/crypto/ot/base/simplest/stream.go +++ b/crypto/ot/base/simplest/stream.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/zkp/schnorr" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/zkp/schnorr" ) // ReceiverStreamOTRun exposes the entire seed OT process for the receiver in "stream mode" to the user. diff --git a/pkg/crypto/ot/base/simplest/util.go b/crypto/ot/base/simplest/util.go similarity index 100% rename from pkg/crypto/ot/base/simplest/util.go rename to crypto/ot/base/simplest/util.go diff --git a/pkg/crypto/ot/extension/kos/kos.go b/crypto/ot/extension/kos/kos.go similarity index 99% rename from pkg/crypto/ot/extension/kos/kos.go rename to crypto/ot/extension/kos/kos.go index 0dee042b9..e1fb9a0ad 100755 --- a/pkg/crypto/ot/extension/kos/kos.go +++ b/crypto/ot/extension/kos/kos.go @@ -17,8 +17,8 @@ import ( "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" "github.com/pkg/errors" ) diff --git a/pkg/crypto/ot/extension/kos/kos_test.go b/crypto/ot/extension/kos/kos_test.go similarity index 96% rename from pkg/crypto/ot/extension/kos/kos_test.go rename to crypto/ot/extension/kos/kos_test.go index e277cf630..ff40adaef 100755 --- a/pkg/crypto/ot/extension/kos/kos_test.go +++ b/crypto/ot/extension/kos/kos_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/ottest" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/ottest" ) func TestBinaryMult(t *testing.T) { diff --git a/pkg/crypto/ot/extension/kos/stream.go b/crypto/ot/extension/kos/stream.go similarity index 95% rename from pkg/crypto/ot/extension/kos/stream.go rename to crypto/ot/extension/kos/stream.go index 1f5ff4f2c..739299fee 100755 --- a/pkg/crypto/ot/extension/kos/stream.go +++ b/crypto/ot/extension/kos/stream.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" ) // ReceiverStreamCOtRun exposes an end-to-end "streaming" version of the cOT process for the receiver. diff --git a/pkg/crypto/ot/ottest/util.go b/crypto/ot/ottest/util.go similarity index 95% rename from pkg/crypto/ot/ottest/util.go rename to crypto/ot/ottest/util.go index 9a574226b..f000da8ed 100755 --- a/pkg/crypto/ot/ottest/util.go +++ b/crypto/ot/ottest/util.go @@ -5,8 +5,8 @@ package ottest import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" ) // RunSimplestOT is a utility function used _only_ during various tests. diff --git a/pkg/crypto/paillier/README.md b/crypto/paillier/README.md similarity index 100% rename from pkg/crypto/paillier/README.md rename to crypto/paillier/README.md diff --git a/pkg/crypto/paillier/paillier.go b/crypto/paillier/paillier.go similarity index 99% rename from pkg/crypto/paillier/paillier.go rename to crypto/paillier/paillier.go index b9ea50bbe..c094f4fb9 100755 --- a/pkg/crypto/paillier/paillier.go +++ b/crypto/paillier/paillier.go @@ -27,8 +27,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/crypto/internal" ) // PaillierPrimeBits is the number of bits used to generate Paillier Safe Primes. diff --git a/pkg/crypto/paillier/psf.go b/crypto/paillier/psf.go similarity index 97% rename from pkg/crypto/paillier/psf.go rename to crypto/paillier/psf.go index ca89d041a..b2d2b3583 100755 --- a/pkg/crypto/paillier/psf.go +++ b/crypto/paillier/psf.go @@ -12,9 +12,9 @@ import ( "fmt" "math/big" - crypto "github.com/onsonr/sonr/pkg/crypto/core" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + crypto "github.com/onsonr/sonr/crypto/core" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) // [spec] 10.2 and ProvePSF, VerifyPSF fig.15 diff --git a/pkg/crypto/paillier/psf_test.go b/crypto/paillier/psf_test.go similarity index 99% rename from pkg/crypto/paillier/psf_test.go rename to crypto/paillier/psf_test.go index f2f062d95..b27f25bb3 100755 --- a/pkg/crypto/paillier/psf_test.go +++ b/crypto/paillier/psf_test.go @@ -15,9 +15,9 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - crypto "github.com/onsonr/sonr/pkg/crypto/core" - curves2 "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + crypto "github.com/onsonr/sonr/crypto/core" + curves2 "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) var testPrimes = []*big.Int{ diff --git a/pkg/crypto/sharing/README.md b/crypto/sharing/README.md similarity index 100% rename from pkg/crypto/sharing/README.md rename to crypto/sharing/README.md diff --git a/pkg/crypto/sharing/ed25519_feldman_test.go b/crypto/sharing/ed25519_feldman_test.go similarity index 98% rename from pkg/crypto/sharing/ed25519_feldman_test.go rename to crypto/sharing/ed25519_feldman_test.go index ddecf4075..2337392ee 100755 --- a/pkg/crypto/sharing/ed25519_feldman_test.go +++ b/crypto/sharing/ed25519_feldman_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) var testCurve = curves.ED25519() diff --git a/pkg/crypto/sharing/feldman.go b/crypto/sharing/feldman.go similarity index 98% rename from pkg/crypto/sharing/feldman.go rename to crypto/sharing/feldman.go index 51940e040..ff2d42889 100755 --- a/pkg/crypto/sharing/feldman.go +++ b/crypto/sharing/feldman.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type FeldmanVerifier struct { diff --git a/pkg/crypto/sharing/pedersen.go b/crypto/sharing/pedersen.go similarity index 98% rename from pkg/crypto/sharing/pedersen.go rename to crypto/sharing/pedersen.go index 5e493755c..36230775f 100755 --- a/pkg/crypto/sharing/pedersen.go +++ b/crypto/sharing/pedersen.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // Pedersen Verifiable Secret Sharing Scheme diff --git a/pkg/crypto/sharing/polynomial.go b/crypto/sharing/polynomial.go similarity index 93% rename from pkg/crypto/sharing/polynomial.go rename to crypto/sharing/polynomial.go index 6e4be22e9..e146958ad 100755 --- a/pkg/crypto/sharing/polynomial.go +++ b/crypto/sharing/polynomial.go @@ -9,7 +9,7 @@ package sharing import ( "io" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type Polynomial struct { diff --git a/pkg/crypto/sharing/polynomial_test.go b/crypto/sharing/polynomial_test.go similarity index 91% rename from pkg/crypto/sharing/polynomial_test.go rename to crypto/sharing/polynomial_test.go index bea0bd307..1d828f8b2 100755 --- a/pkg/crypto/sharing/polynomial_test.go +++ b/crypto/sharing/polynomial_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestNewPoly(t *testing.T) { diff --git a/pkg/crypto/sharing/shamir.go b/crypto/sharing/shamir.go similarity index 99% rename from pkg/crypto/sharing/shamir.go rename to crypto/sharing/shamir.go index fe38b8d0a..0bc0f383b 100755 --- a/pkg/crypto/sharing/shamir.go +++ b/crypto/sharing/shamir.go @@ -16,7 +16,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type ShamirShare struct { diff --git a/pkg/crypto/sharing/shamir_test.go b/crypto/sharing/shamir_test.go similarity index 98% rename from pkg/crypto/sharing/shamir_test.go rename to crypto/sharing/shamir_test.go index 8394b0185..b9281a71d 100755 --- a/pkg/crypto/sharing/shamir_test.go +++ b/crypto/sharing/shamir_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestShamirSplitInvalidArgs(t *testing.T) { diff --git a/pkg/crypto/sharing/v1/bls12381g1_feldman_test.go b/crypto/sharing/v1/bls12381g1_feldman_test.go similarity index 98% rename from pkg/crypto/sharing/v1/bls12381g1_feldman_test.go rename to crypto/sharing/v1/bls12381g1_feldman_test.go index ddf020946..0a4e1dddf 100755 --- a/pkg/crypto/sharing/v1/bls12381g1_feldman_test.go +++ b/crypto/sharing/v1/bls12381g1_feldman_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) var ( diff --git a/pkg/crypto/sharing/v1/bls12381g1curve.go b/crypto/sharing/v1/bls12381g1curve.go similarity index 94% rename from pkg/crypto/sharing/v1/bls12381g1curve.go rename to crypto/sharing/v1/bls12381g1curve.go index f961c4258..319dfa498 100755 --- a/pkg/crypto/sharing/v1/bls12381g1curve.go +++ b/crypto/sharing/v1/bls12381g1curve.go @@ -11,9 +11,9 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/sharing/v1/bls12381g2_feldman_test.go b/crypto/sharing/v1/bls12381g2_feldman_test.go similarity index 100% rename from pkg/crypto/sharing/v1/bls12381g2_feldman_test.go rename to crypto/sharing/v1/bls12381g2_feldman_test.go diff --git a/pkg/crypto/sharing/v1/bls12381g2curve.go b/crypto/sharing/v1/bls12381g2curve.go similarity index 96% rename from pkg/crypto/sharing/v1/bls12381g2curve.go rename to crypto/sharing/v1/bls12381g2curve.go index 0360bb03b..58470270b 100755 --- a/pkg/crypto/sharing/v1/bls12381g2curve.go +++ b/crypto/sharing/v1/bls12381g2curve.go @@ -11,8 +11,8 @@ import ( "math/big" "sync" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) var ( diff --git a/pkg/crypto/sharing/v1/common.go b/crypto/sharing/v1/common.go similarity index 80% rename from pkg/crypto/sharing/v1/common.go rename to crypto/sharing/v1/common.go index c5ef0171b..285b5218c 100755 --- a/pkg/crypto/sharing/v1/common.go +++ b/crypto/sharing/v1/common.go @@ -7,7 +7,7 @@ package v1 import ( - kryptology "github.com/onsonr/sonr/pkg/crypto/core/curves" + kryptology "github.com/onsonr/sonr/crypto/core/curves" ) // ShareVerifier is used to verify secret shares from Feldman or Pedersen VSS diff --git a/pkg/crypto/sharing/v1/ed25519_feldman_test.go b/crypto/sharing/v1/ed25519_feldman_test.go similarity index 100% rename from pkg/crypto/sharing/v1/ed25519_feldman_test.go rename to crypto/sharing/v1/ed25519_feldman_test.go diff --git a/pkg/crypto/sharing/v1/ed25519_pedersen_test.go b/crypto/sharing/v1/ed25519_pedersen_test.go similarity index 97% rename from pkg/crypto/sharing/v1/ed25519_pedersen_test.go rename to crypto/sharing/v1/ed25519_pedersen_test.go index 3ac363851..351f0ad23 100755 --- a/pkg/crypto/sharing/v1/ed25519_pedersen_test.go +++ b/crypto/sharing/v1/ed25519_pedersen_test.go @@ -14,8 +14,8 @@ import ( "filippo.io/edwards25519" "github.com/stretchr/testify/require" - core "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + core "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/sharing/v1/ed25519curve.go b/crypto/sharing/v1/ed25519curve.go similarity index 97% rename from pkg/crypto/sharing/v1/ed25519curve.go rename to crypto/sharing/v1/ed25519curve.go index e94e1e623..cd0185e46 100755 --- a/pkg/crypto/sharing/v1/ed25519curve.go +++ b/crypto/sharing/v1/ed25519curve.go @@ -13,8 +13,8 @@ import ( ed "filippo.io/edwards25519" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) var ( diff --git a/pkg/crypto/sharing/v1/ed25519curve_test.go b/crypto/sharing/v1/ed25519curve_test.go similarity index 100% rename from pkg/crypto/sharing/v1/ed25519curve_test.go rename to crypto/sharing/v1/ed25519curve_test.go diff --git a/pkg/crypto/sharing/v1/feldman.go b/crypto/sharing/v1/feldman.go similarity index 98% rename from pkg/crypto/sharing/v1/feldman.go rename to crypto/sharing/v1/feldman.go index 9ffde8d91..2fbcde479 100755 --- a/pkg/crypto/sharing/v1/feldman.go +++ b/crypto/sharing/v1/feldman.go @@ -11,7 +11,7 @@ import ( "encoding/binary" "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // Feldman Verifiable Secret Sharing Scheme diff --git a/pkg/crypto/sharing/v1/k256_feldman_test.go b/crypto/sharing/v1/k256_feldman_test.go similarity index 100% rename from pkg/crypto/sharing/v1/k256_feldman_test.go rename to crypto/sharing/v1/k256_feldman_test.go diff --git a/pkg/crypto/sharing/v1/k256_pedersen_test.go b/crypto/sharing/v1/k256_pedersen_test.go similarity index 98% rename from pkg/crypto/sharing/v1/k256_pedersen_test.go rename to crypto/sharing/v1/k256_pedersen_test.go index 6b07d3bed..81f936901 100755 --- a/pkg/crypto/sharing/v1/k256_pedersen_test.go +++ b/crypto/sharing/v1/k256_pedersen_test.go @@ -13,7 +13,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/stretchr/testify/require" - core "github.com/onsonr/sonr/pkg/crypto/core/curves" + core "github.com/onsonr/sonr/crypto/core/curves" ) var ( diff --git a/pkg/crypto/sharing/v1/p256_feldman_test.go b/crypto/sharing/v1/p256_feldman_test.go similarity index 100% rename from pkg/crypto/sharing/v1/p256_feldman_test.go rename to crypto/sharing/v1/p256_feldman_test.go diff --git a/pkg/crypto/sharing/v1/pedersen.go b/crypto/sharing/v1/pedersen.go similarity index 97% rename from pkg/crypto/sharing/v1/pedersen.go rename to crypto/sharing/v1/pedersen.go index 6c83f82a7..3cbd4ac8a 100755 --- a/pkg/crypto/sharing/v1/pedersen.go +++ b/crypto/sharing/v1/pedersen.go @@ -12,8 +12,8 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) // Pedersen Verifiable Secret Sharing Scheme diff --git a/pkg/crypto/sharing/v1/polynomial.go b/crypto/sharing/v1/polynomial.go similarity index 95% rename from pkg/crypto/sharing/v1/polynomial.go rename to crypto/sharing/v1/polynomial.go index 6c8fc9d70..e631a9a5d 100755 --- a/pkg/crypto/sharing/v1/polynomial.go +++ b/crypto/sharing/v1/polynomial.go @@ -7,7 +7,7 @@ package v1 import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type polynomial struct { diff --git a/pkg/crypto/sharing/v1/polynomial_test.go b/crypto/sharing/v1/polynomial_test.go similarity index 100% rename from pkg/crypto/sharing/v1/polynomial_test.go rename to crypto/sharing/v1/polynomial_test.go diff --git a/pkg/crypto/sharing/v1/shamir.go b/crypto/sharing/v1/shamir.go similarity index 99% rename from pkg/crypto/sharing/v1/shamir.go rename to crypto/sharing/v1/shamir.go index 441d47abc..df1282d37 100755 --- a/pkg/crypto/sharing/v1/shamir.go +++ b/crypto/sharing/v1/shamir.go @@ -11,7 +11,7 @@ import ( "fmt" "math/big" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // ShamirShare is the data from splitting a secret diff --git a/pkg/crypto/sharing/v1/shamir_test.go b/crypto/sharing/v1/shamir_test.go similarity index 99% rename from pkg/crypto/sharing/v1/shamir_test.go rename to crypto/sharing/v1/shamir_test.go index 0e3073210..0fa383235 100755 --- a/pkg/crypto/sharing/v1/shamir_test.go +++ b/crypto/sharing/v1/shamir_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestShamirSplitInvalidArgs(t *testing.T) { diff --git a/pkg/crypto/signatures/bbs/blind_signature.go b/crypto/signatures/bbs/blind_signature.go similarity index 94% rename from pkg/crypto/signatures/bbs/blind_signature.go rename to crypto/signatures/bbs/blind_signature.go index 41fdcc1fd..0fa16ed29 100755 --- a/pkg/crypto/signatures/bbs/blind_signature.go +++ b/crypto/signatures/bbs/blind_signature.go @@ -10,8 +10,8 @@ import ( "errors" "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/signatures/common" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/signatures/common" ) // BlindSignature is a BBS+ blind signature diff --git a/pkg/crypto/signatures/bbs/blind_signature_context.go b/crypto/signatures/bbs/blind_signature_context.go similarity index 98% rename from pkg/crypto/signatures/bbs/blind_signature_context.go rename to crypto/signatures/bbs/blind_signature_context.go index b1107142b..a05edd1e9 100755 --- a/pkg/crypto/signatures/bbs/blind_signature_context.go +++ b/crypto/signatures/bbs/blind_signature_context.go @@ -14,9 +14,9 @@ import ( "github.com/gtank/merlin" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" - "github.com/onsonr/sonr/pkg/crypto/signatures/common" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/crypto/signatures/common" ) // BlindSignatureContext contains the data used for computing diff --git a/pkg/crypto/signatures/bbs/blind_signature_context_test.go b/crypto/signatures/bbs/blind_signature_context_test.go similarity index 98% rename from pkg/crypto/signatures/bbs/blind_signature_context_test.go rename to crypto/signatures/bbs/blind_signature_context_test.go index 25f1b18cd..6853818f9 100755 --- a/pkg/crypto/signatures/bbs/blind_signature_context_test.go +++ b/crypto/signatures/bbs/blind_signature_context_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestBlindSignatureContext(t *testing.T) { diff --git a/pkg/crypto/signatures/bbs/message_generators.go b/crypto/signatures/bbs/message_generators.go similarity index 97% rename from pkg/crypto/signatures/bbs/message_generators.go rename to crypto/signatures/bbs/message_generators.go index f3bcd31e3..641093671 100755 --- a/pkg/crypto/signatures/bbs/message_generators.go +++ b/crypto/signatures/bbs/message_generators.go @@ -9,7 +9,7 @@ package bbs import ( "errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // MessageGenerators are used to sign a vector of commitments for diff --git a/pkg/crypto/signatures/bbs/pok_signature.go b/crypto/signatures/bbs/pok_signature.go similarity index 97% rename from pkg/crypto/signatures/bbs/pok_signature.go rename to crypto/signatures/bbs/pok_signature.go index aba608c01..b16736e34 100755 --- a/pkg/crypto/signatures/bbs/pok_signature.go +++ b/crypto/signatures/bbs/pok_signature.go @@ -12,8 +12,8 @@ import ( "github.com/gtank/merlin" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/signatures/common" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/signatures/common" ) // PokSignature a.k.a. Proof of Knowledge of a Signature diff --git a/pkg/crypto/signatures/bbs/pok_signature_proof.go b/crypto/signatures/bbs/pok_signature_proof.go similarity index 98% rename from pkg/crypto/signatures/bbs/pok_signature_proof.go rename to crypto/signatures/bbs/pok_signature_proof.go index 318bd09d4..6ba4e4ace 100755 --- a/pkg/crypto/signatures/bbs/pok_signature_proof.go +++ b/crypto/signatures/bbs/pok_signature_proof.go @@ -12,8 +12,8 @@ import ( "github.com/gtank/merlin" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/signatures/common" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/signatures/common" ) // PokSignatureProof is the actual proof sent from a prover diff --git a/pkg/crypto/signatures/bbs/pok_signature_proof_test.go b/crypto/signatures/bbs/pok_signature_proof_test.go similarity index 98% rename from pkg/crypto/signatures/bbs/pok_signature_proof_test.go rename to crypto/signatures/bbs/pok_signature_proof_test.go index a84fc1a8e..6a1c571b1 100755 --- a/pkg/crypto/signatures/bbs/pok_signature_proof_test.go +++ b/crypto/signatures/bbs/pok_signature_proof_test.go @@ -13,8 +13,8 @@ import ( "github.com/gtank/merlin" "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/signatures/common" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/signatures/common" ) func TestPokSignatureProofSomeMessagesRevealed(t *testing.T) { diff --git a/pkg/crypto/signatures/bbs/public_key.go b/crypto/signatures/bbs/public_key.go similarity index 97% rename from pkg/crypto/signatures/bbs/public_key.go rename to crypto/signatures/bbs/public_key.go index ff61a30b7..57d80a611 100755 --- a/pkg/crypto/signatures/bbs/public_key.go +++ b/crypto/signatures/bbs/public_key.go @@ -10,7 +10,7 @@ import ( "errors" "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // PublicKey is a BBS+ verification key diff --git a/pkg/crypto/signatures/bbs/secret_key.go b/crypto/signatures/bbs/secret_key.go similarity index 98% rename from pkg/crypto/signatures/bbs/secret_key.go rename to crypto/signatures/bbs/secret_key.go index a46ec7503..a1d24df7a 100755 --- a/pkg/crypto/signatures/bbs/secret_key.go +++ b/crypto/signatures/bbs/secret_key.go @@ -16,7 +16,7 @@ import ( "golang.org/x/crypto/hkdf" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // SecretKey is a BBS+ signing key diff --git a/pkg/crypto/signatures/bbs/signature.go b/crypto/signatures/bbs/signature.go similarity index 96% rename from pkg/crypto/signatures/bbs/signature.go rename to crypto/signatures/bbs/signature.go index 4bfc1e9d0..5964e58d6 100755 --- a/pkg/crypto/signatures/bbs/signature.go +++ b/crypto/signatures/bbs/signature.go @@ -11,7 +11,7 @@ import ( "errors" "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // Signature is a BBS+ signature diff --git a/pkg/crypto/signatures/bbs/signature_test.go b/crypto/signatures/bbs/signature_test.go similarity index 97% rename from pkg/crypto/signatures/bbs/signature_test.go rename to crypto/signatures/bbs/signature_test.go index 42fc3e1b4..6ff1159d7 100755 --- a/pkg/crypto/signatures/bbs/signature_test.go +++ b/crypto/signatures/bbs/signature_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestSignatureWorks(t *testing.T) { diff --git a/pkg/crypto/signatures/bls/README.md b/crypto/signatures/bls/README.md similarity index 100% rename from pkg/crypto/signatures/bls/README.md rename to crypto/signatures/bls/README.md diff --git a/pkg/crypto/signatures/bls/bls_sig/lib.go b/crypto/signatures/bls/bls_sig/lib.go similarity index 95% rename from pkg/crypto/signatures/bls/bls_sig/lib.go rename to crypto/signatures/bls/bls_sig/lib.go index 845a2954a..23802563e 100755 --- a/pkg/crypto/signatures/bls/bls_sig/lib.go +++ b/crypto/signatures/bls/bls_sig/lib.go @@ -15,11 +15,11 @@ import ( "golang.org/x/crypto/hkdf" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/pkg/crypto/internal" - "github.com/onsonr/sonr/pkg/crypto/sharing" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/crypto/sharing" ) // Secret key in Fr diff --git a/pkg/crypto/signatures/bls/bls_sig/lib_test.go b/crypto/signatures/bls/bls_sig/lib_test.go similarity index 98% rename from pkg/crypto/signatures/bls/bls_sig/lib_test.go rename to crypto/signatures/bls/bls_sig/lib_test.go index 1e19449ef..57f41c082 100755 --- a/pkg/crypto/signatures/bls/bls_sig/lib_test.go +++ b/crypto/signatures/bls/bls_sig/lib_test.go @@ -13,8 +13,8 @@ import ( "math/big" "testing" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/internal" ) func genSecretKey(t *testing.T) *SecretKey { diff --git a/pkg/crypto/signatures/bls/bls_sig/tiny_bls.go b/crypto/signatures/bls/bls_sig/tiny_bls.go similarity index 100% rename from pkg/crypto/signatures/bls/bls_sig/tiny_bls.go rename to crypto/signatures/bls/bls_sig/tiny_bls.go diff --git a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig.go b/crypto/signatures/bls/bls_sig/tiny_bls_sig.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig.go rename to crypto/signatures/bls/bls_sig/tiny_bls_sig.go index d7e4345de..ed1a6721f 100755 --- a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig.go +++ b/crypto/signatures/bls/bls_sig/tiny_bls_sig.go @@ -9,9 +9,9 @@ package bls_sig import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/internal" ) // Implement BLS signatures on the BLS12-381 curve diff --git a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go b/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go rename to crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go index 30d939a8e..6421022c2 100755 --- a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go +++ b/crypto/signatures/bls/bls_sig/tiny_bls_sig_aug_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) func generateAugSignatureG1(sk *SecretKey, msg []byte, t *testing.T) *SignatureVt { diff --git a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go b/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go rename to crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go index 9c8277a6c..d7f48d4b8 100755 --- a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go +++ b/crypto/signatures/bls/bls_sig/tiny_bls_sig_basic_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) func generateBasicSignatureG1(sk *SecretKey, msg []byte, t *testing.T) *SignatureVt { diff --git a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go b/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go rename to crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go index d9ddaa82c..82d737012 100755 --- a/pkg/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go +++ b/crypto/signatures/bls/bls_sig/tiny_bls_sig_pop_test.go @@ -12,7 +12,7 @@ import ( "math/rand" "testing" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) const numAggregateG1 = 10 diff --git a/pkg/crypto/signatures/bls/bls_sig/usual_bls.go b/crypto/signatures/bls/bls_sig/usual_bls.go similarity index 100% rename from pkg/crypto/signatures/bls/bls_sig/usual_bls.go rename to crypto/signatures/bls/bls_sig/usual_bls.go diff --git a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig.go b/crypto/signatures/bls/bls_sig/usual_bls_sig.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/usual_bls_sig.go rename to crypto/signatures/bls/bls_sig/usual_bls_sig.go index 5c1cc367b..284393eda 100755 --- a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig.go +++ b/crypto/signatures/bls/bls_sig/usual_bls_sig.go @@ -9,9 +9,9 @@ package bls_sig import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves/native" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/internal" ) // Implement BLS signatures on the BLS12-381 curve diff --git a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go b/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go rename to crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go index 31414f352..b70f8a316 100755 --- a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go +++ b/crypto/signatures/bls/bls_sig/usual_bls_sig_aug_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) func generateAugSignatureG2(sk *SecretKey, msg []byte, t *testing.T) *Signature { diff --git a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go b/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go rename to crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go index 36ebe014f..0b9682973 100755 --- a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go +++ b/crypto/signatures/bls/bls_sig/usual_bls_sig_basic_test.go @@ -9,7 +9,7 @@ package bls_sig import ( "testing" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) func generateBasicSignatureG2(sk *SecretKey, msg []byte, t *testing.T) *Signature { diff --git a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go b/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go similarity index 99% rename from pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go rename to crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go index 985d262c0..4a6157d83 100755 --- a/pkg/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go +++ b/crypto/signatures/bls/bls_sig/usual_bls_sig_pop_test.go @@ -12,7 +12,7 @@ import ( "math/rand" "testing" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/bls12381" + "github.com/onsonr/sonr/crypto/core/curves/native/bls12381" ) const numAggregateG2 = 10 diff --git a/pkg/crypto/signatures/bls/rust/Cargo.toml b/crypto/signatures/bls/rust/Cargo.toml similarity index 100% rename from pkg/crypto/signatures/bls/rust/Cargo.toml rename to crypto/signatures/bls/rust/Cargo.toml diff --git a/pkg/crypto/signatures/bls/rust/README.md b/crypto/signatures/bls/rust/README.md similarity index 100% rename from pkg/crypto/signatures/bls/rust/README.md rename to crypto/signatures/bls/rust/README.md diff --git a/pkg/crypto/signatures/bls/rust/src/main.rs b/crypto/signatures/bls/rust/src/main.rs similarity index 100% rename from pkg/crypto/signatures/bls/rust/src/main.rs rename to crypto/signatures/bls/rust/src/main.rs diff --git a/pkg/crypto/signatures/bls/tests/bls/main.go b/crypto/signatures/bls/tests/bls/main.go similarity index 98% rename from pkg/crypto/signatures/bls/tests/bls/main.go rename to crypto/signatures/bls/tests/bls/main.go index 2388e931f..14c6cc4f9 100755 --- a/pkg/crypto/signatures/bls/tests/bls/main.go +++ b/crypto/signatures/bls/tests/bls/main.go @@ -15,7 +15,7 @@ import ( "io/ioutil" "os" - bls "github.com/onsonr/sonr/pkg/crypto/signatures/bls/bls_sig" + bls "github.com/onsonr/sonr/crypto/signatures/bls/bls_sig" ) type signOp struct { diff --git a/pkg/crypto/signatures/bls/tmp.json b/crypto/signatures/bls/tmp.json similarity index 100% rename from pkg/crypto/signatures/bls/tmp.json rename to crypto/signatures/bls/tmp.json diff --git a/pkg/crypto/signatures/common/challenge.go b/crypto/signatures/common/challenge.go similarity index 80% rename from pkg/crypto/signatures/common/challenge.go rename to crypto/signatures/common/challenge.go index 3d14285cc..1a8db7f6e 100755 --- a/pkg/crypto/signatures/common/challenge.go +++ b/crypto/signatures/common/challenge.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // Challenge generated by fiat-shamir heuristic diff --git a/pkg/crypto/signatures/common/commitment.go b/crypto/signatures/common/commitment.go similarity index 83% rename from pkg/crypto/signatures/common/commitment.go rename to crypto/signatures/common/commitment.go index 77905ff1a..62a190054 100755 --- a/pkg/crypto/signatures/common/commitment.go +++ b/crypto/signatures/common/commitment.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // Commitment represents a point Pedersen commitment of one or more diff --git a/pkg/crypto/signatures/common/hmacdrbg.go b/crypto/signatures/common/hmacdrbg.go similarity index 100% rename from pkg/crypto/signatures/common/hmacdrbg.go rename to crypto/signatures/common/hmacdrbg.go diff --git a/pkg/crypto/signatures/common/nonce.go b/crypto/signatures/common/nonce.go similarity index 83% rename from pkg/crypto/signatures/common/nonce.go rename to crypto/signatures/common/nonce.go index 48ccb53de..4b117258c 100755 --- a/pkg/crypto/signatures/common/nonce.go +++ b/crypto/signatures/common/nonce.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // Nonce is used for zero-knowledge proofs to prevent replay attacks diff --git a/pkg/crypto/signatures/common/proof_committed_builder.go b/crypto/signatures/common/proof_committed_builder.go similarity index 98% rename from pkg/crypto/signatures/common/proof_committed_builder.go rename to crypto/signatures/common/proof_committed_builder.go index 538fb6dfb..8e19f8b36 100755 --- a/pkg/crypto/signatures/common/proof_committed_builder.go +++ b/crypto/signatures/common/proof_committed_builder.go @@ -10,7 +10,7 @@ import ( "fmt" "io" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) const limit = 65535 diff --git a/pkg/crypto/signatures/common/proof_message.go b/crypto/signatures/common/proof_message.go similarity index 97% rename from pkg/crypto/signatures/common/proof_message.go rename to crypto/signatures/common/proof_message.go index ab462c91b..4c60b9bd0 100755 --- a/pkg/crypto/signatures/common/proof_message.go +++ b/crypto/signatures/common/proof_message.go @@ -9,7 +9,7 @@ package common import ( "io" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // ProofMessage classifies how a message is presented in a proof diff --git a/pkg/crypto/signatures/common/signature_blinding.go b/crypto/signatures/common/signature_blinding.go similarity index 83% rename from pkg/crypto/signatures/common/signature_blinding.go rename to crypto/signatures/common/signature_blinding.go index e6988cc82..741ec9ee6 100755 --- a/pkg/crypto/signatures/common/signature_blinding.go +++ b/crypto/signatures/common/signature_blinding.go @@ -7,7 +7,7 @@ package common import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // SignatureBlinding is a value used for computing blind signatures diff --git a/pkg/crypto/signatures/schnorr/mina/bitvector.go b/crypto/signatures/schnorr/mina/bitvector.go similarity index 100% rename from pkg/crypto/signatures/schnorr/mina/bitvector.go rename to crypto/signatures/schnorr/mina/bitvector.go diff --git a/pkg/crypto/signatures/schnorr/mina/challenge_derive.go b/crypto/signatures/schnorr/mina/challenge_derive.go similarity index 94% rename from pkg/crypto/signatures/schnorr/mina/challenge_derive.go rename to crypto/signatures/schnorr/mina/challenge_derive.go index 345ee66cd..5e3111d76 100755 --- a/pkg/crypto/signatures/schnorr/mina/challenge_derive.go +++ b/crypto/signatures/schnorr/mina/challenge_derive.go @@ -9,7 +9,7 @@ package mina import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type MinaTSchnorrHandler struct{} diff --git a/pkg/crypto/signatures/schnorr/mina/keys.go b/crypto/signatures/schnorr/mina/keys.go similarity index 97% rename from pkg/crypto/signatures/schnorr/mina/keys.go rename to crypto/signatures/schnorr/mina/keys.go index 231064ea2..afc7177df 100755 --- a/pkg/crypto/signatures/schnorr/mina/keys.go +++ b/crypto/signatures/schnorr/mina/keys.go @@ -17,9 +17,9 @@ import ( "github.com/mr-tron/base58" "golang.org/x/crypto/blake2b" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) const ( diff --git a/pkg/crypto/signatures/schnorr/mina/keys_test.go b/crypto/signatures/schnorr/mina/keys_test.go similarity index 98% rename from pkg/crypto/signatures/schnorr/mina/keys_test.go rename to crypto/signatures/schnorr/mina/keys_test.go index d48844058..8b9764965 100755 --- a/pkg/crypto/signatures/schnorr/mina/keys_test.go +++ b/crypto/signatures/schnorr/mina/keys_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) func TestNewKeys(t *testing.T) { diff --git a/pkg/crypto/signatures/schnorr/mina/poseidon_config.go b/crypto/signatures/schnorr/mina/poseidon_config.go similarity index 96% rename from pkg/crypto/signatures/schnorr/mina/poseidon_config.go rename to crypto/signatures/schnorr/mina/poseidon_config.go index d2fbfaca4..5eb9da8c3 100755 --- a/pkg/crypto/signatures/schnorr/mina/poseidon_config.go +++ b/crypto/signatures/schnorr/mina/poseidon_config.go @@ -7,7 +7,7 @@ package mina import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" ) // SBox is the type of exponentiation to perform diff --git a/pkg/crypto/signatures/schnorr/mina/poseidon_hash.go b/crypto/signatures/schnorr/mina/poseidon_hash.go similarity index 99% rename from pkg/crypto/signatures/schnorr/mina/poseidon_hash.go rename to crypto/signatures/schnorr/mina/poseidon_hash.go index f45fdb6e6..17573d86a 100755 --- a/pkg/crypto/signatures/schnorr/mina/poseidon_hash.go +++ b/crypto/signatures/schnorr/mina/poseidon_hash.go @@ -7,8 +7,8 @@ package mina import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) type Context struct { diff --git a/pkg/crypto/signatures/schnorr/mina/poseidon_hash_test.go b/crypto/signatures/schnorr/mina/poseidon_hash_test.go similarity index 96% rename from pkg/crypto/signatures/schnorr/mina/poseidon_hash_test.go rename to crypto/signatures/schnorr/mina/poseidon_hash_test.go index 1ae8f417d..739c03182 100755 --- a/pkg/crypto/signatures/schnorr/mina/poseidon_hash_test.go +++ b/crypto/signatures/schnorr/mina/poseidon_hash_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) func TestPoseidonHash(t *testing.T) { diff --git a/pkg/crypto/signatures/schnorr/mina/roinput.go b/crypto/signatures/schnorr/mina/roinput.go similarity index 95% rename from pkg/crypto/signatures/schnorr/mina/roinput.go rename to crypto/signatures/schnorr/mina/roinput.go index b2c9b92d9..df172ddc1 100755 --- a/pkg/crypto/signatures/schnorr/mina/roinput.go +++ b/crypto/signatures/schnorr/mina/roinput.go @@ -7,8 +7,8 @@ package mina import ( - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) // Handles the packing of bits and fields according to Mina spec diff --git a/pkg/crypto/signatures/schnorr/mina/signature.go b/crypto/signatures/schnorr/mina/signature.go similarity index 86% rename from pkg/crypto/signatures/schnorr/mina/signature.go rename to crypto/signatures/schnorr/mina/signature.go index 7e3708b8a..63c008b45 100755 --- a/pkg/crypto/signatures/schnorr/mina/signature.go +++ b/crypto/signatures/schnorr/mina/signature.go @@ -9,8 +9,8 @@ package mina import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fp" - "github.com/onsonr/sonr/pkg/crypto/core/curves/native/pasta/fq" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fp" + "github.com/onsonr/sonr/crypto/core/curves/native/pasta/fq" ) // Signature is a Mina compatible signature either for payment or delegation diff --git a/pkg/crypto/signatures/schnorr/mina/txn.go b/crypto/signatures/schnorr/mina/txn.go similarity index 99% rename from pkg/crypto/signatures/schnorr/mina/txn.go rename to crypto/signatures/schnorr/mina/txn.go index 544f7212b..246aa7e53 100755 --- a/pkg/crypto/signatures/schnorr/mina/txn.go +++ b/crypto/signatures/schnorr/mina/txn.go @@ -13,7 +13,7 @@ import ( "github.com/cosmos/btcutil/base58" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // Transaction is a Mina transaction for payments or delegations diff --git a/pkg/crypto/signatures/schnorr/nem/ed25519_keccak.go b/crypto/signatures/schnorr/nem/ed25519_keccak.go similarity index 99% rename from pkg/crypto/signatures/schnorr/nem/ed25519_keccak.go rename to crypto/signatures/schnorr/nem/ed25519_keccak.go index 52c911c94..541601afd 100755 --- a/pkg/crypto/signatures/schnorr/nem/ed25519_keccak.go +++ b/crypto/signatures/schnorr/nem/ed25519_keccak.go @@ -28,7 +28,7 @@ import ( "filippo.io/edwards25519" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/internal" ) const ( diff --git a/pkg/crypto/signatures/schnorr/nem/ed25519_keccak_test.go b/crypto/signatures/schnorr/nem/ed25519_keccak_test.go similarity index 100% rename from pkg/crypto/signatures/schnorr/nem/ed25519_keccak_test.go rename to crypto/signatures/schnorr/nem/ed25519_keccak_test.go diff --git a/pkg/crypto/subtle/hkdf.go b/crypto/subtle/hkdf.go similarity index 100% rename from pkg/crypto/subtle/hkdf.go rename to crypto/subtle/hkdf.go diff --git a/pkg/crypto/subtle/random/random.go b/crypto/subtle/random/random.go similarity index 100% rename from pkg/crypto/subtle/random/random.go rename to crypto/subtle/random/random.go diff --git a/pkg/crypto/subtle/subtle.go b/crypto/subtle/subtle.go similarity index 100% rename from pkg/crypto/subtle/subtle.go rename to crypto/subtle/subtle.go diff --git a/pkg/crypto/subtle/x25519.go b/crypto/subtle/x25519.go similarity index 100% rename from pkg/crypto/subtle/x25519.go rename to crypto/subtle/x25519.go diff --git a/pkg/crypto/tecdsa/dklsv1/README.md b/crypto/tecdsa/dklsv1/README.md similarity index 100% rename from pkg/crypto/tecdsa/dklsv1/README.md rename to crypto/tecdsa/dklsv1/README.md diff --git a/pkg/crypto/tecdsa/dklsv1/boilerplate.go b/crypto/tecdsa/dklsv1/boilerplate.go similarity index 97% rename from pkg/crypto/tecdsa/dklsv1/boilerplate.go rename to crypto/tecdsa/dklsv1/boilerplate.go index d2df3aa0f..4f8def1bc 100755 --- a/pkg/crypto/tecdsa/dklsv1/boilerplate.go +++ b/crypto/tecdsa/dklsv1/boilerplate.go @@ -5,11 +5,11 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/refresh" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/refresh" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" ) // AliceDkg DKLS DKG implementation that satisfies the protocol iterator interface. diff --git a/pkg/crypto/tecdsa/dklsv1/dealer/dealer.go b/crypto/tecdsa/dklsv1/dealer/dealer.go similarity index 93% rename from pkg/crypto/tecdsa/dklsv1/dealer/dealer.go rename to crypto/tecdsa/dklsv1/dealer/dealer.go index 9111396b2..f14bf0a96 100755 --- a/pkg/crypto/tecdsa/dklsv1/dealer/dealer.go +++ b/crypto/tecdsa/dklsv1/dealer/dealer.go @@ -15,10 +15,10 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" ) // GenerationAndDeal produces private key material for alice and bob which they can later use in signing. diff --git a/pkg/crypto/tecdsa/dklsv1/dealer/dealer_test.go b/crypto/tecdsa/dklsv1/dealer/dealer_test.go similarity index 90% rename from pkg/crypto/tecdsa/dklsv1/dealer/dealer_test.go rename to crypto/tecdsa/dklsv1/dealer/dealer_test.go index e680edffb..3c836775a 100755 --- a/pkg/crypto/tecdsa/dklsv1/dealer/dealer_test.go +++ b/crypto/tecdsa/dklsv1/dealer/dealer_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dealer" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dealer" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" ) func Test_DealerCanGenerateKeysThatSign(t *testing.T) { diff --git a/pkg/crypto/tecdsa/dklsv1/dkg/dkg.go b/crypto/tecdsa/dklsv1/dkg/dkg.go similarity index 98% rename from pkg/crypto/tecdsa/dklsv1/dkg/dkg.go rename to crypto/tecdsa/dklsv1/dkg/dkg.go index 21b6da307..667fb2797 100755 --- a/pkg/crypto/tecdsa/dklsv1/dkg/dkg.go +++ b/crypto/tecdsa/dklsv1/dkg/dkg.go @@ -15,10 +15,10 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/zkp/schnorr" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/zkp/schnorr" ) // AliceOutput is the result of running DKG for Alice. It contains both the public and secret values that are needed diff --git a/pkg/crypto/tecdsa/dklsv1/dkg/dkg_test.go b/crypto/tecdsa/dklsv1/dkg/dkg_test.go similarity index 96% rename from pkg/crypto/tecdsa/dklsv1/dkg/dkg_test.go rename to crypto/tecdsa/dklsv1/dkg/dkg_test.go index 329f97761..24d6501bb 100755 --- a/pkg/crypto/tecdsa/dklsv1/dkg/dkg_test.go +++ b/crypto/tecdsa/dklsv1/dkg/dkg_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/extension/kos" ) func TestDkg(t *testing.T) { diff --git a/pkg/crypto/tecdsa/dklsv1/dkgserializers.go b/crypto/tecdsa/dklsv1/dkgserializers.go similarity index 97% rename from pkg/crypto/tecdsa/dklsv1/dkgserializers.go rename to crypto/tecdsa/dklsv1/dkgserializers.go index 47a795c03..b408bfe43 100755 --- a/pkg/crypto/tecdsa/dklsv1/dkgserializers.go +++ b/crypto/tecdsa/dklsv1/dkgserializers.go @@ -6,11 +6,11 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/pkg/crypto/zkp/schnorr" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/zkp/schnorr" ) const payloadKey = "direct" diff --git a/pkg/crypto/tecdsa/dklsv1/protocol.go b/crypto/tecdsa/dklsv1/protocol.go similarity index 95% rename from pkg/crypto/tecdsa/dklsv1/protocol.go rename to crypto/tecdsa/dklsv1/protocol.go index 29e85bc0c..50e73a184 100755 --- a/pkg/crypto/tecdsa/dklsv1/protocol.go +++ b/crypto/tecdsa/dklsv1/protocol.go @@ -3,7 +3,7 @@ package dklsv1 import ( - "github.com/onsonr/sonr/pkg/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/core/protocol" ) // Basic protocol interface implementation that calls the next step func in a pre-defined list diff --git a/pkg/crypto/tecdsa/dklsv1/protocol_test.go b/crypto/tecdsa/dklsv1/protocol_test.go similarity index 98% rename from pkg/crypto/tecdsa/dklsv1/protocol_test.go rename to crypto/tecdsa/dklsv1/protocol_test.go index 231a1648d..214edb6b8 100755 --- a/pkg/crypto/tecdsa/dklsv1/protocol_test.go +++ b/crypto/tecdsa/dklsv1/protocol_test.go @@ -13,10 +13,10 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" ) // For DKG bob starts first. For refresh and sign, Alice starts first. diff --git a/pkg/crypto/tecdsa/dklsv1/refresh/refresh.go b/crypto/tecdsa/dklsv1/refresh/refresh.go similarity index 96% rename from pkg/crypto/tecdsa/dklsv1/refresh/refresh.go rename to crypto/tecdsa/dklsv1/refresh/refresh.go index 7c84b900f..f2488293d 100755 --- a/pkg/crypto/tecdsa/dklsv1/refresh/refresh.go +++ b/crypto/tecdsa/dklsv1/refresh/refresh.go @@ -19,11 +19,11 @@ import ( "github.com/gtank/merlin" "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/pkg/crypto/zkp/schnorr" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/zkp/schnorr" ) // Alice struct encoding Alice's state during one execution of the overall signing algorithm. diff --git a/pkg/crypto/tecdsa/dklsv1/refresh/refresh_test.go b/crypto/tecdsa/dklsv1/refresh/refresh_test.go similarity index 95% rename from pkg/crypto/tecdsa/dklsv1/refresh/refresh_test.go rename to crypto/tecdsa/dklsv1/refresh/refresh_test.go index bd49ec71a..89eafede4 100755 --- a/pkg/crypto/tecdsa/dklsv1/refresh/refresh_test.go +++ b/crypto/tecdsa/dklsv1/refresh/refresh_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/refresh" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/refresh" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" ) func performDKG(t *testing.T, curve *curves.Curve) (*dkg.Alice, *dkg.Bob) { diff --git a/pkg/crypto/tecdsa/dklsv1/refreshserializers.go b/crypto/tecdsa/dklsv1/refreshserializers.go similarity index 96% rename from pkg/crypto/tecdsa/dklsv1/refreshserializers.go rename to crypto/tecdsa/dklsv1/refreshserializers.go index cf820d378..53f065364 100755 --- a/pkg/crypto/tecdsa/dklsv1/refreshserializers.go +++ b/crypto/tecdsa/dklsv1/refreshserializers.go @@ -6,11 +6,11 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/refresh" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/refresh" ) func newRefreshProtocolMessage(payload []byte, round string, version uint) *protocol.Message { diff --git a/pkg/crypto/tecdsa/dklsv1/sign/multiply.go b/crypto/tecdsa/dklsv1/sign/multiply.go similarity index 98% rename from pkg/crypto/tecdsa/dklsv1/sign/multiply.go rename to crypto/tecdsa/dklsv1/sign/multiply.go index e3d118151..353faef65 100755 --- a/pkg/crypto/tecdsa/dklsv1/sign/multiply.go +++ b/crypto/tecdsa/dklsv1/sign/multiply.go @@ -16,10 +16,10 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/extension/kos" ) // This implements the Multiplication protocol of DKLs, protocol 5. https://eprint.iacr.org/2018/499.pdf diff --git a/pkg/crypto/tecdsa/dklsv1/sign/multiply_test.go b/crypto/tecdsa/dklsv1/sign/multiply_test.go similarity index 84% rename from pkg/crypto/tecdsa/dklsv1/sign/multiply_test.go rename to crypto/tecdsa/dklsv1/sign/multiply_test.go index 72f3c55cb..1bfede1bd 100755 --- a/pkg/crypto/tecdsa/dklsv1/sign/multiply_test.go +++ b/crypto/tecdsa/dklsv1/sign/multiply_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/ot/ottest" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/ot/ottest" ) func TestMultiply(t *testing.T) { diff --git a/pkg/crypto/tecdsa/dklsv1/sign/sign.go b/crypto/tecdsa/dklsv1/sign/sign.go similarity index 98% rename from pkg/crypto/tecdsa/dklsv1/sign/sign.go rename to crypto/tecdsa/dklsv1/sign/sign.go index 553e2829f..6d81add20 100755 --- a/pkg/crypto/tecdsa/dklsv1/sign/sign.go +++ b/crypto/tecdsa/dklsv1/sign/sign.go @@ -20,11 +20,11 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" - "github.com/onsonr/sonr/pkg/crypto/zkp/schnorr" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/zkp/schnorr" ) const multiplicationCount = 2 diff --git a/pkg/crypto/tecdsa/dklsv1/sign/sign_test.go b/crypto/tecdsa/dklsv1/sign/sign_test.go similarity index 91% rename from pkg/crypto/tecdsa/dklsv1/sign/sign_test.go rename to crypto/tecdsa/dklsv1/sign/sign_test.go index b44aa020f..71427b084 100755 --- a/pkg/crypto/tecdsa/dklsv1/sign/sign_test.go +++ b/crypto/tecdsa/dklsv1/sign/sign_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/ot/base/simplest" - "github.com/onsonr/sonr/pkg/crypto/ot/extension/kos" - "github.com/onsonr/sonr/pkg/crypto/ot/ottest" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/dkg" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/ot/base/simplest" + "github.com/onsonr/sonr/crypto/ot/extension/kos" + "github.com/onsonr/sonr/crypto/ot/ottest" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/dkg" ) func TestSign(t *testing.T) { diff --git a/pkg/crypto/tecdsa/dklsv1/signserializers.go b/crypto/tecdsa/dklsv1/signserializers.go similarity index 95% rename from pkg/crypto/tecdsa/dklsv1/signserializers.go rename to crypto/tecdsa/dklsv1/signserializers.go index 82d0e54bb..14b5a26bf 100755 --- a/pkg/crypto/tecdsa/dklsv1/signserializers.go +++ b/crypto/tecdsa/dklsv1/signserializers.go @@ -6,9 +6,9 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1/sign" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/protocol" + "github.com/onsonr/sonr/crypto/tecdsa/dklsv1/sign" ) func newSignProtocolMessage(payload []byte, round string, version uint) *protocol.Message { diff --git a/pkg/crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin b/crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin similarity index 100% rename from pkg/crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin rename to crypto/tecdsa/dklsv1/testdata/alice-dkls-v1-dkg.bin diff --git a/pkg/crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin b/crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin similarity index 100% rename from pkg/crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin rename to crypto/tecdsa/dklsv1/testdata/bob-dkls-v1-dkg.bin diff --git a/pkg/crypto/ted25519/frost/README.md b/crypto/ted25519/frost/README.md similarity index 100% rename from pkg/crypto/ted25519/frost/README.md rename to crypto/ted25519/frost/README.md diff --git a/pkg/crypto/ted25519/frost/challenge_derive.go b/crypto/ted25519/frost/challenge_derive.go similarity index 92% rename from pkg/crypto/ted25519/frost/challenge_derive.go rename to crypto/ted25519/frost/challenge_derive.go index e01cf28bc..cbd138703 100755 --- a/pkg/crypto/ted25519/frost/challenge_derive.go +++ b/crypto/ted25519/frost/challenge_derive.go @@ -9,7 +9,7 @@ package frost import ( "crypto/sha512" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type ChallengeDerive interface { diff --git a/pkg/crypto/ted25519/frost/participant.go b/crypto/ted25519/frost/participant.go similarity index 95% rename from pkg/crypto/ted25519/frost/participant.go rename to crypto/ted25519/frost/participant.go index c0a2745e8..1ede7f2d4 100755 --- a/pkg/crypto/ted25519/frost/participant.go +++ b/crypto/ted25519/frost/participant.go @@ -10,9 +10,9 @@ package frost import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/dkg/frost" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/dkg/frost" + "github.com/onsonr/sonr/crypto/internal" ) // Signer is a tSchnorr player performing the signing operation. diff --git a/pkg/crypto/ted25519/frost/round1.go b/crypto/ted25519/frost/round1.go similarity index 94% rename from pkg/crypto/ted25519/frost/round1.go rename to crypto/ted25519/frost/round1.go index 83d1f0d6e..71736e7ea 100755 --- a/pkg/crypto/ted25519/frost/round1.go +++ b/crypto/ted25519/frost/round1.go @@ -13,8 +13,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) // Round1Bcast contains values to be broadcast to all players after the completion of signing round 1. diff --git a/pkg/crypto/ted25519/frost/round2.go b/crypto/ted25519/frost/round2.go similarity index 98% rename from pkg/crypto/ted25519/frost/round2.go rename to crypto/ted25519/frost/round2.go index a39b39703..bdf2adaa6 100755 --- a/pkg/crypto/ted25519/frost/round2.go +++ b/crypto/ted25519/frost/round2.go @@ -13,8 +13,8 @@ import ( "github.com/pkg/errors" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) // Round2Bcast contains values that will be broadcast to other signers after completion of round 2. diff --git a/pkg/crypto/ted25519/frost/round3.go b/crypto/ted25519/frost/round3.go similarity index 97% rename from pkg/crypto/ted25519/frost/round3.go rename to crypto/ted25519/frost/round3.go index ab62dddc8..62cfa0d78 100755 --- a/pkg/crypto/ted25519/frost/round3.go +++ b/crypto/ted25519/frost/round3.go @@ -9,8 +9,8 @@ package frost import ( "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/internal" + "github.com/onsonr/sonr/crypto/core/curves" + "github.com/onsonr/sonr/crypto/internal" ) // Round3Bcast contains the output of FROST signature, i.e., it contains FROST signature (z,c) and the diff --git a/pkg/crypto/ted25519/frost/rounds_test.go b/crypto/ted25519/frost/rounds_test.go similarity index 98% rename from pkg/crypto/ted25519/frost/rounds_test.go rename to crypto/ted25519/frost/rounds_test.go index e0e7dcd8c..de4443109 100755 --- a/pkg/crypto/ted25519/frost/rounds_test.go +++ b/crypto/ted25519/frost/rounds_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - dkg "github.com/onsonr/sonr/pkg/crypto/dkg/frost" - "github.com/onsonr/sonr/pkg/crypto/sharing" + "github.com/onsonr/sonr/crypto/core/curves" + dkg "github.com/onsonr/sonr/crypto/dkg/frost" + "github.com/onsonr/sonr/crypto/sharing" ) var ( diff --git a/pkg/crypto/ted25519/ted25519/ed25519.go b/crypto/ted25519/ted25519/ed25519.go similarity index 99% rename from pkg/crypto/ted25519/ted25519/ed25519.go rename to crypto/ted25519/ted25519/ed25519.go index fe66a1e05..fb4943e8c 100755 --- a/pkg/crypto/ted25519/ted25519/ed25519.go +++ b/crypto/ted25519/ted25519/ed25519.go @@ -22,7 +22,7 @@ import ( "io" "strconv" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) const ( diff --git a/pkg/crypto/ted25519/ted25519/ed25519_test.go b/crypto/ted25519/ted25519/ed25519_test.go similarity index 98% rename from pkg/crypto/ted25519/ted25519/ed25519_test.go rename to crypto/ted25519/ted25519/ed25519_test.go index e7cc2cca2..f1dbda4da 100755 --- a/pkg/crypto/ted25519/ted25519/ed25519_test.go +++ b/crypto/ted25519/ted25519/ed25519_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // sign.input.gz is a selection of test cases from diff --git a/pkg/crypto/ted25519/ted25519/ext.go b/crypto/ted25519/ted25519/ext.go similarity index 98% rename from pkg/crypto/ted25519/ted25519/ext.go rename to crypto/ted25519/ted25519/ext.go index e5c60d4fb..27c0edda9 100755 --- a/pkg/crypto/ted25519/ted25519/ext.go +++ b/crypto/ted25519/ted25519/ext.go @@ -10,7 +10,7 @@ import ( "crypto/sha512" "strconv" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // GeAdd returns the sum of two public keys, a and b. diff --git a/pkg/crypto/ted25519/ted25519/ext_test.go b/crypto/ted25519/ted25519/ext_test.go similarity index 97% rename from pkg/crypto/ted25519/ted25519/ext_test.go rename to crypto/ted25519/ted25519/ext_test.go index a5e20e961..e1bb83296 100755 --- a/pkg/crypto/ted25519/ted25519/ext_test.go +++ b/crypto/ted25519/ted25519/ext_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) const ( diff --git a/pkg/crypto/ted25519/ted25519/keygen.go b/crypto/ted25519/ted25519/keygen.go similarity index 98% rename from pkg/crypto/ted25519/ted25519/keygen.go rename to crypto/ted25519/ted25519/keygen.go index a260fa135..58d21fe1e 100755 --- a/pkg/crypto/ted25519/ted25519/keygen.go +++ b/crypto/ted25519/ted25519/keygen.go @@ -10,8 +10,8 @@ import ( "encoding/binary" "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) // PublicKeyFromBytes converts byte array into PublicKey byte array diff --git a/pkg/crypto/ted25519/ted25519/keygen_test.go b/crypto/ted25519/ted25519/keygen_test.go similarity index 97% rename from pkg/crypto/ted25519/ted25519/keygen_test.go rename to crypto/ted25519/ted25519/keygen_test.go index fe6f0bc2c..ead13126f 100755 --- a/pkg/crypto/ted25519/ted25519/keygen_test.go +++ b/crypto/ted25519/ted25519/keygen_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) func TestGenerateEd25519Key(t *testing.T) { diff --git a/pkg/crypto/ted25519/ted25519/noncegen.go b/crypto/ted25519/ted25519/noncegen.go similarity index 98% rename from pkg/crypto/ted25519/ted25519/noncegen.go rename to crypto/ted25519/ted25519/noncegen.go index 1462f6c2c..ed5d56096 100755 --- a/pkg/crypto/ted25519/ted25519/noncegen.go +++ b/crypto/ted25519/ted25519/noncegen.go @@ -13,7 +13,7 @@ import ( "golang.org/x/crypto/hkdf" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) // NonceShare represents a share of a generated nonce. diff --git a/pkg/crypto/ted25519/ted25519/noncegen_test.go b/crypto/ted25519/ted25519/noncegen_test.go similarity index 96% rename from pkg/crypto/ted25519/ted25519/noncegen_test.go rename to crypto/ted25519/ted25519/noncegen_test.go index c880a5567..cd9c7ce65 100755 --- a/pkg/crypto/ted25519/ted25519/noncegen_test.go +++ b/crypto/ted25519/ted25519/noncegen_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) func TestNonceShareFromBytes(t *testing.T) { diff --git a/pkg/crypto/ted25519/ted25519/partialsig.go b/crypto/ted25519/ted25519/partialsig.go similarity index 100% rename from pkg/crypto/ted25519/ted25519/partialsig.go rename to crypto/ted25519/ted25519/partialsig.go diff --git a/pkg/crypto/ted25519/ted25519/partialsig_test.go b/crypto/ted25519/ted25519/partialsig_test.go similarity index 96% rename from pkg/crypto/ted25519/ted25519/partialsig_test.go rename to crypto/ted25519/ted25519/partialsig_test.go index c50c80ab3..c19530cdc 100755 --- a/pkg/crypto/ted25519/ted25519/partialsig_test.go +++ b/crypto/ted25519/ted25519/partialsig_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestPartialSignNormalSignature(t *testing.T) { diff --git a/pkg/crypto/ted25519/ted25519/sigagg.go b/crypto/ted25519/ted25519/sigagg.go similarity index 93% rename from pkg/crypto/ted25519/ted25519/sigagg.go rename to crypto/ted25519/ted25519/sigagg.go index 193f626ed..78c48a4d4 100755 --- a/pkg/crypto/ted25519/ted25519/sigagg.go +++ b/crypto/ted25519/ted25519/sigagg.go @@ -10,8 +10,8 @@ import ( "bytes" "fmt" - "github.com/onsonr/sonr/pkg/crypto/core/curves" - v1 "github.com/onsonr/sonr/pkg/crypto/sharing/v1" + "github.com/onsonr/sonr/crypto/core/curves" + v1 "github.com/onsonr/sonr/crypto/sharing/v1" ) type Signature = []byte diff --git a/pkg/crypto/ted25519/ted25519/sigagg_test.go b/crypto/ted25519/ted25519/sigagg_test.go similarity index 100% rename from pkg/crypto/ted25519/ted25519/sigagg_test.go rename to crypto/ted25519/ted25519/sigagg_test.go diff --git a/pkg/crypto/ted25519/ted25519/twobytwo_test.go b/crypto/ted25519/ted25519/twobytwo_test.go similarity index 96% rename from pkg/crypto/ted25519/ted25519/twobytwo_test.go rename to crypto/ted25519/ted25519/twobytwo_test.go index ec03774ca..85a58c1ad 100755 --- a/pkg/crypto/ted25519/ted25519/twobytwo_test.go +++ b/crypto/ted25519/ted25519/twobytwo_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func AggregateSignatures(sig1, sig2 *PartialSignature) []byte { diff --git a/pkg/crypto/zkp/schnorr/schnorr.go b/crypto/zkp/schnorr/schnorr.go similarity index 99% rename from pkg/crypto/zkp/schnorr/schnorr.go rename to crypto/zkp/schnorr/schnorr.go index 87c6cb9d4..756133c1d 100755 --- a/pkg/crypto/zkp/schnorr/schnorr.go +++ b/crypto/zkp/schnorr/schnorr.go @@ -16,7 +16,7 @@ import ( "github.com/pkg/errors" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) type Commitment = []byte diff --git a/pkg/crypto/zkp/schnorr/schnorr_test.go b/crypto/zkp/schnorr/schnorr_test.go similarity index 94% rename from pkg/crypto/zkp/schnorr/schnorr_test.go rename to crypto/zkp/schnorr/schnorr_test.go index 8baa5811f..defa7a76b 100755 --- a/pkg/crypto/zkp/schnorr/schnorr_test.go +++ b/crypto/zkp/schnorr/schnorr_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" - "github.com/onsonr/sonr/pkg/crypto/core/curves" + "github.com/onsonr/sonr/crypto/core/curves" ) func TestZKPOverMultipleCurves(t *testing.T) { diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 000000000..426dbd4fe --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,8 @@ +# Deployment + +This directory contains the configuration files for deploying the Sonr blockchain. + +## Contents + +- `devnet`: Configuration for deploying the Sonr blockchain on the devnet (local development). +- `testnet`: Configuration for deploying the Sonr blockchain on the testnet (current prod setup) diff --git a/deploy/devnet/Taskfile.yml b/deploy/devnet/Taskfile.yml new file mode 100644 index 000000000..51b2a82a4 --- /dev/null +++ b/deploy/devnet/Taskfile.yml @@ -0,0 +1,12 @@ +# https://taskfile.dev + +version: '3' + +vars: + GREETING: Hello, World! + +tasks: + default: + cmds: + - echo "{{.GREETING}}" + silent: true diff --git a/deploy/devnet/config/ipfs.config.pkl b/deploy/devnet/config/ipfs.config.pkl new file mode 100644 index 000000000..8fe12985f --- /dev/null +++ b/deploy/devnet/config/ipfs.config.pkl @@ -0,0 +1,202 @@ +import "https://pkl.sh/ipfs.net/0.0.1/Config.pkl" + +API { + HTTPHeaders { + `Access-Control-Allow-Origin` = new { "*" } + } +} + +Addresses { + API = "/ip4/127.0.0.1/tcp/5001" + Gateway = "/ip4/127.0.0.1/tcp/8080" + Swarm = new { + "/ip4/0.0.0.0/tcp/4001" + "/ip6/::/tcp/4001" + "/ip4/0.0.0.0/udp/4001/quic" + "/ip6/::/udp/4001/quic" + } +} + +Bootstrap { + "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa" + "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb" + "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt" + "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" + "/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" + "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN" +} + +Datastore { + BloomFilterSize = 0 + GCPeriod = "1h" + HashOnRead = false + StorageGCWatermark = 90 + StorageMax = "10GB" + Spec = new { + mounts = new { + new { + prefix = "flatfs.datastore" + child = new { + path = "blocks" + shardFunc = "/repo/flatfs/shard/v1/next-to-last/2" + type = "flatfs" + sync = true + } + mountpoint = "/blocks" + type = "measure" + } + new { + prefix = "leveldb.datastore" + child = new { + compression = "none" + path = "datastore" + type = "levelds" + } + mountpoint = "/" + type = "measure" + } + } + type = "mount" + } +} + +Discovery { + MDNS = new { + Enabled = true + } +} + +Experimental { + StrategicProviding = false + UrlstoreEnabled = false + AcceleratedDHTClient = false + GraphsyncEnabled = false + FilestoreEnabled = false + Libp2pStreamMounting = false + P2pHttpProxy = false +} + +Gateway { + HTTPHeaders = new { + `Access-Control-Allow-Headers` = new { + "X-Requested-With" + "Range" + "User-Agent" + } + `Access-Control-Allow-Methods` = new { "GET" } + `Access-Control-Allow-Origin` = new { "*" } + } + NoDNSLink = false + NoFetch = false + PublicGateways = null + RootRedirect = "" + Writable = false +} + +Identity { + PrivKey = "CAESQP0FRhYf5Nvxg0wrbN+VTK7kWdgy+3AKoxU3vNH0K9FHVpXyx6/mHKyCaPjqI11YsHUW0B2ZODGROPafyS6IeWY=" + PeerID = "12D3KooWFeMr1tHFs8WAF11rKDULJbmKg9rE5aVhYJU23oC7pqjB" +} + +Ipns { + RecordLifetime = "" + RepublishPeriod = "" + ResolveCacheSize = 128 +} + +Migration { + Keep = "" +} + +Mounts { + IPNS = "/ipns" + FuseAllowOther = false + IPFS = "/ipfs" +} + +Peering { + Peers = new { + new { + Addrs = new { "/dnsaddr/node-1.ingress.cloudflare-ipfs.com" } + ID = "QmcFf2FH3CEgTNHeMRGhN7HNHU1EXAxoEk6EFuSyXCsvRE" + } + new { + Addrs = new { "/dnsaddr/node-2.ingress.cloudflare-ipfs.com" } + ID = "QmcFmLd5ySfk2WZuJ1mfSWLDjdmHZq7rSAua4GoeSQfs1z" + } + new { + Addrs = new { "/dnsaddr/node-3.ingress.cloudflare-ipfs.com" } + ID = "QmcfFmzSDVbwexQ9Au2pt5YEXHK5xajwgaU6PpkbLWerMa" + } + new { + Addrs = new { "/dnsaddr/node-4.ingress.cloudflare-ipfs.com" } + ID = "QmcfJeB3Js1FG7T8YaZATEiaHqNKVdQfybYYkbT1knUswx" + } + new { + Addrs = new { "/dnsaddr/node-5.ingress.cloudflare-ipfs.com" } + ID = "QmcfVvzK4tMdFmpJjEKDUoqRgP4W9FnmJoziYX5GXJJ8eZ" + } + new { + Addrs = new { "/dnsaddr/node-6.ingress.cloudflare-ipfs.com" } + ID = "QmcfZD3VKrUxyP9BbyUnZDpbqDnT7cQ4WjPP8TRLXaoE7G" + } + new { + Addrs = new { "/dnsaddr/node-7.ingress.cloudflare-ipfs.com" } + ID = "QmcfZP2LuW4jxviTeG8fi28qjnZScACb8PEgHAc17ZEri3" + } + new { + Addrs = new { "/dnsaddr/node-8.ingress.cloudflare-ipfs.com" } + ID = "QmcfgsJsMtx6qJb74akCw1M24X1zFwgGo11h1cuhwQjtJP" + } + new { + Addrs = new { "/dnsaddr/node-9.ingress.cloudflare-ipfs.com" } + ID = "Qmcfr2FC7pFzJbTSDfYaSy1J8Uuy8ccGLeLyqJCKJvTHMi" + } + new { + Addrs = new { "/dnsaddr/node-10.ingress.cloudflare-ipfs.com" } + ID = "QmcfR3V5YAtHBzxVACWCzXTt26SyEkxdwhGJ6875A8BuWx" + } + new { + Addrs = new { "/dnsaddr/node-11.ingress.cloudflare-ipfs.com" } + ID = "Qmcfuo1TM9uUiJp6dTbm915Rf1aTqm3a3dnmCdDQLHgvL5" + } + new { + Addrs = new { "/dnsaddr/node-12.ingress.cloudflare-ipfs.com" } + ID = "QmcfV2sg9zaq7UUHVCGuSvT2M2rnLBAPsiE79vVyK3Cuev" + } + } +} + +Provider { + Strategy = "" +} + +Pubsub { + Router = "" + DisableSigning = false +} + +Reprovider { + Strategy = "all" + Interval = "12h" +} + +Routing { + Methods = null + Routers = null + Type = "dht" +} + +Swarm { + AddrFilters = null + ConnMgr = new {} + DisableBandwidthMetrics = false + DisableNatPortMap = false + RelayClient = new {} + ResourceMgr = new {} + Transports = new { + Multiplexers = new {} + Network = new {} + Security = new {} + } +} diff --git a/deploy/devnet/config/sonr.app.pkl b/deploy/devnet/config/sonr.app.pkl new file mode 100644 index 000000000..b65786b54 --- /dev/null +++ b/deploy/devnet/config/sonr.app.pkl @@ -0,0 +1,3 @@ +amends "https://pkl.sh/sonr.chain/0.0.2/App.pkl" + + diff --git a/deploy/devnet/config/sonr.config.pkl b/deploy/devnet/config/sonr.config.pkl new file mode 100644 index 000000000..ef647ff32 --- /dev/null +++ b/deploy/devnet/config/sonr.config.pkl @@ -0,0 +1,3 @@ +amends "https://pkl.sh/sonr.chain/0.0.2/Genesis.pkl" + + diff --git a/deploy/local/devbox.json b/deploy/devnet/devbox.json similarity index 56% rename from deploy/local/devbox.json rename to deploy/devnet/devbox.json index 00e5ad434..a71f4663e 100644 --- a/deploy/local/devbox.json +++ b/deploy/devnet/devbox.json @@ -1,19 +1,22 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", "packages": [ - "go@1.22", + "go@1.23", "bun@latest", "ipfs@latest", "skate@latest", "air@latest", - "templ@latest" + "go-task@latest", + "templ@latest", + "tigerbeetle@latest" ], "env": { "GOPATH": "$HOME/go", - "CHAIN_ID": "sonr-testnet-1", + "PATH": "./build:$HOME/go/bin:$PATH", + "CHAIN_ID": "sonr-devnet-1", "DENOM": "usnr", "KEYRING": "test", - "MONIKER": "florence", + "MONIKER": "cupertino", "BINARY": "sonrd", "ACC0_NAME": "acc0", "ACC1_NAME": "acc1", @@ -23,12 +26,23 @@ "ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)" }, "shell": { - "init_hook": ["export ROOT=$(git rev-parse --show-toplevel)"], + "init_hook": [ + "export ROOT=$(git rev-parse --show-toplevel)" + ], "scripts": { - "devnet": ["cd $ROOT", "make sh-testnet"], - "ipfs": ["cd $ROOT", "make setup-ipfs", "ipfs daemon"], - "air": ["cd $ROOT", "air"], - "gex": ["go install github.com/cosmos/gex@latest", "gex"] + "sonr": [ + "cd $ROOT", + "make sh-testnet" + ], + "ipfs": [ + "cd $ROOT", + "make setup-ipfs", + "ipfs daemon" + ], + "hway": [ + "cd $ROOT", + "air" + ] } } } diff --git a/deploy/local/devbox.lock b/deploy/devnet/devbox.lock similarity index 65% rename from deploy/local/devbox.lock rename to deploy/devnet/devbox.lock index e2633ad0f..7a79c3989 100644 --- a/deploy/local/devbox.lock +++ b/deploy/devnet/devbox.lock @@ -97,51 +97,99 @@ } } }, - "go@1.22": { - "last_modified": "2024-11-16T04:25:12Z", - "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#go_1_22", + "go-task@latest": { + "last_modified": "2024-11-28T07:51:56Z", + "resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#go-task", "source": "devbox-search", - "version": "1.22.9", + "version": "3.40.0", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/4nf51i4ah186y2jy3fad2fyvpa49qx6q-go-1.22.9", + "path": "/nix/store/ynnx5bghcar86a89026rdysvpf51b2li-go-task-3.40.0", "default": true } ], - "store_path": "/nix/store/4nf51i4ah186y2jy3fad2fyvpa49qx6q-go-1.22.9" + "store_path": "/nix/store/ynnx5bghcar86a89026rdysvpf51b2li-go-task-3.40.0" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/8w8vzwgp55yl8j1ljgm4wzdgjkvkv5v3-go-1.22.9", + "path": "/nix/store/2ga7yc7nn0k01n2w3wa6fjbp0i31r6d6-go-task-3.40.0", "default": true } ], - "store_path": "/nix/store/8w8vzwgp55yl8j1ljgm4wzdgjkvkv5v3-go-1.22.9" + "store_path": "/nix/store/2ga7yc7nn0k01n2w3wa6fjbp0i31r6d6-go-task-3.40.0" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/vlih7j78ki05i8nvzdsxvws7a7ksq04m-go-1.22.9", + "path": "/nix/store/0fc73lrh98s9i7qjsxk8gjddxam5kv76-go-task-3.40.0", "default": true } ], - "store_path": "/nix/store/vlih7j78ki05i8nvzdsxvws7a7ksq04m-go-1.22.9" + "store_path": "/nix/store/0fc73lrh98s9i7qjsxk8gjddxam5kv76-go-task-3.40.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9", + "path": "/nix/store/x5pbyv5p0yj3fl77j4bmgcj8s7jjcjwn-go-task-3.40.0", "default": true } ], - "store_path": "/nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9" + "store_path": "/nix/store/x5pbyv5p0yj3fl77j4bmgcj8s7jjcjwn-go-task-3.40.0" + } + } + }, + "go@1.23": { + "last_modified": "2024-11-16T04:25:12Z", + "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#go", + "source": "devbox-search", + "version": "1.23.3", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3" } } }, @@ -246,6 +294,54 @@ "store_path": "/nix/store/sn5h79d36r86i6a8rm1k52c2ij1s32kx-templ-0.2.793" } } + }, + "tigerbeetle@latest": { + "last_modified": "2024-11-16T04:25:12Z", + "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#tigerbeetle", + "source": "devbox-search", + "version": "0.16.12", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12" + } + } } } } diff --git a/deploy/local/process-compose.yaml b/deploy/devnet/process-compose.yaml similarity index 68% rename from deploy/local/process-compose.yaml rename to deploy/devnet/process-compose.yaml index 67e41333f..22d5034d4 100644 --- a/deploy/local/process-compose.yaml +++ b/deploy/devnet/process-compose.yaml @@ -2,7 +2,7 @@ version: "0.6" processes: ipfs: - namespace: testnet + namespace: devnet command: "devbox run ipfs" background: true availability: @@ -10,19 +10,20 @@ processes: max_restarts: 0 sonr: - namespace: testnet + namespace: devnet background: true - command: "devbox run devnet" + command: "devbox run sonr" restart: never max_restarts: 1 depends: - ipfs - hway-air: - namespace: testnet + hway: + namespace: devnet background: true - command: "devbox run air" + command: "devbox run hway" restart: never max_restarts: 1 depends: + - ipfs - sonr diff --git a/deploy/devnet/sink/schema.sql b/deploy/devnet/sink/schema.sql new file mode 100644 index 000000000..ce5a241ba --- /dev/null +++ b/deploy/devnet/sink/schema.sql @@ -0,0 +1,85 @@ +/* + This file defines the database schema for the PostgresQL ("psql") event sink + implementation in CometBFT. The operator must create a database and install + this schema before using the database to index events. + */ + +-- The blocks table records metadata about each block. +-- The block record does not include its events or transactions (see tx_results). +CREATE TABLE blocks ( + rowid BIGSERIAL PRIMARY KEY, + + height BIGINT NOT NULL, + chain_id VARCHAR NOT NULL, + + -- When this block header was logged into the sink, in UTC. + created_at TIMESTAMPTZ NOT NULL, + + UNIQUE (height, chain_id) +); + +-- Index blocks by height and chain, since we need to resolve block IDs when +-- indexing transaction records and transaction events. +CREATE INDEX idx_blocks_height_chain ON blocks(height, chain_id); + +-- The tx_results table records metadata about transaction results. Note that +-- the events from a transaction are stored separately. +CREATE TABLE tx_results ( + rowid BIGSERIAL PRIMARY KEY, + + -- The block to which this transaction belongs. + block_id BIGINT NOT NULL REFERENCES blocks(rowid), + -- The sequential index of the transaction within the block. + index INTEGER NOT NULL, + -- When this result record was logged into the sink, in UTC. + created_at TIMESTAMPTZ NOT NULL, + -- The hex-encoded hash of the transaction. + tx_hash VARCHAR NOT NULL, + -- The protobuf wire encoding of the TxResult message. + tx_result BYTEA NOT NULL, + + UNIQUE (block_id, index) +); + +-- The events table records events. All events (both block and transaction) are +-- associated with a block ID; transaction events also have a transaction ID. +CREATE TABLE events ( + rowid BIGSERIAL PRIMARY KEY, + + -- The block and transaction this event belongs to. + -- If tx_id is NULL, this is a block event. + block_id BIGINT NOT NULL REFERENCES blocks(rowid), + tx_id BIGINT NULL REFERENCES tx_results(rowid), + + -- The application-defined type label for the event. + type VARCHAR NOT NULL +); + +-- The attributes table records event attributes. +CREATE TABLE attributes ( + event_id BIGINT NOT NULL REFERENCES events(rowid), + key VARCHAR NOT NULL, -- bare key + composite_key VARCHAR NOT NULL, -- composed type.key + value VARCHAR NULL, + + UNIQUE (event_id, key) +); + +-- A joined view of events and their attributes. Events that do not have any +-- attributes are represented as a single row with empty key and value fields. +CREATE VIEW event_attributes AS + SELECT block_id, tx_id, type, key, composite_key, value + FROM events LEFT JOIN attributes ON (events.rowid = attributes.event_id); + +-- A joined view of all block events (those having tx_id NULL). +CREATE VIEW block_events AS + SELECT blocks.rowid as block_id, height, chain_id, type, key, composite_key, value + FROM blocks JOIN event_attributes ON (blocks.rowid = event_attributes.block_id) + WHERE event_attributes.tx_id IS NULL; + +-- A joined view of all transaction events. +CREATE VIEW tx_events AS + SELECT height, index, chain_id, type, key, composite_key, value, tx_results.created_at + FROM blocks JOIN tx_results ON (blocks.rowid = tx_results.block_id) + JOIN event_attributes ON (tx_results.rowid = event_attributes.tx_id) + WHERE event_attributes.tx_id IS NOT NULL; diff --git a/deploy/testnet/Taskfile.yml b/deploy/testnet/Taskfile.yml new file mode 100644 index 000000000..51b2a82a4 --- /dev/null +++ b/deploy/testnet/Taskfile.yml @@ -0,0 +1,12 @@ +# https://taskfile.dev + +version: '3' + +vars: + GREETING: Hello, World! + +tasks: + default: + cmds: + - echo "{{.GREETING}}" + silent: true diff --git a/deploy/testnet/config/ipfs.config.pkl b/deploy/testnet/config/ipfs.config.pkl new file mode 100644 index 000000000..8fe12985f --- /dev/null +++ b/deploy/testnet/config/ipfs.config.pkl @@ -0,0 +1,202 @@ +import "https://pkl.sh/ipfs.net/0.0.1/Config.pkl" + +API { + HTTPHeaders { + `Access-Control-Allow-Origin` = new { "*" } + } +} + +Addresses { + API = "/ip4/127.0.0.1/tcp/5001" + Gateway = "/ip4/127.0.0.1/tcp/8080" + Swarm = new { + "/ip4/0.0.0.0/tcp/4001" + "/ip6/::/tcp/4001" + "/ip4/0.0.0.0/udp/4001/quic" + "/ip6/::/udp/4001/quic" + } +} + +Bootstrap { + "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa" + "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb" + "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt" + "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" + "/ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" + "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN" +} + +Datastore { + BloomFilterSize = 0 + GCPeriod = "1h" + HashOnRead = false + StorageGCWatermark = 90 + StorageMax = "10GB" + Spec = new { + mounts = new { + new { + prefix = "flatfs.datastore" + child = new { + path = "blocks" + shardFunc = "/repo/flatfs/shard/v1/next-to-last/2" + type = "flatfs" + sync = true + } + mountpoint = "/blocks" + type = "measure" + } + new { + prefix = "leveldb.datastore" + child = new { + compression = "none" + path = "datastore" + type = "levelds" + } + mountpoint = "/" + type = "measure" + } + } + type = "mount" + } +} + +Discovery { + MDNS = new { + Enabled = true + } +} + +Experimental { + StrategicProviding = false + UrlstoreEnabled = false + AcceleratedDHTClient = false + GraphsyncEnabled = false + FilestoreEnabled = false + Libp2pStreamMounting = false + P2pHttpProxy = false +} + +Gateway { + HTTPHeaders = new { + `Access-Control-Allow-Headers` = new { + "X-Requested-With" + "Range" + "User-Agent" + } + `Access-Control-Allow-Methods` = new { "GET" } + `Access-Control-Allow-Origin` = new { "*" } + } + NoDNSLink = false + NoFetch = false + PublicGateways = null + RootRedirect = "" + Writable = false +} + +Identity { + PrivKey = "CAESQP0FRhYf5Nvxg0wrbN+VTK7kWdgy+3AKoxU3vNH0K9FHVpXyx6/mHKyCaPjqI11YsHUW0B2ZODGROPafyS6IeWY=" + PeerID = "12D3KooWFeMr1tHFs8WAF11rKDULJbmKg9rE5aVhYJU23oC7pqjB" +} + +Ipns { + RecordLifetime = "" + RepublishPeriod = "" + ResolveCacheSize = 128 +} + +Migration { + Keep = "" +} + +Mounts { + IPNS = "/ipns" + FuseAllowOther = false + IPFS = "/ipfs" +} + +Peering { + Peers = new { + new { + Addrs = new { "/dnsaddr/node-1.ingress.cloudflare-ipfs.com" } + ID = "QmcFf2FH3CEgTNHeMRGhN7HNHU1EXAxoEk6EFuSyXCsvRE" + } + new { + Addrs = new { "/dnsaddr/node-2.ingress.cloudflare-ipfs.com" } + ID = "QmcFmLd5ySfk2WZuJ1mfSWLDjdmHZq7rSAua4GoeSQfs1z" + } + new { + Addrs = new { "/dnsaddr/node-3.ingress.cloudflare-ipfs.com" } + ID = "QmcfFmzSDVbwexQ9Au2pt5YEXHK5xajwgaU6PpkbLWerMa" + } + new { + Addrs = new { "/dnsaddr/node-4.ingress.cloudflare-ipfs.com" } + ID = "QmcfJeB3Js1FG7T8YaZATEiaHqNKVdQfybYYkbT1knUswx" + } + new { + Addrs = new { "/dnsaddr/node-5.ingress.cloudflare-ipfs.com" } + ID = "QmcfVvzK4tMdFmpJjEKDUoqRgP4W9FnmJoziYX5GXJJ8eZ" + } + new { + Addrs = new { "/dnsaddr/node-6.ingress.cloudflare-ipfs.com" } + ID = "QmcfZD3VKrUxyP9BbyUnZDpbqDnT7cQ4WjPP8TRLXaoE7G" + } + new { + Addrs = new { "/dnsaddr/node-7.ingress.cloudflare-ipfs.com" } + ID = "QmcfZP2LuW4jxviTeG8fi28qjnZScACb8PEgHAc17ZEri3" + } + new { + Addrs = new { "/dnsaddr/node-8.ingress.cloudflare-ipfs.com" } + ID = "QmcfgsJsMtx6qJb74akCw1M24X1zFwgGo11h1cuhwQjtJP" + } + new { + Addrs = new { "/dnsaddr/node-9.ingress.cloudflare-ipfs.com" } + ID = "Qmcfr2FC7pFzJbTSDfYaSy1J8Uuy8ccGLeLyqJCKJvTHMi" + } + new { + Addrs = new { "/dnsaddr/node-10.ingress.cloudflare-ipfs.com" } + ID = "QmcfR3V5YAtHBzxVACWCzXTt26SyEkxdwhGJ6875A8BuWx" + } + new { + Addrs = new { "/dnsaddr/node-11.ingress.cloudflare-ipfs.com" } + ID = "Qmcfuo1TM9uUiJp6dTbm915Rf1aTqm3a3dnmCdDQLHgvL5" + } + new { + Addrs = new { "/dnsaddr/node-12.ingress.cloudflare-ipfs.com" } + ID = "QmcfV2sg9zaq7UUHVCGuSvT2M2rnLBAPsiE79vVyK3Cuev" + } + } +} + +Provider { + Strategy = "" +} + +Pubsub { + Router = "" + DisableSigning = false +} + +Reprovider { + Strategy = "all" + Interval = "12h" +} + +Routing { + Methods = null + Routers = null + Type = "dht" +} + +Swarm { + AddrFilters = null + ConnMgr = new {} + DisableBandwidthMetrics = false + DisableNatPortMap = false + RelayClient = new {} + ResourceMgr = new {} + Transports = new { + Multiplexers = new {} + Network = new {} + Security = new {} + } +} diff --git a/deploy/testnet/config/sonr.app.pkl b/deploy/testnet/config/sonr.app.pkl new file mode 100644 index 000000000..b65786b54 --- /dev/null +++ b/deploy/testnet/config/sonr.app.pkl @@ -0,0 +1,3 @@ +amends "https://pkl.sh/sonr.chain/0.0.2/App.pkl" + + diff --git a/deploy/testnet/config/sonr.config.pkl b/deploy/testnet/config/sonr.config.pkl new file mode 100644 index 000000000..ef647ff32 --- /dev/null +++ b/deploy/testnet/config/sonr.config.pkl @@ -0,0 +1,3 @@ +amends "https://pkl.sh/sonr.chain/0.0.2/Genesis.pkl" + + diff --git a/deploy/testnet/devbox.json b/deploy/testnet/devbox.json index 637c1b677..3fcd691a2 100644 --- a/deploy/testnet/devbox.json +++ b/deploy/testnet/devbox.json @@ -1,12 +1,20 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", - "packages": [ - "go@1.22", - "bun@latest", - "ipfs@latest", - "air@latest", - "templ@latest" - ], + "packages": { + "go": "1.23", + "bun": "latest", + "ipfs": "latest", + "skate": "latest", + "cloudflared": "latest", + "go-task": "latest", + "tigerbeetle": "latest", + "matrix-synapse": { + "version": "latest", + "excluded_platforms": [ + "aarch64-darwin" + ] + } + }, "env": { "GOPATH": "$HOME/go", "PATH": "./build:$HOME/go/bin:$PATH", @@ -21,22 +29,21 @@ "ACC1_ADDRESS": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd", "ACC0_MNEMONIC": "$(skate get ACC0_MNEMONIC)", "ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)", - "TUNNEL_TOKEN": "$(skate get CLOUDFLARE_TUNNEL_TOKEN)", - "TEMPL_EXPERIMENT": "rawgo", - "R2_CDN_BUCKET": "cdn", - "R2_PKL_BUCKET": "pkljar" + "TUNNEL_TOKEN": "$(skate get CLOUDFLARE_TUNNEL_TOKEN)" }, "shell": { - "init_hook": ["export ROOT=$(git rev-parse --show-toplevel)"], + "init_hook": [ + "export ROOT=$(git rev-parse --show-toplevel)" + ], "scripts": { - "start:testnet": ["make sh-testnet"], - "start:ipfs": ["sh scripts/setup_ipfs.sh"], - "start:air": ["air"], - "start:gex": ["go install github.com/cosmos/gex@latest", "gex"], - "gen:pkl": ["make gen-pkl"], - "gen:templ": ["make gen-templ"], - "buf-push": [ - "cd ./proto && bunx buf dep update && bunx buf build && bunx buf push" + "sonr": [ + "cd $ROOT", + "make sh-testnet" + ], + "ipfs": [ + "cd $ROOT", + "make setup-ipfs", + "ipfs daemon" ] } } diff --git a/deploy/testnet/devbox.lock b/deploy/testnet/devbox.lock index 6d0c0e762..33d3cc1eb 100644 --- a/deploy/testnet/devbox.lock +++ b/deploy/testnet/devbox.lock @@ -1,54 +1,6 @@ { "lockfile_version": "1", "packages": { - "air@latest": { - "last_modified": "2024-11-16T04:25:12Z", - "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#air", - "source": "devbox-search", - "version": "1.61.1", - "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/0s90vbnmsyyixs0991md21pbrw8babfb-air-1.61.1", - "default": true - } - ], - "store_path": "/nix/store/0s90vbnmsyyixs0991md21pbrw8babfb-air-1.61.1" - }, - "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/8mpw2asxs297v26fxqy2y1bq438f344l-air-1.61.1", - "default": true - } - ], - "store_path": "/nix/store/8mpw2asxs297v26fxqy2y1bq438f344l-air-1.61.1" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/abminkf7ldqf9vm14xx5wvsrdx3wrvy6-air-1.61.1", - "default": true - } - ], - "store_path": "/nix/store/abminkf7ldqf9vm14xx5wvsrdx3wrvy6-air-1.61.1" - }, - "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/ajx8v5rbbvglncb97yybg3x9kn95gfrm-air-1.61.1", - "default": true - } - ], - "store_path": "/nix/store/ajx8v5rbbvglncb97yybg3x9kn95gfrm-air-1.61.1" - } - } - }, "bun@latest": { "last_modified": "2024-11-18T00:41:09Z", "resolved": "github:NixOS/nixpkgs/5083ec887760adfe12af64830a66807423a859a7#bun", @@ -97,51 +49,99 @@ } } }, - "go@1.22": { - "last_modified": "2024-11-16T04:25:12Z", - "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#go_1_22", + "cloudflared@latest": { + "last_modified": "2024-11-18T00:41:09Z", + "resolved": "github:NixOS/nixpkgs/5083ec887760adfe12af64830a66807423a859a7#cloudflared", "source": "devbox-search", - "version": "1.22.9", + "version": "2024.11.0", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/4nf51i4ah186y2jy3fad2fyvpa49qx6q-go-1.22.9", + "path": "/nix/store/95knk04xlh78swlk9a6kg524rfykzzmz-cloudflared-2024.11.0", "default": true } ], - "store_path": "/nix/store/4nf51i4ah186y2jy3fad2fyvpa49qx6q-go-1.22.9" + "store_path": "/nix/store/95knk04xlh78swlk9a6kg524rfykzzmz-cloudflared-2024.11.0" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/8w8vzwgp55yl8j1ljgm4wzdgjkvkv5v3-go-1.22.9", + "path": "/nix/store/2d6mh1pi99m19bc9m3phcsfgygbfpyig-cloudflared-2024.11.0", "default": true } ], - "store_path": "/nix/store/8w8vzwgp55yl8j1ljgm4wzdgjkvkv5v3-go-1.22.9" + "store_path": "/nix/store/2d6mh1pi99m19bc9m3phcsfgygbfpyig-cloudflared-2024.11.0" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/vlih7j78ki05i8nvzdsxvws7a7ksq04m-go-1.22.9", + "path": "/nix/store/4dii539ldfv0f9n7xigfy19ivrg3ng2n-cloudflared-2024.11.0", "default": true } ], - "store_path": "/nix/store/vlih7j78ki05i8nvzdsxvws7a7ksq04m-go-1.22.9" + "store_path": "/nix/store/4dii539ldfv0f9n7xigfy19ivrg3ng2n-cloudflared-2024.11.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9", + "path": "/nix/store/hlnabpfi58mpd16symqb7kp8xc2lf1pf-cloudflared-2024.11.0", "default": true } ], - "store_path": "/nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9" + "store_path": "/nix/store/hlnabpfi58mpd16symqb7kp8xc2lf1pf-cloudflared-2024.11.0" + } + } + }, + "go@1.23": { + "last_modified": "2024-11-16T04:25:12Z", + "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#go", + "source": "devbox-search", + "version": "1.23.3", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3", + "default": true + } + ], + "store_path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3" } } }, @@ -151,51 +151,252 @@ "source": "devbox-search", "version": "0.17.0" }, - "templ@latest": { - "last_modified": "2024-11-16T04:25:12Z", - "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#templ", + "matrix-synapse@latest": { + "last_modified": "2024-11-18T00:41:09Z", + "resolved": "github:NixOS/nixpkgs/5083ec887760adfe12af64830a66807423a859a7#matrix-synapse", "source": "devbox-search", - "version": "0.2.793", + "version": "1.119.0", "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/ivargvf76g71k5gk3iz4al52rsy28w38-templ-0.2.793", - "default": true - } - ], - "store_path": "/nix/store/ivargvf76g71k5gk3iz4al52rsy28w38-templ-0.2.793" - }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/03654iddn006yx5j1lqq496hax60v8p5-templ-0.2.793", + "path": "/nix/store/dfgj6lgmxy18qd5v9z91376i0b1z06jx-matrix-synapse-wrapped-1.119.0", "default": true } ], - "store_path": "/nix/store/03654iddn006yx5j1lqq496hax60v8p5-templ-0.2.793" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/blvd5wbd1ix6m745s4zx3b84kwzprshq-templ-0.2.793", - "default": true - } - ], - "store_path": "/nix/store/blvd5wbd1ix6m745s4zx3b84kwzprshq-templ-0.2.793" + "store_path": "/nix/store/dfgj6lgmxy18qd5v9z91376i0b1z06jx-matrix-synapse-wrapped-1.119.0" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/sn5h79d36r86i6a8rm1k52c2ij1s32kx-templ-0.2.793", + "path": "/nix/store/570l35c4n3qdxaszrf6bz4rrrw87pkil-matrix-synapse-wrapped-1.119.0", "default": true } ], - "store_path": "/nix/store/sn5h79d36r86i6a8rm1k52c2ij1s32kx-templ-0.2.793" + "store_path": "/nix/store/570l35c4n3qdxaszrf6bz4rrrw87pkil-matrix-synapse-wrapped-1.119.0" + } + } + }, + "postgresql@latest": { + "last_modified": "2024-11-22T01:27:12Z", + "plugin_version": "0.0.2", + "resolved": "github:NixOS/nixpkgs/8edf06bea5bcbee082df1b7369ff973b91618b8d#postgresql", + "source": "devbox-search", + "version": "16.4", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/j6n9b877yhrnkp9z9p1gllxpnfvdrbrb-postgresql-16.4", + "default": true + }, + { + "name": "man", + "path": "/nix/store/465icqyw6m38jxpx5yr1ri26ki0f96sz-postgresql-16.4-man", + "default": true + }, + { + "name": "lib", + "path": "/nix/store/l9w6d22hrcrxkv005g2gbzhvk64vp4rm-postgresql-16.4-lib" + }, + { + "name": "dev", + "path": "/nix/store/jvw9nsblsbh9m4n551sq7qnw82hhsv08-postgresql-16.4-dev" + }, + { + "name": "doc", + "path": "/nix/store/fk1x8k1qsiaasp73qnzyrzw4ylaf1xy6-postgresql-16.4-doc" + } + ], + "store_path": "/nix/store/j6n9b877yhrnkp9z9p1gllxpnfvdrbrb-postgresql-16.4" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/2ywn472iqfdiyw5w4frm63rn3nyrkgn1-postgresql-16.4", + "default": true + }, + { + "name": "man", + "path": "/nix/store/650fqsb195p9x00jgqgzkisjwddbvgfd-postgresql-16.4-man", + "default": true + }, + { + "name": "debug", + "path": "/nix/store/wm34pd2y04mjgvhanqw4ymmhds56l9da-postgresql-16.4-debug" + }, + { + "name": "dev", + "path": "/nix/store/ai2ckvi44jdh9i5078gj5brdwsxk4ydm-postgresql-16.4-dev" + }, + { + "name": "doc", + "path": "/nix/store/qys6z2y4iwr0f6ahpq9gcv9hb551w479-postgresql-16.4-doc" + }, + { + "name": "lib", + "path": "/nix/store/pii1vyxbzggi7aqy7xglav8p52c0qfp2-postgresql-16.4-lib" + } + ], + "store_path": "/nix/store/2ywn472iqfdiyw5w4frm63rn3nyrkgn1-postgresql-16.4" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/5k1p2jjnsdcsvk8zpsqxlzhajh1x9ghq-postgresql-16.4", + "default": true + }, + { + "name": "man", + "path": "/nix/store/p8b24icm7xiwlky1dggqcinn1ah92agl-postgresql-16.4-man", + "default": true + }, + { + "name": "dev", + "path": "/nix/store/cvl9wdw387jk02bbhm1qvidzl18hayyr-postgresql-16.4-dev" + }, + { + "name": "doc", + "path": "/nix/store/ysmwxhh3s2l1k2jkzxq0bv6vdzlgr14j-postgresql-16.4-doc" + }, + { + "name": "lib", + "path": "/nix/store/4va0gp1c718dk1zyqs0il2gn7a81spr0-postgresql-16.4-lib" + } + ], + "store_path": "/nix/store/5k1p2jjnsdcsvk8zpsqxlzhajh1x9ghq-postgresql-16.4" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/ypx0whdqvwbql73nija0zrm4z3rgcm9l-postgresql-16.4", + "default": true + }, + { + "name": "man", + "path": "/nix/store/7x75jfmpc7x36863cf6kr61ikcz787ki-postgresql-16.4-man", + "default": true + }, + { + "name": "doc", + "path": "/nix/store/4c7h8sg2i0jim6hzmzhjw5nn0zmx1xvd-postgresql-16.4-doc" + }, + { + "name": "lib", + "path": "/nix/store/xd8ks7bs2p7gjgk8h98bfg8801swl9m0-postgresql-16.4-lib" + }, + { + "name": "debug", + "path": "/nix/store/pxhd0wq2sbafamjmcp7f890qza76gwav-postgresql-16.4-debug" + }, + { + "name": "dev", + "path": "/nix/store/20i6jma3fbm4sw060hdnrs311fw4aczj-postgresql-16.4-dev" + } + ], + "store_path": "/nix/store/ypx0whdqvwbql73nija0zrm4z3rgcm9l-postgresql-16.4" + } + } + }, + "skate@latest": { + "last_modified": "2024-11-16T04:25:12Z", + "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#skate", + "source": "devbox-search", + "version": "1.0.0", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0", + "default": true + } + ], + "store_path": "/nix/store/q6yhpyfbqiabyic6ymx5rp2db62bnbvr-skate-1.0.0" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0", + "default": true + } + ], + "store_path": "/nix/store/q55dbgvc4xwvr2g02dks6j2j699qni2k-skate-1.0.0" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0", + "default": true + } + ], + "store_path": "/nix/store/s1hy525y8ciya3nrns9kryy3jlcw8igv-skate-1.0.0" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0", + "default": true + } + ], + "store_path": "/nix/store/8s03iazymz77nv6pjxpz7wair0m646wv-skate-1.0.0" + } + } + }, + "tigerbeetle@latest": { + "last_modified": "2024-11-16T04:25:12Z", + "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#tigerbeetle", + "source": "devbox-search", + "version": "0.16.12", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/mm3jzwf24p35afr55v7kl5a0h6962i6p-tigerbeetle-0.16.12" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/4106973gg3crfxq0gwrgwn4hcx64mzyy-tigerbeetle-0.16.12" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/6lnwnr3mvdamm5lxjjqkaagw2pyqlq0a-tigerbeetle-0.16.12" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12", + "default": true + } + ], + "store_path": "/nix/store/afrj2ph61xz0lh7f3d1g1d7v2rslbvny-tigerbeetle-0.16.12" } } } diff --git a/deploy/testnet/process-compose.yaml b/deploy/testnet/process-compose.yaml index bb0f06d2e..2eb1092ad 100644 --- a/deploy/testnet/process-compose.yaml +++ b/deploy/testnet/process-compose.yaml @@ -3,7 +3,7 @@ version: "0.6" processes: ipfs: namespace: testnet - command: "devbox run start:ipfs" + command: "devbox run ipfs" background: true availability: restart: never @@ -12,8 +12,18 @@ processes: sonr: namespace: testnet background: true - command: "devbox run start:testnet" + command: "devbox run sonr" restart: never max_restarts: 1 depends: - ipfs + + hway: + namespace: testnet + background: true + command: "devbox run hway" + restart: never + max_restarts: 1 + depends: + - ipfs + - sonr diff --git a/deploy/testnet/sink/schema.sql b/deploy/testnet/sink/schema.sql new file mode 100644 index 000000000..ce5a241ba --- /dev/null +++ b/deploy/testnet/sink/schema.sql @@ -0,0 +1,85 @@ +/* + This file defines the database schema for the PostgresQL ("psql") event sink + implementation in CometBFT. The operator must create a database and install + this schema before using the database to index events. + */ + +-- The blocks table records metadata about each block. +-- The block record does not include its events or transactions (see tx_results). +CREATE TABLE blocks ( + rowid BIGSERIAL PRIMARY KEY, + + height BIGINT NOT NULL, + chain_id VARCHAR NOT NULL, + + -- When this block header was logged into the sink, in UTC. + created_at TIMESTAMPTZ NOT NULL, + + UNIQUE (height, chain_id) +); + +-- Index blocks by height and chain, since we need to resolve block IDs when +-- indexing transaction records and transaction events. +CREATE INDEX idx_blocks_height_chain ON blocks(height, chain_id); + +-- The tx_results table records metadata about transaction results. Note that +-- the events from a transaction are stored separately. +CREATE TABLE tx_results ( + rowid BIGSERIAL PRIMARY KEY, + + -- The block to which this transaction belongs. + block_id BIGINT NOT NULL REFERENCES blocks(rowid), + -- The sequential index of the transaction within the block. + index INTEGER NOT NULL, + -- When this result record was logged into the sink, in UTC. + created_at TIMESTAMPTZ NOT NULL, + -- The hex-encoded hash of the transaction. + tx_hash VARCHAR NOT NULL, + -- The protobuf wire encoding of the TxResult message. + tx_result BYTEA NOT NULL, + + UNIQUE (block_id, index) +); + +-- The events table records events. All events (both block and transaction) are +-- associated with a block ID; transaction events also have a transaction ID. +CREATE TABLE events ( + rowid BIGSERIAL PRIMARY KEY, + + -- The block and transaction this event belongs to. + -- If tx_id is NULL, this is a block event. + block_id BIGINT NOT NULL REFERENCES blocks(rowid), + tx_id BIGINT NULL REFERENCES tx_results(rowid), + + -- The application-defined type label for the event. + type VARCHAR NOT NULL +); + +-- The attributes table records event attributes. +CREATE TABLE attributes ( + event_id BIGINT NOT NULL REFERENCES events(rowid), + key VARCHAR NOT NULL, -- bare key + composite_key VARCHAR NOT NULL, -- composed type.key + value VARCHAR NULL, + + UNIQUE (event_id, key) +); + +-- A joined view of events and their attributes. Events that do not have any +-- attributes are represented as a single row with empty key and value fields. +CREATE VIEW event_attributes AS + SELECT block_id, tx_id, type, key, composite_key, value + FROM events LEFT JOIN attributes ON (events.rowid = attributes.event_id); + +-- A joined view of all block events (those having tx_id NULL). +CREATE VIEW block_events AS + SELECT blocks.rowid as block_id, height, chain_id, type, key, composite_key, value + FROM blocks JOIN event_attributes ON (blocks.rowid = event_attributes.block_id) + WHERE event_attributes.tx_id IS NULL; + +-- A joined view of all transaction events. +CREATE VIEW tx_events AS + SELECT height, index, chain_id, type, key, composite_key, value, tx_results.created_at + FROM blocks JOIN tx_results ON (blocks.rowid = tx_results.block_id) + JOIN event_attributes ON (tx_results.rowid = event_attributes.tx_id) + WHERE event_attributes.tx_id IS NOT NULL; diff --git a/devbox.json b/devbox.json index e5649f070..d793a40e7 100644 --- a/devbox.json +++ b/devbox.json @@ -1,6 +1,10 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", - "packages": ["go@1.22", "bun@latest", "gum@latest"], + "packages": [ + "go@1.23", + "bun@latest", + "gum@latest" + ], "env": { "GOPATH": "$HOME/go", "PATH": "./build:$HOME/go/bin:$PATH", @@ -8,16 +12,18 @@ }, "shell": { "scripts": { - "deploy-buf": ["gum spin --title='Deploying buf' -- make deploy-buf"], - "deploy-cdn": [ + "deploy": [ "gum spin --title='Generating PKL' -- make pkl-gen", - "gum spin --title='Generating Styles' -- make styles-gen", + "gum spin --title='Generating Styles' -- make tailwind-gen", "gum spin --title='Building Motr WASM' -- make motr-build", "gum spin --title='Uploading to Bucket' -- make deploy-cdn" ], - "start-local": ["cd deploy/local && devbox services up"], - "start-testnet": ["cd deploy/testnet && devbox services up"], - "start-gex": ["go install github.com/cosmos/gex@latest", "gex"] + "devnet": [ + "cd deploy/devnet && devbox services up" + ], + "testnet": [ + "cd deploy/testnet && devbox services up" + ] } } } diff --git a/devbox.lock b/devbox.lock index 073867ef6..1b2e61c70 100644 --- a/devbox.lock +++ b/devbox.lock @@ -49,51 +49,51 @@ } } }, - "go@1.22": { - "last_modified": "2024-10-13T23:44:06Z", - "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#go_1_22", + "go@1.23": { + "last_modified": "2024-11-16T04:25:12Z", + "resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#go", "source": "devbox-search", - "version": "1.22.8", + "version": "1.23.3", "systems": { "aarch64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/8mll7mf53m2hx3hx158gcls70ngcmhxi-go-1.22.8", + "path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3", "default": true } ], - "store_path": "/nix/store/8mll7mf53m2hx3hx158gcls70ngcmhxi-go-1.22.8" + "store_path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3" }, "aarch64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/20v33h47dgf8h7baxh81d3dzdfbgxw33-go-1.22.8", + "path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3", "default": true } ], - "store_path": "/nix/store/20v33h47dgf8h7baxh81d3dzdfbgxw33-go-1.22.8" + "store_path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3" }, "x86_64-darwin": { "outputs": [ { "name": "out", - "path": "/nix/store/dzrq6b65b9wvd6xjrn0qy7prx2s6pnym-go-1.22.8", + "path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3", "default": true } ], - "store_path": "/nix/store/dzrq6b65b9wvd6xjrn0qy7prx2s6pnym-go-1.22.8" + "store_path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3" }, "x86_64-linux": { "outputs": [ { "name": "out", - "path": "/nix/store/gh9fsnl6gxrfzkrxwykbrp9lhnirmv9h-go-1.22.8", + "path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3", "default": true } ], - "store_path": "/nix/store/gh9fsnl6gxrfzkrxwykbrp9lhnirmv9h-go-1.22.8" + "store_path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3" } } }, diff --git a/go.mod b/go.mod index 1f8645d49..a2bd49660 100644 --- a/go.mod +++ b/go.mod @@ -72,10 +72,12 @@ require ( github.com/gorilla/mux v1.8.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/gtank/merlin v0.1.1 - github.com/ipfs/boxo v0.24.0 + github.com/ipfs/boxo v0.24.3 + github.com/ipfs/kubo v0.32.1 github.com/joho/godotenv v1.5.1 github.com/labstack/echo/v4 v4.10.2 - github.com/libp2p/go-libp2p v0.36.5 + github.com/libp2p/go-libp2p v0.37.0 + github.com/libp2p/go-libp2p-core v0.7.0 github.com/mr-tron/base58 v1.2.0 github.com/multiformats/go-multibase v0.2.0 github.com/multiformats/go-multicodec v0.9.0 @@ -90,29 +92,35 @@ require ( github.com/strangelove-ventures/poa v0.50.0 github.com/strangelove-ventures/tokenfactory v0.50.0 github.com/stretchr/testify v1.9.0 + github.com/tigerbeetle/tigerbeetle-go v0.16.14 github.com/ucan-wg/go-ucan v0.7.0 - golang.org/x/crypto v0.27.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 - google.golang.org/grpc v1.64.1 - google.golang.org/protobuf v1.34.2 + golang.org/x/crypto v0.28.0 + google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 + google.golang.org/grpc v1.67.1 + google.golang.org/protobuf v1.35.1 lukechampine.com/blake3 v1.3.0 ) require ( cloud.google.com/go v0.112.1 // indirect - cloud.google.com/go/compute/metadata v0.3.0 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.38.0 // 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 github.com/DataDog/zstd v1.5.5 // indirect - github.com/aws/aws-sdk-go v1.44.224 // indirect + github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect + github.com/aws/aws-sdk-go v1.55.5 // indirect + github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/btcsuite/btcd v0.20.1-beta // indirect + github.com/caddyserver/certmagic v0.21.4 // indirect + github.com/caddyserver/zerossl v0.1.3 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -131,11 +139,12 @@ require ( github.com/cosmos/iavl v1.1.2 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect - github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668 // indirect + github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf // indirect github.com/creachadair/atomicfile v0.3.1 // indirect github.com/creachadair/tomledit v0.0.24 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect @@ -144,8 +153,11 @@ require ( github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect github.com/ethereum/go-ethereum v1.14.6 // indirect + github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 // indirect github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/flynn/noise v1.1.0 // indirect + github.com/francoispqt/gojay v1.2.13 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect @@ -154,55 +166,95 @@ require ( github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-webauthn/x v0.1.14 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-tpm v0.9.1 // indirect + github.com/google/gopacket v1.1.19 // indirect github.com/google/orderedcode v0.0.1 // indirect + github.com/google/pprof v0.0.0-20241017200806-017d972448fc // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.5 // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect + github.com/huin/goupnp v1.3.0 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/ipfs/bbloom v0.0.4 // indirect + github.com/ipfs/go-bitfield v1.1.0 // indirect + github.com/ipfs/go-block-format v0.2.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect + github.com/ipfs/go-datastore v0.6.0 // indirect + github.com/ipfs/go-ds-measure v0.2.0 // indirect + github.com/ipfs/go-fs-lock v0.0.7 // indirect + github.com/ipfs/go-ipfs-cmds v0.14.0 // indirect + github.com/ipfs/go-ipfs-util v0.0.3 // indirect + github.com/ipfs/go-ipld-cbor v0.2.0 // indirect + github.com/ipfs/go-ipld-format v0.6.0 // indirect + github.com/ipfs/go-ipld-legacy v0.2.1 // indirect + github.com/ipfs/go-log v1.0.5 // indirect + github.com/ipfs/go-log/v2 v2.5.1 // indirect + github.com/ipfs/go-metrics-interface v0.0.1 // indirect + github.com/ipfs/go-unixfsnode v1.9.2 // indirect + github.com/ipld/go-car/v2 v2.14.2 // indirect + github.com/ipld/go-codec-dagpb v1.6.0 // indirect + github.com/ipld/go-ipld-prime v0.21.0 // indirect + github.com/ipshipyard/p2p-forge v0.0.2 // indirect + github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect + github.com/jbenet/goprocess v0.1.4 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.9 // indirect + github.com/klauspost/compress v1.17.11 // indirect github.com/klauspost/cpuid/v2 v2.2.8 // indirect + github.com/koron/go-ssdp v0.0.4 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/labstack/gommon v0.4.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/libp2p/go-libp2p-core v0.7.0 // indirect + github.com/libdns/libdns v0.2.2 // indirect + github.com/libp2p/go-buffer-pool v0.1.0 // indirect + github.com/libp2p/go-cidranger v1.1.0 // indirect + github.com/libp2p/go-flow-metrics v0.2.0 // indirect + github.com/libp2p/go-libp2p-asn-util v0.4.1 // indirect + github.com/libp2p/go-libp2p-kad-dht v0.28.1 // indirect + github.com/libp2p/go-libp2p-kbucket v0.6.4 // indirect + github.com/libp2p/go-libp2p-record v0.2.0 // indirect + github.com/libp2p/go-libp2p-routing-helpers v0.7.4 // indirect + github.com/libp2p/go-msgio v0.3.0 // indirect + github.com/libp2p/go-nat v0.2.0 // indirect + github.com/libp2p/go-netroute v0.2.1 // indirect github.com/libp2p/go-openssl v0.1.0 // indirect github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect @@ -210,6 +262,8 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-pointer v0.0.1 // indirect + github.com/mholt/acmez/v2 v2.0.3 // indirect + github.com/miekg/dns v1.1.62 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/minio/sha256-simd v1.0.1 // indirect @@ -220,24 +274,51 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/multiformats/go-multiaddr v0.13.0 // indirect + github.com/multiformats/go-multiaddr-dns v0.4.0 // indirect + github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multihash v0.2.3 // indirect + github.com/multiformats/go-multistream v0.5.0 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/onsi/ginkgo v1.16.5 // indirect - github.com/onsi/gomega v1.33.1 // indirect + github.com/onsi/ginkgo/v2 v2.20.2 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect + github.com/pion/datachannel v1.5.9 // indirect + github.com/pion/dtls/v2 v2.2.12 // indirect + github.com/pion/ice/v2 v2.3.36 // indirect + github.com/pion/interceptor v0.1.37 // indirect + github.com/pion/logging v0.2.2 // indirect + github.com/pion/mdns v0.0.12 // indirect + github.com/pion/randutil v0.1.0 // indirect + github.com/pion/rtcp v1.2.14 // indirect + github.com/pion/rtp v1.8.9 // indirect + github.com/pion/sctp v1.8.33 // indirect + github.com/pion/sdp/v3 v3.0.9 // indirect + github.com/pion/srtp/v2 v2.0.20 // indirect + github.com/pion/stun v0.6.1 // indirect + github.com/pion/transport/v2 v2.2.10 // indirect + github.com/pion/turn/v2 v2.1.6 // indirect + github.com/pion/webrtc/v3 v3.3.4 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.20.4 // indirect + github.com/polydawn/refmt v0.89.0 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect + github.com/quic-go/qpack v0.5.1 // indirect + github.com/quic-go/quic-go v0.48.1 // indirect + github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/rs/cors v1.11.1 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/samber/lo v1.47.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect @@ -252,29 +333,43 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect + github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect + github.com/whyrusleeping/cbor-gen v0.1.2 // indirect + github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect + github.com/wlynxg/anet v0.0.5 // indirect github.com/x448/float16 v0.8.4 // indirect + github.com/zeebo/blake3 v0.2.4 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.10 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect + go.opentelemetry.io/otel v1.31.0 // indirect + go.opentelemetry.io/otel/metric v1.31.0 // indirect + go.opentelemetry.io/otel/trace v1.31.0 // indirect + go.uber.org/dig v1.18.0 // indirect + go.uber.org/fx v1.23.0 // indirect + go.uber.org/mock v0.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect - golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect + go.uber.org/zap v1.27.0 // indirect + go4.org v0.0.0-20230225012048-214862532bf5 // indirect + golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.25.0 // indirect - golang.org/x/term v0.24.0 // indirect - golang.org/x/text v0.18.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.26.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - google.golang.org/api v0.169.0 // indirect + gonum.org/v1/gonum v0.15.0 // indirect + google.golang.org/api v0.172.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // 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 diff --git a/go.sum b/go.sum index 25044d5c5..bc8b3137e 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,10 @@ +bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc h1:utDghgcjE8u+EBjHOgYT+dJPcnDF05KqWMBcjuJy510= +bazil.org/fuse v0.0.0-20200117225306-7b5117fecadc/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.0.0-20170206221025-ce650573d812/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= @@ -221,8 +225,8 @@ cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZ cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= -cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= @@ -801,10 +805,15 @@ cosmossdk.io/x/tx v0.13.5 h1:FdnU+MdmFWn1pTsbfU0OCf2u6mJ8cqc1H4OMG418MLw= cosmossdk.io/x/tx v0.13.5/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= +dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= +dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= +dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= 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.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= 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= @@ -812,6 +821,8 @@ git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDf 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-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M= +github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= @@ -852,6 +863,8 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXY github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= +github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= @@ -885,9 +898,14 @@ github.com/alecthomas/participle/v2 v2.0.0-alpha7/go.mod h1:NumScqsC42o9x+dGj8/Y github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= +github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 h1:iW0a5ljuFxkLGPNem5Ui+KBjFJzKg4Fv2fnxe4dvzpM= +github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5/go.mod h1:Y2QMoi1vgtOIfc+6DhrMOGkLoGzqSV2rKp4Sm+opsyA= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= @@ -902,8 +920,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.224 h1:09CiaaF35nRmxrzWZ2uRq5v6Ghg/d2RiPjZnSgtt+RQ= -github.com/aws/aws-sdk-go v1.44.224/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= +github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= @@ -928,6 +946,8 @@ github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -940,10 +960,13 @@ github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edY github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= @@ -961,9 +984,14 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/caddyserver/certmagic v0.21.4 h1:e7VobB8rffHv8ZZpSiZtEwnLDHUwLVYLWzWSa1FfKI0= +github.com/caddyserver/certmagic v0.21.4/go.mod h1:swUXjQ1T9ZtMv95qj7/InJvWLXURU85r+CfG0T+ZbDE= +github.com/caddyserver/zerossl v0.1.3 h1:onS+pxp3M8HnHpN5MMbOMyNjmTheJyWRaZYwn+YTAyA= +github.com/caddyserver/zerossl v0.1.3/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -972,6 +1000,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/ceramicnetwork/go-dag-jose v0.1.1 h1:7pObs22egc14vSS3AfCFfS1VmaL4lQUsAK7OGC3PlKk= +github.com/ceramicnetwork/go-dag-jose v0.1.1/go.mod h1:8ptnYwY2Z2y/s5oJnNBn/UCxLg6CpramNJ2ZXF/5aNY= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -1049,10 +1079,15 @@ github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1 github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= +github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= +github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d h1:t5Wuyh53qYyg9eqn4BbnlIT+vmhyww0TatL+zT3uWgI= +github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= @@ -1088,8 +1123,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668 h1:ZFUue+PNxmHlu7pYv+IYMtqlaO/0VwaGEqKepZf9JpA= -github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= +github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf h1:dwGgBWn84wUS1pVikGiruW+x5XM4amhjaZO20vCjay4= +github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE= github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= @@ -1097,6 +1132,8 @@ github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6f github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= github.com/creachadair/tomledit v0.0.24/go.mod h1:9qHbShRWQzSCcn617cMzg4eab1vbLCOjOshAWSzWr8U= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0= +github.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= github.com/cucumber/common/gherkin/go/v22 v22.0.0/go.mod h1:3mJT10B2GGn3MvVPd3FwR7m2u4tLhSRhWUqJU4KN4Fg= github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= @@ -1110,6 +1147,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= +github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= @@ -1124,6 +1163,8 @@ github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRk github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8= +github.com/dgraph-io/badger v1.6.2/go.mod h1:JW2yswe3V058sS0kZ2h/AXeDSqFjxnZcRrVH//y2UQE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -1163,6 +1204,8 @@ github.com/ecies/go/v2 v2.0.9/go.mod h1:HOVvjxPPx/HilLI8q7JRZ2ZTE4WzQU/RVvhUKPG3 github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/uo= +github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -1191,6 +1234,8 @@ github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbL github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWXVKaaC8= github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= +github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A= +github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -1205,10 +1250,15 @@ github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6Ytix github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= +github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= +github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +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.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= @@ -1219,6 +1269,8 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/gabriel-vasile/mimetype v1.4.6 h1:3+PzJTKLkvgjeTbts6msPJt4DixhT4YtFNf1gtGe3zc= +github.com/gabriel-vasile/mimetype v1.4.6/go.mod h1:JX1qVKqZd40hUPpAfiNTe0Sne7hdfKSbOqqmkq8GCXc= github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= @@ -1231,6 +1283,7 @@ github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgoo github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= @@ -1246,6 +1299,8 @@ github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmn github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= +github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= @@ -1281,11 +1336,13 @@ github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5Nq github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-webauthn/webauthn v0.11.2 h1:Fgx0/wlmkClTKlnOsdOQ+K5HcHDsDcYIvtYmfhEOSUc= github.com/go-webauthn/webauthn v0.11.2/go.mod h1:aOtudaF94pM71g3jRwTYYwQTG1KyTILTcZqN1srkmD0= github.com/go-webauthn/x v0.1.14 h1:1wrB8jzXAofojJPAaRxnZhRgagvLGnLjhCAwg3kTpT0= github.com/go-webauthn/x v0.1.14/go.mod h1:UuVvFZ8/NbOnkDz3y1NaxtUN87pmtpC1PQ+/5BBQRdc= +github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= @@ -1295,6 +1352,8 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= @@ -1319,13 +1378,14 @@ github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgR github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -1393,6 +1453,7 @@ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= @@ -1403,6 +1464,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gopacket v1.1.19 h1:ves8RnFZPGiFnTS0uPQStjwru6uO6h+nlr9j6fL7kF8= +github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -1428,6 +1491,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= +github.com/google/pprof v0.0.0-20241017200806-017d972448fc h1:NGyrhhFhwvRAZg02jnYVg3GBQy0qGBKmFQJwaPmpmxs= +github.com/google/pprof v0.0.0-20241017200806-017d972448fc/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= @@ -1453,6 +1518,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksP github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= +github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1468,11 +1535,13 @@ github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38 github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= -github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= +github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/cLCKqA= +github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c h1:7lF+Vz0LqiRidnzC1Oq86fpX1q/iEv2KJdrCtttYjT4= +github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -1484,14 +1553,18 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is= @@ -1500,6 +1573,7 @@ github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtX github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g= github.com/hashicorp/consul/sdk v0.14.1/go.mod h1:vFt03juSzocLRFo59NkeQHHmQa6+g7oU0pfzdI1mUhg= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -1520,6 +1594,7 @@ github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= @@ -1537,8 +1612,9 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= @@ -1567,6 +1643,7 @@ github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0Jr github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= @@ -1596,20 +1673,114 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/ipfs/boxo v0.24.0 h1:D9gTU3QdxyjPMlJ6QfqhHTG3TIJPplKzjXLO2J30h9U= -github.com/ipfs/boxo v0.24.0/go.mod h1:iP7xUPpHq2QAmVAjwtQvsNBTxTwLpFuy6ZpiRFwmzDA= +github.com/ipfs-shipyard/nopfs v0.0.12 h1:mvwaoefDF5VI9jyvgWCmaoTJIJFAfrbyQV5fJz35hlk= +github.com/ipfs-shipyard/nopfs v0.0.12/go.mod h1:mQyd0BElYI2gB/kq/Oue97obP4B3os4eBmgfPZ+hnrE= +github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c h1:7UynTbtdlt+w08ggb1UGLGaGjp1mMaZhoTZSctpn5Ak= +github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c/go.mod h1:6EekK/jo+TynwSE/ZOiOJd4eEvRXoavEC3vquKtv4yI= +github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= +github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= +github.com/ipfs/boxo v0.24.3 h1:gldDPOWdM3Rz0v5LkVLtZu7A7gFNvAlWcmxhCqlHR3c= +github.com/ipfs/boxo v0.24.3/go.mod h1:h0DRzOY1IBFDHp6KNvrJLMFdSXTYID0Zf+q7X05JsNg= +github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= +github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= +github.com/ipfs/go-block-format v0.2.0 h1:ZqrkxBA2ICbDRbK8KJs/u0O3dlp6gmAuuXUJNiW1Ycs= +github.com/ipfs/go-block-format v0.2.0/go.mod h1:+jpL11nFx5A/SPpsoBn6Bzkra/zaArfSmsknbPMYgzM= +github.com/ipfs/go-blockservice v0.5.2 h1:in9Bc+QcXwd1apOVM7Un9t8tixPKdaHQFdLSUM1Xgk8= +github.com/ipfs/go-blockservice v0.5.2/go.mod h1:VpMblFEqG67A/H2sHKAemeH9vlURVavlysbdUI632yk= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= +github.com/ipfs/go-cidutil v0.1.0 h1:RW5hO7Vcf16dplUU60Hs0AKDkQAVPVplr7lk97CFL+Q= +github.com/ipfs/go-cidutil v0.1.0/go.mod h1:e7OEVBMIv9JaOxt9zaGEmAoSlXW9jdFZ5lP/0PwcfpA= +github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= +github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= +github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= +github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= +github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= +github.com/ipfs/go-ds-badger v0.3.0 h1:xREL3V0EH9S219kFFueOYJJTcjgNSZ2HY1iSvN7U1Ro= +github.com/ipfs/go-ds-badger v0.3.0/go.mod h1:1ke6mXNqeV8K3y5Ak2bAA0osoTfmxUdupVCGm4QUIek= +github.com/ipfs/go-ds-flatfs v0.5.1 h1:ZCIO/kQOS/PSh3vcF1H6a8fkRGS7pOfwfPdx4n/KJH4= +github.com/ipfs/go-ds-flatfs v0.5.1/go.mod h1:RWTV7oZD/yZYBKdbVIFXTX2fdY2Tbvl94NsWqmoyAX4= +github.com/ipfs/go-ds-leveldb v0.5.0 h1:s++MEBbD3ZKc9/8/njrn4flZLnCuY9I79v94gBUNumo= +github.com/ipfs/go-ds-leveldb v0.5.0/go.mod h1:d3XG9RUDzQ6V4SHi8+Xgj9j1XuEk1z82lquxrVbml/Q= +github.com/ipfs/go-ds-measure v0.2.0 h1:sG4goQe0KDTccHMyT45CY1XyUbxe5VwTKpg2LjApYyQ= +github.com/ipfs/go-ds-measure v0.2.0/go.mod h1:SEUD/rE2PwRa4IQEC5FuNAmjJCyYObZr9UvVh8V3JxE= +github.com/ipfs/go-ds-pebble v0.4.0 h1:88lgFAs2ck8jCQ8lMYRBtksEg18r9BlvTxIMnNJkZaQ= +github.com/ipfs/go-ds-pebble v0.4.0/go.mod h1:ZyYU+weIni+4NG/Yjva+cPkU3ghlsU1HA2R/VLHJ9sM= +github.com/ipfs/go-fs-lock v0.0.7 h1:6BR3dajORFrFTkb5EpCUFIAypsoxpGpDSVUdFwzgL9U= +github.com/ipfs/go-fs-lock v0.0.7/go.mod h1:Js8ka+FNYmgQRLrRXzU3CB/+Csr1BwrRilEcvYrHhhc= +github.com/ipfs/go-ipfs-blockstore v1.3.1 h1:cEI9ci7V0sRNivqaOr0elDsamxXFxJMMMy7PTTDQNsQ= +github.com/ipfs/go-ipfs-blockstore v1.3.1/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE= +github.com/ipfs/go-ipfs-cmds v0.14.0 h1:sxdurhAHSdQr5VrSNJjc+t92uJObSNq+gRVm/wLZGMM= +github.com/ipfs/go-ipfs-cmds v0.14.0/go.mod h1:zj2jN7bHJ4pDucRmqdq863AQYcsqdxXrfVkr9eqPfvo= +github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= +github.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ= +github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= +github.com/ipfs/go-ipfs-ds-help v1.1.1 h1:B5UJOH52IbcfS56+Ul+sv8jnIV10lbjLF5eOO0C66Nw= +github.com/ipfs/go-ipfs-ds-help v1.1.1/go.mod h1:75vrVCkSdSFidJscs8n4W+77AtTpCIAdDGAwjitJMIo= +github.com/ipfs/go-ipfs-exchange-interface v0.2.1 h1:jMzo2VhLKSHbVe+mHNzYgs95n0+t0Q69GQ5WhRDZV/s= +github.com/ipfs/go-ipfs-exchange-interface v0.2.1/go.mod h1:MUsYn6rKbG6CTtsDp+lKJPmVt3ZrCViNyH3rfPGsZ2E= +github.com/ipfs/go-ipfs-pq v0.0.3 h1:YpoHVJB+jzK15mr/xsWC574tyDLkezVrDNeaalQBsTE= +github.com/ipfs/go-ipfs-pq v0.0.3/go.mod h1:btNw5hsHBpRcSSgZtiNm/SLj5gYIZ18AKtv3kERkRb4= +github.com/ipfs/go-ipfs-redirects-file v0.1.2 h1:QCK7VtL91FH17KROVVy5KrzDx2hu68QvB2FTWk08ZQk= +github.com/ipfs/go-ipfs-redirects-file v0.1.2/go.mod h1:yIiTlLcDEM/8lS6T3FlCEXZktPPqSOyuY6dEzVqw7Fw= +github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= +github.com/ipfs/go-ipfs-util v0.0.3 h1:2RFdGez6bu2ZlZdI+rWfIdbQb1KudQp3VGwPtdNCmE0= +github.com/ipfs/go-ipfs-util v0.0.3/go.mod h1:LHzG1a0Ig4G+iZ26UUOMjHd+lfM84LZCrn17xAKWBvs= +github.com/ipfs/go-ipld-cbor v0.2.0 h1:VHIW3HVIjcMd8m4ZLZbrYpwjzqlVUfjLM7oK4T5/YF0= +github.com/ipfs/go-ipld-cbor v0.2.0/go.mod h1:Cp8T7w1NKcu4AQJLqK0tWpd1nkgTxEVB5C6kVpLW6/0= +github.com/ipfs/go-ipld-format v0.6.0 h1:VEJlA2kQ3LqFSIm5Vu6eIlSxD/Ze90xtc4Meten1F5U= +github.com/ipfs/go-ipld-format v0.6.0/go.mod h1:g4QVMTn3marU3qXchwjpKPKgJv+zF+OlaKMyhJ4LHPg= +github.com/ipfs/go-ipld-git v0.1.1 h1:TWGnZjS0htmEmlMFEkA3ogrNCqWjIxwr16x1OsdhG+Y= +github.com/ipfs/go-ipld-git v0.1.1/go.mod h1:+VyMqF5lMcJh4rwEppV0e6g4nCCHXThLYYDpKUkJubI= +github.com/ipfs/go-ipld-legacy v0.2.1 h1:mDFtrBpmU7b//LzLSypVrXsD8QxkEWxu5qVxN99/+tk= +github.com/ipfs/go-ipld-legacy v0.2.1/go.mod h1:782MOUghNzMO2DER0FlBR94mllfdCJCkTtDtPM51otM= +github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= +github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= +github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= +github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= +github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= +github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= +github.com/ipfs/go-merkledag v0.11.0 h1:DgzwK5hprESOzS4O1t/wi6JDpyVQdvm9Bs59N/jqfBY= +github.com/ipfs/go-merkledag v0.11.0/go.mod h1:Q4f/1ezvBiJV0YCIXvt51W/9/kqJGH4I1LsA7+djsM4= +github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= +github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= +github.com/ipfs/go-peertaskqueue v0.8.1 h1:YhxAs1+wxb5jk7RvS0LHdyiILpNmRIRnZVztekOF0pg= +github.com/ipfs/go-peertaskqueue v0.8.1/go.mod h1:Oxxd3eaK279FxeydSPPVGHzbwVeHjatZ2GA8XD+KbPU= +github.com/ipfs/go-test v0.0.4 h1:DKT66T6GBB6PsDFLoO56QZPrOmzJkqU1FZH5C9ySkew= +github.com/ipfs/go-test v0.0.4/go.mod h1:qhIM1EluEfElKKM6fnWxGn822/z9knUGM1+I/OAQNKI= +github.com/ipfs/go-unixfsnode v1.9.2 h1:0A12BYs4XOtDPJTMlwmNPlllDfqcc4yie4e919hcUXk= +github.com/ipfs/go-unixfsnode v1.9.2/go.mod h1:v1nuMFHf4QTIhFUdPMvg1nQu7AqDLvIdwyvJ531Ot1U= +github.com/ipfs/go-verifcid v0.0.3 h1:gmRKccqhWDocCRkC+a59g5QW7uJw5bpX9HWBevXa0zs= +github.com/ipfs/go-verifcid v0.0.3/go.mod h1:gcCtGniVzelKrbk9ooUSX/pM3xlH73fZZJDzQJRvOUw= +github.com/ipfs/kubo v0.32.1 h1:nkx5qrkMeJ2f1ET7v3vx7U1ycurM0dC9R7AnsuSrNjk= +github.com/ipfs/kubo v0.32.1/go.mod h1:7fi1IMPgW5fupyMFUjJ4d4zbvkTEwq6tV3T+EQvtF28= +github.com/ipld/go-car v0.6.2 h1:Hlnl3Awgnq8icK+ze3iRghk805lu8YNq3wlREDTF2qc= +github.com/ipld/go-car v0.6.2/go.mod h1:oEGXdwp6bmxJCZ+rARSkDliTeYnVzv3++eXajZ+Bmr8= +github.com/ipld/go-car/v2 v2.14.2 h1:9ERr7KXpCC7If0rChZLhYDlyr6Bes6yRKPJnCO3hdHY= +github.com/ipld/go-car/v2 v2.14.2/go.mod h1:0iPB/825lTZLU2zPK5bVTk/R3V2612E1VI279OGSXWA= +github.com/ipld/go-codec-dagpb v1.6.0 h1:9nYazfyu9B1p3NAgfVdpRco3Fs2nFC72DqVsMj6rOcc= +github.com/ipld/go-codec-dagpb v1.6.0/go.mod h1:ANzFhfP2uMJxRBr8CE+WQWs5UsNa0pYtmKZ+agnUw9s= +github.com/ipld/go-ipld-prime v0.21.0 h1:n4JmcpOlPDIxBcY037SVfpd1G+Sj1nKZah0m6QH9C2E= +github.com/ipld/go-ipld-prime v0.21.0/go.mod h1:3RLqy//ERg/y5oShXXdx5YIp50cFGOanyMctpPjsvxQ= +github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd h1:gMlw/MhNr2Wtp5RwGdsW23cs+yCuj9k2ON7i9MiJlRo= +github.com/ipld/go-ipld-prime/storage/bsadapter v0.0.0-20230102063945-1a409dc236dd/go.mod h1:wZ8hH8UxeryOs4kJEJaiui/s00hDSbE37OKsL47g+Sw= +github.com/ipshipyard/p2p-forge v0.0.2 h1:86y9LxGB8sGxYQ/If5sNx+c8C/huSpBUg3UZ1uvtym8= +github.com/ipshipyard/p2p-forge v0.0.2/go.mod h1:taPeh3PDSO8Ual0/N2tIOAUXPV8gZoPF3uPXoUyiq14= github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= +github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= +github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= +github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= +github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= @@ -1629,6 +1800,7 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= +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/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= @@ -1661,8 +1833,8 @@ github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrD github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= @@ -1671,14 +1843,18 @@ github.com/klauspost/cpuid/v2 v2.2.8/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZY github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/koron/go-ssdp v0.0.4 h1:1IDwrghSKYM7yLf7XCzbByg2sJ/JcNOZRXS2jczTwz0= +github.com/koron/go-ssdp v0.0.4/go.mod h1:oDXq+E5IL5q0U8uSBcoAXzTzInwy5lEgC91HoKtbmZk= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= @@ -1697,30 +1873,72 @@ github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ic github.com/lib/pq v1.0.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/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s= +github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= +github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= +github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= +github.com/libp2p/go-doh-resolver v0.4.0 h1:gUBa1f1XsPwtpE1du0O+nnZCUqtG7oYi7Bb+0S7FQqw= +github.com/libp2p/go-doh-resolver v0.4.0/go.mod h1:v1/jwsFusgsWIGX/c6vCRrnJ60x7bhTiq/fs2qt0cAg= github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p v0.36.5 h1:DoABsaHO0VXwH6pwCs2F6XKAXWYjFMO4HFBoVxTnF9g= -github.com/libp2p/go-libp2p v0.36.5/go.mod h1:CpszAtXxHYOcyvB7K8rSHgnNlh21eKjYbEfLoMerbEI= +github.com/libp2p/go-flow-metrics v0.2.0 h1:EIZzjmeOE6c8Dav0sNv35vhZxATIXWZg6j/C08XmmDw= +github.com/libp2p/go-flow-metrics v0.2.0/go.mod h1:st3qqfu8+pMfh+9Mzqb2GTiwrAGjIPszEjZmtksN8Jc= +github.com/libp2p/go-libp2p v0.37.0 h1:8K3mcZgwTldydMCNOiNi/ZJrOB9BY+GlI3UxYzxBi9A= +github.com/libp2p/go-libp2p v0.37.0/go.mod h1:GOKmSN99scDuYGTwaTbQPR8Nt6dxrK3ue7OjW2NGDg4= +github.com/libp2p/go-libp2p-asn-util v0.4.1 h1:xqL7++IKD9TBFMgnLPZR6/6iYhawHKHl950SO9L6n94= +github.com/libp2p/go-libp2p-asn-util v0.4.1/go.mod h1:d/NI6XZ9qxw67b4e+NgpQexCIiFYJjErASrYW4PFDN8= github.com/libp2p/go-libp2p-core v0.7.0 h1:4a0TMjrWNTZlNvcqxZmrMRDi/NQWrhwO2pkTuLSQ/IQ= github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= +github.com/libp2p/go-libp2p-kad-dht v0.28.1 h1:DVTfzG8Ybn88g9RycIq47evWCRss5f0Wm8iWtpwyHso= +github.com/libp2p/go-libp2p-kad-dht v0.28.1/go.mod h1:0wHURlSFdAC42+wF7GEmpLoARw8JuS8do2guCtc/Y/w= +github.com/libp2p/go-libp2p-kbucket v0.6.4 h1:OjfiYxU42TKQSB8t8WYd8MKhYhMJeO2If+NiuKfb6iQ= +github.com/libp2p/go-libp2p-kbucket v0.6.4/go.mod h1:jp6w82sczYaBsAypt5ayACcRJi0lgsba7o4TzJKEfWA= +github.com/libp2p/go-libp2p-pubsub v0.12.0 h1:PENNZjSfk8KYxANRlpipdS7+BfLmOl3L2E/6vSNjbdI= +github.com/libp2p/go-libp2p-pubsub v0.12.0/go.mod h1:Oi0zw9aw8/Y5GC99zt+Ef2gYAl+0nZlwdJonDyOz/sE= +github.com/libp2p/go-libp2p-pubsub-router v0.6.0 h1:D30iKdlqDt5ZmLEYhHELCMRj8b4sFAqrUcshIUvVP/s= +github.com/libp2p/go-libp2p-pubsub-router v0.6.0/go.mod h1:FY/q0/RBTKsLA7l4vqC2cbRbOvyDotg8PJQ7j8FDudE= +github.com/libp2p/go-libp2p-record v0.2.0 h1:oiNUOCWno2BFuxt3my4i1frNrt7PerzB3queqa1NkQ0= +github.com/libp2p/go-libp2p-record v0.2.0/go.mod h1:I+3zMkvvg5m2OcSdoL0KPljyJyvNDFGKX7QdlpYUcwk= +github.com/libp2p/go-libp2p-routing-helpers v0.7.4 h1:6LqS1Bzn5CfDJ4tzvP9uwh42IB7TJLNFJA6dEeGBv84= +github.com/libp2p/go-libp2p-routing-helpers v0.7.4/go.mod h1:we5WDj9tbolBXOuF1hGOkR+r7Uh1408tQbAKaT5n1LE= +github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA= +github.com/libp2p/go-libp2p-testing v0.12.0/go.mod h1:KcGDRXyN7sQCllucn1cOOS+Dmm7ujhfEyXQL5lvkcPg= +github.com/libp2p/go-libp2p-xor v0.1.0 h1:hhQwT4uGrBcuAkUGXADuPltalOdpf9aag9kaYNT2tLA= +github.com/libp2p/go-libp2p-xor v0.1.0/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= +github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= +github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM= +github.com/libp2p/go-nat v0.2.0 h1:Tyz+bUFAYqGyJ/ppPPymMGbIgNRH+WqC5QrT5fKrrGk= +github.com/libp2p/go-nat v0.2.0/go.mod h1:3MJr+GRpRkyT65EpVPBstXLvOlAPzUVlG6Pwg9ohLJk= +github.com/libp2p/go-netroute v0.2.1 h1:V8kVrpD8GK0Riv15/7VN6RbUQ3URNZVosw7H2v9tksU= +github.com/libp2p/go-netroute v0.2.1/go.mod h1:hraioZr0fhBjG0ZRXJJ6Zj2IVEVNx6tDTFQfSmcq7mQ= github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo= github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc= +github.com/libp2p/go-reuseport v0.4.0 h1:nR5KU7hD0WxXCJbmw7r2rhRYruNRl2koHw8fQscQm2s= +github.com/libp2p/go-reuseport v0.4.0/go.mod h1:ZtI03j/wO5hZVDFo2jKywN6bYKWLOy8Se6DrI2E1cLU= +github.com/libp2p/go-yamux/v4 v4.0.1 h1:FfDR4S1wj6Bw2Pqbc8Uz7pCxeRBPbwsBbEdfwiCypkQ= +github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4= +github.com/libp2p/zeroconf/v2 v2.2.0 h1:Cup06Jv6u81HLhIj1KasuNM/RHHrJ8T7wOTS4+Tv53Q= +github.com/libp2p/zeroconf/v2 v2.2.0/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs= github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= +github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk= +github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU= github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1740,6 +1958,7 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -1763,9 +1982,18 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= +github.com/mholt/acmez/v2 v2.0.3 h1:CgDBlEwg3QBp6s45tPQmFIBrkRIkBT4rW4orMM6p4sw= +github.com/mholt/acmez/v2 v2.0.3/go.mod h1:pQ1ysaDeGrIMvJ9dfJMk5kJNkn7L2sb3UhyrX6Q91cw= +github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ= +github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ= +github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b h1:z78hV3sbSMAUoyUMM0I83AUIT6Hu17AWfgjzIbtrYFc= +github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= +github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc h1:PTfri+PuQmWDqERdnNMiD9ZejrlswWrCpBEZgWOiTrc= +github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= @@ -1802,6 +2030,7 @@ github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= +github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= @@ -1814,18 +2043,26 @@ github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYg github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= +github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= github.com/multiformats/go-multiaddr v0.13.0 h1:BCBzs61E3AGHcYYTv8dqRH43ZfyrqM8RXVPT8t13tLQ= github.com/multiformats/go-multiaddr v0.13.0/go.mod h1:sBXrNzucqkFJhvKOiwwLyqamGa/P5EIXNPLovyhQCII= +github.com/multiformats/go-multiaddr-dns v0.4.0 h1:P76EJ3qzBXpUXZ3twdCDx/kvagMsNo0LMFXpyms/zgU= +github.com/multiformats/go-multiaddr-dns v0.4.0/go.mod h1:7hfthtB4E4pQwirrz+J0CcDUfbWzTqEzVyYKKIKpgkc= +github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= +github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= +github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= +github.com/multiformats/go-multistream v0.5.0 h1:5htLSLl7lvJk3xx3qT/8Zm9J4K8vEOf/QGkvOGQAyiE= +github.com/multiformats/go-multistream v0.5.0/go.mod h1:n6tMZiwiP2wUsR8DgfDWw1dydlEqV3l6N3/GBsX6ILA= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= @@ -1844,9 +2081,10 @@ github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7 github.com/nats-io/nkeys v0.4.4/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= +github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= @@ -1863,30 +2101,43 @@ github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1ls github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4= +github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 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/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= 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= github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= +github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= +github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= +github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= +github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9 h1:1/WtZae0yGtPq+TI6+Tv1WTxkukpXeMlviSxvL7SRgk= +github.com/petar/GoLLRB v0.0.0-20210522233825-ae3b015fd3e9/go.mod h1:x3N5drFsm2uilKKuuYo6LdyD8vZAW55sH/9w+pbo1sw= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= @@ -1900,6 +2151,48 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pion/datachannel v1.5.9 h1:LpIWAOYPyDrXtU+BW7X0Yt/vGtYxtXQ8ql7dFfYUVZA= +github.com/pion/datachannel v1.5.9/go.mod h1:kDUuk4CU4Uxp82NH4LQZbISULkX/HtzKa4P7ldf9izE= +github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= +github.com/pion/dtls/v2 v2.2.12 h1:KP7H5/c1EiVAAKUmXyCzPiQe5+bCJrpOeKg/L05dunk= +github.com/pion/dtls/v2 v2.2.12/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= +github.com/pion/ice/v2 v2.3.36 h1:SopeXiVbbcooUg2EIR8sq4b13RQ8gzrkkldOVg+bBsc= +github.com/pion/ice/v2 v2.3.36/go.mod h1:mBF7lnigdqgtB+YHkaY/Y6s6tsyRyo4u4rPGRuOjUBQ= +github.com/pion/interceptor v0.1.37 h1:aRA8Zpab/wE7/c0O3fh1PqY0AJI3fCSEM5lRWJVorwI= +github.com/pion/interceptor v0.1.37/go.mod h1:JzxbJ4umVTlZAf+/utHzNesY8tmRkM2lVmkS82TTj8Y= +github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= +github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= +github.com/pion/mdns v0.0.12 h1:CiMYlY+O0azojWDmxdNr7ADGrnZ+V6Ilfner+6mSVK8= +github.com/pion/mdns v0.0.12/go.mod h1:VExJjv8to/6Wqm1FXK+Ii/Z9tsVk/F5sD/N70cnYFbk= +github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA= +github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8= +github.com/pion/rtcp v1.2.12/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= +github.com/pion/rtcp v1.2.14 h1:KCkGV3vJ+4DAJmvP0vaQShsb0xkRfWkO540Gy102KyE= +github.com/pion/rtcp v1.2.14/go.mod h1:sn6qjxvnwyAkkPzPULIbVqSKI5Dv54Rv7VG0kNxh9L4= +github.com/pion/rtp v1.8.3/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/rtp v1.8.9 h1:E2HX740TZKaqdcPmf4pw6ZZuG8u5RlMMt+l3dxeu6Wk= +github.com/pion/rtp v1.8.9/go.mod h1:pBGHaFt/yW7bf1jjWAoUjpSNoDnw98KTMg+jWWvziqU= +github.com/pion/sctp v1.8.33 h1:dSE4wX6uTJBcNm8+YlMg7lw1wqyKHggsP5uKbdj+NZw= +github.com/pion/sctp v1.8.33/go.mod h1:beTnqSzewI53KWoG3nqB282oDMGrhNxBdb+JZnkCwRM= +github.com/pion/sdp/v3 v3.0.9 h1:pX++dCHoHUwq43kuwf3PyJfHlwIj4hXA7Vrifiq0IJY= +github.com/pion/sdp/v3 v3.0.9/go.mod h1:B5xmvENq5IXJimIO4zfp6LAe1fD9N+kFv+V/1lOdz8M= +github.com/pion/srtp/v2 v2.0.20 h1:HNNny4s+OUmG280ETrCdgFndp4ufx3/uy85EawYEhTk= +github.com/pion/srtp/v2 v2.0.20/go.mod h1:0KJQjA99A6/a0DOVTu1PhDSw0CXF2jTkqOoMg3ODqdA= +github.com/pion/stun v0.6.1 h1:8lp6YejULeHBF8NmV8e2787BogQhduZugh5PdhDyyN4= +github.com/pion/stun v0.6.1/go.mod h1:/hO7APkX4hZKu/D0f2lHzNyvdkTGtIy3NDmLR7kSz/8= +github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= +github.com/pion/transport/v2 v2.2.3/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v2 v2.2.4/go.mod h1:q2U/tf9FEfnSBGSW6w5Qp5PFWRLRj3NjLhCCgpRK4p0= +github.com/pion/transport/v2 v2.2.10 h1:ucLBLE8nuxiHfvkFKnkDQRYWYfp8ejf4YBOPfaQpw6Q= +github.com/pion/transport/v2 v2.2.10/go.mod h1:sq1kSLWs+cHW9E+2fJP95QudkzbK7wscs8yYgQToO5E= +github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= +github.com/pion/transport/v3 v3.0.7 h1:iRbMH05BzSNwhILHoBoAPxoB9xQgOaJk+591KC9P1o0= +github.com/pion/transport/v3 v3.0.7/go.mod h1:YleKiTZ4vqNxVwh77Z0zytYi7rXHl7j6uPLGhhz9rwo= +github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= +github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= +github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= +github.com/pion/webrtc/v3 v3.3.4 h1:v2heQVnXTSqNRXcaFQVOhIOYkLMxOu1iJG8uy1djvkk= +github.com/pion/webrtc/v3 v3.3.4/go.mod h1:liNa+E1iwyzyXqNUwvoMRNQ10x8h8FOeJKL8RkIbamE= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -1913,6 +2206,8 @@ github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUI github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polydawn/refmt v0.89.0 h1:ADJTApkvkeBZsN0tBTx8QjpD9JkmxbKp0cxfr9qszm4= +github.com/polydawn/refmt v0.89.0/go.mod h1:/zvteZs/GwLtCgZ4BL6CBsk9IKIlexP43ObX9AxTqTw= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= @@ -1930,6 +2225,7 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k= github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc= +github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= @@ -1939,6 +2235,14 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7/go.mod h1:IToEjHuttnUzwZI5KBSM/LOOW3qLbbrHOEfp3SbECGY= +github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI= +github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg= +github.com/quic-go/quic-go v0.48.1 h1:y/8xmfWI9qmGTc+lBr4jKRUWLGSlSigv847ULJ4hYXA= +github.com/quic-go/quic-go v0.48.1/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= +github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 h1:4WFk6u3sOT6pLa1kQ50ZVdm8BQFgJNA117cepZxtLIg= +github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66/go.mod h1:Vp72IJajgeOL6ddqrAhmp7IM9zbTcgkQxD/YdxrVwMw= +github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= +github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= @@ -1957,8 +2261,8 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= @@ -1970,6 +2274,7 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= +github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.15.0/go.mod h1:5rwNNax6Mlk9sZ40AcyVtiEw24Z4J04cfSioF2COKmc= @@ -1978,6 +2283,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc= +github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= @@ -1989,16 +2296,44 @@ github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= +github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= +github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= +github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= +github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= +github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= +github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= +github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= +github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= +github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= +github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= +github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= +github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= +github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= +github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= +github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= +github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs= +github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= +github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= +github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -2063,10 +2398,13 @@ github.com/supranational/blst v0.3.8-0.20220526154634-513d2456b344/go.mod h1:jZJ github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tigerbeetle/tigerbeetle-go v0.16.14 h1:rECnKk2iAh8KKSChAsZ1n5aDaLzheukIfhrrAy2VMs4= +github.com/tigerbeetle/tigerbeetle-go v0.16.14/go.mod h1:d6G7n4OlD7GLHd62x0VlWPXeI/L0SoNNTfm/ee24GJI= github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= @@ -2077,11 +2415,14 @@ github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:s github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ucan-wg/go-ucan v0.7.0 h1:88A6rbd222Bi1zO6vANvQwDveBnpcUArdjVL0sdwr0w= github.com/ucan-wg/go-ucan v0.7.0/go.mod h1:e6jS6eb29JevZ8Pb3DpwPXYHqQai87ohwcIfQkEgM1Y= +github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb h1:Ywfo8sUltxogBpFuMOFRrrSifO788kAFxmvVw31PtQQ= +github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb/go.mod h1:ikPs9bRWicNw3S7XpJ8sK/smGwU9WcSVU3dy9qahYBM= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/urfave/cli v1.22.10/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= @@ -2095,11 +2436,32 @@ github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= +github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IUPn0Bjt8= github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/warpfork/go-testmark v0.12.1 h1:rMgCpJfwy1sJ50x0M0NgyphxYYPMOODIJHhsXyEHU0s= +github.com/warpfork/go-testmark v0.12.1/go.mod h1:kHwy7wfvGSPh1rQJYKayD4AbtNaeyZdcGi9tNJTaa5Y= +github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0 h1:GDDkbFiaK8jsSDJfjId/PEGEShv6ugrt4kYsC5UIDaQ= +github.com/warpfork/go-wish v0.0.0-20220906213052-39a1cc7a02d0/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= +github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc h1:BCPnHtcboadS0DvysUuJXZ4lWVv5Bh5i7+tbIyi+ck4= +github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= +github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 h1:5HZfQkwe0mIfyDmc1Em5GqlNRzcdtlv4HTNmdpt7XH0= +github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11/go.mod h1:Wlo/SzPmxVp6vXpGt/zaXhHH0fn4IxgqZc82aKg6bpQ= +github.com/whyrusleeping/cbor-gen v0.1.2 h1:WQFlrPhpcQl+M2/3dP5cvlTLWPVsL6LGBb9jJt6l/cA= +github.com/whyrusleeping/cbor-gen v0.1.2/go.mod h1:pM99HXyEbSQHcosHc0iW7YFmwnscr+t9Te4ibko05so= +github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E= +github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k= +github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= +github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:E9S12nwJwEOXe2d6gT6qxdvqMnNq+VnSsKPgm2ZZNds= +github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/wlynxg/anet v0.0.3/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= +github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= +github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -2119,7 +2481,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/blake3 v0.2.4 h1:KYQPkhpRtcqh0ssGYcKLG1JYvddkEA8QwCM/yBqhaZI= +github.com/zeebo/blake3 v0.2.4/go.mod h1:7eeQ6d2iXWRGF6npfaxl2CU+xy2Fjo2gxeyZGCRUjcE= +github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= +github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -2131,6 +2498,7 @@ go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+ go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -2142,43 +2510,78 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.27.0 h1:mlk+/Y1gLPLn84U4tI8d3GNJmGT/eXe3ZuOXN9kTWmI= -go.opentelemetry.io/otel/sdk v1.27.0/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= +go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= +go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 h1:UGZ1QwZWY67Z6BmckTU+9Rxn04m2bD3gD6Mk0OIOCPk= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0/go.mod h1:fcwWuDuaObkkChiDlhEpSq9+X1C0omv+s5mBtToAQ64= +go.opentelemetry.io/otel/exporters/zipkin v1.31.0 h1:CgucL0tj3717DJnni7HVVB2wExzi8c2zJNEA2BhLMvI= +go.opentelemetry.io/otel/exporters/zipkin v1.31.0/go.mod h1:rfzOVNiSwIcWtEC2J8epwG26fiaXlYvLySJ7bwsrtAE= +go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= +go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= +go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= +go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= +go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= +go.uber.org/dig v1.18.0 h1:imUL1UiY0Mg4bqbFfsRQO5G4CGRBec/ZujWTvSVp3pw= +go.uber.org/dig v1.18.0/go.mod h1:Us0rSJiThwCv2GteUN0Q7OKvU7n5J4dxZ9JKUXozFdE= +go.uber.org/fx v1.23.0 h1:lIr/gYWQGfTwGcSXWXu4vP5Ws6iqnNEIY+F/aFzCKTg= +go.uber.org/fx v1.23.0/go.mod h1:o/D9n+2mLP6v1EG+qsdT1O8wKopYAsqZasju97SDFCU= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= -go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= +go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= +go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= +go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= +golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/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-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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= @@ -2187,6 +2590,7 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -2202,6 +2606,7 @@ golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= @@ -2210,8 +2615,8 @@ golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliY golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= -golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2232,8 +2637,8 @@ golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -2247,6 +2652,7 @@ golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeap golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -2281,13 +2687,18 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= 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= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -2361,10 +2772,12 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2398,8 +2811,9 @@ golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2424,12 +2838,14 @@ golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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-20190316082340-a2f829d7f35f/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= @@ -2467,6 +2883,7 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2476,7 +2893,6 @@ golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2552,8 +2968,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= -golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2572,8 +2988,8 @@ golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= -golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2595,8 +3011,9 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= -golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2608,7 +3025,9 @@ golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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-20180828015842-6cd1fcedba52/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-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/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= @@ -2629,6 +3048,8 @@ golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2663,7 +3084,6 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2684,6 +3104,8 @@ golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2700,6 +3122,8 @@ gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= +gonum.org/v1/gonum v0.15.0 h1:2lYxjRbTYyxkJxlhC+LvJIx3SsANPdRybu1tGj9/OrQ= +gonum.org/v1/gonum v0.15.0/go.mod h1:xzZVBJBtS+Mz4q0Yl2LJTk+OxOg4jiXZ7qBoM0uISGo= gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= @@ -2707,6 +3131,9 @@ gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= gonum.org/v1/plot v0.10.0/go.mod h1:JWIHJ7U20drSQb/aDpTetJzfC1KlAPldJLpkSy88dvQ= gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= google.golang.org/api v0.0.0-20170206182103-3d017632ea10/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -2771,9 +3198,11 @@ google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvy google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk= -google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= -google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= +google.golang.org/api v0.172.0 h1:/1OcMZGPmW1rX2LCu2CmGUD1KXK1+pfzxotxyRUCCdk= +google.golang.org/api v0.172.0/go.mod h1:+fJZq6QXWfa9pXhnIzsjx4yI22d4aI9ZpLb58gvXjis= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= @@ -2783,6 +3212,9 @@ google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= +google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2944,8 +3376,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go. google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 h1:MuYw1wJzT+ZkybKfaOXKp5hJiZDn2iHaXRw0mRYdHSc= -google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4/go.mod h1:px9SlOOZBg1wM1zdnr8jEL4CNGUBZ+ZKYtNPApNQc4c= +google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg= +google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:qDbnxtViX5J6CvFbxeNUSzKgVlDLJ/6L+caxye9+Flo= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= @@ -2959,10 +3391,13 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 h1:Di6ANFilr+S60a4S61ZM00vLdw0IrQOSMS2/6mrnOU0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -3011,8 +3446,8 @@ google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpX google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/grpc v1.64.1 h1:LKtvyfbX3UGVPFcGqJ9ItpVWW6oN/2XqTxfAnwRRXiA= -google.golang.org/grpc v1.64.1/go.mod h1:hiQF4LFZelK2WKaP6W0L92zGHtiQdZxk8CrSdvyjeP0= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -3033,8 +3468,8 @@ google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -3046,6 +3481,7 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= 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/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= @@ -3068,6 +3504,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -3143,3 +3581,5 @@ rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/pkg/common/auth/config.go b/pkg/common/auth/config.go new file mode 100644 index 000000000..14b3482bf --- /dev/null +++ b/pkg/common/auth/config.go @@ -0,0 +1,36 @@ +package auth + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/crypto/mpc" +) + +// UCANConfig defines the configuration for UCAN middleware +type UCANConfig struct { + // Skipper defines a function to skip middleware + Skipper func(c echo.Context) bool + + // KeySource provides the source for validating UCANs + KeySource mpc.KeyshareSource + + // TokenLookup is a string in the form of ":" that is used + // to extract token from the request. + // Optional. Default value "header:Authorization". + // Possible values: + // - "header:" + // - "query:" + // - "param:" + // - "cookie:" + TokenLookup string + + // AuthScheme to be used in the Authorization header. + // Optional. Default value "Bearer". + AuthScheme string +} + +// DefaultUCANConfig is the default UCAN middleware config +var DefaultUCANConfig = UCANConfig{ + Skipper: nil, + TokenLookup: "header:Authorization", + AuthScheme: "Bearer", +} diff --git a/pkg/common/auth/middleware.go b/pkg/common/auth/middleware.go new file mode 100644 index 000000000..4b02e18f7 --- /dev/null +++ b/pkg/common/auth/middleware.go @@ -0,0 +1,119 @@ +package auth + +import ( + "fmt" + "strings" + + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/crypto/mpc" +) + +// UCAN returns middleware to validate UCAN tokens +func UCAN(source mpc.KeyshareSource, opts ...Option) echo.MiddlewareFunc { + c := DefaultUCANConfig + for _, opt := range opts { + opt(&c) + } + c.KeySource = source + return UCANWithConfig(c) +} + +// UCANWithConfig returns UCAN middleware with custom config +func UCANWithConfig(config UCANConfig) echo.MiddlewareFunc { + // Defaults + if config.Skipper == nil { + config.Skipper = DefaultUCANConfig.Skipper + } + if config.TokenLookup == "" { + config.TokenLookup = DefaultUCANConfig.TokenLookup + } + if config.AuthScheme == "" { + config.AuthScheme = DefaultUCANConfig.AuthScheme + } + + // Initialize + parts := strings.Split(config.TokenLookup, ":") + extractor := tokenFromHeader(parts[1], config.AuthScheme) + switch parts[0] { + case "query": + extractor = tokenFromQuery(parts[1]) + case "param": + extractor = tokenFromParam(parts[1]) + case "cookie": + extractor = tokenFromCookie(parts[1]) + } + + return func(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + if config.Skipper != nil && config.Skipper(c) { + return next(c) + } + + auth, err := extractor(c) + if err != nil { + return echo.NewHTTPError(401, err.Error()) + } + + parser := config.KeySource.UCANParser() + token, err := parser.ParseAndVerify(c.Request().Context(), auth) + if err != nil { + return echo.NewHTTPError(401, "invalid UCAN token") + } + + // Store token in context + c.Set("ucan", token) + return next(c) + } + } +} + +// tokenFromHeader extracts token from header +func tokenFromHeader(header string, authScheme string) func(echo.Context) (string, error) { + return func(c echo.Context) (string, error) { + auth := c.Request().Header.Get(header) + if auth == "" { + return "", fmt.Errorf("missing auth token") + } + if authScheme == "" { + return auth, nil + } + l := len(authScheme) + if len(auth) > l+1 && auth[:l] == authScheme { + return auth[l+1:], nil + } + return "", fmt.Errorf("invalid auth scheme") + } +} + +// tokenFromQuery extracts token from query string +func tokenFromQuery(param string) func(echo.Context) (string, error) { + return func(c echo.Context) (string, error) { + token := c.QueryParam(param) + if token == "" { + return "", fmt.Errorf("missing auth token") + } + return token, nil + } +} + +// tokenFromParam extracts token from url param +func tokenFromParam(param string) func(echo.Context) (string, error) { + return func(c echo.Context) (string, error) { + token := c.Param(param) + if token == "" { + return "", fmt.Errorf("missing auth token") + } + return token, nil + } +} + +// tokenFromCookie extracts token from cookie +func tokenFromCookie(name string) func(echo.Context) (string, error) { + return func(c echo.Context) (string, error) { + cookie, err := c.Cookie(name) + if err != nil { + return "", fmt.Errorf("missing auth token") + } + return cookie.Value, nil + } +} diff --git a/pkg/common/auth/options.go b/pkg/common/auth/options.go new file mode 100644 index 000000000..8b6851d66 --- /dev/null +++ b/pkg/common/auth/options.go @@ -0,0 +1,26 @@ +package auth + +import ( + "github.com/labstack/echo/v4" +) + +type Option func(c *UCANConfig) + +func WithSkipper(skipper func(c echo.Context) bool) Option { + return func(c *UCANConfig) { + c.Skipper = skipper + } +} + +func WithAuthScheme(scheme string) Option { + return func(c *UCANConfig) { + c.AuthScheme = scheme + } +} + +// WithTokenLookup sets the token lookup strategy +func WithTokenLookup(lookup string) Option { + return func(c *UCANConfig) { + c.TokenLookup = lookup + } +} diff --git a/pkg/common/middleware/cookie/keys.go b/pkg/common/cookie/codec.go similarity index 90% rename from pkg/common/middleware/cookie/keys.go rename to pkg/common/cookie/codec.go index 6ce490ecc..06bf7cda4 100644 --- a/pkg/common/middleware/cookie/keys.go +++ b/pkg/common/cookie/codec.go @@ -16,9 +16,6 @@ const ( // SonrAddress is the key for the Sonr address cookie. SonrAddress Key = "sonr.address" - // SonrKeyshare is the key for the Sonr address cookie. - SonrKeyshare Key = "sonr.keyshare" - // SonrDID is the key for the Sonr DID cookie. SonrDID Key = "sonr.did" diff --git a/pkg/common/middleware/cookie/cookie.go b/pkg/common/cookie/cookie.go similarity index 100% rename from pkg/common/middleware/cookie/cookie.go rename to pkg/common/cookie/cookie.go diff --git a/pkg/common/middleware/header/keys.go b/pkg/common/header/codec.go similarity index 90% rename from pkg/common/middleware/header/keys.go rename to pkg/common/header/codec.go index f8a7d1df8..bde52280c 100644 --- a/pkg/common/middleware/header/keys.go +++ b/pkg/common/header/codec.go @@ -16,8 +16,6 @@ const ( UserAgent Key = "Sec-CH-UA" // Sonr Injected - ChainID Key = "X-Chain-ID" - IPFSHost Key = "X-Host-IPFS" SonrAPIURL Key = "X-Sonr-API" SonrgRPCURL Key = "X-Sonr-GRPC" SonrRPCURL Key = "X-Sonr-RPC" diff --git a/pkg/common/middleware/header/header.go b/pkg/common/header/header.go similarity index 100% rename from pkg/common/middleware/header/header.go rename to pkg/common/header/header.go diff --git a/pkg/common/httputil/get.go b/pkg/common/httputil/get.go deleted file mode 100644 index 80bc369b6..000000000 --- a/pkg/common/httputil/get.go +++ /dev/null @@ -1,49 +0,0 @@ -package httputil - -import ( - "encoding/json" - "fmt" - "io" - "net/http" -) - -// FetchAndDecode makes a GET request to the specified URL and decodes the JSON response into the provided type T -func FetchAndDecode[T any](url string) (*T, error) { - // Create HTTP client - client := &http.Client{} - - // Create request - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %w", err) - } - - // Set headers - req.Header.Set("Content-Type", "application/json") - - // Make the request - resp, err := client.Do(req) - if err != nil { - return nil, fmt.Errorf("error making request: %w", err) - } - defer resp.Body.Close() - - // Check status code - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("unexpected status code: %d", resp.StatusCode) - } - - // Read body - body, err := io.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("error reading response body: %w", err) - } - - // Decode JSON into generic type - var result T - if err := json.Unmarshal(body, &result); err != nil { - return nil, fmt.Errorf("error decoding JSON: %w", err) - } - - return &result, nil -} diff --git a/pkg/common/ipfs/ipfs.go b/pkg/common/ipfs/ipfs.go deleted file mode 100644 index a0c59fc20..000000000 --- a/pkg/common/ipfs/ipfs.go +++ /dev/null @@ -1 +0,0 @@ -package ipfs diff --git a/pkg/common/ipfsapi/ipfsapi.go b/pkg/common/ipfsapi/ipfsapi.go deleted file mode 100644 index f017ba8b8..000000000 --- a/pkg/common/ipfsapi/ipfsapi.go +++ /dev/null @@ -1 +0,0 @@ -package ipfsapi diff --git a/pkg/common/ipfsget/ipfsget.go b/pkg/common/ipfsget/ipfsget.go deleted file mode 100644 index c77e53a5d..000000000 --- a/pkg/common/ipfsget/ipfsget.go +++ /dev/null @@ -1 +0,0 @@ -package ipfsget diff --git a/pkg/common/models/Account.pkl.go b/pkg/common/models/Account.pkl.go index e90bd822a..f996980df 100644 --- a/pkg/common/models/Account.pkl.go +++ b/pkg/common/models/Account.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type Account struct { diff --git a/pkg/common/models/Asset.pkl.go b/pkg/common/models/Asset.pkl.go index fd7323e46..1008899c1 100644 --- a/pkg/common/models/Asset.pkl.go +++ b/pkg/common/models/Asset.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type Asset struct { diff --git a/pkg/common/models/Chain.pkl.go b/pkg/common/models/Chain.pkl.go index 3fab037ad..ee4553e22 100644 --- a/pkg/common/models/Chain.pkl.go +++ b/pkg/common/models/Chain.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type Chain struct { diff --git a/pkg/common/models/Credential.pkl.go b/pkg/common/models/Credential.pkl.go index 92ab2473a..90a325860 100644 --- a/pkg/common/models/Credential.pkl.go +++ b/pkg/common/models/Credential.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type Credential struct { diff --git a/pkg/common/models/DID.pkl.go b/pkg/common/models/DID.pkl.go index af38bfb87..229ca2ad8 100644 --- a/pkg/common/models/DID.pkl.go +++ b/pkg/common/models/DID.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models import ( diff --git a/pkg/common/models/Grant.pkl.go b/pkg/common/models/Grant.pkl.go index 5580c62e4..6f636552b 100644 --- a/pkg/common/models/Grant.pkl.go +++ b/pkg/common/models/Grant.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type Grant struct { diff --git a/pkg/common/models/JWK.pkl.go b/pkg/common/models/JWK.pkl.go index 90e2ba27f..2fe0df9eb 100644 --- a/pkg/common/models/JWK.pkl.go +++ b/pkg/common/models/JWK.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type JWK struct { diff --git a/pkg/common/models/Keyshare.pkl.go b/pkg/common/models/Keyshare.pkl.go index 9693d2a6f..49f774405 100644 --- a/pkg/common/models/Keyshare.pkl.go +++ b/pkg/common/models/Keyshare.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type Keyshare struct { diff --git a/pkg/common/models/ORM.pkl.go b/pkg/common/models/ORM.pkl.go index 1f3fa1f6f..811c9b7bf 100644 --- a/pkg/common/models/ORM.pkl.go +++ b/pkg/common/models/ORM.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models import ( diff --git a/pkg/common/models/Profile.pkl.go b/pkg/common/models/Profile.pkl.go index 7645f381a..3d5babb38 100644 --- a/pkg/common/models/Profile.pkl.go +++ b/pkg/common/models/Profile.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models type Profile struct { diff --git a/pkg/common/models/assettype/AssetType.pkl.go b/pkg/common/models/assettype/AssetType.pkl.go index 717503e2e..3f3b5e870 100644 --- a/pkg/common/models/assettype/AssetType.pkl.go +++ b/pkg/common/models/assettype/AssetType.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package assettype import ( diff --git a/pkg/common/models/didmethod/DIDMethod.pkl.go b/pkg/common/models/didmethod/DIDMethod.pkl.go index 6fdfe1e83..1c9b3e6de 100644 --- a/pkg/common/models/didmethod/DIDMethod.pkl.go +++ b/pkg/common/models/didmethod/DIDMethod.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package didmethod import ( diff --git a/pkg/common/models/init.pkl.go b/pkg/common/models/init.pkl.go index e33a7809b..ff1a7ca1f 100644 --- a/pkg/common/models/init.pkl.go +++ b/pkg/common/models/init.pkl.go @@ -1,17 +1,17 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package models import "github.com/apple/pkl-go/pkl" func init() { - pkl.RegisterMapping("common.types.ORM", ORM{}) - pkl.RegisterMapping("common.types.ORM#Account", Account{}) - pkl.RegisterMapping("common.types.ORM#Asset", Asset{}) - pkl.RegisterMapping("common.types.ORM#Chain", Chain{}) - pkl.RegisterMapping("common.types.ORM#Credential", Credential{}) - pkl.RegisterMapping("common.types.ORM#DID", DID{}) - pkl.RegisterMapping("common.types.ORM#JWK", JWK{}) - pkl.RegisterMapping("common.types.ORM#Grant", Grant{}) - pkl.RegisterMapping("common.types.ORM#Keyshare", Keyshare{}) - pkl.RegisterMapping("common.types.ORM#Profile", Profile{}) + pkl.RegisterMapping("sonr.motr.ORM", ORM{}) + pkl.RegisterMapping("sonr.motr.ORM#Account", Account{}) + pkl.RegisterMapping("sonr.motr.ORM#Asset", Asset{}) + pkl.RegisterMapping("sonr.motr.ORM#Chain", Chain{}) + pkl.RegisterMapping("sonr.motr.ORM#Credential", Credential{}) + pkl.RegisterMapping("sonr.motr.ORM#DID", DID{}) + pkl.RegisterMapping("sonr.motr.ORM#JWK", JWK{}) + pkl.RegisterMapping("sonr.motr.ORM#Grant", Grant{}) + pkl.RegisterMapping("sonr.motr.ORM#Keyshare", Keyshare{}) + pkl.RegisterMapping("sonr.motr.ORM#Profile", Profile{}) } diff --git a/pkg/common/models/keyalgorithm/KeyAlgorithm.pkl.go b/pkg/common/models/keyalgorithm/KeyAlgorithm.pkl.go index db39d96c5..3c36f6318 100644 --- a/pkg/common/models/keyalgorithm/KeyAlgorithm.pkl.go +++ b/pkg/common/models/keyalgorithm/KeyAlgorithm.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package keyalgorithm import ( diff --git a/pkg/common/models/keycurve/KeyCurve.pkl.go b/pkg/common/models/keycurve/KeyCurve.pkl.go index 4babadd67..98db6f7b2 100644 --- a/pkg/common/models/keycurve/KeyCurve.pkl.go +++ b/pkg/common/models/keycurve/KeyCurve.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package keycurve import ( diff --git a/pkg/common/models/keyencoding/KeyEncoding.pkl.go b/pkg/common/models/keyencoding/KeyEncoding.pkl.go index b6fbfceb1..848471c47 100644 --- a/pkg/common/models/keyencoding/KeyEncoding.pkl.go +++ b/pkg/common/models/keyencoding/KeyEncoding.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package keyencoding import ( diff --git a/pkg/common/models/keyrole/KeyRole.pkl.go b/pkg/common/models/keyrole/KeyRole.pkl.go index daa26bdd0..a88e749d4 100644 --- a/pkg/common/models/keyrole/KeyRole.pkl.go +++ b/pkg/common/models/keyrole/KeyRole.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package keyrole import ( diff --git a/pkg/common/models/keysharerole/KeyShareRole.pkl.go b/pkg/common/models/keysharerole/KeyShareRole.pkl.go index 11e8073cb..a83aa6f3b 100644 --- a/pkg/common/models/keysharerole/KeyShareRole.pkl.go +++ b/pkg/common/models/keysharerole/KeyShareRole.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package keysharerole import ( diff --git a/pkg/common/models/keytype/KeyType.pkl.go b/pkg/common/models/keytype/KeyType.pkl.go index 2faf5ae49..91e6e831a 100644 --- a/pkg/common/models/keytype/KeyType.pkl.go +++ b/pkg/common/models/keytype/KeyType.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package keytype import ( diff --git a/pkg/common/models/permissiongrant/PermissionGrant.pkl.go b/pkg/common/models/permissiongrant/PermissionGrant.pkl.go index 0e8822d49..6d122ab9b 100644 --- a/pkg/common/models/permissiongrant/PermissionGrant.pkl.go +++ b/pkg/common/models/permissiongrant/PermissionGrant.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package permissiongrant import ( diff --git a/pkg/common/models/permissionscope/PermissionScope.pkl.go b/pkg/common/models/permissionscope/PermissionScope.pkl.go index 72bd76bda..52ca785f6 100644 --- a/pkg/common/models/permissionscope/PermissionScope.pkl.go +++ b/pkg/common/models/permissionscope/PermissionScope.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.ORM`. DO NOT EDIT. +// Code generated from Pkl module `sonr.motr.ORM`. DO NOT EDIT. package permissionscope import ( diff --git a/pkg/common/middleware/request/cookies.go b/pkg/common/request/cookies.go similarity index 100% rename from pkg/common/middleware/request/cookies.go rename to pkg/common/request/cookies.go diff --git a/pkg/common/middleware/request/headers.go b/pkg/common/request/headers.go similarity index 100% rename from pkg/common/middleware/request/headers.go rename to pkg/common/request/headers.go diff --git a/pkg/common/middleware/request/params.go b/pkg/common/request/params.go similarity index 100% rename from pkg/common/middleware/request/params.go rename to pkg/common/request/params.go diff --git a/pkg/common/middleware/request/query.go b/pkg/common/request/query.go similarity index 100% rename from pkg/common/middleware/request/query.go rename to pkg/common/request/query.go diff --git a/pkg/common/middleware/response/cache.go b/pkg/common/response/cache.go similarity index 100% rename from pkg/common/middleware/response/cache.go rename to pkg/common/response/cache.go diff --git a/pkg/common/middleware/response/cookies.go b/pkg/common/response/cookies.go similarity index 100% rename from pkg/common/middleware/response/cookies.go rename to pkg/common/response/cookies.go diff --git a/pkg/common/middleware/response/headers.go b/pkg/common/response/headers.go similarity index 100% rename from pkg/common/middleware/response/headers.go rename to pkg/common/response/headers.go diff --git a/pkg/common/response/redirect.go b/pkg/common/response/redirect.go new file mode 100644 index 000000000..affae7923 --- /dev/null +++ b/pkg/common/response/redirect.go @@ -0,0 +1,19 @@ +package response + +import ( + "net/http" + + "github.com/labstack/echo/v4" +) + +func RedirectLanding(c echo.Context) error { + return c.Redirect(http.StatusFound, "http://localhost:3000") +} + +func RedirectVaultCID(c echo.Context, cid string) error { + return c.Redirect(http.StatusFound, cid) +} + +func RedirectVaultIPNS(c echo.Context, ipns string) error { + return c.Redirect(http.StatusFound, ipns) +} diff --git a/pkg/common/middleware/response/render.go b/pkg/common/response/render.go similarity index 100% rename from pkg/common/middleware/response/render.go rename to pkg/common/response/render.go diff --git a/pkg/common/middleware/session/context.go b/pkg/common/session/context.go similarity index 100% rename from pkg/common/middleware/session/context.go rename to pkg/common/session/context.go diff --git a/pkg/common/session/exports.go b/pkg/common/session/exports.go new file mode 100644 index 000000000..e6b1b5ad7 --- /dev/null +++ b/pkg/common/session/exports.go @@ -0,0 +1,42 @@ +package session + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/common/cookie" + "github.com/onsonr/sonr/pkg/common/header" + "github.com/onsonr/sonr/pkg/vault/types" +) + +// TODO: Returns fixed chain ID for testing. +func GetChainID(c echo.Context) string { + return "sonr-testnet-1" +} + +// GetVaultConfig returns the default vault config +func GetVaultConfig(c echo.Context, addr string, ucanCID string) *types.Config { + return &types.Config{ + MotrToken: ucanCID, + MotrAddress: addr, + IpfsGatewayUrl: "http://localhost:80", + SonrApiUrl: "http://localhost:1317", + SonrRpcUrl: "http://localhost:26657", + SonrChainId: GetChainID(c), + VaultSchema: GetVaultSchema(c), + } +} + +// GetVaultSchema returns the default vault schema +func GetVaultSchema(c echo.Context) *types.Schema { + return types.DefaultSchema() +} + +// SetVaultAddress sets the address of the vault +func SetVaultAddress(c echo.Context, address string) error { + return cookie.Write(c, cookie.SonrAddress, address) +} + +// SetVaultAuthorization sets the UCAN CID of the vault +func SetVaultAuthorization(c echo.Context, ucanCID string) error { + header.Write(c, header.Authorization, formatAuth(ucanCID)) + return nil +} diff --git a/pkg/common/middleware/session/middleware.go b/pkg/common/session/middleware.go similarity index 75% rename from pkg/common/middleware/session/middleware.go rename to pkg/common/session/middleware.go index 8f9e0e9eb..eba85e069 100644 --- a/pkg/common/middleware/session/middleware.go +++ b/pkg/common/session/middleware.go @@ -6,9 +6,9 @@ import ( "github.com/labstack/echo/v4" "github.com/onsonr/sonr/pkg/common" - "github.com/onsonr/sonr/pkg/common/middleware/cookie" - "github.com/onsonr/sonr/pkg/common/middleware/header" - "github.com/onsonr/sonr/pkg/core/dwn" + "github.com/onsonr/sonr/pkg/common/cookie" + "github.com/onsonr/sonr/pkg/common/header" + "github.com/onsonr/sonr/pkg/vault/types" ) // HwayMiddleware establishes a Session Cookie. @@ -22,7 +22,7 @@ func HwayMiddleware() echo.MiddlewareFunc { } // MotrMiddleware establishes a Session Cookie. -func MotrMiddleware(config *dwn.Config) echo.MiddlewareFunc { +func MotrMiddleware(config *types.Config) echo.MiddlewareFunc { return func(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { err := injectConfig(c, config) @@ -35,16 +35,11 @@ func MotrMiddleware(config *dwn.Config) echo.MiddlewareFunc { } } -func injectConfig(c echo.Context, config *dwn.Config) error { - header.Write(c, header.IPFSHost, config.IpfsGatewayUrl) - header.Write(c, header.ChainID, config.SonrChainId) - +func injectConfig(c echo.Context, config *types.Config) error { header.Write(c, header.SonrAPIURL, config.SonrApiUrl) header.Write(c, header.SonrRPCURL, config.SonrRpcUrl) cookie.Write(c, cookie.SonrAddress, config.MotrAddress) - cookie.Write(c, cookie.SonrKeyshare, config.MotrKeyshare) - schemaBz, err := json.Marshal(config.VaultSchema) if err != nil { return err @@ -58,16 +53,16 @@ func injectSession(c echo.Context, role common.PeerRole) *HTTPContext { if c == nil { return initHTTPContext(nil) } - + cookie.Write(c, cookie.SessionRole, role.String()) - + // Continue even if there are errors, just ensure we have valid session data if err := loadOrGenKsuid(c); err != nil { // Log error but continue } if err := loadOrGenChallenge(c); err != nil { - // Log error but continue + // Log error but continue } - + return initHTTPContext(c) } diff --git a/pkg/common/middleware/session/session.go b/pkg/common/session/session.go similarity index 96% rename from pkg/common/middleware/session/session.go rename to pkg/common/session/session.go index fbd367cae..332a1a9e1 100644 --- a/pkg/common/middleware/session/session.go +++ b/pkg/common/session/session.go @@ -6,7 +6,7 @@ import ( "github.com/labstack/echo/v4" "github.com/onsonr/sonr/pkg/common" - "github.com/onsonr/sonr/pkg/common/middleware/cookie" + "github.com/onsonr/sonr/pkg/common/cookie" "github.com/onsonr/sonr/pkg/common/types" ) @@ -41,18 +41,18 @@ func initHTTPContext(c echo.Context) *HTTPContext { sessionData: &types.Session{}, } } - + sessionData := injectSessionData(c) if sessionData == nil { sessionData = &types.Session{} } - + cc := &HTTPContext{ Context: c, role: common.PeerRole(cookie.ReadUnsafe(c, cookie.SessionRole)), sessionData: sessionData, } - + // Set the session data in both contexts c.SetRequest(c.Request().WithContext(WithData(c.Request().Context(), sessionData))) return cc diff --git a/pkg/common/middleware/session/utils.go b/pkg/common/session/utils.go similarity index 97% rename from pkg/common/middleware/session/utils.go rename to pkg/common/session/utils.go index 53c53ee73..669ba4a9f 100644 --- a/pkg/common/middleware/session/utils.go +++ b/pkg/common/session/utils.go @@ -10,8 +10,8 @@ import ( "github.com/segmentio/ksuid" "github.com/onsonr/sonr/pkg/common" - "github.com/onsonr/sonr/pkg/common/middleware/cookie" - "github.com/onsonr/sonr/pkg/common/middleware/header" + "github.com/onsonr/sonr/pkg/common/cookie" + "github.com/onsonr/sonr/pkg/common/header" "github.com/onsonr/sonr/pkg/common/types" ) @@ -186,3 +186,7 @@ func baseRegisterOptions() *common.RegisterOptions { }, } } + +func formatAuth(ucanCID string) string { + return "Bearer " + ucanCID +} diff --git a/pkg/common/types/Ctx.pkl.go b/pkg/common/types/Ctx.pkl.go index a8b0efdb6..d3d28cee4 100644 --- a/pkg/common/types/Ctx.pkl.go +++ b/pkg/common/types/Ctx.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.Ctx`. DO NOT EDIT. +// Code generated from Pkl module `sonr.hway.Ctx`. DO NOT EDIT. package types import ( diff --git a/pkg/common/types/Session.pkl.go b/pkg/common/types/Session.pkl.go index e3b8f30cb..95d9de3f4 100644 --- a/pkg/common/types/Session.pkl.go +++ b/pkg/common/types/Session.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `common.types.Ctx`. DO NOT EDIT. +// Code generated from Pkl module `sonr.hway.Ctx`. DO NOT EDIT. package types type Session struct { diff --git a/pkg/common/types/init.pkl.go b/pkg/common/types/init.pkl.go index 9e15a2bbb..b3d02c1c9 100644 --- a/pkg/common/types/init.pkl.go +++ b/pkg/common/types/init.pkl.go @@ -1,9 +1,9 @@ -// Code generated from Pkl module `common.types.Ctx`. DO NOT EDIT. +// Code generated from Pkl module `sonr.hway.Ctx`. DO NOT EDIT. package types import "github.com/apple/pkl-go/pkl" func init() { - pkl.RegisterMapping("common.types.Ctx", Ctx{}) - pkl.RegisterMapping("common.types.Ctx#Session", Session{}) + pkl.RegisterMapping("sonr.hway.Ctx", Ctx{}) + pkl.RegisterMapping("sonr.hway.Ctx#Session", Session{}) } diff --git a/pkg/core/dwn/dwn.go b/pkg/core/dwn/dwn.go deleted file mode 100644 index 2b15defa8..000000000 --- a/pkg/core/dwn/dwn.go +++ /dev/null @@ -1,30 +0,0 @@ -package dwn - -import ( - "encoding/json" - "os" -) - -const dwnJSONFileName = "dwn.json" - -func LoadJSONConfig() (*Config, error) { - // Read dwn.json config - dwnBz, err := os.ReadFile(dwnJSONFileName) - if err != nil { - return nil, err - } - dwnConfig := new(Config) - err = json.Unmarshal(dwnBz, dwnConfig) - if err != nil { - return nil, err - } - return dwnConfig, nil -} - -func (c *Config) MarshalJSON() ([]byte, error) { - return json.Marshal(c) -} - -func (c *Config) UnmarshalJSON(data []byte) error { - return json.Unmarshal(data, c) -} diff --git a/pkg/core/dwn/handlers/worker.go b/pkg/core/dwn/handlers/worker.go deleted file mode 100644 index 31c23f4d6..000000000 --- a/pkg/core/dwn/handlers/worker.go +++ /dev/null @@ -1,284 +0,0 @@ -package handlers - -import ( - "fmt" - "net/http" - - "github.com/labstack/echo/v4" - "github.com/onsonr/sonr/pkg/core/dwn" -) - -// generateRawServiceWorkerJS returns the service worker JavaScript as a string -func generateRawServiceWorkerJS(cfg *dwn.Environment) string { - return fmt.Sprintf(`const CACHE_NAMES = { - wasm: "wasm-cache-%s", - static: "static-cache-%s", - dynamic: "dynamic-cache-%s" -}; - -importScripts( - %q, - %q -); - -// Initialize WASM HTTP listener with configured path -const wasmInstance = registerWasmHTTPListener(%q); - -// MessageChannel port for WASM communication -let wasmPort; - -// Request queue for offline operations -let requestQueue = new Map(); - -// Setup message channel handler -self.addEventListener('message', async (event) => { - if (event.data.type === 'PORT_INITIALIZATION') { - wasmPort = event.data.port; - setupWasmCommunication(); - } -}); - -function setupWasmCommunication() { - wasmPort.onmessage = async (event) => { - const { type, data } = event.data; - - switch (type) { - case 'WASM_REQUEST': - handleWasmRequest(data); - break; - case 'SYNC_REQUEST': - processSyncQueue(); - break; - } - }; - - // Notify that WASM is ready - wasmPort.postMessage({ type: 'WASM_READY' }); -} - -// Enhanced install event -self.addEventListener("install", (event) => { - event.waitUntil( - Promise.all([ - skipWaiting(), - // Cache WASM binary and essential resources - caches.open(CACHE_NAMES.wasm).then(cache => - cache.addAll([ - %q, - %q - ]) - ) - ]) - ); -}); - -// Enhanced activate event -self.addEventListener("activate", (event) => { - event.waitUntil( - Promise.all([ - clients.claim(), - // Clean up old caches - caches.keys().then(keys => - Promise.all( - keys.map(key => { - if (!Object.values(CACHE_NAMES).includes(key)) { - return caches.delete(key); - } - }) - ) - ) - ]) - ); -}); - -// Intercept fetch events -self.addEventListener('fetch', (event) => { - const request = event.request; - - // Handle API requests differently from static resources - if (request.url.includes('/api/')) { - event.respondWith(handleApiRequest(request)); - } else { - event.respondWith(handleStaticRequest(request)); - } -}); - -async function handleApiRequest(request) { - try { - // Try to make the request - const response = await fetch(request.clone()); - - // If successful, pass through WASM handler - if (response.ok) { - return await processWasmResponse(request, response); - } - - // If offline or failed, queue the request - await queueRequest(request); - - // Return cached response if available - const cachedResponse = await caches.match(request); - if (cachedResponse) { - return cachedResponse; - } - - // Return offline response - return new Response( - JSON.stringify({ error: 'Currently offline' }), - { - status: 503, - headers: { 'Content-Type': 'application/json' } - } - ); - } catch (error) { - await queueRequest(request); - return new Response( - JSON.stringify({ error: 'Request failed' }), - { - status: 500, - headers: { 'Content-Type': 'application/json' } - } - ); - } -} - -async function handleStaticRequest(request) { - // Check cache first - const cachedResponse = await caches.match(request); - if (cachedResponse) { - return cachedResponse; - } - - try { - const response = await fetch(request); - - // Cache successful responses - if (response.ok) { - const cache = await caches.open(CACHE_NAMES.static); - cache.put(request, response.clone()); - } - - return response; - } catch (error) { - // Return offline page for navigation requests - if (request.mode === 'navigate') { - return caches.match('/offline.html'); - } - throw error; - } -} - -async function processWasmResponse(request, response) { - const responseClone = response.clone(); - - try { - const processedResponse = await wasmInstance.processResponse(responseClone); - - if (wasmPort) { - wasmPort.postMessage({ - type: 'RESPONSE', - requestId: request.headers.get('X-Wasm-Request-ID'), - response: processedResponse - }); - } - - return processedResponse; - } catch (error) { - console.error('WASM processing error:', error); - return response; - } -} - -async function queueRequest(request) { - const serializedRequest = await serializeRequest(request); - requestQueue.set(request.url, serializedRequest); - - try { - await self.registration.sync.register('wasm-sync'); - } catch (error) { - console.error('Sync registration failed:', error); - } -} - -async function serializeRequest(request) { - const headers = {}; - for (const [key, value] of request.headers.entries()) { - headers[key] = value; - } - - return { - url: request.url, - method: request.method, - headers, - body: await request.text(), - timestamp: Date.now() - }; -} - -// Handle background sync -self.addEventListener('sync', (event) => { - if (event.tag === 'wasm-sync') { - event.waitUntil(processSyncQueue()); - } -}); - -async function processSyncQueue() { - const requests = Array.from(requestQueue.values()); - - for (const serializedRequest of requests) { - try { - const response = await fetch(new Request(serializedRequest.url, { - method: serializedRequest.method, - headers: serializedRequest.headers, - body: serializedRequest.body - })); - - if (response.ok) { - requestQueue.delete(serializedRequest.url); - - if (wasmPort) { - wasmPort.postMessage({ - type: 'SYNC_COMPLETE', - url: serializedRequest.url - }); - } - } - } catch (error) { - console.error('Sync failed for request:', error); - } - } -} - -// Handle payment requests -self.addEventListener("canmakepayment", function (e) { - e.respondWith(Promise.resolve(true)); -}); - -// Handle periodic sync if available -self.addEventListener('periodicsync', (event) => { - if (event.tag === 'wasm-sync') { - event.waitUntil(processSyncQueue()); - } -});`, - cfg.CacheVersion, - cfg.CacheVersion, - cfg.CacheVersion, - cfg.WasmExecPath, - cfg.HttpserverPath, - cfg.WasmPath, - cfg.WasmPath, - cfg.WasmExecPath, - ) -} - -// ServiceWorkerHandler is an Echo handler that serves the service worker -func ServiceWorkerHandler(cfg *dwn.Environment) echo.HandlerFunc { - return func(c echo.Context) error { - // Set appropriate headers for service worker - c.Response().Header().Set("Content-Type", "application/javascript") - c.Response().Header().Set("Service-Worker-Allowed", "/") - - // Generate and write the service worker JavaScript - return c.String(http.StatusOK, generateRawServiceWorkerJS(cfg)) - } -} diff --git a/pkg/core/dwn/init.pkl.go b/pkg/core/dwn/init.pkl.go deleted file mode 100644 index 857030c0d..000000000 --- a/pkg/core/dwn/init.pkl.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated from Pkl module `common.types.DWN`. DO NOT EDIT. -package dwn - -import "github.com/apple/pkl-go/pkl" - -func init() { - pkl.RegisterMapping("common.types.DWN", DWN{}) - pkl.RegisterMapping("common.types.DWN#Config", Config{}) - pkl.RegisterMapping("common.types.DWN#Schema", Schema{}) - pkl.RegisterMapping("common.types.DWN#Environment", Environment{}) -} diff --git a/pkg/core/dwn/server/server.go b/pkg/core/dwn/server/server.go deleted file mode 100644 index 0bca1298e..000000000 --- a/pkg/core/dwn/server/server.go +++ /dev/null @@ -1,60 +0,0 @@ -//go:build js && wasm -// +build js,wasm - -package server - -import ( - "github.com/labstack/echo/v4" - - "github.com/onsonr/sonr/pkg/common/middleware/session" - "github.com/onsonr/sonr/pkg/core/dwn" - - "github.com/onsonr/sonr/pkg/core/dwn/bridge" - "github.com/onsonr/sonr/pkg/core/dwn/handlers" -) - -// Server is the interface that wraps the Serve function. -type Server interface { - Serve() func() -} - -type MotrServer struct { - e *echo.Echo - - WasmPath string - WasmExecPath string - HTTPServerPath string - CacheVersion string - IsDev bool -} - -func New(env *dwn.Environment, config *dwn.Config) Server { - s := &MotrServer{e: echo.New()} - - s.e.Use(session.MotrMiddleware(config)) - s.e.Use(bridge.WasmContextMiddleware) - - // Add WASM-specific routes - registerAPI(s.e) - return s -} - -func (s *MotrServer) Serve() func() { - return bridge.ServeFetch(s.e) -} - -// registerAPI registers the Decentralized Web Node API routes. -func registerAPI(e *echo.Echo) { - g1 := e.Group("api") - g1.GET("/register/:subject/start", handlers.RegisterSubjectStart) - g1.POST("/register/:subject/check", handlers.RegisterSubjectCheck) - g1.POST("/register/:subject/finish", handlers.RegisterSubjectFinish) - - g1.GET("/login/:subject/start", handlers.LoginSubjectStart) - g1.POST("/login/:subject/check", handlers.LoginSubjectCheck) - g1.POST("/login/:subject/finish", handlers.LoginSubjectFinish) - - g1.GET("/:origin/grant/jwks", handlers.GetJWKS) - g1.GET("/:origin/grant/token", handlers.GetToken) - g1.POST("/:origin/grant/:subject", handlers.GrantAuthorization) -} diff --git a/pkg/crypto/mpc/caps.go b/pkg/crypto/mpc/caps.go deleted file mode 100644 index 9f82347ad..000000000 --- a/pkg/crypto/mpc/caps.go +++ /dev/null @@ -1,117 +0,0 @@ -package mpc - -import ( - "fmt" - - "github.com/ucan-wg/go-ucan" -) - -// Capability hierarchy for smart account operations -// ---------------------------------------------- -// OWNER -// └─ OPERATOR -// ├─ EXECUTE -// ├─ PROPOSE -// └─ SIGN -// └─ SET_POLICY -// └─ SET_THRESHOLD -// └─ RECOVER -// └─ SOCIAL - -// Define capability hierarchy for smart account operations -const ( - // Root capabilities - CAP_OWNER = "OWNER" // Full account control - CAP_OPERATOR = "OPERATOR" // Can perform operations - CAP_OBSERVER = "OBSERVER" // Can view account state - - // Operation capabilities - CAP_EXECUTE = "EXECUTE" // Can execute transactions - CAP_PROPOSE = "PROPOSE" // Can propose transactions - CAP_SIGN = "SIGN" // Can sign transactions - - // Policy capabilities - CAP_SET_POLICY = "SET_POLICY" // Can modify account policies - CAP_SET_THRESHOLD = "SET_THRESHOLD" // Can modify signing threshold - - // Recovery capabilities - CAP_RECOVER = "RECOVER" // Can initiate recovery - CAP_SOCIAL = "SOCIAL" // Can act as social recovery -) - -// SmartAccountCapabilities defines the capability hierarchy -func NewSmartAccountCapabilities() ucan.NestedCapabilities { - return ucan.NewNestedCapabilities( - CAP_OWNER, - CAP_OPERATOR, - CAP_OBSERVER, - CAP_EXECUTE, - CAP_PROPOSE, - CAP_SIGN, - CAP_SET_POLICY, - CAP_SET_THRESHOLD, - CAP_RECOVER, - CAP_SOCIAL, - ) -} - -// Resource types for smart account operations -type ResourceType string - -const ( - RES_ACCOUNT = "account" - RES_TRANSACTION = "tx" - RES_POLICY = "policy" - RES_RECOVERY = "recovery" -) - -// NewSmartAccountResource creates a new resource identifier -func NewSmartAccountResource(resType ResourceType, path string) ucan.Resource { - return ucan.NewStringLengthResource(string(resType), path) -} - -// CreateSmartAccountAttenuations creates default attenuations for a smart account -func CreateSmartAccountAttenuations( - caps ucan.NestedCapabilities, - accountAddr string, -) ucan.Attenuations { - return ucan.Attenuations{ - // Owner capabilities - {caps.Cap(CAP_OWNER), NewSmartAccountResource(RES_ACCOUNT, accountAddr)}, - - // Operation capabilities - {caps.Cap(CAP_EXECUTE), NewSmartAccountResource(RES_TRANSACTION, fmt.Sprintf("%s:*", accountAddr))}, - {caps.Cap(CAP_PROPOSE), NewSmartAccountResource(RES_TRANSACTION, fmt.Sprintf("%s:*", accountAddr))}, - {caps.Cap(CAP_SIGN), NewSmartAccountResource(RES_TRANSACTION, fmt.Sprintf("%s:*", accountAddr))}, - - // Policy capabilities - {caps.Cap(CAP_SET_POLICY), NewSmartAccountResource(RES_POLICY, fmt.Sprintf("%s:*", accountAddr))}, - {caps.Cap(CAP_SET_THRESHOLD), NewSmartAccountResource(RES_POLICY, fmt.Sprintf("%s:threshold", accountAddr))}, - } -} - -// Policy represents smart account execution policies -type PolicyType string - -const ( - POLICY_THRESHOLD = "threshold" - POLICY_TIMELOCK = "timelock" - POLICY_WHITELIST = "whitelist" -) - -// CreatePolicyAttenuation creates attenuations for policy management -func CreatePolicyAttenuation( - caps ucan.NestedCapabilities, - accountAddr string, - policyType PolicyType, -) ucan.Attenuations { - return ucan.Attenuations{ - { - caps.Cap(CAP_SET_POLICY), - NewSmartAccountResource( - RES_POLICY, - fmt.Sprintf("%s:%s", accountAddr, policyType), - ), - }, - } -} diff --git a/pkg/crypto/mpc/mpc_test.go b/pkg/crypto/mpc/mpc_test.go deleted file mode 100644 index 2df5979c3..000000000 --- a/pkg/crypto/mpc/mpc_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package mpc_test - -import ( - "fmt" - "testing" - - "github.com/onsonr/sonr/pkg/crypto/mpc" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestKeyshareGeneration(t *testing.T) { - // Test data - testData := []byte("hello world") - - // Generate keyshares - src, err := mpc.NewKeyshareSource() - require.NoError(t, err) - src.Address() - - // Test signing with keyshares - sig, err := src.SignData(testData) - require.NoError(t, err) - require.NotNil(t, sig) - - // Verify signature - valid, err := src.VerifyData(testData, sig) - require.NoError(t, err) - assert.True(t, valid) - tk, err := src.DefaultOriginToken() - require.NoError(t, err) - cid, err := tk.CID() - require.NoError(t, err) - fmt.Println(cid) -} diff --git a/pkg/crypto/mpc/share.go b/pkg/crypto/mpc/share.go deleted file mode 100644 index 5f48ca266..000000000 --- a/pkg/crypto/mpc/share.go +++ /dev/null @@ -1,198 +0,0 @@ -package mpc - -import ( - "crypto/ecdsa" - "encoding/json" - "errors" - - "github.com/onsonr/sonr/pkg/crypto/core/curves" - "github.com/onsonr/sonr/pkg/crypto/core/protocol" - "github.com/onsonr/sonr/pkg/crypto/tecdsa/dklsv1" - "golang.org/x/crypto/sha3" -) - -var ErrInvalidKeyshareRole = errors.New("invalid keyshare role") - -type Role int - -const ( - RoleUnknown Role = iota - RoleUser - RoleValidator -) - -func (r Role) IsUser() bool { - return r == RoleUser -} - -func (r Role) IsValidator() bool { - return r == RoleValidator -} - -// Message is the protocol.Message that is used for MPC -type Message *protocol.Message - -type PublicKey *ecdsa.PublicKey - -type Signature *curves.EcdsaSignature - -// RefreshFunc is the type for the refresh function -type RefreshFunc interface { - protocol.Iterator -} - -// SignFunc is the type for the sign function -type SignFunc interface { - protocol.Iterator -} - -type ValKeyshare struct { - Message Message `json:"message"` - Role int `json:"role"` // 1 for validator, 2 for user - PublicKey []byte `json:"public-key"` -} - -func NewValKeyshare(msg Message) (*ValKeyshare, error) { - valShare, err := dklsv1.DecodeAliceDkgResult(msg) - if err != nil { - return nil, err - } - return &ValKeyshare{ - Message: msg, - Role: 1, - PublicKey: valShare.PublicKey.ToAffineUncompressed(), - }, nil -} - -func (v ValKeyshare) GetPayloads() map[string][]byte { - return v.Message.Payloads -} - -func (v ValKeyshare) GetMetadata() map[string]string { - return v.Message.Metadata -} - -func (v ValKeyshare) GetPublicKey() []byte { - return v.PublicKey -} - -func (v ValKeyshare) GetProtocol() string { - return v.Message.Protocol -} - -func (v ValKeyshare) GetRole() int32 { - return int32(v.Role) -} - -func (v ValKeyshare) GetVersion() uint32 { - return uint32(v.Message.Version) -} - -func (k ValKeyshare) ECDSAPublicKey() (*ecdsa.PublicKey, error) { - return ComputeEcdsaPublicKey(k.PublicKey) -} - -func (k ValKeyshare) ExtractMessage() *protocol.Message { - return &protocol.Message{ - Payloads: k.GetPayloads(), - Metadata: k.GetMetadata(), - Protocol: k.GetProtocol(), - Version: uint(k.GetVersion()), - } -} - -func (k ValKeyshare) RefreshFunc() (RefreshFunc, error) { - curve := curves.K256() - return dklsv1.NewAliceRefresh(curve, k.ExtractMessage(), protocol.Version1) -} - -func (k ValKeyshare) SignFunc(msg []byte) (SignFunc, error) { - curve := curves.K256() - return dklsv1.NewAliceSign(curve, sha3.New256(), msg, k.ExtractMessage(), protocol.Version1) -} - -func (v ValKeyshare) Marshal() (string, error) { - jsonBytes, err := json.Marshal(v) - return string(jsonBytes), err -} - -func (v ValKeyshare) Unmarshal(data string) error { - return json.Unmarshal([]byte(data), &v) -} - -type UserKeyshare struct { - Message Message `json:"message"` // BobOutput - Role int `json:"role"` // 2 for user, 1 for validator - PublicKey []byte `json:"public-key"` -} - -func NewUserKeyshare(msg Message) (*UserKeyshare, error) { - out, err := dklsv1.DecodeBobDkgResult(msg) - if err != nil { - return nil, err - } - return &UserKeyshare{ - Message: msg, - Role: 2, - PublicKey: out.PublicKey.ToAffineUncompressed(), - }, nil -} - -func (u UserKeyshare) GetPayloads() map[string][]byte { - return u.Message.Payloads -} - -func (u UserKeyshare) GetMetadata() map[string]string { - return u.Message.Metadata -} - -func (u UserKeyshare) GetPublicKey() []byte { - return u.PublicKey -} - -func (u UserKeyshare) GetProtocol() string { - return u.Message.Protocol -} - -func (u UserKeyshare) GetRole() int32 { - return int32(u.Role) -} - -func (u UserKeyshare) GetVersion() uint32 { - return uint32(u.Message.Version) -} - -func (k UserKeyshare) ECDSAPublicKey() (*ecdsa.PublicKey, error) { - return ComputeEcdsaPublicKey(k.PublicKey) -} - -func (k UserKeyshare) ExtractMessage() *protocol.Message { - return &protocol.Message{ - Payloads: k.GetPayloads(), - Metadata: k.GetMetadata(), - Protocol: k.GetProtocol(), - Version: uint(k.GetVersion()), - } -} - -func (k UserKeyshare) RefreshFunc() (RefreshFunc, error) { - curve := curves.K256() - return dklsv1.NewBobRefresh(curve, k.ExtractMessage(), protocol.Version1) -} - -func (k UserKeyshare) SignFunc(msg []byte) (SignFunc, error) { - curve := curves.K256() - return dklsv1.NewBobSign(curve, sha3.New256(), msg, k.ExtractMessage(), protocol.Version1) -} - -func (u UserKeyshare) Marshal() (string, error) { - jsonBytes, err := json.Marshal(u) - if err != nil { - return "", err - } - return string(jsonBytes), nil -} - -func (u UserKeyshare) Unmarshal(data string) error { - return json.Unmarshal([]byte(data), &u) -} diff --git a/pkg/gateway/embed/index.html b/pkg/gateway/embed/index.html new file mode 100644 index 000000000..b830f7a1b --- /dev/null +++ b/pkg/gateway/embed/index.html @@ -0,0 +1,138 @@ + + + + + + + Sonr DWN + + + + + + + + + + + + + + + + + + + + + +
+ You are currently offline. Some features may be limited. +
+ + + + +
+
+ Loading... +
+
+ + + + + + + diff --git a/pkg/gateway/embed/main.js b/pkg/gateway/embed/main.js new file mode 100644 index 000000000..480d26357 --- /dev/null +++ b/pkg/gateway/embed/main.js @@ -0,0 +1,152 @@ +// MessageChannel for WASM communication +let wasmChannel; +let wasmPort; + +async function initWasmChannel() { + wasmChannel = new MessageChannel(); + wasmPort = wasmChannel.port1; + + // Setup message handling from WASM + wasmPort.onmessage = (event) => { + const { type, data } = event.data; + switch (type) { + case 'WASM_READY': + console.log('WASM is ready'); + document.dispatchEvent(new CustomEvent('wasm-ready')); + break; + case 'RESPONSE': + handleWasmResponse(data); + break; + case 'SYNC_COMPLETE': + handleSyncComplete(data); + break; + } + }; +} + +// Initialize WebAssembly and Service Worker +async function init() { + try { + // Register service worker + if ('serviceWorker' in navigator) { + const registration = await navigator.serviceWorker.register('./sw.js'); + console.log('ServiceWorker registered'); + + // Wait for the service worker to be ready + await navigator.serviceWorker.ready; + + // Initialize MessageChannel + await initWasmChannel(); + + // Send the MessageChannel port to the service worker + navigator.serviceWorker.controller.postMessage({ + type: 'PORT_INITIALIZATION', + port: wasmChannel.port2 + }, [wasmChannel.port2]); + + // Register for periodic sync if available + if ('periodicSync' in registration) { + try { + await registration.periodicSync.register('wasm-sync', { + minInterval: 24 * 60 * 60 * 1000 // 24 hours + }); + } catch (error) { + console.log('Periodic sync could not be registered:', error); + } + } + } + + // Initialize HTMX with custom config + htmx.config.withCredentials = true; + htmx.config.wsReconnectDelay = 'full-jitter'; + + // Override HTMX's internal request handling + htmx.config.beforeRequest = function (config) { + // Add request ID for tracking + const requestId = 'req_' + Date.now(); + config.headers['X-Wasm-Request-ID'] = requestId; + + // If offline, handle through service worker + if (!navigator.onLine) { + return false; // Let service worker handle it + } + return true; + }; + + // Handle HTMX after request + htmx.config.afterRequest = function (config) { + // Additional processing after request if needed + }; + + // Handle HTMX errors + htmx.config.errorHandler = function (error) { + console.error('HTMX Error:', error); + }; + + } catch (error) { + console.error('Initialization failed:', error); + } +} + +function handleWasmResponse(data) { + const { requestId, response } = data; + // Process the WASM response + // This might update the UI or trigger HTMX swaps + const targetElement = document.querySelector(`[data-request-id="${requestId}"]`); + if (targetElement) { + htmx.process(targetElement); + } +} + +function handleSyncComplete(data) { + const { url } = data; + // Handle successful sync + // Maybe refresh the relevant part of the UI + htmx.trigger('body', 'sync:complete', { url }); +} + +// Handle offline status changes +window.addEventListener('online', () => { + document.body.classList.remove('offline'); + // Trigger sync when back online + if (wasmPort) { + wasmPort.postMessage({ type: 'SYNC_REQUEST' }); + } +}); + +window.addEventListener('offline', () => { + document.body.classList.add('offline'); +}); + +// Custom event handlers for HTMX +document.addEventListener('htmx:beforeRequest', (event) => { + const { elt, xhr } = event.detail; + // Add request tracking + const requestId = xhr.headers['X-Wasm-Request-ID']; + elt.setAttribute('data-request-id', requestId); +}); + +document.addEventListener('htmx:afterRequest', (event) => { + const { elt, successful } = event.detail; + if (successful) { + elt.removeAttribute('data-request-id'); + } +}); + +// Initialize everything when the page loads +document.addEventListener('DOMContentLoaded', init); + +// Export functions that might be needed by WASM +window.wasmBridge = { + triggerUIUpdate: function (selector, content) { + const target = document.querySelector(selector); + if (target) { + htmx.process(htmx.parse(content).forEach(node => target.appendChild(node))); + } + }, + + showNotification: function (message, type = 'info') { + // Implement notification system + console.log(`${type}: ${message}`); + } +}; diff --git a/x/dwn/types/static/static.go b/pkg/gateway/embed/static.go similarity index 66% rename from x/dwn/types/static/static.go rename to pkg/gateway/embed/static.go index 7a56ecccd..fc1e54d95 100644 --- a/x/dwn/types/static/static.go +++ b/pkg/gateway/embed/static.go @@ -1,4 +1,4 @@ -package static +package embed import ( _ "embed" @@ -7,5 +7,8 @@ import ( //go:embed index.html var IndexHTML []byte +//go:embed main.js +var MainJS []byte + //go:embed sw.js var WorkerJS []byte diff --git a/x/dwn/types/static/sw.js b/pkg/gateway/embed/sw.js similarity index 100% rename from x/dwn/types/static/sw.js rename to pkg/gateway/embed/sw.js diff --git a/pkg/gateway/embed/vault.go b/pkg/gateway/embed/vault.go new file mode 100644 index 000000000..2ddb0f116 --- /dev/null +++ b/pkg/gateway/embed/vault.go @@ -0,0 +1,24 @@ +package embed + +import ( + "github.com/ipfs/boxo/files" +) + +const ( + AppManifestFileName = "app.webmanifest" + DWNConfigFileName = "dwn.json" + IndexHTMLFileName = "index.html" + MainJSFileName = "main.js" + ServiceWorkerFileName = "sw.js" +) + +// spawnVaultDirectory creates a new directory with the default files +func NewFS(cfgBz []byte, manifestBz []byte) files.Directory { + return files.NewMapDirectory(map[string]files.Node{ + AppManifestFileName: files.NewBytesFile(manifestBz), + DWNConfigFileName: files.NewBytesFile(cfgBz), + IndexHTMLFileName: files.NewBytesFile(IndexHTML), + MainJSFileName: files.NewBytesFile(MainJS), + ServiceWorkerFileName: files.NewBytesFile(WorkerJS), + }) +} diff --git a/pkg/gateway/handlers/pin.go b/pkg/gateway/handlers/pin.go new file mode 100644 index 000000000..03748a147 --- /dev/null +++ b/pkg/gateway/handlers/pin.go @@ -0,0 +1,11 @@ +package handlers + +import "github.com/labstack/echo/v4" + +func PinVault(c echo.Context) error { + return nil +} + +func PublishVault(c echo.Context) error { + return nil +} diff --git a/pkg/gateway/handlers/spawn.go b/pkg/gateway/handlers/spawn.go new file mode 100644 index 000000000..2ba6fd143 --- /dev/null +++ b/pkg/gateway/handlers/spawn.go @@ -0,0 +1,59 @@ +package handlers + +import ( + "encoding/json" + "net/http" + + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/crypto/mpc" + "github.com/onsonr/sonr/pkg/common/session" + "github.com/onsonr/sonr/pkg/gateway/embed" + "github.com/onsonr/sonr/pkg/gateway/middleware" + "github.com/onsonr/sonr/pkg/vault/types" +) + +func SpawnVault(c echo.Context) error { + ipfs, err := middleware.GetIPFSClient(c) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + ks, err := mpc.NewKeyset() + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + src, err := mpc.NewSource(ks) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + tk, err := src.OriginToken() + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + + // Create the vault keyshare auth token + kscid, err := tk.CID() + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + + // Create the vault config + cfg := session.GetVaultConfig(c, src.Address(), kscid.String()) + cnf, err := json.Marshal(cfg) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + + // Create the vault app manifest + manifest := types.NewWebManifest() + manifestBz, err := json.Marshal(manifest) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + + dir := embed.NewFS(cnf, manifestBz) + path, err := ipfs.Unixfs().Add(c.Request().Context(), dir) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + return c.Redirect(http.StatusFound, path.String()) +} diff --git a/pkg/gateway/middleware/ipfs.go b/pkg/gateway/middleware/ipfs.go new file mode 100644 index 000000000..3e44d2c63 --- /dev/null +++ b/pkg/gateway/middleware/ipfs.go @@ -0,0 +1,132 @@ +package middleware + +import ( + "errors" + "fmt" + "io" + "net/http" + "path/filepath" + "strings" + + "github.com/ipfs/boxo/files" + "github.com/ipfs/kubo/client/rpc" + "github.com/labstack/echo/v4" +) + +type IPFSContext struct { + echo.Context + ipfs *rpc.HttpApi +} + +func IPFSMiddleware(client *rpc.HttpApi) echo.MiddlewareFunc { + return func(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + cc := &IPFSContext{ + Context: c, + ipfs: client, + } + return next(cc) + } + } +} + +func GetIPFSClient(c echo.Context) (*rpc.HttpApi, error) { + cc, ok := c.(*IPFSContext) + if !ok { + return nil, errors.New("not an IPFSContext") + } + if cc.ipfs == nil { + return nil, errors.New("no IPFS client") + } + return cc.ipfs, nil +} + +func getContentType(path string, defaultType string) string { + ext := strings.ToLower(filepath.Ext(path)) + switch ext { + case ".html", ".htm": + return "text/html" + case ".css": + return "text/css" + case ".js": + return "application/javascript" + case ".jpg", ".jpeg": + return "image/jpeg" + case ".png": + return "image/png" + case ".gif": + return "image/gif" + case ".svg": + return "image/svg+xml" + case ".json": + return "application/json" + case ".xml": + return "application/xml" + case ".pdf": + return "application/pdf" + case ".zip": + return "application/zip" + case ".mp4": + return "video/mp4" + case ".mp3": + return "audio/mpeg" + case ".woff": + return "font/woff" + case ".woff2": + return "font/woff2" + case ".ttf": + return "font/ttf" + default: + return defaultType + } +} + +func streamFile(c echo.Context, file files.File, cid string, filePath string) error { + // Get file size if possible + stat, err := file.Size() + if err == nil { + c.Response().Header().Set("Content-Length", fmt.Sprintf("%d", stat)) + } + + // Set content type based on file extension first + contentType := getContentType(filePath, "") + + // If no content type found by extension, detect from content + if contentType == "" { + buffer := make([]byte, 512) + _, err = file.Read(buffer) + if err != nil && err != io.EOF { + return err + } + contentType = http.DetectContentType(buffer) + + // Reset file pointer after reading for content type detection + if seeker, ok := file.(io.Seeker); ok { + _, err = seeker.Seek(0, io.SeekStart) + if err != nil { + return err + } + } + } + + // Set headers + c.Response().Header().Set("Content-Type", contentType) + c.Response().Header().Set("ETag", fmt.Sprintf(`"%s"`, cid)) + c.Response().Header().Set("Cache-Control", "public, max-age=29030400, immutable") + c.Response().Header().Set("X-Content-Type-Options", "nosniff") + c.Response().Header().Set("X-Frame-Options", "DENY") + c.Response().Header().Set("X-XSS-Protection", "1; mode=block") + + // Stream the file + return c.Stream(http.StatusOK, contentType, file) +} + +func redirectOnError(c echo.Context) error { + return c.Redirect(http.StatusFound, "http://localhost:3000") +} + +func looksLikeCID(s string) bool { + return strings.HasPrefix(s, "Qm") || // v0 CID + strings.HasPrefix(s, "bafy") || // v1 CID + strings.HasPrefix(s, "b") // other base32 v1 CIDs +} diff --git a/pkg/gateway/routes.go b/pkg/gateway/routes.go new file mode 100644 index 000000000..f21fe9d7e --- /dev/null +++ b/pkg/gateway/routes.go @@ -0,0 +1,23 @@ +package gateway + +import ( + "net/http" + + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/gateway/handlers" +) + +func RegisterRoutes(e *echo.Echo) { + // Custom error handler for gateway + e.HTTPErrorHandler = func(err error, c echo.Context) { + if he, ok := err.(*echo.HTTPError); ok { + // Log the error if needed + c.Logger().Errorf("Gateway error: %v", he.Message) + } + // Redirect to main site + c.Redirect(http.StatusFound, "http://localhost:3000") + } + e.POST("/spawn", handlers.SpawnVault) + e.POST("/pin", handlers.PinVault) + e.POST("/publish", handlers.PublishVault) +} diff --git a/pkg/gateway/types/Config.pkl.go b/pkg/gateway/types/Config.pkl.go new file mode 100644 index 000000000..eb894f474 --- /dev/null +++ b/pkg/gateway/types/Config.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `sonr.hway.Gate`. DO NOT EDIT. +package types + +type Config struct { + ChainId string `pkl:"chainId" json:"chainId,omitempty"` + + IpfsGatewayUrl string `pkl:"ipfsGatewayUrl" json:"ipfsGatewayUrl,omitempty"` + + LandingUrl string `pkl:"landingUrl" json:"landingUrl,omitempty"` + + AuthProxyUrl string `pkl:"authProxyUrl" json:"authProxyUrl,omitempty"` + + SonrApiUrl string `pkl:"sonrApiUrl" json:"sonrApiUrl,omitempty"` + + SonrRpcUrl string `pkl:"sonrRpcUrl" json:"sonrRpcUrl,omitempty"` +} diff --git a/pkg/gateway/types/Ctx.pkl.go b/pkg/gateway/types/Ctx.pkl.go new file mode 100644 index 000000000..6ad8de08d --- /dev/null +++ b/pkg/gateway/types/Ctx.pkl.go @@ -0,0 +1,5 @@ +// Code generated from Pkl module `sonr.hway.Ctx`. DO NOT EDIT. +package types + +type Ctx struct { +} diff --git a/pkg/gateway/types/Gate.pkl.go b/pkg/gateway/types/Gate.pkl.go new file mode 100644 index 000000000..686ef8daa --- /dev/null +++ b/pkg/gateway/types/Gate.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `sonr.hway.Gate`. DO NOT EDIT. +package types + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Gate struct { +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Gate +func LoadFromPath(ctx context.Context, path string) (ret *Gate, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Gate +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Gate, error) { + var ret Gate + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/pkg/gateway/types/init.pkl.go b/pkg/gateway/types/init.pkl.go new file mode 100644 index 000000000..32d03a02e --- /dev/null +++ b/pkg/gateway/types/init.pkl.go @@ -0,0 +1,9 @@ +// Code generated from Pkl module `sonr.hway.Gate`. DO NOT EDIT. +package types + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("sonr.hway.Gate", Gate{}) + pkl.RegisterMapping("sonr.hway.Gate#Config", Config{}) +} diff --git a/pkg/services/storage/scripts.templ b/pkg/services/storage/scripts.templ deleted file mode 100644 index bff5ba2d8..000000000 --- a/pkg/services/storage/scripts.templ +++ /dev/null @@ -1,82 +0,0 @@ -package storage - -var storageHandle = templ.NewOnceHandle() - -// Internal script templates for storage operations - -script setLocalStorage(key string, value string) { - localStorage.setItem(key, value) -} - -script getLocalStorage(key string) { - return localStorage.getItem(key) -} - -script removeLocalStorage(key string) { - localStorage.removeItem(key) -} - -script setSessionStorage(key string, value string) { - sessionStorage.setItem(key, value) -} - -script getSessionStorage(key string) { - return sessionStorage.getItem(key) -} - -script removeSessionStorage(key string) { - sessionStorage.removeItem(key) -} - -// Storage component that includes all storage-related scripts -templ StorageScripts() { - @storageHandle.Once() { - - } -} - -// Public components for storage operations -templ SetLocalStorageItem(key string, value any) { - @StorageScripts() - -} - -templ SetSessionStorageItem(key string, value any) { - @StorageScripts() - -} diff --git a/pkg/services/storage/scripts_templ.go b/pkg/services/storage/scripts_templ.go deleted file mode 100644 index b413849b6..000000000 --- a/pkg/services/storage/scripts_templ.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package storage - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -var storageHandle = templ.NewOnceHandle() - -// Internal script templates for storage operations -func setLocalStorage(key string, value string) templ.ComponentScript { - return templ.ComponentScript{ - Name: `__templ_setLocalStorage_13ae`, - Function: `function __templ_setLocalStorage_13ae(key, value){localStorage.setItem(key, value) -}`, - Call: templ.SafeScript(`__templ_setLocalStorage_13ae`, key, value), - CallInline: templ.SafeScriptInline(`__templ_setLocalStorage_13ae`, key, value), - } -} - -func getLocalStorage(key string) templ.ComponentScript { - return templ.ComponentScript{ - Name: `__templ_getLocalStorage_3450`, - Function: `function __templ_getLocalStorage_3450(key){return localStorage.getItem(key) -}`, - Call: templ.SafeScript(`__templ_getLocalStorage_3450`, key), - CallInline: templ.SafeScriptInline(`__templ_getLocalStorage_3450`, key), - } -} - -func removeLocalStorage(key string) templ.ComponentScript { - return templ.ComponentScript{ - Name: `__templ_removeLocalStorage_64b1`, - Function: `function __templ_removeLocalStorage_64b1(key){localStorage.removeItem(key) -}`, - Call: templ.SafeScript(`__templ_removeLocalStorage_64b1`, key), - CallInline: templ.SafeScriptInline(`__templ_removeLocalStorage_64b1`, key), - } -} - -func setSessionStorage(key string, value string) templ.ComponentScript { - return templ.ComponentScript{ - Name: `__templ_setSessionStorage_0b44`, - Function: `function __templ_setSessionStorage_0b44(key, value){sessionStorage.setItem(key, value) -}`, - Call: templ.SafeScript(`__templ_setSessionStorage_0b44`, key, value), - CallInline: templ.SafeScriptInline(`__templ_setSessionStorage_0b44`, key, value), - } -} - -func getSessionStorage(key string) templ.ComponentScript { - return templ.ComponentScript{ - Name: `__templ_getSessionStorage_66b8`, - Function: `function __templ_getSessionStorage_66b8(key){return sessionStorage.getItem(key) -}`, - Call: templ.SafeScript(`__templ_getSessionStorage_66b8`, key), - CallInline: templ.SafeScriptInline(`__templ_getSessionStorage_66b8`, key), - } -} - -func removeSessionStorage(key string) templ.ComponentScript { - return templ.ComponentScript{ - Name: `__templ_removeSessionStorage_a2e3`, - Function: `function __templ_removeSessionStorage_a2e3(key){sessionStorage.removeItem(key) -}`, - Call: templ.SafeScript(`__templ_removeSessionStorage_a2e3`, key), - CallInline: templ.SafeScriptInline(`__templ_removeSessionStorage_a2e3`, key), - } -} - -// Storage component that includes all storage-related scripts -func StorageScripts() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) - templ_7745c5c3_Err = storageHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -// Public components for storage operations -func SetLocalStorageItem(key string, value any) templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var3 := templ.GetChildren(ctx) - if templ_7745c5c3_Var3 == nil { - templ_7745c5c3_Var3 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = StorageScripts().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func SetSessionStorageItem(key string, value any) templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var4 := templ.GetChildren(ctx) - if templ_7745c5c3_Var4 == nil { - templ_7745c5c3_Var4 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = StorageScripts().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/services/storage/storage.go b/pkg/services/storage/storage.go deleted file mode 100644 index 83897e395..000000000 --- a/pkg/services/storage/storage.go +++ /dev/null @@ -1,15 +0,0 @@ -package storage - -import ( - "github.com/labstack/echo/v4" -) - -// SetLocal sets a value in localStorage -func SetLocal(c echo.Context, key string, value any) error { - return SetLocalStorageItem(key, value).Render(c.Request().Context(), c.Response().Writer) -} - -// SetSession sets a value in sessionStorage -func SetSession(c echo.Context, key string, value any) error { - return SetSessionStorageItem(key, value).Render(c.Request().Context(), c.Response().Writer) -} diff --git a/pkg/vault/handlers/accounts.go b/pkg/vault/handlers/accounts.go new file mode 100644 index 000000000..5ac8282f4 --- /dev/null +++ b/pkg/vault/handlers/accounts.go @@ -0,0 +1 @@ +package handlers diff --git a/pkg/core/dwn/handlers/openid.go b/pkg/vault/handlers/authorization.go similarity index 100% rename from pkg/core/dwn/handlers/openid.go rename to pkg/vault/handlers/authorization.go diff --git a/pkg/core/dwn/handlers/auth.go b/pkg/vault/handlers/credentials.go similarity index 100% rename from pkg/core/dwn/handlers/auth.go rename to pkg/vault/handlers/credentials.go diff --git a/pkg/vault/handlers/frontend.go b/pkg/vault/handlers/frontend.go new file mode 100644 index 000000000..5ac8282f4 --- /dev/null +++ b/pkg/vault/handlers/frontend.go @@ -0,0 +1 @@ +package handlers diff --git a/pkg/vault/handlers/resolver.go b/pkg/vault/handlers/resolver.go new file mode 100644 index 000000000..5ac8282f4 --- /dev/null +++ b/pkg/vault/handlers/resolver.go @@ -0,0 +1 @@ +package handlers diff --git a/pkg/vault/handlers/transaction.go b/pkg/vault/handlers/transaction.go new file mode 100644 index 000000000..5ac8282f4 --- /dev/null +++ b/pkg/vault/handlers/transaction.go @@ -0,0 +1 @@ +package handlers diff --git a/pkg/vault/routes.go b/pkg/vault/routes.go new file mode 100644 index 000000000..87d585ac9 --- /dev/null +++ b/pkg/vault/routes.go @@ -0,0 +1,23 @@ +//go:build js && wasm +// +build js,wasm + +package vault + +import ( + "github.com/labstack/echo/v4" + + "github.com/onsonr/sonr/pkg/vault/handlers" +) + +// RegisterAPI registers the Decentralized Web Node API routes. +func RegisterAPI(e *echo.Echo) { + e.GET("/register/:subject/start", handlers.RegisterSubjectStart) + e.POST("/register/:subject/finish", handlers.RegisterSubjectFinish) + + e.GET("/login/:subject/start", handlers.LoginSubjectStart) + e.POST("/login/:subject/finish", handlers.LoginSubjectFinish) + + e.GET("/authz/jwks", handlers.GetJWKS) + e.GET("/authz/token", handlers.GetToken) + e.POST("/:origin/grant/:subject", handlers.GrantAuthorization) +} diff --git a/pkg/core/dwn/Config.pkl.go b/pkg/vault/types/Config.pkl.go similarity index 74% rename from pkg/core/dwn/Config.pkl.go rename to pkg/vault/types/Config.pkl.go index ca0749115..5b938a5cd 100644 --- a/pkg/core/dwn/Config.pkl.go +++ b/pkg/vault/types/Config.pkl.go @@ -1,10 +1,10 @@ -// Code generated from Pkl module `common.types.DWN`. DO NOT EDIT. -package dwn +// Code generated from Pkl module `sonr.motr.DWN`. DO NOT EDIT. +package types type Config struct { IpfsGatewayUrl string `pkl:"ipfsGatewayUrl" json:"ipfsGatewayUrl,omitempty"` - MotrKeyshare string `pkl:"motrKeyshare" json:"motrKeyshare,omitempty"` + MotrToken string `pkl:"motrToken" json:"motrToken,omitempty"` MotrAddress string `pkl:"motrAddress" json:"motrAddress,omitempty"` diff --git a/pkg/core/dwn/DWN.pkl.go b/pkg/vault/types/DWN.pkl.go similarity index 91% rename from pkg/core/dwn/DWN.pkl.go rename to pkg/vault/types/DWN.pkl.go index 11a84615e..250885748 100644 --- a/pkg/core/dwn/DWN.pkl.go +++ b/pkg/vault/types/DWN.pkl.go @@ -1,5 +1,5 @@ -// Code generated from Pkl module `common.types.DWN`. DO NOT EDIT. -package dwn +// Code generated from Pkl module `sonr.motr.DWN`. DO NOT EDIT. +package types import ( "context" diff --git a/pkg/core/dwn/Environment.pkl.go b/pkg/vault/types/Environment.pkl.go similarity index 83% rename from pkg/core/dwn/Environment.pkl.go rename to pkg/vault/types/Environment.pkl.go index 7d2a953d4..c3b703d88 100644 --- a/pkg/core/dwn/Environment.pkl.go +++ b/pkg/vault/types/Environment.pkl.go @@ -1,5 +1,5 @@ -// Code generated from Pkl module `common.types.DWN`. DO NOT EDIT. -package dwn +// Code generated from Pkl module `sonr.motr.DWN`. DO NOT EDIT. +package types type Environment struct { IsDevelopment bool `pkl:"isDevelopment" json:"isDevelopment,omitempty"` diff --git a/pkg/core/dwn/Schema.pkl.go b/pkg/vault/types/Schema.pkl.go similarity index 86% rename from pkg/core/dwn/Schema.pkl.go rename to pkg/vault/types/Schema.pkl.go index 222f561f9..ca6cb99d5 100644 --- a/pkg/core/dwn/Schema.pkl.go +++ b/pkg/vault/types/Schema.pkl.go @@ -1,5 +1,5 @@ -// Code generated from Pkl module `common.types.DWN`. DO NOT EDIT. -package dwn +// Code generated from Pkl module `sonr.motr.DWN`. DO NOT EDIT. +package types type Schema struct { Version int `pkl:"version"` diff --git a/pkg/vault/types/defaults.go b/pkg/vault/types/defaults.go new file mode 100644 index 000000000..4d3b5c226 --- /dev/null +++ b/pkg/vault/types/defaults.go @@ -0,0 +1,55 @@ +package types + +import ( + "reflect" + "strings" + + "github.com/onsonr/sonr/pkg/common/models" +) + +const SchemaVersion = 1 + +// DefaultSchema returns the default schema +func DefaultSchema() *Schema { + return &Schema{ + Version: SchemaVersion, + Account: getSchema(&models.Account{}), + Asset: getSchema(&models.Asset{}), + Chain: getSchema(&models.Chain{}), + Credential: getSchema(&models.Credential{}), + Grant: getSchema(&models.Grant{}), + Keyshare: getSchema(&models.Keyshare{}), + Profile: getSchema(&models.Profile{}), + } +} + +func getSchema(structType interface{}) string { + t := reflect.TypeOf(structType) + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + + if t.Kind() != reflect.Struct { + return "" + } + + var fields []string + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + fieldName := toCamelCase(field.Name) + fields = append(fields, fieldName) + } + + // Add "++" at the beginning, separated by a comma + return "++, " + strings.Join(fields, ", ") +} + +func toCamelCase(s string) string { + if s == "" { + return s + } + if len(s) == 1 { + return strings.ToLower(s) + } + return strings.ToLower(s[:1]) + s[1:] +} diff --git a/pkg/vault/types/init.pkl.go b/pkg/vault/types/init.pkl.go new file mode 100644 index 000000000..eef43b76f --- /dev/null +++ b/pkg/vault/types/init.pkl.go @@ -0,0 +1,11 @@ +// Code generated from Pkl module `sonr.motr.DWN`. DO NOT EDIT. +package types + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("sonr.motr.DWN", DWN{}) + pkl.RegisterMapping("sonr.motr.DWN#Config", Config{}) + pkl.RegisterMapping("sonr.motr.DWN#Schema", Schema{}) + pkl.RegisterMapping("sonr.motr.DWN#Environment", Environment{}) +} diff --git a/pkg/vault/types/manifest.go b/pkg/vault/types/manifest.go new file mode 100644 index 000000000..617e56c5d --- /dev/null +++ b/pkg/vault/types/manifest.go @@ -0,0 +1,137 @@ +package types + +func NewWebManifest() WebManifest { + return baseWebManifest +} + +var baseWebManifest = WebManifest{ + Name: "Sonr Vault", + ShortName: "Sonr.ID", + StartURL: "/index.html", + Display: "standalone", + DisplayOverride: []string{ + "fullscreen", + "minimal-ui", + }, + Icons: []IconDefinition{ + { + Src: "/icons/icon-192x192.png", + Sizes: "192x192", + Type: "image/png", + }, + }, + ServiceWorker: ServiceWorker{ + Scope: "/", + Src: "/sw.js", + UseCache: true, + }, + ProtocolHandlers: []ProtocolHandler{ + { + Scheme: "did.sonr", + URL: "/resolve/sonr/%s", + }, + { + Scheme: "did.eth", + URL: "/resolve/eth/%s", + }, + { + Scheme: "did.btc", + URL: "/resolve/btc/%s", + }, + { + Scheme: "did.usdc", + URL: "/resolve/usdc/%s", + }, + { + Scheme: "did.ipfs", + URL: "/resolve/ipfs/%s", + }, + }, +} + +type WebManifest struct { + // Required fields + Name string `json:"name"` // Full name of the application + ShortName string `json:"short_name"` // Short version of the name + + // Display and appearance + Description string `json:"description,omitempty"` // Purpose and features of the application + Display string `json:"display,omitempty"` // Preferred display mode: fullscreen, standalone, minimal-ui, browser + DisplayOverride []string `json:"display_override,omitempty"` + ThemeColor string `json:"theme_color,omitempty"` // Default theme color for the application + BackgroundColor string `json:"background_color,omitempty"` // Background color during launch + Orientation string `json:"orientation,omitempty"` // Default orientation: any, natural, landscape, portrait + + // URLs and scope + StartURL string `json:"start_url"` // Starting URL when launching + Scope string `json:"scope,omitempty"` // Navigation scope of the web application + ServiceWorker ServiceWorker `json:"service_worker,omitempty"` + + // Icons + Icons []IconDefinition `json:"icons,omitempty"` + + // Optional features + RelatedApplications []RelatedApplication `json:"related_applications,omitempty"` + PreferRelatedApplications bool `json:"prefer_related_applications,omitempty"` + Shortcuts []Shortcut `json:"shortcuts,omitempty"` + + // Experimental features (uncomment if needed) + FileHandlers []FileHandler `json:"file_handlers,omitempty"` + ProtocolHandlers []ProtocolHandler `json:"protocol_handlers,omitempty"` +} + +type FileHandler struct { + Action string `json:"action"` + Accept map[string][]string `json:"accept"` +} + +type LaunchHandler struct { + Action string `json:"action"` +} + +type IconDefinition struct { + Src string `json:"src"` + Sizes string `json:"sizes"` + Type string `json:"type,omitempty"` + Purpose string `json:"purpose,omitempty"` +} + +type ProtocolHandler struct { + Scheme string `json:"scheme"` + URL string `json:"url"` +} + +type RelatedApplication struct { + Platform string `json:"platform"` + URL string `json:"url,omitempty"` + ID string `json:"id,omitempty"` +} + +type Shortcut struct { + Name string `json:"name"` + ShortName string `json:"short_name,omitempty"` + Description string `json:"description,omitempty"` + URL string `json:"url"` + Icons []IconDefinition `json:"icons,omitempty"` +} + +type ServiceWorker struct { + Scope string `json:"scope"` + Src string `json:"src"` + UseCache bool `json:"use_cache"` +} + +// Example usage: +// manifest := WebManifest{ +// Name: "My Amazing App", +// ShortName: "MyApp", +// StartURL: "/", +// Display: "standalone", +// Icons: []IconDefinition{ +// { +// Src: "/icons/icon-192x192.png", +// Sizes: "192x192", +// Type: "image/png", +// }, +// }, +// } diff --git a/pkg/webapp/components/auth/current.templ b/pkg/webapp/components/auth/current.templ deleted file mode 100644 index f8a8fb931..000000000 --- a/pkg/webapp/components/auth/current.templ +++ /dev/null @@ -1,30 +0,0 @@ -package auth - -import "github.com/onsonr/sonr/pkg/webapp/components/ui" - -// RedirectModal returns the Modal with a QR code to scan. -templ RedirectModal() { - @ui.FullScreenModal() { -
-
-
- - - -

Continue with your phone

-

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

-
- @ui.Separator("Or Reserve Handle") -
- - - -
-
-

Already have an account? Login here

-

By continuing, you agree to our Terms and Policy.

-
- } -} diff --git a/pkg/webapp/components/auth/current_templ.go b/pkg/webapp/components/auth/current_templ.go deleted file mode 100644 index 9caad89f3..000000000 --- a/pkg/webapp/components/auth/current_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package auth - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -import "github.com/onsonr/sonr/pkg/webapp/components/ui" - -// RedirectModal returns the Modal with a QR code to scan. -func RedirectModal() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = ui.Separator("Or Reserve Handle").Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) - templ_7745c5c3_Err = ui.FullScreenModal().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/components/dash/layout.templ b/pkg/webapp/components/dash/layout.templ deleted file mode 100644 index fa07135a8..000000000 --- a/pkg/webapp/components/dash/layout.templ +++ /dev/null @@ -1,17 +0,0 @@ -package ui - -// Variant is a component that has attributes -type Variant interface { - Attributes() templ.Attributes -} - -// ╭───────────────────────────────────────────────────────────╮ -// │ General Layout Components │ -// ╰───────────────────────────────────────────────────────────╯ - -// Columns is a component that renders a flex container with a gap of 3 and a max width of 100% -templ Columns() { -
- { children... } -
-} diff --git a/pkg/webapp/components/dash/layout_templ.go b/pkg/webapp/components/dash/layout_templ.go deleted file mode 100644 index addc76889..000000000 --- a/pkg/webapp/components/dash/layout_templ.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package ui - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -// Variant is a component that has attributes -type Variant interface { - Attributes() templ.Attributes -} - -// ╭───────────────────────────────────────────────────────────╮ -// │ General Layout Components │ -// ╰───────────────────────────────────────────────────────────╯ - -// Columns is a component that renders a flex container with a gap of 3 and a max width of 100% -func Columns() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/auth/internal/components.templ b/pkg/webapp/pages/auth/internal/components.templ deleted file mode 100644 index b19279394..000000000 --- a/pkg/webapp/pages/auth/internal/components.templ +++ /dev/null @@ -1,28 +0,0 @@ -package internal - -templ RegisterHeader() { -
- - - -

Continue with your phone

-

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

-
-} - -templ RegisterFooter() { -

- Already have an account? - - Login here - - -

-

- By continuing, you agree to our - Terms and - - Policy - . -

-} diff --git a/pkg/webapp/pages/auth/internal/components_templ.go b/pkg/webapp/pages/auth/internal/components_templ.go deleted file mode 100644 index 1d7212cce..000000000 --- a/pkg/webapp/pages/auth/internal/components_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterHeader() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func RegisterFooter() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/auth/internal/forms_templ.go b/pkg/webapp/pages/auth/internal/forms_templ.go deleted file mode 100644 index 3445417c9..000000000 --- a/pkg/webapp/pages/auth/internal/forms_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterCredentialForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func ReserveHandleForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/auth/internal/scripts.templ b/pkg/webapp/pages/auth/internal/scripts.templ deleted file mode 100644 index 6a11ca2e4..000000000 --- a/pkg/webapp/pages/auth/internal/scripts.templ +++ /dev/null @@ -1,37 +0,0 @@ -package internal - -templ CreateCredentialsScript() { - -} diff --git a/pkg/webapp/pages/auth/internal/scripts_templ.go b/pkg/webapp/pages/auth/internal/scripts_templ.go deleted file mode 100644 index a07b37d1d..000000000 --- a/pkg/webapp/pages/auth/internal/scripts_templ.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func CreateCredentialsScript() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/dash/internal/components.templ b/pkg/webapp/pages/dash/internal/components.templ deleted file mode 100644 index cef6a0802..000000000 --- a/pkg/webapp/pages/dash/internal/components.templ +++ /dev/null @@ -1,16 +0,0 @@ -package internal - -templ RegisterHeader() { -
- - - -

Continue with your phone

-

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

-
-} - -templ RegisterFooter() { -

Already have an account? Login here

-

By continuing, you agree to our Terms and Policy.

-} diff --git a/pkg/webapp/pages/dash/internal/components_templ.go b/pkg/webapp/pages/dash/internal/components_templ.go deleted file mode 100644 index d5cee3a77..000000000 --- a/pkg/webapp/pages/dash/internal/components_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterHeader() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func RegisterFooter() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/dash/internal/forms.templ b/pkg/webapp/pages/dash/internal/forms.templ deleted file mode 100644 index 6653e32a0..000000000 --- a/pkg/webapp/pages/dash/internal/forms.templ +++ /dev/null @@ -1,21 +0,0 @@ -package internal - -templ RegisterCredentialForm() { -
-
-
-
-
-
-
-} - -templ ReserveHandleForm() { -
- - - -
-} diff --git a/pkg/webapp/pages/dash/internal/forms_templ.go b/pkg/webapp/pages/dash/internal/forms_templ.go deleted file mode 100644 index 3445417c9..000000000 --- a/pkg/webapp/pages/dash/internal/forms_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterCredentialForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func ReserveHandleForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/dash/internal/scripts.templ b/pkg/webapp/pages/dash/internal/scripts.templ deleted file mode 100644 index 6a11ca2e4..000000000 --- a/pkg/webapp/pages/dash/internal/scripts.templ +++ /dev/null @@ -1,37 +0,0 @@ -package internal - -templ CreateCredentialsScript() { - -} diff --git a/pkg/webapp/pages/dash/internal/scripts_templ.go b/pkg/webapp/pages/dash/internal/scripts_templ.go deleted file mode 100644 index a07b37d1d..000000000 --- a/pkg/webapp/pages/dash/internal/scripts_templ.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func CreateCredentialsScript() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/dash/page.templ b/pkg/webapp/pages/dash/page.templ deleted file mode 100644 index f95cc3c59..000000000 --- a/pkg/webapp/pages/dash/page.templ +++ /dev/null @@ -1,19 +0,0 @@ -package dash - -import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/dash/internal" -) - -// RedirectModal returns the Modal with a QR code to scan. -templ Page() { - @view.FullScreenModal() { -
- @internal.RegisterHeader() - @layout.Separator("Or Reserve Handle") - @internal.ReserveHandleForm() -
- @internal.RegisterFooter() - } -} diff --git a/pkg/webapp/pages/dash/page_templ.go b/pkg/webapp/pages/dash/page_templ.go deleted file mode 100644 index 9e77f5a49..000000000 --- a/pkg/webapp/pages/dash/page_templ.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package dash - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/dash/internal" -) - -// RedirectModal returns the Modal with a QR code to scan. -func Page() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.RegisterHeader().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = layout.Separator("Or Reserve Handle").Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.ReserveHandleForm().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.RegisterFooter().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) - templ_7745c5c3_Err = view.FullScreenModal().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/login/internal/components.templ b/pkg/webapp/pages/login/internal/components.templ deleted file mode 100644 index cef6a0802..000000000 --- a/pkg/webapp/pages/login/internal/components.templ +++ /dev/null @@ -1,16 +0,0 @@ -package internal - -templ RegisterHeader() { -
- - - -

Continue with your phone

-

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

-
-} - -templ RegisterFooter() { -

Already have an account? Login here

-

By continuing, you agree to our Terms and Policy.

-} diff --git a/pkg/webapp/pages/login/internal/components_templ.go b/pkg/webapp/pages/login/internal/components_templ.go deleted file mode 100644 index d5cee3a77..000000000 --- a/pkg/webapp/pages/login/internal/components_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterHeader() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func RegisterFooter() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/login/internal/forms.templ b/pkg/webapp/pages/login/internal/forms.templ deleted file mode 100644 index 6653e32a0..000000000 --- a/pkg/webapp/pages/login/internal/forms.templ +++ /dev/null @@ -1,21 +0,0 @@ -package internal - -templ RegisterCredentialForm() { -
-
-
-
-
-
-
-} - -templ ReserveHandleForm() { -
- - - -
-} diff --git a/pkg/webapp/pages/login/internal/forms_templ.go b/pkg/webapp/pages/login/internal/forms_templ.go deleted file mode 100644 index 3445417c9..000000000 --- a/pkg/webapp/pages/login/internal/forms_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterCredentialForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func ReserveHandleForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/login/internal/scripts.templ b/pkg/webapp/pages/login/internal/scripts.templ deleted file mode 100644 index 6a11ca2e4..000000000 --- a/pkg/webapp/pages/login/internal/scripts.templ +++ /dev/null @@ -1,37 +0,0 @@ -package internal - -templ CreateCredentialsScript() { - -} diff --git a/pkg/webapp/pages/login/internal/scripts_templ.go b/pkg/webapp/pages/login/internal/scripts_templ.go deleted file mode 100644 index a07b37d1d..000000000 --- a/pkg/webapp/pages/login/internal/scripts_templ.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func CreateCredentialsScript() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/login/page.templ b/pkg/webapp/pages/login/page.templ deleted file mode 100644 index 452e981d6..000000000 --- a/pkg/webapp/pages/login/page.templ +++ /dev/null @@ -1,19 +0,0 @@ -package login - -import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/login/internal" -) - -// RedirectModal returns the Modal with a QR code to scan. -templ Page() { - @view.FullScreenModal() { -
- @internal.RegisterHeader() - @layout.Separator("Or Reserve Handle") - @internal.ReserveHandleForm() -
- @internal.RegisterFooter() - } -} diff --git a/pkg/webapp/pages/login/page_templ.go b/pkg/webapp/pages/login/page_templ.go deleted file mode 100644 index 3f253226d..000000000 --- a/pkg/webapp/pages/login/page_templ.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package login - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/login/internal" -) - -// RedirectModal returns the Modal with a QR code to scan. -func Page() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.RegisterHeader().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = layout.Separator("Or Reserve Handle").Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.ReserveHandleForm().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.RegisterFooter().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) - templ_7745c5c3_Err = view.FullScreenModal().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/register/internal/components.templ b/pkg/webapp/pages/register/internal/components.templ deleted file mode 100644 index cef6a0802..000000000 --- a/pkg/webapp/pages/register/internal/components.templ +++ /dev/null @@ -1,16 +0,0 @@ -package internal - -templ RegisterHeader() { -
- - - -

Continue with your phone

-

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

-
-} - -templ RegisterFooter() { -

Already have an account? Login here

-

By continuing, you agree to our Terms and Policy.

-} diff --git a/pkg/webapp/pages/register/internal/components_templ.go b/pkg/webapp/pages/register/internal/components_templ.go deleted file mode 100644 index d5cee3a77..000000000 --- a/pkg/webapp/pages/register/internal/components_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterHeader() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func RegisterFooter() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/register/internal/forms.templ b/pkg/webapp/pages/register/internal/forms.templ deleted file mode 100644 index 6653e32a0..000000000 --- a/pkg/webapp/pages/register/internal/forms.templ +++ /dev/null @@ -1,21 +0,0 @@ -package internal - -templ RegisterCredentialForm() { -
-
-
-
-
-
-
-} - -templ ReserveHandleForm() { -
- - - -
-} diff --git a/pkg/webapp/pages/register/internal/forms_templ.go b/pkg/webapp/pages/register/internal/forms_templ.go deleted file mode 100644 index 3445417c9..000000000 --- a/pkg/webapp/pages/register/internal/forms_templ.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func RegisterCredentialForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func ReserveHandleForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/register/internal/scripts.templ b/pkg/webapp/pages/register/internal/scripts.templ deleted file mode 100644 index 6a11ca2e4..000000000 --- a/pkg/webapp/pages/register/internal/scripts.templ +++ /dev/null @@ -1,37 +0,0 @@ -package internal - -templ CreateCredentialsScript() { - -} diff --git a/pkg/webapp/pages/register/internal/scripts_templ.go b/pkg/webapp/pages/register/internal/scripts_templ.go deleted file mode 100644 index a07b37d1d..000000000 --- a/pkg/webapp/pages/register/internal/scripts_templ.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package internal - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func CreateCredentialsScript() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/pages/register/page.templ b/pkg/webapp/pages/register/page.templ deleted file mode 100644 index 33ca137f1..000000000 --- a/pkg/webapp/pages/register/page.templ +++ /dev/null @@ -1,19 +0,0 @@ -package register - -import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/register/internal" -) - -// RedirectModal returns the Modal with a QR code to scan. -templ Page() { - @view.FullScreenModal() { -
- @internal.RegisterHeader() - @layout.Separator("Or Reserve Handle") - @internal.ReserveHandleForm() -
- @internal.RegisterFooter() - } -} diff --git a/pkg/webapp/pages/register/page_templ.go b/pkg/webapp/pages/register/page_templ.go deleted file mode 100644 index 3396805b4..000000000 --- a/pkg/webapp/pages/register/page_templ.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package register - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/register/internal" -) - -// RedirectModal returns the Modal with a QR code to scan. -func Page() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.RegisterHeader().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = layout.Separator("Or Reserve Handle").Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.ReserveHandleForm().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = internal.RegisterFooter().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) - templ_7745c5c3_Err = view.FullScreenModal().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/bun.lockb b/pkg/webui/bun.lockb similarity index 98% rename from pkg/webapp/bun.lockb rename to pkg/webui/bun.lockb index 4320dae9e..38370bdae 100755 Binary files a/pkg/webapp/bun.lockb and b/pkg/webui/bun.lockb differ diff --git a/pkg/webapp/pages/auth/internal/forms.templ b/pkg/webui/landing/components/auth.templ similarity index 58% rename from pkg/webapp/pages/auth/internal/forms.templ rename to pkg/webui/landing/components/auth.templ index 6653e32a0..9e775ab72 100644 --- a/pkg/webapp/pages/auth/internal/forms.templ +++ b/pkg/webui/landing/components/auth.templ @@ -1,4 +1,19 @@ -package internal +package components + +templ RegisterHeader() { +
+ + + +

Continue with your phone

+

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

+
+} + +templ RegisterFooter() { +

Already have an account? Login here

+

By continuing, you agree to our Terms and Policy.

+} templ RegisterCredentialForm() {
@@ -19,3 +34,39 @@ templ ReserveHandleForm() { } + +templ CreateCredentialsScript() { + +} diff --git a/pkg/webui/landing/components/auth_templ.go b/pkg/webui/landing/components/auth_templ.go new file mode 100644 index 000000000..c711ee7ea --- /dev/null +++ b/pkg/webui/landing/components/auth_templ.go @@ -0,0 +1,156 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.793 +package components + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +func RegisterHeader() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func RegisterFooter() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func RegisterCredentialForm() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func ReserveHandleForm() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func CreateCredentialsScript() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var5 := templ.GetChildren(ctx) + if templ_7745c5c3_Var5 == nil { + templ_7745c5c3_Var5 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/models/base.go b/pkg/webui/landing/models/base.go similarity index 100% rename from pkg/webapp/models/base.go rename to pkg/webui/landing/models/base.go diff --git a/pkg/webapp/models/cdn.go b/pkg/webui/landing/models/cdn.go similarity index 100% rename from pkg/webapp/models/cdn.go rename to pkg/webui/landing/models/cdn.go diff --git a/pkg/webapp/models/forms.go b/pkg/webui/landing/models/forms.go similarity index 100% rename from pkg/webapp/models/forms.go rename to pkg/webui/landing/models/forms.go diff --git a/pkg/webapp/models/marketing.go b/pkg/webui/landing/models/marketing.go similarity index 100% rename from pkg/webapp/models/marketing.go rename to pkg/webui/landing/models/marketing.go diff --git a/pkg/webapp/pages/home/model.go b/pkg/webui/landing/pages/home.go similarity index 99% rename from pkg/webapp/pages/home/model.go rename to pkg/webui/landing/pages/home.go index 79e60bea5..2fe9735d7 100644 --- a/pkg/webapp/pages/home/model.go +++ b/pkg/webui/landing/pages/home.go @@ -1,6 +1,6 @@ -package home +package pages -import "github.com/onsonr/sonr/pkg/webapp/models" +import "github.com/onsonr/sonr/pkg/webui/landing/models" var header = &models.NavHeader{ Logo: &models.Image{ diff --git a/pkg/webapp/pages/home/page.templ b/pkg/webui/landing/pages/home.templ similarity index 67% rename from pkg/webapp/pages/home/page.templ rename to pkg/webui/landing/pages/home.templ index bc558442d..04a4bb7ab 100644 --- a/pkg/webapp/pages/home/page.templ +++ b/pkg/webui/landing/pages/home.templ @@ -1,13 +1,13 @@ -package home +package pages import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - landing "github.com/onsonr/sonr/pkg/webapp/pages/home/internal" + landing "github.com/onsonr/sonr/pkg/webui/landing/sections" + "github.com/onsonr/sonr/pkg/webui/styles/layout" ) // View renders the home page -templ Page() { +templ HomePage() { @layout.NoBody("Sonr.ID", true) { @landing.Header(header) @landing.Hero(hero) diff --git a/pkg/webapp/pages/home/page_templ.go b/pkg/webui/landing/pages/home_templ.go similarity index 96% rename from pkg/webapp/pages/home/page_templ.go rename to pkg/webui/landing/pages/home_templ.go index 611245897..4b7c2990e 100644 --- a/pkg/webapp/pages/home/page_templ.go +++ b/pkg/webui/landing/pages/home_templ.go @@ -2,7 +2,7 @@ // templ: version: v0.2.793 -package home +package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -10,12 +10,12 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - landing "github.com/onsonr/sonr/pkg/webapp/pages/home/internal" + landing "github.com/onsonr/sonr/pkg/webui/landing/sections" + "github.com/onsonr/sonr/pkg/webui/styles/layout" ) // View renders the home page -func Page() templ.Component { +func HomePage() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { diff --git a/pkg/webapp/pages/auth/page.templ b/pkg/webui/landing/pages/register.templ similarity index 58% rename from pkg/webapp/pages/auth/page.templ rename to pkg/webui/landing/pages/register.templ index b4232c3a7..5457c20ec 100644 --- a/pkg/webapp/pages/auth/page.templ +++ b/pkg/webui/landing/pages/register.templ @@ -1,13 +1,13 @@ -package login +package pages import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/auth/internal" + internal "github.com/onsonr/sonr/pkg/webui/landing/components" + "github.com/onsonr/sonr/pkg/webui/styles/layout" + "github.com/onsonr/sonr/pkg/webui/styles/view" ) // RedirectModal returns the Modal with a QR code to scan. -templ Page() { +templ RegisterPage() { @view.FullScreenModal() {
@internal.RegisterHeader() diff --git a/pkg/webapp/pages/auth/page_templ.go b/pkg/webui/landing/pages/register_templ.go similarity index 93% rename from pkg/webapp/pages/auth/page_templ.go rename to pkg/webui/landing/pages/register_templ.go index 838697a60..f5ae08a3b 100644 --- a/pkg/webapp/pages/auth/page_templ.go +++ b/pkg/webui/landing/pages/register_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package login +package pages //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -9,13 +9,13 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/webapp/components/layout" - "github.com/onsonr/sonr/pkg/webapp/components/view" - "github.com/onsonr/sonr/pkg/webapp/pages/auth/internal" + internal "github.com/onsonr/sonr/pkg/webui/landing/components" + "github.com/onsonr/sonr/pkg/webui/styles/layout" + "github.com/onsonr/sonr/pkg/webui/styles/view" ) // RedirectModal returns the Modal with a QR code to scan. -func Page() templ.Component { +func RegisterPage() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { diff --git a/pkg/webui/landing/routes.go b/pkg/webui/landing/routes.go new file mode 100644 index 000000000..ad3ff2cf4 --- /dev/null +++ b/pkg/webui/landing/routes.go @@ -0,0 +1,12 @@ +package landing + +import ( + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/pkg/common/response" + "github.com/onsonr/sonr/pkg/webui/landing/pages" +) + +func RegisterRoutes(e *echo.Echo) { + e.GET("/", response.Templ(pages.HomePage())) + e.GET("/register", response.Templ(pages.RegisterPage())) +} diff --git a/pkg/webapp/pages/home/internal/arch.templ b/pkg/webui/landing/sections/arch.templ similarity index 98% rename from pkg/webapp/pages/home/internal/arch.templ rename to pkg/webui/landing/sections/arch.templ index 86b31f156..4acc6cc12 100644 --- a/pkg/webapp/pages/home/internal/arch.templ +++ b/pkg/webui/landing/sections/arch.templ @@ -1,6 +1,6 @@ -package internal +package sections -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" // Architecture is the (4th) home page architecture section templ Architecture(arch *models.Architecture) { diff --git a/pkg/webapp/pages/home/internal/arch_templ.go b/pkg/webui/landing/sections/arch_templ.go similarity index 93% rename from pkg/webapp/pages/home/internal/arch_templ.go rename to pkg/webui/landing/sections/arch_templ.go index c46fc9925..7937ad990 100644 --- a/pkg/webapp/pages/home/internal/arch_templ.go +++ b/pkg/webui/landing/sections/arch_templ.go @@ -1,14 +1,14 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" // Architecture is the (4th) home page architecture section func Architecture(arch *models.Architecture) templ.Component { @@ -39,7 +39,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Heading) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 17, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 17, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -52,7 +52,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Subtitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 20, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 20, Col: 21} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -65,7 +65,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Primary.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 42, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 42, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -78,7 +78,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Primary.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 46, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 46, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -91,7 +91,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Primary.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 52, Col: 36} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 52, Col: 36} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -104,7 +104,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Secondary.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 75, Col: 31} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 75, Col: 31} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -117,7 +117,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Secondary.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 79, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 79, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -130,7 +130,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Secondary.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 85, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 85, Col: 38} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -143,7 +143,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var10 string templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Tertiary.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 108, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 108, Col: 30} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { @@ -156,7 +156,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Tertiary.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 112, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 112, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { @@ -169,7 +169,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var12 string templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Tertiary.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 118, Col: 37} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 118, Col: 37} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -182,7 +182,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var13 string templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quaternary.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 141, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 141, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) if templ_7745c5c3_Err != nil { @@ -195,7 +195,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var14 string templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quaternary.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 145, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 145, Col: 30} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { @@ -208,7 +208,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var15 string templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quaternary.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 151, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 151, Col: 39} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) if templ_7745c5c3_Err != nil { @@ -221,7 +221,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var16 string templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quinary.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 174, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 174, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) if templ_7745c5c3_Err != nil { @@ -234,7 +234,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var17 string templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quinary.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 178, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 178, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17)) if templ_7745c5c3_Err != nil { @@ -247,7 +247,7 @@ func Architecture(arch *models.Architecture) templ.Component { var templ_7745c5c3_Var18 string templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quinary.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/arch.templ`, Line: 184, Col: 36} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/arch.templ`, Line: 184, Col: 36} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/pages/home/internal/cta.templ b/pkg/webui/landing/sections/cta.templ similarity index 99% rename from pkg/webapp/pages/home/internal/cta.templ rename to pkg/webui/landing/sections/cta.templ index bd654b4e0..7193dc08e 100644 --- a/pkg/webapp/pages/home/internal/cta.templ +++ b/pkg/webui/landing/sections/cta.templ @@ -1,6 +1,6 @@ -package internal +package sections -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" templ CallToAction(cta *models.CallToAction) {
diff --git a/pkg/webapp/pages/home/internal/cta_templ.go b/pkg/webui/landing/sections/cta_templ.go similarity index 99% rename from pkg/webapp/pages/home/internal/cta_templ.go rename to pkg/webui/landing/sections/cta_templ.go index 92a0b7a1b..fd163b7cf 100644 --- a/pkg/webapp/pages/home/internal/cta_templ.go +++ b/pkg/webui/landing/sections/cta_templ.go @@ -1,14 +1,14 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" func CallToAction(cta *models.CallToAction) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { diff --git a/pkg/webapp/pages/home/internal/footer.templ b/pkg/webui/landing/sections/footer.templ similarity index 99% rename from pkg/webapp/pages/home/internal/footer.templ rename to pkg/webui/landing/sections/footer.templ index 0e6bebc72..9afbb64c7 100644 --- a/pkg/webapp/pages/home/internal/footer.templ +++ b/pkg/webui/landing/sections/footer.templ @@ -1,5 +1,4 @@ - -package internal +package sections templ Footer() { diff --git a/pkg/webapp/pages/home/internal/footer_templ.go b/pkg/webui/landing/sections/footer_templ.go similarity index 99% rename from pkg/webapp/pages/home/internal/footer_templ.go rename to pkg/webui/landing/sections/footer_templ.go index aae38429f..06ea64e93 100644 --- a/pkg/webapp/pages/home/internal/footer_templ.go +++ b/pkg/webui/landing/sections/footer_templ.go @@ -1,8 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 - -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/pkg/webapp/pages/home/internal/header.templ b/pkg/webui/landing/sections/header.templ similarity index 95% rename from pkg/webapp/pages/home/internal/header.templ rename to pkg/webui/landing/sections/header.templ index 117701fa7..52cadfdbc 100644 --- a/pkg/webapp/pages/home/internal/header.templ +++ b/pkg/webui/landing/sections/header.templ @@ -1,6 +1,6 @@ -package internal +package sections -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" templ Header(header *models.NavHeader) { diff --git a/pkg/webapp/pages/home/internal/header_templ.go b/pkg/webui/landing/sections/header_templ.go similarity index 94% rename from pkg/webapp/pages/home/internal/header_templ.go rename to pkg/webui/landing/sections/header_templ.go index e167cde4d..86f8ef18b 100644 --- a/pkg/webapp/pages/home/internal/header_templ.go +++ b/pkg/webui/landing/sections/header_templ.go @@ -1,14 +1,14 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" func Header(header *models.NavHeader) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { @@ -38,7 +38,7 @@ func Header(header *models.NavHeader) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(header.Logo.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/header.templ`, Line: 15, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/header.templ`, Line: 15, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -51,7 +51,7 @@ func Header(header *models.NavHeader) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(header.Logo.Width) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/header.templ`, Line: 15, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/header.templ`, Line: 15, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -64,7 +64,7 @@ func Header(header *models.NavHeader) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(header.Logo.Height) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/header.templ`, Line: 15, Col: 91} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/header.templ`, Line: 15, Col: 91} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -133,7 +133,7 @@ func navButton(item *models.NavItem, isPrimary bool) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(item.Href) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/header.templ`, Line: 42, Col: 132} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/header.templ`, Line: 42, Col: 132} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -146,7 +146,7 @@ func navButton(item *models.NavItem, isPrimary bool) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(item.Text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/header.templ`, Line: 42, Col: 146} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/header.templ`, Line: 42, Col: 146} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -173,7 +173,7 @@ func navButton(item *models.NavItem, isPrimary bool) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(item.Text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/header.templ`, Line: 44, Col: 189} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/header.templ`, Line: 44, Col: 189} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/pages/home/internal/hero.templ b/pkg/webui/landing/sections/hero.templ similarity index 98% rename from pkg/webapp/pages/home/internal/hero.templ rename to pkg/webui/landing/sections/hero.templ index df03176ac..ebbd36d6f 100644 --- a/pkg/webapp/pages/home/internal/hero.templ +++ b/pkg/webui/landing/sections/hero.templ @@ -1,9 +1,9 @@ -package internal +package sections import ( "fmt" - "github.com/onsonr/sonr/pkg/webapp/components/button" - models "github.com/onsonr/sonr/pkg/webapp/models" + "github.com/onsonr/sonr/pkg/webui/landing/models" + "github.com/onsonr/sonr/pkg/webui/styles/button" ) // Hero Section diff --git a/pkg/webapp/pages/home/internal/hero_templ.go b/pkg/webui/landing/sections/hero_templ.go similarity index 96% rename from pkg/webapp/pages/home/internal/hero_templ.go rename to pkg/webui/landing/sections/hero_templ.go index fd58eeb4e..6081f761f 100644 --- a/pkg/webapp/pages/home/internal/hero_templ.go +++ b/pkg/webui/landing/sections/hero_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -10,8 +10,8 @@ import templruntime "github.com/a-h/templ/runtime" import ( "fmt" - "github.com/onsonr/sonr/pkg/webapp/components/button" - models "github.com/onsonr/sonr/pkg/webapp/models" + "github.com/onsonr/sonr/pkg/webui/landing/models" + "github.com/onsonr/sonr/pkg/webui/styles/button" ) // Hero Section @@ -51,7 +51,7 @@ func Hero(hero *models.Hero) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 20, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 20, Col: 22} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -117,7 +117,7 @@ func heroTitle(first string, emphasis string, second string) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(first) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 37, Col: 9} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 37, Col: 9} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -130,7 +130,7 @@ func heroTitle(first string, emphasis string, second string) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(emphasis) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 39, Col: 13} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 39, Col: 13} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -143,7 +143,7 @@ func heroTitle(first string, emphasis string, second string) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(second) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 45, Col: 10} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 45, Col: 10} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -185,7 +185,7 @@ func heroImage(hero *models.Image) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 54, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 54, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -198,7 +198,7 @@ func heroImage(hero *models.Image) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Width) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 55, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 55, Col: 21} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -211,7 +211,7 @@ func heroImage(hero *models.Image) templ.Component { var templ_7745c5c3_Var10 string templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Height) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 56, Col: 23} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 56, Col: 23} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { @@ -258,7 +258,7 @@ func stats(stats []*models.Stat) templ.Component { var templ_7745c5c3_Var12 string templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(counterXData(item.Value)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 68, Col: 122} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 68, Col: 122} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -271,7 +271,7 @@ func stats(stats []*models.Stat) templ.Component { var templ_7745c5c3_Var13 string templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 68, Col: 159} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 68, Col: 159} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) if templ_7745c5c3_Err != nil { @@ -284,7 +284,7 @@ func stats(stats []*models.Stat) templ.Component { var templ_7745c5c3_Var14 string templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(item.Denom) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 68, Col: 180} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 68, Col: 180} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { @@ -297,7 +297,7 @@ func stats(stats []*models.Stat) templ.Component { var templ_7745c5c3_Var15 string templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/hero.templ`, Line: 69, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/hero.templ`, Line: 69, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/pages/home/internal/highlights.templ b/pkg/webui/landing/sections/highlights.templ similarity index 98% rename from pkg/webapp/pages/home/internal/highlights.templ rename to pkg/webui/landing/sections/highlights.templ index 9127eea5b..8e8c41d4b 100644 --- a/pkg/webapp/pages/home/internal/highlights.templ +++ b/pkg/webui/landing/sections/highlights.templ @@ -1,8 +1,8 @@ -package internal +package sections import ( "fmt" - models "github.com/onsonr/sonr/pkg/webapp/models" + "github.com/onsonr/sonr/pkg/webui/landing/models" ) // ╭───────────────────────────────────────────────────────────╮ diff --git a/pkg/webapp/pages/home/internal/highlights_templ.go b/pkg/webui/landing/sections/highlights_templ.go similarity index 94% rename from pkg/webapp/pages/home/internal/highlights_templ.go rename to pkg/webui/landing/sections/highlights_templ.go index d32acfcd6..c91a37719 100644 --- a/pkg/webapp/pages/home/internal/highlights_templ.go +++ b/pkg/webui/landing/sections/highlights_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime" import ( "fmt" - models "github.com/onsonr/sonr/pkg/webapp/models" + "github.com/onsonr/sonr/pkg/webui/landing/models" ) // ╭───────────────────────────────────────────────────────────╮ @@ -48,7 +48,7 @@ func Highlights(highlights *models.Highlights) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Heading) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 24, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 24, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -61,7 +61,7 @@ func Highlights(highlights *models.Highlights) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Subtitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 27, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 27, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -123,7 +123,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(getSelectedClass(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 46, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 46, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -136,7 +136,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(getClickPrevent(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 48, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 48, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -149,7 +149,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 52, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 52, Col: 21} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -162,7 +162,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(getShowBorder(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 55, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 55, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -175,7 +175,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 67, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 67, Col: 19} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -217,7 +217,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(getXShow(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 75, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 75, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { @@ -230,7 +230,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var12 string templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 86, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 86, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -243,7 +243,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var13 string templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Width) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 87, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 87, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) if templ_7745c5c3_Err != nil { @@ -256,7 +256,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var14 string templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Height) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 88, Col: 35} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 88, Col: 35} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { @@ -269,7 +269,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var15 string templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/highlights.templ`, Line: 89, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/highlights.templ`, Line: 89, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/pages/home/internal/lowlights.templ b/pkg/webui/landing/sections/lowlights.templ similarity index 97% rename from pkg/webapp/pages/home/internal/lowlights.templ rename to pkg/webui/landing/sections/lowlights.templ index d2022c917..6983ed242 100644 --- a/pkg/webapp/pages/home/internal/lowlights.templ +++ b/pkg/webui/landing/sections/lowlights.templ @@ -1,6 +1,6 @@ -package internal +package sections -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" // ╭───────────────────────────────────────────────────────────╮ // │ Data Model │ diff --git a/pkg/webapp/pages/home/internal/lowlights_templ.go b/pkg/webui/landing/sections/lowlights_templ.go similarity index 95% rename from pkg/webapp/pages/home/internal/lowlights_templ.go rename to pkg/webui/landing/sections/lowlights_templ.go index 0cc6af941..71de4309a 100644 --- a/pkg/webapp/pages/home/internal/lowlights_templ.go +++ b/pkg/webui/landing/sections/lowlights_templ.go @@ -1,14 +1,14 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" // ╭───────────────────────────────────────────────────────────╮ // │ Data Model │ @@ -47,7 +47,7 @@ func Lowlights(lowlights *models.Lowlights) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(lowlights.Heading) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/lowlights.templ`, Line: 20, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/lowlights.templ`, Line: 20, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -109,7 +109,7 @@ func quoteItem(quote *models.Testimonial) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Avatar.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/lowlights.templ`, Line: 65, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/lowlights.templ`, Line: 65, Col: 65} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -122,7 +122,7 @@ func quoteItem(quote *models.Testimonial) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Avatar.Width) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/lowlights.templ`, Line: 65, Col: 94} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/lowlights.templ`, Line: 65, Col: 94} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -135,7 +135,7 @@ func quoteItem(quote *models.Testimonial) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Avatar.Height) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/lowlights.templ`, Line: 65, Col: 125} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/lowlights.templ`, Line: 65, Col: 125} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -148,7 +148,7 @@ func quoteItem(quote *models.Testimonial) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(quote.FullName) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/lowlights.templ`, Line: 67, Col: 74} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/lowlights.templ`, Line: 67, Col: 74} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -161,7 +161,7 @@ func quoteItem(quote *models.Testimonial) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Username) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/lowlights.templ`, Line: 69, Col: 107} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/lowlights.templ`, Line: 69, Col: 107} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -174,7 +174,7 @@ func quoteItem(quote *models.Testimonial) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Quote) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/lowlights.templ`, Line: 74, Col: 16} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/lowlights.templ`, Line: 74, Col: 16} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/pages/home/internal/mission.templ b/pkg/webui/landing/sections/mission.templ similarity index 99% rename from pkg/webapp/pages/home/internal/mission.templ rename to pkg/webui/landing/sections/mission.templ index e8e0d0e89..85f7e7af1 100644 --- a/pkg/webapp/pages/home/internal/mission.templ +++ b/pkg/webui/landing/sections/mission.templ @@ -1,6 +1,6 @@ -package internal +package sections -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" templ Mission(mission *models.Mission) { diff --git a/pkg/webapp/pages/home/internal/mission_templ.go b/pkg/webui/landing/sections/mission_templ.go similarity index 96% rename from pkg/webapp/pages/home/internal/mission_templ.go rename to pkg/webui/landing/sections/mission_templ.go index 39409898e..a4ecc92a2 100644 --- a/pkg/webapp/pages/home/internal/mission_templ.go +++ b/pkg/webui/landing/sections/mission_templ.go @@ -1,14 +1,14 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.793 -package internal +package sections //lint:file-ignore SA4006 This context is only used if a nested component is present. import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -import models "github.com/onsonr/sonr/pkg/webapp/models" +import models "github.com/onsonr/sonr/pkg/webui/landing/models" func Mission(mission *models.Mission) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { @@ -38,7 +38,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Eyebrow) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 23, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 23, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -51,7 +51,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Heading) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 28, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 28, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -64,7 +64,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Subtitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 31, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 31, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -77,7 +77,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Experience.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 55, Col: 36} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 55, Col: 36} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -90,7 +90,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Experience.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 58, Col: 35} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 58, Col: 35} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -103,7 +103,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Compliance.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 81, Col: 36} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 81, Col: 36} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -116,7 +116,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Compliance.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 84, Col: 35} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 84, Col: 35} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -129,7 +129,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Interoperability.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 107, Col: 42} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 107, Col: 42} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -142,7 +142,7 @@ func Mission(mission *models.Mission) templ.Component { var templ_7745c5c3_Var10 string templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Interoperability.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/pages/home/internal/mission.templ`, Line: 110, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/landing/sections/mission.templ`, Line: 110, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/package.json b/pkg/webui/package.json similarity index 76% rename from pkg/webapp/package.json rename to pkg/webui/package.json index 0d5f50433..7a5290131 100644 --- a/pkg/webapp/package.json +++ b/pkg/webui/package.json @@ -2,7 +2,7 @@ "name": "@onsonr/nebula", "version": "0.0.2", "scripts": { - "build": "bunx tailwindcss -i ./globals.css -o ./dist/styles.css" + "build": "bunx tailwindcss -i ./styles/globals.css -o ./dist/styles.css" }, "dependencies": { "@tailwindcss/forms": "^0.5.7", diff --git a/pkg/webui/styles/bun.lockb b/pkg/webui/styles/bun.lockb new file mode 100755 index 000000000..38370bdae Binary files /dev/null and b/pkg/webui/styles/bun.lockb differ diff --git a/pkg/webapp/components/button/buttons.templ b/pkg/webui/styles/button/default.templ similarity index 100% rename from pkg/webapp/components/button/buttons.templ rename to pkg/webui/styles/button/default.templ diff --git a/pkg/webapp/components/button/buttons_templ.go b/pkg/webui/styles/button/default_templ.go similarity index 96% rename from pkg/webapp/components/button/buttons_templ.go rename to pkg/webui/styles/button/default_templ.go index 096ad5425..acd98d3e5 100644 --- a/pkg/webapp/components/button/buttons_templ.go +++ b/pkg/webui/styles/button/default_templ.go @@ -36,7 +36,7 @@ func Primary(href string, text string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(href) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/button/buttons.templ`, Line: 5, Col: 124} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/button/default.templ`, Line: 5, Col: 124} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -49,7 +49,7 @@ func Primary(href string, text string) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/button/buttons.templ`, Line: 6, Col: 9} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/button/default.templ`, Line: 6, Col: 9} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -91,7 +91,7 @@ func Secondary(href string, text string) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/button/buttons.templ`, Line: 13, Col: 175} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/button/default.templ`, Line: 13, Col: 175} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/globals.css b/pkg/webui/styles/globals.css similarity index 100% rename from pkg/webapp/globals.css rename to pkg/webui/styles/globals.css diff --git a/pkg/webapp/components/icon/icon.templ b/pkg/webui/styles/icon/icon.templ similarity index 100% rename from pkg/webapp/components/icon/icon.templ rename to pkg/webui/styles/icon/icon.templ diff --git a/pkg/webapp/components/icon/icon_templ.go b/pkg/webui/styles/icon/icon_templ.go similarity index 98% rename from pkg/webapp/components/icon/icon_templ.go rename to pkg/webui/styles/icon/icon_templ.go index bd8304e9a..1038f77a1 100644 --- a/pkg/webapp/components/icon/icon_templ.go +++ b/pkg/webui/styles/icon/icon_templ.go @@ -75,7 +75,7 @@ func faIcon(class string) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var2).String()) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/icon/icon.templ`, Line: 1, Col: 0} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/icon/icon.templ`, Line: 1, Col: 0} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/components/layout/root.templ b/pkg/webui/styles/layout/root.templ similarity index 100% rename from pkg/webapp/components/layout/root.templ rename to pkg/webui/styles/layout/root.templ diff --git a/pkg/webapp/components/layout/root_templ.go b/pkg/webui/styles/layout/root_templ.go similarity index 98% rename from pkg/webapp/components/layout/root_templ.go rename to pkg/webui/styles/layout/root_templ.go index 9f82e8c38..e2cf90f47 100644 --- a/pkg/webapp/components/layout/root_templ.go +++ b/pkg/webui/styles/layout/root_templ.go @@ -57,7 +57,7 @@ func Root(title string, remote bool) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/root.templ`, Line: 15, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/root.templ`, Line: 15, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -154,7 +154,7 @@ func NoBody(title string, remote bool) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/root.templ`, Line: 43, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/root.templ`, Line: 43, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/components/layout/scripts.templ b/pkg/webui/styles/layout/scripts.templ similarity index 100% rename from pkg/webapp/components/layout/scripts.templ rename to pkg/webui/styles/layout/scripts.templ diff --git a/pkg/webapp/components/layout/scripts_templ.go b/pkg/webui/styles/layout/scripts_templ.go similarity index 97% rename from pkg/webapp/components/layout/scripts_templ.go rename to pkg/webui/styles/layout/scripts_templ.go index a49e30ab5..b9a15f0bd 100644 --- a/pkg/webapp/components/layout/scripts_templ.go +++ b/pkg/webui/styles/layout/scripts_templ.go @@ -47,7 +47,7 @@ func Styles() templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/css/styles.css") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/scripts.templ`, Line: 15, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/scripts.templ`, Line: 15, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -89,7 +89,7 @@ func Alpine() templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine-focus.min.js") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/scripts.templ`, Line: 20, Col: 59} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/scripts.templ`, Line: 20, Col: 59} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -102,7 +102,7 @@ func Alpine() templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine.min.js") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/scripts.templ`, Line: 21, Col: 53} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/scripts.templ`, Line: 21, Col: 53} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -144,7 +144,7 @@ func Dexie() templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/dexie.min.js") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/scripts.templ`, Line: 25, Col: 52} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/scripts.templ`, Line: 25, Col: 52} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -186,7 +186,7 @@ func Htmx() templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/htmx.min.js") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/scripts.templ`, Line: 29, Col: 51} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/scripts.templ`, Line: 29, Col: 51} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/components/layout/ui.templ b/pkg/webui/styles/layout/ui.templ similarity index 100% rename from pkg/webapp/components/layout/ui.templ rename to pkg/webui/styles/layout/ui.templ diff --git a/pkg/webapp/components/layout/ui_templ.go b/pkg/webui/styles/layout/ui_templ.go similarity index 99% rename from pkg/webapp/components/layout/ui_templ.go rename to pkg/webui/styles/layout/ui_templ.go index 91d3a4761..ea67ff7a0 100644 --- a/pkg/webapp/components/layout/ui_templ.go +++ b/pkg/webui/styles/layout/ui_templ.go @@ -104,7 +104,7 @@ func Separator(text string) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/layout/ui.templ`, Line: 19, Col: 54} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/layout/ui.templ`, Line: 19, Col: 54} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/components/view/view.templ b/pkg/webui/styles/view/view.templ similarity index 100% rename from pkg/webapp/components/view/view.templ rename to pkg/webui/styles/view/view.templ diff --git a/pkg/webapp/components/view/view_templ.go b/pkg/webui/styles/view/view_templ.go similarity index 98% rename from pkg/webapp/components/view/view_templ.go rename to pkg/webui/styles/view/view_templ.go index c05aba538..8b48000bd 100644 --- a/pkg/webapp/components/view/view_templ.go +++ b/pkg/webui/styles/view/view_templ.go @@ -37,7 +37,7 @@ func Modal(title, description string) templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/view/view.templ`, Line: 36, Col: 47} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/view/view.templ`, Line: 36, Col: 47} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -50,7 +50,7 @@ func Modal(title, description string) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(description) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/view/view.templ`, Line: 42, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webui/styles/view/view.templ`, Line: 42, Col: 22} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/pkg/webapp/tailwind.config.js b/pkg/webui/tailwind.config.js similarity index 85% rename from pkg/webapp/tailwind.config.js rename to pkg/webui/tailwind.config.js index 75f8dc08f..e0f244a62 100644 --- a/pkg/webapp/tailwind.config.js +++ b/pkg/webui/tailwind.config.js @@ -1,8 +1,15 @@ // tailwind.config.js module.exports = { content: [ - "./components/**/*.{templ,html}", - "./pages/**/*.{templ,html}", + "./styles/button/**/*.{templ,html}", + "./styles/icon/**/*.{templ,html}", + "./styles/layout/**/*.{templ,html}", + "./styles/view/**/*.{templ,html}", + + "./landing/pages/**/*.{templ,html}", + "./landing/sections/**/*.{templ,html}", + + "./vault/**/*.{templ,html}", ], theme: { extend: { diff --git a/pkl/README.md b/pkl/README.md new file mode 100644 index 000000000..fa7b43aa1 --- /dev/null +++ b/pkl/README.md @@ -0,0 +1,19 @@ +# Sonr Pkl Definitions + +## Overview + +This directory contains the protobuf definitions for the Sonr blockchain. + +## Directory Structure + +### `did` + +The `did` directory contains the protobuf definitions for the DID module. + +### `dwn` + +The `dwn` directory contains the protobuf definitions for the Vault module. + +### `svc` + +The `service` directory contains the protobuf definitions for the Service module. diff --git a/pkl/base.types/ORM.pkl b/pkl/base.types/ORM.pkl deleted file mode 100644 index d6a59b1b5..000000000 --- a/pkl/base.types/ORM.pkl +++ /dev/null @@ -1,275 +0,0 @@ -@go.Package { name = "github.com/onsonr/sonr/pkg/common/models" } - -module common.types.ORM - -import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" - - -// 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" - -typealias Base58 = String -typealias Base64 = String - -typealias Bech32 = String -typealias Keccak = String - -typealias ChainCode = UInt -typealias Scope = String - -typealias Hex = String - -class PrimaryKey extends go.Field { - structTags { - ["json"] = "%{name},omitempty" - ["query"] = "%{name}" - } -} - -class JsonField extends go.Field { - structTags { - ["json"] = "%{name},omitempty" - } -} - - -class Account { - @PrimaryKey - id: String - - @JsonField - name: String - - @JsonField - address: Bech32|Keccak|String - - @JsonField - publicKey: Base58 - - @JsonField - chainCode: ChainCode - - @JsonField - index: Int - - @JsonField - controller: Bech32 - - @JsonField - createdAt: String? -} - -class Asset { - @PrimaryKey - id: String - - @JsonField - name: String - - @JsonField - symbol: String - - @JsonField - decimals: Int - - @JsonField - chainCode: ChainCode - - @JsonField - createdAt: String? -} - -class Chain { - @PrimaryKey - id: String - - @JsonField - name: String - - @JsonField - networkId: String - - @JsonField - chainCode: ChainCode - - @JsonField - createdAt: String? -} - -class Credential { - @PrimaryKey - id: String - - @JsonField - subject: String - - @JsonField - controller: Bech32 - - @JsonField - attestationType: String - - @JsonField - origin: String - - @JsonField - label: String? - - @JsonField - deviceId: String? - - @JsonField - credentialId: Base64 - - @JsonField - publicKey: Base64 - - @JsonField - transport: List - - @JsonField - signCount: UInt - - @JsonField - userPresent: Boolean - - @JsonField - userVerified: Boolean - - @JsonField - backupEligible: Boolean - - @JsonField - backupState: Boolean - - @JsonField - cloneWarning: Boolean - - @JsonField - createdAt: String? - - @JsonField - updatedAt: String? -} - -class DID { - @PrimaryKey - id: String - role: KeyRole - algorithm: KeyAlgorithm - encoding: KeyEncoding - curve: KeyCurve - key_type: KeyType - raw: Base64 - jwk: JWK -} - -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 - - @JsonField - subject: String - - @JsonField - controller: Bech32 - - @JsonField - origin: String - - @JsonField - token: String - - @JsonField - scopes: List - - @JsonField - createdAt: String? - - @JsonField - updatedAt: String? -} - -class Keyshare { - @PrimaryKey - id: String - - @JsonField - data: Base64 - - @JsonField - role: Int - - @JsonField - createdAt: String? - - @JsonField - lastRefreshed: String? -} - -class Profile { - @PrimaryKey - id: String - - @JsonField - subject: String - - @JsonField - controller: Bech32 - - @JsonField - originUri: String? - - @JsonField - publicMetadata: String? - - @JsonField - privateMetadata: String? - - @JsonField - createdAt: String? - - @JsonField - updatedAt: String? -} - -db_name: String = "vault" -db_version: Int = 1 diff --git a/pkl/basePklProject.pkl b/pkl/basePklProject.pkl index 0b63c4cc8..74d8dac18 100644 --- a/pkl/basePklProject.pkl +++ b/pkl/basePklProject.pkl @@ -32,13 +32,13 @@ local function findRootModule(mod: reflect.Module): Module = else findRootModule(supermodule) package { - baseUri = "package://pkl.sh/\(name)@\(version)" - packageZipUrl = "https://github.com/onsonr/sonr/releases/download/\(name)@\(version).zip" + baseUri = "package://pkl.sh/\(name)" + packageZipUrl = "https://pkl.sh/\(name)@\(version).zip" license = "Apache-2.0" authors { "Prad N " } description = myModule.docComment issueTracker = "https://github.com/onsonr/sonr/issues" - sourceCode = "https://github.com/onsonr/sonr/tree/third_party/pkl/packages/\(name)" + sourceCode = "https://github.com/onsonr/sonr/tree/pkl/\(name)" } diff --git a/pkl/ipfs.net/Config.pkl b/pkl/ipfs.net/Config.pkl new file mode 100644 index 000000000..996dc6d3f --- /dev/null +++ b/pkl/ipfs.net/Config.pkl @@ -0,0 +1,275 @@ +module ipfs.net.Config + +API: API + +Addresses: Addresses + +AutoNAT: Dynamic + +Bootstrap: Listing + +DNS: DNS + +Datastore: Datastore + +Discovery: Discovery + +Experimental: Experimental + +Gateway: Gateway + +Identity: Identity + +Internal: Dynamic + +Ipns: Ipns + +Migration: Migration + +Mounts: Mounts + +Peering: Peering + +Pinning: Pinning + +Plugins: Plugins + +Provider: Provider + +Pubsub: Pubsub + +Reprovider: Reprovider + +Routing: Routing + +Swarm: Swarm + +class API { + HTTPHeaders: HTTPHeaders +} + +class HTTPHeaders { + `Access-Control-Allow-Origin`: Listing +} + +class Addresses { + API: String + + Announce: Listing + + AppendAnnounce: Listing + + Gateway: String + + NoAnnounce: Listing + + Swarm: Listing +} + +class DNS { + Resolvers: Dynamic +} + +class Datastore { + BloomFilterSize: Int + + GCPeriod: String + + HashOnRead: Boolean + + Spec: Spec + + StorageGCWatermark: Int + + StorageMax: String +} + +class Spec { + mounts: Listing + + type: String +} + +class MountsItem0 { + child: Child + + mountpoint: String + + prefix: String + + type: String +} + +class Child { + path: String + + shardFunc: String + + sync: Boolean + + type: String +} + +class MountsItem1 { + child: MountsItem1Child + + mountpoint: String + + prefix: String + + type: String +} + +class MountsItem1Child { + compression: String + + path: String + + type: String +} + +class Discovery { + MDNS: MDNS +} + +class MDNS { + Enabled: Boolean +} + +class Experimental { + AcceleratedDHTClient: Boolean + + FilestoreEnabled: Boolean + + GraphsyncEnabled: Boolean + + Libp2pStreamMounting: Boolean + + P2pHttpProxy: Boolean + + StrategicProviding: Boolean + + UrlstoreEnabled: Boolean +} + +class Gateway { + APICommands: Listing + + HTTPHeaders: GatewayHTTPHeaders + + NoDNSLink: Boolean + + NoFetch: Boolean + + PathPrefixes: Listing + + PublicGateways: Any + + RootRedirect: String + + Writable: Boolean +} + +class GatewayHTTPHeaders { + `Access-Control-Allow-Headers`: Listing + + `Access-Control-Allow-Methods`: Listing + + `Access-Control-Allow-Origin`: Listing +} + +class Identity { + PeerID: String + + PrivKey: String +} + +class Ipns { + RecordLifetime: String + + RepublishPeriod: String + + ResolveCacheSize: Int +} + +class Migration { + DownloadSources: Listing + + Keep: String +} + +class Mounts { + FuseAllowOther: Boolean + + IPFS: String + + IPNS: String +} + +class Peering { + Peers: Listing +} + +class PeersItem11 { + Addrs: Listing + + ID: String +} + +class Pinning { + RemoteServices: Dynamic +} + +class Plugins { + Plugins: Any +} + +class Provider { + Strategy: String +} + +class Pubsub { + DisableSigning: Boolean + + Router: String +} + +class Reprovider { + Interval: String + + Strategy: String +} + +class Routing { + Methods: Any + + Routers: Any + + Type: String +} + +class Swarm { + AddrFilters: Any + + ConnMgr: Dynamic + + DisableBandwidthMetrics: Boolean + + DisableNatPortMap: Boolean + + RelayClient: Dynamic + + RelayService: Dynamic + + ResourceMgr: Dynamic + + Transports: Transports +} + +class Transports { + Multiplexers: Dynamic + + Network: Dynamic + + Security: Dynamic +} diff --git a/pkl/pkl.exts/PklProject b/pkl/ipfs.net/PklProject similarity index 95% rename from pkl/pkl.exts/PklProject rename to pkl/ipfs.net/PklProject index 23bb2d48e..1539ef8ba 100644 --- a/pkl/pkl.exts/PklProject +++ b/pkl/ipfs.net/PklProject @@ -17,6 +17,6 @@ amends "../basePklProject.pkl" package { - name = "net.matrix" - version = "0.0.1" + name = "ipfs.net" + version = "0.0.4" } diff --git a/pkl/base.types/PklProject.deps.json b/pkl/ipfs.net/PklProject.deps.json similarity index 100% rename from pkl/base.types/PklProject.deps.json rename to pkl/ipfs.net/PklProject.deps.json diff --git a/pkl/matrix.net/AppService.pkl b/pkl/matrix.net/AppService.pkl new file mode 100644 index 000000000..1f620e9be --- /dev/null +++ b/pkl/matrix.net/AppService.pkl @@ -0,0 +1,2 @@ +open module matrix.net.AppService + diff --git a/pkl/net.matrix/Homeserver.pkl b/pkl/matrix.net/Homeserver.pkl similarity index 99% rename from pkl/net.matrix/Homeserver.pkl rename to pkl/matrix.net/Homeserver.pkl index a6f74951e..24f5b4171 100644 --- a/pkl/net.matrix/Homeserver.pkl +++ b/pkl/matrix.net/Homeserver.pkl @@ -1,4 +1,4 @@ -module net.svcs.Homeserver +open module matrix.net.Homeserver version = 2 diff --git a/pkl/net.matrix/PklProject b/pkl/matrix.net/PklProject similarity index 97% rename from pkl/net.matrix/PklProject rename to pkl/matrix.net/PklProject index 23bb2d48e..0eb713b9a 100644 --- a/pkl/net.matrix/PklProject +++ b/pkl/matrix.net/PklProject @@ -17,6 +17,6 @@ amends "../basePklProject.pkl" package { - name = "net.matrix" + name = "matrix.net" version = "0.0.1" } diff --git a/pkl/net.matrix/PklProject.deps.json b/pkl/matrix.net/PklProject.deps.json similarity index 100% rename from pkl/net.matrix/PklProject.deps.json rename to pkl/matrix.net/PklProject.deps.json diff --git a/pkl/net.matrix/Synapse.pkl b/pkl/matrix.net/Synapse.pkl similarity index 99% rename from pkl/net.matrix/Synapse.pkl rename to pkl/matrix.net/Synapse.pkl index 6f85d4f02..8d3f765f1 100644 --- a/pkl/net.matrix/Synapse.pkl +++ b/pkl/matrix.net/Synapse.pkl @@ -1,4 +1,4 @@ -module net.svcs.Synapse +open module matrix.net.Synapse version = 2 diff --git a/pkl/pkl.exts/json.pkl b/pkl/pkl.exts/json.pkl deleted file mode 100644 index e69de29bb..000000000 diff --git a/pkl/sonr.chain/App.pkl b/pkl/sonr.chain/App.pkl index ca9188e55..9ec0317c8 100644 --- a/pkl/sonr.chain/App.pkl +++ b/pkl/sonr.chain/App.pkl @@ -1,4 +1,4 @@ -module config.sonr.App +open module sonr.chain.App import "package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0#/toml.pkl" diff --git a/pkl/sonr.chain/Chain.pkl b/pkl/sonr.chain/Config.pkl similarity index 94% rename from pkl/sonr.chain/Chain.pkl rename to pkl/sonr.chain/Config.pkl index dc136a8cf..ee5e50c52 100644 --- a/pkl/sonr.chain/Chain.pkl +++ b/pkl/sonr.chain/Config.pkl @@ -1,4 +1,4 @@ -module config.sonr.Chain +open module sonr.chain.Config import "package://pkg.pkl-lang.org/pkl-pantry/pkl.toml@1.0.0#/toml.pkl" @@ -65,7 +65,7 @@ class P2p { laddr: String = "tcp://0.0.0.0:26656" external_address: String = "" seeds: String = "" - persistent_peers: String = "7698b304905ac4459e8bf5fe8f8373aa46a528a5@192.168.0.2:26656,b1aee1db2ac83c57ffe561624ba169bdcd80dc1a@192.168.0.4:26656,cda55214016021246cd26f8991bd842a0c1dc3fb@192.168.0.3:26656" + persistent_peers: String = read("env:SONR_PERSISTENT_PEERS") ?? "" addr_book_file: String = "config/addrbook.json" addr_book_strict: Boolean = true max_num_inbound_peers: Int = 40 @@ -138,7 +138,7 @@ class Storage { class TxIndex { indexer: String = "kv" - `psql-conn`: String = "" + `psql-conn`: String = read("env:SONR_PSQL_CONN") ?? "" } class Instrumentation { diff --git a/pkl/sonr.chain/Genesis.pkl b/pkl/sonr.chain/Genesis.pkl index 814d12ece..3247a1ea5 100644 --- a/pkl/sonr.chain/Genesis.pkl +++ b/pkl/sonr.chain/Genesis.pkl @@ -1,3 +1,747 @@ -module config.sonr.Genesis +open module sonr.chain.Genesis + +app_name: String + +app_version: String + +genesis_time: String + +chain_id: String + +initial_height: Int + +app_hash: Any + +app_state: AppState + +consensus: Consensus + +class AppState { + `07-tendermint`: Any + + auth: Auth + + authz: Authz + + bank: Bank + + capability: Capability + + circuit: Circuit + + consensus: Any + + crisis: Crisis + + did: Did + + distribution: Distribution + + dwn: Dwn + + evidence: Evidence + + feegrant: Feegrant + + feeibc: Feeibc + + genutil: Genutil + + globalfee: Globalfee + + gov: Gov + + group: Group + + ibc: Ibc + + interchainaccounts: Interchainaccounts + + mint: Mint + + nft: Nft + + packetfowardmiddleware: Packetfowardmiddleware + + params: Any + + poa: Poa + + slashing: Slashing + + staking: Staking + + svc: Svc + + tokenfactory: Tokenfactory + + transfer: Transfer + + upgrade: Dynamic + + vesting: Dynamic +} + +class Auth { + params: Params + + accounts: Listing +} + +class Params { + max_memo_characters: String + + tx_sig_limit: String + + tx_size_cost_per_byte: String + + sig_verify_cost_ed25519: String + + sig_verify_cost_secp256k1: String +} + +class AccountsItem1 { + `@type`: String + + address: String + + pub_key: Any + + account_number: String + + sequence: String +} + +class Authz { + authorization: Listing +} + +class Bank { + params: BankParams + + balances: Listing + + supply: Listing + + denom_metadata: Listing + + send_enabled: Listing +} + +class BankParams { + send_enabled: Listing + + default_send_enabled: Boolean +} + +class BalancesItem1 { + address: String + + coins: Listing +} + +class ExpeditedMinDepositItem0 { + denom: String + + amount: String +} + +class Capability { + index: String + + owners: Listing +} + +class Circuit { + account_permissions: Listing + + disabled_type_urls: Listing +} + +class Crisis { + constant_fee: ExpeditedMinDepositItem0 +} + +class Did { + params: Dynamic +} + +class Distribution { + params: DistributionParams + + fee_pool: FeePool + + delegator_withdraw_infos: Listing + + previous_proposer: String + + outstanding_rewards: Listing + + validator_accumulated_commissions: Listing + + validator_historical_rewards: Listing + + validator_current_rewards: Listing + + delegator_starting_infos: Listing + + validator_slash_events: Listing +} + +class DistributionParams { + community_tax: String + + base_proposer_reward: String + + bonus_proposer_reward: String + + withdraw_addr_enabled: Boolean +} + +class FeePool { + community_pool: Listing +} + +class Dwn { + params: DwnParams +} + +class DwnParams { + allowed_public_keys: Dynamic + + conveyance_preference: String + + attestation_formats: Listing + + schema: Schema + + allowed_operators: Listing +} + +class Schema { + version: Int + + account: String + + asset: String + + chain: String + + credential: String + + did: String + + jwk: String + + grant: String + + keyshare: String + + profile: String +} + +class Evidence { + evidence: Listing +} + +class Feegrant { + allowances: Listing +} + +class Feeibc { + identified_fees: Listing + + fee_enabled_channels: Listing + + registered_payees: Listing + + registered_counterparty_payees: Listing + + forward_relayers: Listing +} + +class Genutil { + gen_txs: Listing +} + +class GenTxsItem0 { + body: Body + + auth_info: AuthInfo + + signatures: Listing +} + +class Body { + messages: Listing + + memo: String + + timeout_height: String + + extension_options: Listing + + non_critical_extension_options: Listing +} + +class MessagesItem0 { + `@type`: String + + description: Description + + commission: Commission + + min_self_delegation: String + + delegator_address: String + + validator_address: String + + pubkey: PublicKey + + value: ExpeditedMinDepositItem0 +} + +class Description { + moniker: String + + identity: String + + website: String + + security_contact: String + + details: String +} + +class Commission { + rate: String + + max_rate: String + + max_change_rate: String +} + +class PublicKey { + `@type`: String + + key: String +} + +class AuthInfo { + signer_infos: Listing + + fee: Fee + + tip: Any +} + +class SignerInfosItem0 { + public_key: PublicKey + + mode_info: ModeInfo + + sequence: String +} + +class ModeInfo { + single: Single +} + +class Single { + mode: String +} + +class Fee { + amount: Listing + + gas_limit: String + + payer: String + + granter: String +} + +class Globalfee { + params: GlobalfeeParams +} + +class GlobalfeeParams { + minimum_gas_prices: Listing +} + +class MinimumGasPricesItem0 { + amount: String + + denom: String +} + +class Gov { + starting_proposal_id: String + + deposits: Listing + + votes: Listing + + proposals: Listing + + deposit_params: Any + + voting_params: Any + + tally_params: Any + + params: GovParams + + constitution: String +} + +class GovParams { + min_deposit: Listing + + max_deposit_period: String + + voting_period: String + + quorum: String + + threshold: String + + veto_threshold: String + + min_initial_deposit_ratio: String + + proposal_cancel_ratio: String + + proposal_cancel_dest: String + + expedited_voting_period: String + + expedited_threshold: String + + expedited_min_deposit: Listing + + burn_vote_quorum: Boolean + + burn_proposal_deposit_prevote: Boolean + + burn_vote_veto: Boolean + + min_deposit_ratio: String +} + +class Group { + group_seq: String + + groups: Listing + + group_members: Listing + + group_policy_seq: String + + group_policies: Listing + + proposal_seq: String + + proposals: Listing + + votes: Listing +} + +class Ibc { + client_genesis: ClientGenesis + + connection_genesis: ConnectionGenesis + + channel_genesis: ChannelGenesis +} + +class ClientGenesis { + clients: Listing + + clients_consensus: Listing + + clients_metadata: Listing + + params: ClientGenesisParams + + create_localhost: Boolean + + next_client_sequence: String +} + +class ClientGenesisParams { + allowed_clients: Listing +} + +class ConnectionGenesis { + connections: Listing + + client_connection_paths: Listing + + next_connection_sequence: String + + params: ConnectionGenesisParams +} + +class ConnectionGenesisParams { + max_expected_time_per_block: String +} + +class ChannelGenesis { + channels: Listing + + acknowledgements: Listing + + commitments: Listing + + receipts: Listing + + send_sequences: Listing + + recv_sequences: Listing + + ack_sequences: Listing + + next_channel_sequence: String + + params: ChannelGenesisParams +} + +class ChannelGenesisParams { + upgrade_timeout: UpgradeTimeout +} + +class UpgradeTimeout { + height: Height + + timestamp: String +} + +class Height { + revision_number: String + + revision_height: String +} + +class Interchainaccounts { + controller_genesis_state: ControllerGenesisState + + host_genesis_state: HostGenesisState +} + +class ControllerGenesisState { + active_channels: Listing + + interchain_accounts: Listing + + ports: Listing + + params: ControllerGenesisStateParams +} + +class ControllerGenesisStateParams { + controller_enabled: Boolean +} + +class HostGenesisState { + active_channels: Listing + + interchain_accounts: Listing + + port: String + + params: HostGenesisStateParams +} + +class HostGenesisStateParams { + host_enabled: Boolean + + allow_messages: Listing +} + +class Mint { + minter: Minter + + params: MintParams +} + +class Minter { + inflation: String + + annual_provisions: String +} + +class MintParams { + mint_denom: String + + inflation_rate_change: String + + inflation_max: String + + inflation_min: String + + goal_bonded: String + + blocks_per_year: String +} + +class Nft { + classes: Listing + + entries: Listing +} + +class Packetfowardmiddleware { + params: PacketfowardmiddlewareParams + + in_flight_packets: Dynamic +} + +class PacketfowardmiddlewareParams { + fee_percentage: String +} + +class Poa { + params: PoaParams +} + +class PoaParams { + admins: Listing + + allow_validator_self_exit: Boolean +} + +class Slashing { + params: SlashingParams + + signing_infos: Listing + + missed_blocks: Listing +} + +class SlashingParams { + signed_blocks_window: String + + min_signed_per_window: String + + downtime_jail_duration: String + + slash_fraction_double_sign: String + + slash_fraction_downtime: String +} + +class Staking { + params: StakingParams + + last_total_power: String + + last_validator_powers: Listing + + validators: Listing + + delegations: Listing + + unbonding_delegations: Listing + + redelegations: Listing + + exported: Boolean +} + +class StakingParams { + unbonding_time: String + + max_validators: Int + + max_entries: Int + + historical_entries: Int + + bond_denom: String + + min_commission_rate: String +} + +class Svc { + params: SvcParams +} + +class SvcParams { + categories: Any + + types: Any +} + +class Tokenfactory { + params: TokenfactoryParams + + factory_denoms: Listing +} + +class TokenfactoryParams { + denom_creation_fee: Listing + + denom_creation_gas_consume: Int +} + +class Transfer { + port_id: String + + denom_traces: Listing + + params: TransferParams + + total_escrowed: Listing +} + +class TransferParams { + send_enabled: Boolean + + receive_enabled: Boolean +} + +class Consensus { + params: ConsensusParams +} + +class ConsensusParams { + block: Block + + evidence: ParamsEvidence + + validator: Validator + + version: Version + + abci: Abci +} + +class Block { + max_bytes: String + + max_gas: String +} + +class ParamsEvidence { + max_age_num_blocks: String + + max_age_duration: String + + max_bytes: String +} + +class Validator { + pub_key_types: Listing +} + +class Version { + app: String +} + +class Abci { + vote_extensions_enable_height: String +} diff --git a/pkl/sonr.chain/PklProject b/pkl/sonr.chain/PklProject index 5ecf072e1..a5185f92b 100644 --- a/pkl/sonr.chain/PklProject +++ b/pkl/sonr.chain/PklProject @@ -17,6 +17,6 @@ amends "../basePklProject.pkl" package { - name = "chain.sonr" - version = "0.0.1" + name = "sonr.chain" + version = "0.0.2" } diff --git a/pkl/base.types/Ctx.pkl b/pkl/sonr.hway/Ctx.pkl similarity index 96% rename from pkl/base.types/Ctx.pkl rename to pkl/sonr.hway/Ctx.pkl index 8d199db56..a4f0637bd 100644 --- a/pkl/base.types/Ctx.pkl +++ b/pkl/sonr.hway/Ctx.pkl @@ -1,6 +1,6 @@ @go.Package { name = "github.com/onsonr/sonr/pkg/common/types" } -module common.types.Ctx +module sonr.hway.Ctx import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" diff --git a/pkl/sonr.hway/Gate.pkl b/pkl/sonr.hway/Gate.pkl new file mode 100644 index 000000000..e6b9cd237 --- /dev/null +++ b/pkl/sonr.hway/Gate.pkl @@ -0,0 +1,31 @@ +@go.Package { name = "github.com/onsonr/sonr/pkg/gateway/types" } + +module sonr.hway.Gate + +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 Config { + @JsonField + chainId: String + + @JsonField + ipfsGatewayUrl: String + + @JsonField + landingUrl: String + + @JsonField + authProxyUrl: String + + @JsonField + sonrApiUrl: String + + @JsonField + sonrRpcUrl: String +} diff --git a/pkl/sonr.dwn/ORM.pkl b/pkl/sonr.hway/ORM.pkl similarity index 99% rename from pkl/sonr.dwn/ORM.pkl rename to pkl/sonr.hway/ORM.pkl index d6a59b1b5..658ee5f2a 100644 --- a/pkl/sonr.dwn/ORM.pkl +++ b/pkl/sonr.hway/ORM.pkl @@ -1,6 +1,6 @@ @go.Package { name = "github.com/onsonr/sonr/pkg/common/models" } -module common.types.ORM +module sonr.motr.ORM import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" @@ -25,7 +25,6 @@ typealias KeyShareRole = "user"|"validator" typealias PermissionGrant = "none"|"read"|"write"|"verify"|"broadcast"|"admin" typealias PermissionScope = "profile"|"metadata"|"permissions"|"wallets"|"transactions"|"user"|"validator" - typealias Base58 = String typealias Base64 = String diff --git a/pkl/base.types/PklProject b/pkl/sonr.hway/PklProject similarity index 97% rename from pkl/base.types/PklProject rename to pkl/sonr.hway/PklProject index f5363cc8e..16b1d153f 100644 --- a/pkl/base.types/PklProject +++ b/pkl/sonr.hway/PklProject @@ -17,6 +17,6 @@ amends "../basePklProject.pkl" package { - name = "base.types" + name = "sonr.hway" version = "0.0.1" } diff --git a/pkl/pkl.exts/PklProject.deps.json b/pkl/sonr.hway/PklProject.deps.json similarity index 100% rename from pkl/pkl.exts/PklProject.deps.json rename to pkl/sonr.hway/PklProject.deps.json diff --git a/pkl/sonr.motr/ATN.pkl b/pkl/sonr.motr/ATN.pkl new file mode 100644 index 000000000..3b84c63da --- /dev/null +++ b/pkl/sonr.motr/ATN.pkl @@ -0,0 +1,33 @@ +@go.Package { name = "github.com/onsonr/sonr/x/dwn/types/attns" } + +module sonr.motr.ATN + +import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" + + +// Capability hierarchy for smart account operations +// ---------------------------------------------- +// OWNER +// └─ OPERATOR +// └─ AUTHENTICATE +// └─ AUTHORIZE +// └─ DELEGATE +// ├─ EXECUTE +// └─ INVOKE +// ├─ PROPOSE +// └─ SIGN +// └─ VOTE +// └─ SET_POLICY +// └─ SET_THRESHOLD +// └─ RECOVER +// └─ SOCIAL +// └─ VAULT + + +typealias Capability = "CAP_OWNER"|"CAP_OPERATOR"|"CAP_OBSERVER"|"CAP_AUTHENTICATE"|"CAP_AUTHORIZE"|"CAP_DELEGATE"|"CAP_INVOKE"|"CAP_EXECUTE"|"CAP_PROPOSE"|"CAP_SIGN"|"CAP_SET_POLICY"|"CAP_SET_THRESHOLD"|"CAP_RECOVER"|"CAP_SOCIAL"|"CAP_VOTE" + +typealias ResourceType = "RES_ACCOUNT"|"RES_TRANSACTION"|"RES_POLICY"|"RES_RECOVERY"|"RES_VAULT" + +typealias PolicyType = "POLICY_THRESHOLD"|"POLICY_TIMELOCK"|"POLICY_WHITELIST" + + diff --git a/pkl/base.types/DWN.pkl b/pkl/sonr.motr/DWN.pkl similarity index 87% rename from pkl/base.types/DWN.pkl rename to pkl/sonr.motr/DWN.pkl index 055035559..5564fbbcc 100644 --- a/pkl/base.types/DWN.pkl +++ b/pkl/sonr.motr/DWN.pkl @@ -1,6 +1,6 @@ -@go.Package { name = "github.com/onsonr/sonr/pkg/core/dwn" } +@go.Package { name = "github.com/onsonr/sonr/pkg/vault/types" } -module common.types.DWN +module sonr.motr.DWN import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" @@ -17,7 +17,7 @@ class Config { ipfsGatewayUrl: String @JsonField - motrKeyshare: String + motrToken: String @JsonField motrAddress: String @@ -38,16 +38,16 @@ class Config { class Environment { @JsonField isDevelopment: Boolean - + @JsonField cacheVersion: String - + @JsonField httpserverPath: String - + @JsonField wasmExecPath: String - + @JsonField wasmPath: String } @@ -57,26 +57,25 @@ class Schema { @JsonField account: String - + @JsonField asset: String - + @JsonField chain: String - + @JsonField credential: String @JsonField jwk: String - + @JsonField grant: String - + @JsonField keyshare: String @JsonField profile: String } - diff --git a/pkl/sonr.dwn/PklProject b/pkl/sonr.motr/PklProject similarity index 97% rename from pkl/sonr.dwn/PklProject rename to pkl/sonr.motr/PklProject index f5363cc8e..27197f00f 100644 --- a/pkl/sonr.dwn/PklProject +++ b/pkl/sonr.motr/PklProject @@ -17,6 +17,6 @@ amends "../basePklProject.pkl" package { - name = "base.types" + name = "sonr.motr" version = "0.0.1" } diff --git a/pkl/sonr.dwn/PklProject.deps.json b/pkl/sonr.motr/PklProject.deps.json similarity index 100% rename from pkl/sonr.dwn/PklProject.deps.json rename to pkl/sonr.motr/PklProject.deps.json diff --git a/proto/devbox.json b/proto/devbox.json new file mode 100644 index 000000000..b062c7821 --- /dev/null +++ b/proto/devbox.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", + "packages": [ + "go@1.22", + "bun@latest", + "gum@latest" + ], + "env": { + "GOPATH": "$HOME/go", + "PATH": "./build:$HOME/go/bin:$PATH", + "TEMPL_EXPERIMENT": "rawgo" + }, + "shell": { + "scripts": { + "deploy": [ + "gum spin --title='Deploying buf' -- make deploy-buf", + "gum spin --title='Generating PKL' -- make pkl-gen", + "gum spin --title='Generating Styles' -- make styles-gen", + "gum spin --title='Building Motr WASM' -- make motr-build", + "gum spin --title='Uploading to Bucket' -- make deploy-cdn" + ], + "devnet": [ + "cd deploy/devnet && devbox services up" + ], + "testnet": [ + "cd deploy/testnet && devbox services up" + ] + } + } +} diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index 2544ecc9f..89c9f0f79 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package did.v1; import "amino/amino.proto"; -import "did/v1/params.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; @@ -23,3 +22,15 @@ message Document { repeated string capability_invocation = 6; repeated string service = 7; } + + +// Params defines the set of module parameters. +message Params { + option (amino.name) = "did/params"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // Whitelisted Assets + +} + diff --git a/proto/did/v1/params.proto b/proto/did/v1/params.proto deleted file mode 100644 index a27e60ec0..000000000 --- a/proto/did/v1/params.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package did.v1; - -import "amino/amino.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/onsonr/sonr/x/did/types"; - -// Params defines the set of module parameters. -message Params { - option (amino.name) = "did/params"; - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // Whitelisted Assets - - // Whitelisted Key Types - map allowed_public_keys = 2; - - // ConveyancePreference defines the conveyance preference - string conveyance_preference = 3; - - // AttestationFormats defines the attestation formats - repeated string attestation_formats = 4; -} - -// KeyInfo defines information for accepted PubKey types -message KeyInfo { - string role = 1; - string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" - string encoding = 3; // e.g., "hex", "base64", "multibase" - string curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448", - // "Ed25519", "Ed448", "secp256k1" -} diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 4d3a54396..1de68309e 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package did.v1; import "did/v1/genesis.proto"; -import "did/v1/params.proto"; import "google/api/annotations.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index c451ad2e8..de4eae40e 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -5,7 +5,6 @@ package did.v1; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "did/v1/genesis.proto"; -import "did/v1/params.proto"; import "gogoproto/gogo.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; diff --git a/proto/dwn/v1/genesis.proto b/proto/dwn/v1/genesis.proto index 5e5a5306d..5d231f96f 100644 --- a/proto/dwn/v1/genesis.proto +++ b/proto/dwn/v1/genesis.proto @@ -18,9 +18,16 @@ message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - bool ipfs_active = 1; - bool local_registration_enabled = 2; + // Whitelisted Key Types + map allowed_public_keys = 1; + + // ConveyancePreference defines the conveyance preference + string conveyance_preference = 2; + + // AttestationFormats defines the attestation formats + repeated string attestation_formats = 3; Schema schema = 4; + repeated string allowed_operators = 5; } // Capability reprensents the available capabilities of a decentralized web node @@ -31,6 +38,15 @@ message Capability { repeated string resources = 4; } +// KeyInfo defines information for accepted PubKey types +message KeyInfo { + string role = 1; + string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" + string encoding = 3; // e.g., "hex", "base64", "multibase" + string curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448", + // "Ed25519", "Ed448", "secp256k1" +} + // Resource reprensents the available resources of a decentralized web node message Resource { string kind = 1; diff --git a/scripts/json_to_pkl.sh b/scripts/json_to_pkl.sh new file mode 100755 index 000000000..b4f76c5b8 --- /dev/null +++ b/scripts/json_to_pkl.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -e + +SOURCE=$1 +OUTPUT=$2 + +ROOT_DIR=$(git rev-parse --show-toplevel) +cd $ROOT_DIR + +mkdir -p $OUTPUT +pkl eval package://pkg.pkl-lang.org/pkl-pantry/org.json_schema.contrib@1.0.0#/generate.pkl -m . -p source="$SOURCE" -p output="$OUTPUT" diff --git a/scripts/tailwindgen.sh b/scripts/tailwindgen.sh index f3fecc0d7..3eb916a17 100755 --- a/scripts/tailwindgen.sh +++ b/scripts/tailwindgen.sh @@ -3,7 +3,7 @@ set -e ROOT_DIR=$(git rev-parse --show-toplevel) -STYLES_DIR=$ROOT_DIR/pkg/webapp +STYLES_DIR=$ROOT_DIR/pkg/webui DIST_DIR=$STYLES_DIR/dist OUT_DIR=$ROOT_DIR/static/css diff --git a/scripts/upload_cdn.sh b/scripts/upload_cdn.sh index c807933b2..187b03060 100755 --- a/scripts/upload_cdn.sh +++ b/scripts/upload_cdn.sh @@ -4,14 +4,39 @@ set -e ROOT_DIR=$(git rev-parse --show-toplevel) +# Package the PKL projects bunx pkl project package $ROOT_DIR/pkl/*/ +# Process each directory in .out for dir in .out/*/; do + # Get the folder name and version folder=$(basename "$dir") - rclone copy "$dir" "r2:pkljar/$folder" + version=$(echo "$folder" | grep -o '@.*' | sed 's/@//') + new_folder=$(echo "$folder" | sed 's/@[0-9.]*$//') + + # Create new directory without version + mkdir -p ".out/$new_folder/$version" + + # Copy contents to versioned subdirectory + cp -r "$dir"* ".out/$new_folder/$version/" + + # Find and copy only .pkl files from the original package + pkg_dir="$ROOT_DIR/pkl/$new_folder" + if [ -d "$pkg_dir" ]; then + # Copy only .pkl files to version directory + find "$pkg_dir" -name "*.pkl" -exec cp {} ".out/$new_folder/$version/" \; + fi + + # Remove old versioned directory + rm -rf "$dir" + + # Upload to R2 with new structure + rclone copy ".out/$new_folder" "r2:pkljar/$new_folder" done +# Cleanup .out directory rm -rf .out +# Handle static files rclone copy $ROOT_DIR/static "r2:nebula" rm -rf $ROOT_DIR/static diff --git a/x/did/controller/base.go b/x/did/controller/base.go deleted file mode 100644 index dfd547f76..000000000 --- a/x/did/controller/base.go +++ /dev/null @@ -1,54 +0,0 @@ -package controller - -import ( - "github.com/onsonr/sonr/pkg/crypto/mpc" -) - -type ControllerI interface { - ChainID() string - // GetPubKey() *commonv1.PubKey - SonrAddress() string - RawPublicKey() []byte -} - -func New(src mpc.KeyshareSource) (ControllerI, error) { - return &controller{ - src: src, - address: src.Address(), - publicKey: src.PublicKey(), - did: src.Issuer(), - chainID: "sonr-testnet-1", - }, nil -} - -type controller struct { - src mpc.KeyshareSource - address string - chainID string - publicKey []byte - did string -} - -func (c *controller) ChainID() string { - return c.chainID -} - -// -// func (c *controller) GetPubKey() *commonv1.PubKey { -// return &commonv1.PubKey{ -// KeyType: "ecdsa", -// RawKey: &commonv1.RawKey{ -// Algorithm: "secp256k1", -// Key: c.publicKey, -// }, -// Role: "authentication", -// } -// } - -func (c *controller) RawPublicKey() []byte { - return c.publicKey -} - -func (c *controller) SonrAddress() string { - return c.address -} diff --git a/x/did/controller/table.go b/x/did/controller/table.go deleted file mode 100644 index 1d6b00eb1..000000000 --- a/x/did/controller/table.go +++ /dev/null @@ -1,13 +0,0 @@ -package controller - -// func LoadFromTableEntry(ctx sdk.Context, entry *didv1.Controller) (ControllerI, error) { -// k, err := hexutil.Decode(entry.PublicKeyHex) -// if err != nil { -// return nil, err -// } -// return &controller{ -// address: entry.Did, -// chainID: ctx.ChainID(), -// publicKey: k, -// }, nil -// } diff --git a/x/did/keeper/genesis.go b/x/did/keeper/genesis.go index 77b7c3bbf..204609b5e 100644 --- a/x/did/keeper/genesis.go +++ b/x/did/keeper/genesis.go @@ -6,23 +6,9 @@ import ( "cosmossdk.io/log" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/onsonr/sonr/pkg/crypto/mpc" - "github.com/onsonr/sonr/x/did/controller" "github.com/onsonr/sonr/x/did/types" ) -func (k Keeper) NewController(ctx sdk.Context) (controller.ControllerI, error) { - shares, err := mpc.NewKeyshareSource() - if err != nil { - return nil, err - } - controller, err := controller.New(shares) - if err != nil { - return nil, err - } - return controller, nil -} - // func (k Keeper) ResolveController(ctx sdk.Context, did string) (controller.ControllerI, error) { // ct, err := k.OrmDB.ControllerTable().GetByDid(ctx, did) // if err != nil { diff --git a/x/did/types/did/crypto.go b/x/did/types/crypto/crypto.go similarity index 99% rename from x/did/types/did/crypto.go rename to x/did/types/crypto/crypto.go index d0065a7fc..ff2499342 100644 --- a/x/did/types/did/crypto.go +++ b/x/did/types/crypto/crypto.go @@ -1,4 +1,4 @@ -package did +package crypto import ( "crypto/ecdsa" diff --git a/x/did/types/crypto/crypto_test.go b/x/did/types/crypto/crypto_test.go new file mode 100644 index 000000000..a5391166e --- /dev/null +++ b/x/did/types/crypto/crypto_test.go @@ -0,0 +1,108 @@ +package crypto_test + +import ( + "crypto/elliptic" + "crypto/rand" + "testing" + + "github.com/decred/dcrd/dcrec/secp256k1/v4" + libp2p_crypto "github.com/libp2p/go-libp2p/core/crypto" + "github.com/libp2p/go-libp2p/core/crypto/pb" + "github.com/multiformats/go-multicodec" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/onsonr/sonr/x/did/types/crypto" +) + +const ( + exampleDIDStr = "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" + examplePubKeyStr = "Lm/M42cB3HkUiODQsXRcweM6TByfzEHGO9ND274JcOY=" +) + +func TestFromPubKey(t *testing.T) { + t.Parallel() + + _, ecdsaP256, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(elliptic.P256(), rand.Reader) + require.NoError(t, err) + _, ecdsaP384, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(elliptic.P384(), rand.Reader) + require.NoError(t, err) + _, ecdsaP521, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(elliptic.P521(), rand.Reader) + require.NoError(t, err) + _, ecdsaSecp256k1, err := libp2p_crypto.GenerateECDSAKeyPairWithCurve(secp256k1.S256(), rand.Reader) + require.NoError(t, err) + _, ed25519, err := libp2p_crypto.GenerateEd25519Key(rand.Reader) + require.NoError(t, err) + _, rsa, err := libp2p_crypto.GenerateRSAKeyPair(2048, rand.Reader) + require.NoError(t, err) + _, secp256k1PubKey1, err := libp2p_crypto.GenerateSecp256k1Key(rand.Reader) + require.NoError(t, err) + + test := func(pub libp2p_crypto.PubKey, code multicodec.Code) func(t *testing.T) { + t.Helper() + + return func(t *testing.T) { + t.Parallel() + + id, err := crypto.FromPubKey(pub) + require.NoError(t, err) + p, err := id.PubKey() + require.NoError(t, err) + assert.Equal(t, pub, p) + } + } + + t.Run("ECDSA with P256 curve", test(ecdsaP256, crypto.P256)) + t.Run("ECDSA with P384 curve", test(ecdsaP384, crypto.P384)) + t.Run("ECDSA with P521 curve", test(ecdsaP521, crypto.P521)) + t.Run("Ed25519", test(ed25519, crypto.Ed25519)) + t.Run("RSA", test(rsa, crypto.RSA)) + t.Run("secp256k1", test(secp256k1PubKey1, crypto.Secp256k1)) + + t.Run("ECDSA with secp256k1 curve (coerced)", func(t *testing.T) { + t.Parallel() + + id, err := crypto.FromPubKey(ecdsaSecp256k1) + require.NoError(t, err) + p, err := id.PubKey() + require.NoError(t, err) + require.Equal(t, pb.KeyType_Secp256k1, p.Type()) + }) + + t.Run("unmarshaled example key (secp256k1)", func(t *testing.T) { + t.Parallel() + + id, err := crypto.FromPubKey(examplePubKey(t)) + require.NoError(t, err) + require.Equal(t, exampleDID(t), id) + }) +} + +func TestToPubKey(t *testing.T) { + t.Parallel() + + pubKey, err := crypto.ToPubKey(exampleDIDStr) + require.NoError(t, err) + require.Equal(t, examplePubKey(t), pubKey) +} + +func exampleDID(t *testing.T) crypto.DID { + t.Helper() + + id, err := crypto.Parse(exampleDIDStr) + require.NoError(t, err) + + return id +} + +func examplePubKey(t *testing.T) libp2p_crypto.PubKey { + t.Helper() + + pubKeyCfg, err := libp2p_crypto.ConfigDecodeKey(examplePubKeyStr) + require.NoError(t, err) + + pubKey, err := libp2p_crypto.UnmarshalEd25519PublicKey(pubKeyCfg) + require.NoError(t, err) + + return pubKey +} diff --git a/x/did/types/did/did.go b/x/did/types/crypto/did.go similarity index 99% rename from x/did/types/did/did.go rename to x/did/types/crypto/did.go index 19042bf1e..eca3f39da 100644 --- a/x/did/types/did/did.go +++ b/x/did/types/crypto/did.go @@ -1,4 +1,4 @@ -package did +package crypto import ( "crypto/ecdsa" diff --git a/x/did/types/did/did_test.go b/x/did/types/crypto/did_test.go similarity index 98% rename from x/did/types/did/did_test.go rename to x/did/types/crypto/did_test.go index 47585af9b..3781567ab 100644 --- a/x/did/types/did/did_test.go +++ b/x/did/types/crypto/did_test.go @@ -1,4 +1,4 @@ -package did +package crypto import ( "testing" diff --git a/x/did/types/did/crypto_test.go b/x/did/types/did/crypto_test.go deleted file mode 100644 index 6e5aee987..000000000 --- a/x/did/types/did/crypto_test.go +++ /dev/null @@ -1,108 +0,0 @@ -package did_test - -import ( - "crypto/elliptic" - "crypto/rand" - "testing" - - "github.com/decred/dcrd/dcrec/secp256k1/v4" - "github.com/libp2p/go-libp2p/core/crypto" - "github.com/libp2p/go-libp2p/core/crypto/pb" - "github.com/multiformats/go-multicodec" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/onsonr/sonr/x/did/types/did" -) - -const ( - exampleDIDStr = "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK" - examplePubKeyStr = "Lm/M42cB3HkUiODQsXRcweM6TByfzEHGO9ND274JcOY=" -) - -func TestFromPubKey(t *testing.T) { - t.Parallel() - - _, ecdsaP256, err := crypto.GenerateECDSAKeyPairWithCurve(elliptic.P256(), rand.Reader) - require.NoError(t, err) - _, ecdsaP384, err := crypto.GenerateECDSAKeyPairWithCurve(elliptic.P384(), rand.Reader) - require.NoError(t, err) - _, ecdsaP521, err := crypto.GenerateECDSAKeyPairWithCurve(elliptic.P521(), rand.Reader) - require.NoError(t, err) - _, ecdsaSecp256k1, err := crypto.GenerateECDSAKeyPairWithCurve(secp256k1.S256(), rand.Reader) - require.NoError(t, err) - _, ed25519, err := crypto.GenerateEd25519Key(rand.Reader) - require.NoError(t, err) - _, rsa, err := crypto.GenerateRSAKeyPair(2048, rand.Reader) - require.NoError(t, err) - _, secp256k1PubKey1, err := crypto.GenerateSecp256k1Key(rand.Reader) - require.NoError(t, err) - - test := func(pub crypto.PubKey, code multicodec.Code) func(t *testing.T) { - t.Helper() - - return func(t *testing.T) { - t.Parallel() - - id, err := did.FromPubKey(pub) - require.NoError(t, err) - p, err := id.PubKey() - require.NoError(t, err) - assert.Equal(t, pub, p) - } - } - - t.Run("ECDSA with P256 curve", test(ecdsaP256, did.P256)) - t.Run("ECDSA with P384 curve", test(ecdsaP384, did.P384)) - t.Run("ECDSA with P521 curve", test(ecdsaP521, did.P521)) - t.Run("Ed25519", test(ed25519, did.Ed25519)) - t.Run("RSA", test(rsa, did.RSA)) - t.Run("secp256k1", test(secp256k1PubKey1, did.Secp256k1)) - - t.Run("ECDSA with secp256k1 curve (coerced)", func(t *testing.T) { - t.Parallel() - - id, err := did.FromPubKey(ecdsaSecp256k1) - require.NoError(t, err) - p, err := id.PubKey() - require.NoError(t, err) - require.Equal(t, pb.KeyType_Secp256k1, p.Type()) - }) - - t.Run("unmarshaled example key (secp256k1)", func(t *testing.T) { - t.Parallel() - - id, err := did.FromPubKey(examplePubKey(t)) - require.NoError(t, err) - require.Equal(t, exampleDID(t), id) - }) -} - -func TestToPubKey(t *testing.T) { - t.Parallel() - - pubKey, err := did.ToPubKey(exampleDIDStr) - require.NoError(t, err) - require.Equal(t, examplePubKey(t), pubKey) -} - -func exampleDID(t *testing.T) did.DID { - t.Helper() - - id, err := did.Parse(exampleDIDStr) - require.NoError(t, err) - - return id -} - -func examplePubKey(t *testing.T) crypto.PubKey { - t.Helper() - - pubKeyCfg, err := crypto.ConfigDecodeKey(examplePubKeyStr) - require.NoError(t, err) - - pubKey, err := crypto.UnmarshalEd25519PublicKey(pubKeyCfg) - require.NoError(t, err) - - return pubKey -} diff --git a/x/did/types/format.go b/x/did/types/format.go new file mode 100644 index 000000000..ab1254f4c --- /dev/null +++ b/x/did/types/format.go @@ -0,0 +1 @@ +package types diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index fdc02dfc4..adb3683f4 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -163,39 +163,99 @@ func (m *Document) GetService() []string { return nil } +// Params defines the set of module parameters. +type Params struct { +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{2} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + func init() { proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState") proto.RegisterType((*Document)(nil), "did.v1.Document") + proto.RegisterType((*Params)(nil), "did.v1.Params") } func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) } var fileDescriptor_fda181cae44f7c00 = []byte{ - // 344 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xc1, 0x6a, 0xea, 0x40, - 0x14, 0x86, 0x93, 0xe8, 0x8d, 0xd7, 0xb9, 0x17, 0xdb, 0x4e, 0x2d, 0x04, 0x17, 0xa9, 0xb8, 0x28, - 0x16, 0x4a, 0x06, 0xeb, 0xd6, 0x95, 0x08, 0xa5, 0x8b, 0x42, 0xb1, 0xbb, 0x6e, 0x64, 0xcc, 0x0c, - 0x71, 0x20, 0x99, 0x13, 0x66, 0xc6, 0x50, 0xdf, 0xa2, 0x7d, 0x2b, 0x97, 0x2e, 0xbb, 0x2a, 0x45, - 0x5f, 0xa4, 0x38, 0x49, 0x6d, 0x71, 0x73, 0x38, 0xe7, 0xfb, 0xff, 0xff, 0xcc, 0xc0, 0x41, 0x6d, - 0x26, 0x18, 0x29, 0x06, 0x24, 0xe1, 0x92, 0x6b, 0xa1, 0xa3, 0x5c, 0x81, 0x01, 0xec, 0x33, 0xc1, - 0xa2, 0x62, 0xd0, 0x39, 0xa3, 0x99, 0x90, 0x40, 0x6c, 0x2d, 0xa5, 0xce, 0x79, 0x15, 0xc8, 0xa9, - 0xa2, 0x59, 0xe5, 0xef, 0xb4, 0x13, 0x48, 0xc0, 0xb6, 0x64, 0xdf, 0x95, 0xb4, 0x37, 0x42, 0xff, - 0xef, 0xca, 0xb5, 0x4f, 0x86, 0x1a, 0x8e, 0x6f, 0x90, 0x5f, 0xa6, 0x02, 0xb7, 0xeb, 0xf6, 0xff, - 0xdd, 0xb6, 0xa2, 0xf2, 0x99, 0xe8, 0xd1, 0xd2, 0x71, 0x7d, 0xfd, 0x71, 0xe9, 0x4c, 0x2b, 0x4f, - 0xef, 0xcd, 0x43, 0x7f, 0x27, 0x10, 0x2f, 0x33, 0x2e, 0x0d, 0x6e, 0x21, 0x4f, 0x30, 0x1b, 0x6b, - 0x4e, 0x3d, 0xc1, 0x70, 0x88, 0x50, 0x0c, 0xd2, 0x28, 0x48, 0x53, 0xae, 0x02, 0xcf, 0xf2, 0x5f, - 0x04, 0x5f, 0xa1, 0x16, 0x5d, 0x9a, 0x05, 0x97, 0x46, 0xc4, 0xd4, 0x08, 0x90, 0x41, 0xad, 0x5b, - 0xeb, 0x37, 0xa7, 0x47, 0x14, 0x5f, 0xa3, 0x53, 0xaa, 0x35, 0x57, 0xfb, 0x61, 0x96, 0x71, 0xb3, - 0x00, 0x16, 0xd4, 0xad, 0xf3, 0xe4, 0xc0, 0x1f, 0x2c, 0xc6, 0x43, 0x74, 0x11, 0xd3, 0x9c, 0xce, - 0x45, 0x2a, 0xcc, 0x6a, 0xc6, 0x78, 0xca, 0x93, 0x72, 0xf3, 0x1f, 0xeb, 0x6f, 0xff, 0x88, 0x93, - 0x83, 0x76, 0x14, 0x12, 0xb2, 0x80, 0xea, 0x3b, 0xfe, 0x71, 0xe8, 0xfe, 0xa0, 0xe1, 0x00, 0x35, - 0x34, 0x57, 0x85, 0x88, 0x79, 0xd0, 0xb0, 0xb6, 0xef, 0x71, 0x3c, 0x5a, 0x6f, 0x43, 0x77, 0xb3, - 0x0d, 0xdd, 0xcf, 0x6d, 0xe8, 0xbe, 0xee, 0x42, 0x67, 0xb3, 0x0b, 0x9d, 0xf7, 0x5d, 0xe8, 0x3c, - 0xf7, 0x12, 0x61, 0x16, 0xcb, 0x79, 0x14, 0x43, 0x46, 0x40, 0x6a, 0x90, 0x8a, 0xd8, 0xf2, 0x42, - 0xf6, 0xf7, 0x32, 0xab, 0x9c, 0xeb, 0xb9, 0x6f, 0xcf, 0x32, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, - 0x44, 0xa7, 0x3d, 0xf3, 0xf4, 0x01, 0x00, 0x00, + // 371 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xc1, 0x4e, 0xea, 0x40, + 0x14, 0x86, 0xdb, 0xc2, 0x2d, 0x97, 0xb9, 0x37, 0xdc, 0xeb, 0x04, 0x63, 0xc3, 0xa2, 0x60, 0x17, + 0x06, 0x8d, 0x69, 0x83, 0xec, 0x0c, 0x2b, 0x42, 0x62, 0x5c, 0x98, 0x18, 0xdc, 0xb9, 0x21, 0x43, + 0x67, 0x52, 0x26, 0x69, 0x67, 0x9a, 0xce, 0xd0, 0xc8, 0x2b, 0xb8, 0xd2, 0x9d, 0x4b, 0x1e, 0xc1, + 0xc7, 0x60, 0xc9, 0xd2, 0x95, 0x31, 0xb0, 0xd0, 0xc7, 0x30, 0x9d, 0x41, 0x34, 0x6c, 0x26, 0xe7, + 0x7c, 0xff, 0xff, 0x9f, 0x4c, 0xce, 0x01, 0x75, 0x4c, 0x71, 0x90, 0x77, 0x82, 0x88, 0x30, 0x22, + 0xa8, 0xf0, 0xd3, 0x8c, 0x4b, 0x0e, 0x6d, 0x4c, 0xb1, 0x9f, 0x77, 0x1a, 0x7b, 0x28, 0xa1, 0x8c, + 0x07, 0xea, 0xd5, 0x52, 0xa3, 0x1e, 0xf1, 0x88, 0xab, 0x32, 0x28, 0x2a, 0x4d, 0xbd, 0x1e, 0xf8, + 0x7b, 0xa1, 0x27, 0xdc, 0x48, 0x24, 0x09, 0x3c, 0x05, 0x76, 0x8a, 0x32, 0x94, 0x08, 0xc7, 0x6c, + 0x99, 0xed, 0x3f, 0x67, 0x35, 0x5f, 0x4f, 0xf4, 0xaf, 0x15, 0xed, 0x97, 0x17, 0xaf, 0x4d, 0x63, + 0xb8, 0xf1, 0x78, 0x8f, 0x16, 0xf8, 0x3d, 0xe0, 0xe1, 0x34, 0x21, 0x4c, 0xc2, 0x1a, 0xb0, 0x28, + 0x56, 0xb1, 0xea, 0xd0, 0xa2, 0x18, 0xba, 0x00, 0x84, 0x9c, 0xc9, 0x8c, 0xc7, 0x31, 0xc9, 0x1c, + 0x4b, 0xf1, 0x1f, 0x04, 0x1e, 0x81, 0x1a, 0x9a, 0xca, 0x09, 0x61, 0x92, 0x86, 0x48, 0x52, 0xce, + 0x9c, 0x52, 0xab, 0xd4, 0xae, 0x0e, 0x77, 0x28, 0x3c, 0x06, 0xff, 0x91, 0x10, 0x24, 0x2b, 0x9a, + 0x51, 0x42, 0xe4, 0x84, 0x63, 0xa7, 0xac, 0x9c, 0xff, 0xb6, 0xfc, 0x4a, 0x61, 0xd8, 0x05, 0xfb, + 0x21, 0x4a, 0xd1, 0x98, 0xc6, 0x54, 0xce, 0x46, 0x98, 0xc4, 0x24, 0xd2, 0x93, 0x7f, 0x29, 0x7f, + 0xfd, 0x5b, 0x1c, 0x6c, 0xb5, 0x9d, 0x10, 0x65, 0x39, 0xdf, 0x7c, 0xc7, 0xde, 0x0d, 0x5d, 0x6e, + 0x35, 0xe8, 0x80, 0x8a, 0x20, 0x59, 0x4e, 0x43, 0xe2, 0x54, 0x94, 0xed, 0xab, 0xf5, 0x0e, 0x81, + 0xad, 0x77, 0x75, 0x7e, 0xf0, 0x34, 0x6f, 0x1a, 0x1f, 0xf3, 0xa6, 0x79, 0xff, 0xfe, 0x7c, 0x02, + 0x8a, 0x7b, 0xe9, 0xb5, 0xf5, 0x7b, 0x8b, 0x95, 0x6b, 0x2e, 0x57, 0xae, 0xf9, 0xb6, 0x72, 0xcd, + 0x87, 0xb5, 0x6b, 0x2c, 0xd7, 0xae, 0xf1, 0xb2, 0x76, 0x8d, 0x5b, 0x2f, 0xa2, 0x72, 0x32, 0x1d, + 0xfb, 0x21, 0x4f, 0x02, 0xce, 0x04, 0x67, 0x59, 0xa0, 0x9e, 0xbb, 0xa0, 0x88, 0xcb, 0x59, 0x4a, + 0xc4, 0xd8, 0x56, 0x97, 0xeb, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x43, 0x9f, 0x66, 0x22, 0x02, + 0x02, 0x00, 0x00, } +func (this *Params) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + return true +} func (m *GenesisState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -311,6 +371,29 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -380,6 +463,15 @@ func (m *Document) Size() (n int) { return n } +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -743,6 +835,56 @@ func (m *Document) Unmarshal(dAtA []byte) error { } return nil } +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return 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 fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/params.go b/x/did/types/params.go index c2cb73eb5..fb4985cde 100644 --- a/x/did/types/params.go +++ b/x/did/types/params.go @@ -3,20 +3,11 @@ package types import ( "encoding/json" fmt "fmt" - - "github.com/onsonr/sonr/pkg/common/models/keyalgorithm" - "github.com/onsonr/sonr/pkg/common/models/keycurve" - "github.com/onsonr/sonr/pkg/common/models/keyencoding" - "github.com/onsonr/sonr/pkg/common/models/keyrole" ) // DefaultParams returns default module parameters. func DefaultParams() Params { - return Params{ - AllowedPublicKeys: DefaultKeyInfos(), - ConveyancePreference: "direct", - AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"}, - } + return Params{} } // DefaultSeedMessage returns the default seed message @@ -28,66 +19,6 @@ func DefaultSeedMessage() string { return fmt.Sprintf("%s %s %s %s", l1, l2, l3, l4) } -func DefaultKeyInfos() map[string]*KeyInfo { - return map[string]*KeyInfo{ - // Identity Key Info - // Sonr Controller Key Info - From MPC - "auth.dwn": { - Role: keyrole.Invocation.String(), - Curve: keycurve.P256.String(), - Algorithm: keyalgorithm.Ecdsa.String(), - Encoding: keyencoding.Hex.String(), - }, - - // Sonr Vault Shared Key Info - From Registration - "auth.zk": { - Role: keyrole.Assertion.String(), - Curve: keycurve.Bls12381.String(), - Algorithm: keyalgorithm.Es256k.String(), - Encoding: keyencoding.Multibase.String(), - }, - - // Blockchain Key Info - // Ethereum Key Info - "auth.ethereum": { - Role: keyrole.Delegation.String(), - Curve: keycurve.Keccak256.String(), - Algorithm: keyalgorithm.Ecdsa.String(), - Encoding: keyencoding.Hex.String(), - }, - // Bitcoin/IBC Key Info - "auth.bitcoin": { - Role: keyrole.Delegation.String(), - Curve: keycurve.Secp256k1.String(), - Algorithm: keyalgorithm.Ecdsa.String(), - Encoding: keyencoding.Hex.String(), - }, - - // Authentication Key Info - // Browser based WebAuthn - "webauthn.browser": { - Role: keyrole.Authentication.String(), - Curve: keycurve.P256.String(), - Algorithm: keyalgorithm.Es256.String(), - Encoding: keyencoding.Raw.String(), - }, - // FIDO U2F - "webauthn.fido": { - Role: keyrole.Authentication.String(), - Curve: keycurve.P256.String(), - Algorithm: keyalgorithm.Es256.String(), - Encoding: keyencoding.Raw.String(), - }, - // Cross-Platform Passkeys - "webauthn.passkey": { - Role: keyrole.Authentication.String(), - Curve: keycurve.Ed25519.String(), - Algorithm: keyalgorithm.Eddsa.String(), - Encoding: keyencoding.Raw.String(), - }, - } -} - // Stringer method for Params. func (p Params) String() string { bz, err := json.Marshal(p) @@ -103,13 +34,3 @@ func (p Params) Validate() error { // TODO: return nil } - -// # Genesis Structures -// -// Equal returns true if two key infos are equal -func (k *KeyInfo) Equal(b *KeyInfo) bool { - if k == nil && b == nil { - return true - } - return false -} diff --git a/x/did/types/params.pb.go b/x/did/types/params.pb.go deleted file mode 100644 index 5f551f6e0..000000000 --- a/x/did/types/params.pb.go +++ /dev/null @@ -1,931 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Params defines the set of module parameters. -type Params struct { - // Whitelisted Key Types - AllowedPublicKeys map[string]*KeyInfo `protobuf:"bytes,2,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // ConveyancePreference defines the conveyance preference - ConveyancePreference string `protobuf:"bytes,3,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` - // AttestationFormats defines the attestation formats - AttestationFormats []string `protobuf:"bytes,4,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_9d62d07335ae093e, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetAllowedPublicKeys() map[string]*KeyInfo { - if m != nil { - return m.AllowedPublicKeys - } - return nil -} - -func (m *Params) GetConveyancePreference() string { - if m != nil { - return m.ConveyancePreference - } - return "" -} - -func (m *Params) GetAttestationFormats() []string { - if m != nil { - return m.AttestationFormats - } - return nil -} - -// KeyInfo defines information for accepted PubKey types -type KeyInfo struct { - Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` - Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` - Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` - Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` -} - -func (m *KeyInfo) Reset() { *m = KeyInfo{} } -func (m *KeyInfo) String() string { return proto.CompactTextString(m) } -func (*KeyInfo) ProtoMessage() {} -func (*KeyInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_9d62d07335ae093e, []int{1} -} -func (m *KeyInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyInfo.Merge(m, src) -} -func (m *KeyInfo) XXX_Size() int { - return m.Size() -} -func (m *KeyInfo) XXX_DiscardUnknown() { - xxx_messageInfo_KeyInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyInfo proto.InternalMessageInfo - -func (m *KeyInfo) GetRole() string { - if m != nil { - return m.Role - } - return "" -} - -func (m *KeyInfo) GetAlgorithm() string { - if m != nil { - return m.Algorithm - } - return "" -} - -func (m *KeyInfo) GetEncoding() string { - if m != nil { - return m.Encoding - } - return "" -} - -func (m *KeyInfo) GetCurve() string { - if m != nil { - return m.Curve - } - return "" -} - -func init() { - proto.RegisterType((*Params)(nil), "did.v1.Params") - proto.RegisterMapType((map[string]*KeyInfo)(nil), "did.v1.Params.AllowedPublicKeysEntry") - proto.RegisterType((*KeyInfo)(nil), "did.v1.KeyInfo") -} - -func init() { proto.RegisterFile("did/v1/params.proto", fileDescriptor_9d62d07335ae093e) } - -var fileDescriptor_9d62d07335ae093e = []byte{ - // 412 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x73, 0x49, 0x1a, 0xc8, 0x75, 0x80, 0x5e, 0x02, 0x58, 0x11, 0x72, 0xa3, 0x48, 0x95, - 0x2c, 0x06, 0x9f, 0xda, 0x2e, 0xa8, 0x62, 0x01, 0x09, 0x24, 0xd4, 0x25, 0xb2, 0xd4, 0x85, 0xc5, - 0xba, 0xd8, 0x2f, 0xee, 0xa9, 0xf6, 0x3d, 0xeb, 0x7c, 0x36, 0xf8, 0x2b, 0x30, 0x31, 0x32, 0xf6, - 0x23, 0xb0, 0xf0, 0x1d, 0x18, 0x3b, 0x32, 0xa2, 0x64, 0x80, 0x8f, 0x81, 0x7c, 0x17, 0x5a, 0x84, - 0x58, 0x9e, 0xfe, 0xef, 0xfd, 0xfe, 0x7a, 0xef, 0xdd, 0x3b, 0x3a, 0x49, 0x65, 0xca, 0x9b, 0x63, - 0x5e, 0x0a, 0x2d, 0x8a, 0x2a, 0x2c, 0x35, 0x1a, 0x64, 0xa3, 0x54, 0xa6, 0x61, 0x73, 0x3c, 0x3b, - 0x10, 0x85, 0x54, 0xc8, 0x6d, 0x74, 0x68, 0x36, 0xcd, 0x30, 0x43, 0x2b, 0x79, 0xa7, 0x5c, 0x75, - 0xf1, 0xb5, 0x4f, 0x47, 0x4b, 0xdb, 0x81, 0x5d, 0xd0, 0x89, 0xc8, 0x73, 0x7c, 0x0f, 0x69, 0x5c, - 0xd6, 0xab, 0x5c, 0x26, 0xf1, 0x15, 0xb4, 0x95, 0xd7, 0x9f, 0x0f, 0x82, 0xfd, 0x93, 0xa3, 0xd0, - 0x75, 0x0e, 0x9d, 0x39, 0x7c, 0xe9, 0x9c, 0x4b, 0x6b, 0x3c, 0x87, 0xb6, 0x7a, 0xad, 0x8c, 0x6e, - 0xa3, 0x03, 0xf1, 0x6f, 0x9d, 0x9d, 0xd2, 0x47, 0x09, 0xaa, 0x06, 0x5a, 0xa1, 0x12, 0x88, 0x4b, - 0x0d, 0x6b, 0xd0, 0xa0, 0x12, 0xf0, 0x06, 0x73, 0x12, 0x8c, 0xa3, 0xe9, 0x1d, 0x5c, 0xde, 0x32, - 0xc6, 0xe9, 0x44, 0x18, 0x03, 0x95, 0x11, 0x46, 0xa2, 0x8a, 0xd7, 0xa8, 0x0b, 0x61, 0x2a, 0x6f, - 0x38, 0x1f, 0x04, 0xe3, 0x88, 0xfd, 0x85, 0xde, 0x38, 0x32, 0xbb, 0xa0, 0x8f, 0xff, 0xbf, 0x12, - 0x7b, 0x48, 0x07, 0x57, 0xd0, 0x7a, 0xc4, 0x4e, 0xeb, 0x24, 0x3b, 0xa2, 0x7b, 0x8d, 0xc8, 0x6b, - 0xf0, 0xfa, 0x73, 0x12, 0xec, 0x9f, 0x3c, 0xf8, 0xf3, 0xb4, 0x73, 0x68, 0xdf, 0xaa, 0x35, 0x46, - 0x8e, 0x9e, 0xf5, 0x9f, 0x93, 0xb3, 0x27, 0x9f, 0xaf, 0x0f, 0x7b, 0xbf, 0xae, 0x0f, 0xc9, 0xc7, - 0x9f, 0x5f, 0x9e, 0xd1, 0xee, 0xe2, 0xee, 0xdc, 0x8b, 0x82, 0xde, 0xdb, 0xd9, 0x19, 0xa3, 0x43, - 0x8d, 0x39, 0xec, 0x26, 0x58, 0xcd, 0x9e, 0xd2, 0xb1, 0xc8, 0x33, 0xd4, 0xd2, 0x5c, 0x16, 0x76, - 0xcc, 0x38, 0xba, 0x2b, 0xb0, 0x19, 0xbd, 0x0f, 0x2a, 0xc1, 0x54, 0xaa, 0x6c, 0x77, 0x85, 0xdb, - 0x9c, 0x4d, 0xe9, 0x5e, 0x52, 0xeb, 0x06, 0xbc, 0xa1, 0x05, 0x2e, 0x79, 0xf5, 0xe2, 0xdb, 0xc6, - 0x27, 0x37, 0x1b, 0x9f, 0xfc, 0xd8, 0xf8, 0xe4, 0xd3, 0xd6, 0xef, 0xdd, 0x6c, 0xfd, 0xde, 0xf7, - 0xad, 0xdf, 0x7b, 0xb7, 0xc8, 0xa4, 0xb9, 0xac, 0x57, 0x61, 0x82, 0x05, 0x47, 0x55, 0xa1, 0xd2, - 0xdc, 0x86, 0x0f, 0xbc, 0xdb, 0xd6, 0xb4, 0x25, 0x54, 0xab, 0x91, 0xfd, 0xeb, 0xd3, 0xdf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xd2, 0xa2, 0x88, 0x53, 0x33, 0x02, 0x00, 0x00, -} - -func (this *Params) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.AllowedPublicKeys) != len(that1.AllowedPublicKeys) { - return false - } - for i := range this.AllowedPublicKeys { - if !this.AllowedPublicKeys[i].Equal(that1.AllowedPublicKeys[i]) { - return false - } - } - if this.ConveyancePreference != that1.ConveyancePreference { - return false - } - if len(this.AttestationFormats) != len(that1.AttestationFormats) { - return false - } - for i := range this.AttestationFormats { - if this.AttestationFormats[i] != that1.AttestationFormats[i] { - return false - } - } - return true -} -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AttestationFormats) > 0 { - for iNdEx := len(m.AttestationFormats) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AttestationFormats[iNdEx]) - copy(dAtA[i:], m.AttestationFormats[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.AttestationFormats[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.ConveyancePreference) > 0 { - i -= len(m.ConveyancePreference) - copy(dAtA[i:], m.ConveyancePreference) - i = encodeVarintParams(dAtA, i, uint64(len(m.ConveyancePreference))) - i-- - dAtA[i] = 0x1a - } - if len(m.AllowedPublicKeys) > 0 { - for k := range m.AllowedPublicKeys { - v := m.AllowedPublicKeys[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintParams(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintParams(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - return len(dAtA) - i, nil -} - -func (m *KeyInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Curve) > 0 { - i -= len(m.Curve) - copy(dAtA[i:], m.Curve) - i = encodeVarintParams(dAtA, i, uint64(len(m.Curve))) - i-- - dAtA[i] = 0x22 - } - if len(m.Encoding) > 0 { - i -= len(m.Encoding) - copy(dAtA[i:], m.Encoding) - i = encodeVarintParams(dAtA, i, uint64(len(m.Encoding))) - i-- - dAtA[i] = 0x1a - } - if len(m.Algorithm) > 0 { - i -= len(m.Algorithm) - copy(dAtA[i:], m.Algorithm) - i = encodeVarintParams(dAtA, i, uint64(len(m.Algorithm))) - i-- - dAtA[i] = 0x12 - } - if len(m.Role) > 0 { - i -= len(m.Role) - copy(dAtA[i:], m.Role) - i = encodeVarintParams(dAtA, i, uint64(len(m.Role))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AllowedPublicKeys) > 0 { - for k, v := range m.AllowedPublicKeys { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovParams(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovParams(uint64(len(k))) + l - n += mapEntrySize + 1 + sovParams(uint64(mapEntrySize)) - } - } - l = len(m.ConveyancePreference) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - if len(m.AttestationFormats) > 0 { - for _, s := range m.AttestationFormats { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } - return n -} - -func (m *KeyInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Role) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = len(m.Algorithm) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = len(m.Encoding) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = len(m.Curve) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedPublicKeys", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AllowedPublicKeys == nil { - m.AllowedPublicKeys = make(map[string]*KeyInfo) - } - var mapkey string - var mapvalue *KeyInfo - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return 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 ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthParams - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthParams - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthParams - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthParams - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &KeyInfo{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.AllowedPublicKeys[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConveyancePreference = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttestationFormats = append(m.AttestationFormats, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: KeyInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Role = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Algorithm = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Encoding = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Curve = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index d9681537c..7476320de 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -456,37 +456,37 @@ func init() { func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 478 bytes of a gzipped FileDescriptorProto + // 474 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x53, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x8d, 0x53, 0xe2, 0xb6, 0x03, 0x94, 0xb0, 0x35, 0x91, 0x15, 0x22, 0x0b, 0xed, 0x01, 0x21, - 0x81, 0x6c, 0xa5, 0x5c, 0xe1, 0x82, 0xfa, 0x01, 0xe0, 0x22, 0x0e, 0x5c, 0xc0, 0xed, 0x0e, 0x66, - 0xd5, 0x64, 0xd7, 0xf5, 0xae, 0x2d, 0x2c, 0x04, 0x07, 0xbe, 0x00, 0xa9, 0x77, 0xbe, 0x87, 0x63, - 0x25, 0x2e, 0x1c, 0x51, 0xc2, 0x87, 0xa0, 0xac, 0xd7, 0x25, 0x1b, 0x89, 0x23, 0xea, 0xc5, 0xf2, - 0xbc, 0x79, 0xf3, 0xe6, 0x8d, 0x67, 0x0c, 0x84, 0x71, 0x96, 0xd4, 0xd3, 0xe4, 0xac, 0xc2, 0xb2, - 0x89, 0x8b, 0x52, 0x6a, 0x49, 0x7c, 0xc6, 0x59, 0x5c, 0x4f, 0xc7, 0x81, 0xcd, 0xe5, 0x28, 0x50, - 0x71, 0xd5, 0x66, 0xc7, 0xfb, 0x16, 0x2d, 0xb2, 0x32, 0x9b, 0x77, 0xe0, 0x24, 0x97, 0x32, 0x9f, - 0x61, 0x92, 0x15, 0x3c, 0xc9, 0x84, 0x90, 0x3a, 0xd3, 0x5c, 0x0a, 0x9b, 0xa5, 0x6f, 0xe1, 0xc6, - 0x8b, 0x95, 0x7e, 0x8a, 0x67, 0x15, 0x2a, 0x4d, 0x86, 0xb0, 0xc5, 0x38, 0x0b, 0xbd, 0x7b, 0xde, - 0x83, 0xdd, 0x74, 0xf5, 0x4a, 0x46, 0xe0, 0xcb, 0x92, 0xe7, 0x5c, 0x84, 0x7d, 0x03, 0xda, 0x68, - 0xc5, 0x3c, 0xc5, 0x26, 0xdc, 0x6a, 0x99, 0xa7, 0xd8, 0x90, 0x00, 0x06, 0x99, 0x52, 0xa8, 0xc3, - 0x6b, 0x06, 0x6b, 0x03, 0xfa, 0x14, 0xf6, 0x4d, 0x87, 0xe7, 0xc6, 0x54, 0x8a, 0xaa, 0x90, 0x42, - 0x21, 0xb9, 0x0f, 0x7e, 0x6b, 0xd3, 0xf4, 0xba, 0x7e, 0xb0, 0x17, 0xb7, 0xa3, 0xc5, 0x96, 0x67, - 0xb3, 0xf4, 0x10, 0x02, 0x6b, 0x50, 0xc9, 0x59, 0x8d, 0x97, 0xf5, 0x8f, 0x60, 0x87, 0xc9, 0x93, - 0x6a, 0x8e, 0x42, 0x5b, 0x85, 0x61, 0xa7, 0x70, 0x68, 0xf1, 0xf4, 0x92, 0x41, 0x3f, 0xc3, 0xd0, - 0xa8, 0x1c, 0xf1, 0x5c, 0xfc, 0xb7, 0x51, 0x49, 0x08, 0xdb, 0x73, 0x54, 0x2a, 0xcb, 0x31, 0x1c, - 0x18, 0xbc, 0x0b, 0xe9, 0x14, 0x6e, 0xaf, 0xf5, 0xb7, 0x23, 0x4c, 0x60, 0x57, 0xf1, 0x5c, 0x64, - 0xba, 0x2a, 0xd1, 0xda, 0xf8, 0x0b, 0xd0, 0x6f, 0x1e, 0x10, 0x53, 0xf3, 0x0a, 0x4b, 0xfe, 0xae, - 0xb9, 0x02, 0xd7, 0xae, 0x41, 0x7f, 0xd3, 0xe0, 0x43, 0xbb, 0xd8, 0xce, 0x9f, 0x9d, 0x2a, 0x80, - 0x41, 0x9d, 0xcd, 0xac, 0xc5, 0x9d, 0xb4, 0x0d, 0x0e, 0xce, 0xfb, 0x30, 0x30, 0x6c, 0x72, 0x04, - 0x7e, 0xbb, 0x62, 0x12, 0x74, 0x0b, 0x5b, 0xbf, 0xc0, 0xf1, 0x5d, 0x07, 0x75, 0xaf, 0x86, 0x8e, - 0xbe, 0xfc, 0xf8, 0x7d, 0xde, 0x1f, 0x92, 0xbd, 0xc4, 0x39, 0x75, 0xf2, 0x12, 0xb6, 0xed, 0x81, - 0xfc, 0x43, 0x75, 0xb2, 0x81, 0x3a, 0xc7, 0x44, 0xef, 0x18, 0xd9, 0x5b, 0xe4, 0x66, 0x27, 0xfb, - 0x91, 0x71, 0xf6, 0x89, 0xbc, 0x01, 0xbf, 0x1d, 0x8e, 0x8c, 0x9d, 0x72, 0x67, 0x23, 0x1b, 0x86, - 0xdd, 0xaf, 0x41, 0x27, 0x46, 0x79, 0x44, 0x03, 0x47, 0x39, 0xa9, 0x0d, 0xeb, 0xd9, 0x93, 0xef, - 0x8b, 0xc8, 0xbb, 0x58, 0x44, 0xde, 0xaf, 0x45, 0xe4, 0x7d, 0x5d, 0x46, 0xbd, 0x8b, 0x65, 0xd4, - 0xfb, 0xb9, 0x8c, 0x7a, 0xaf, 0x69, 0xce, 0xf5, 0xfb, 0xea, 0x38, 0x3e, 0x91, 0xf3, 0x44, 0x0a, - 0x25, 0x45, 0x99, 0x98, 0xc7, 0x07, 0xa3, 0xa3, 0x9b, 0x02, 0xd5, 0xb1, 0x6f, 0x7e, 0xe1, 0xc7, - 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x63, 0xf5, 0x0e, 0x9a, 0x29, 0x04, 0x00, 0x00, + 0x10, 0x8d, 0x53, 0xe2, 0xb6, 0x03, 0x94, 0xb0, 0x98, 0xc8, 0x0a, 0x91, 0x85, 0xf6, 0x80, 0x90, + 0x40, 0xb6, 0x52, 0xae, 0x70, 0x41, 0xfd, 0x00, 0x70, 0x11, 0x07, 0x2e, 0xb0, 0xed, 0x0e, 0x66, + 0xd5, 0x78, 0xd7, 0xf5, 0xae, 0x2d, 0x2c, 0x04, 0x07, 0xbe, 0x00, 0xa9, 0x77, 0xbe, 0x87, 0x63, + 0x25, 0x2e, 0x1c, 0x51, 0xc2, 0x87, 0xa0, 0xac, 0xd7, 0xa5, 0x8e, 0xc4, 0x11, 0x71, 0xb1, 0x3c, + 0x6f, 0xde, 0xbe, 0x7d, 0xe3, 0x79, 0x06, 0xc2, 0x05, 0x4f, 0xea, 0x79, 0x72, 0x5a, 0x61, 0xd9, + 0xc4, 0x45, 0xa9, 0x8c, 0x22, 0x3e, 0x17, 0x3c, 0xae, 0xe7, 0xd3, 0xc0, 0xf5, 0x32, 0x94, 0xa8, + 0x85, 0x6e, 0xbb, 0xd3, 0x59, 0xa6, 0x54, 0xb6, 0xc0, 0x84, 0x15, 0x22, 0x61, 0x52, 0x2a, 0xc3, + 0x8c, 0x50, 0xd2, 0x75, 0xe9, 0x1b, 0xb8, 0xf6, 0x7c, 0x2d, 0x95, 0xe2, 0x69, 0x85, 0xda, 0x90, + 0x31, 0x6c, 0x71, 0xc1, 0x43, 0xef, 0xae, 0x77, 0x7f, 0x37, 0x5d, 0xbf, 0x92, 0x09, 0xf8, 0xaa, + 0x14, 0x99, 0x90, 0xe1, 0xd0, 0x82, 0xae, 0x5a, 0x33, 0x4f, 0xb0, 0x09, 0xb7, 0x5a, 0xe6, 0x09, + 0x36, 0x24, 0x80, 0x11, 0xd3, 0x1a, 0x4d, 0x78, 0xc5, 0x62, 0x6d, 0x41, 0x9f, 0xc0, 0x2d, 0x7b, + 0xc3, 0x33, 0x56, 0xb2, 0x5c, 0xa7, 0xa8, 0x0b, 0x25, 0x35, 0x92, 0x7b, 0xe0, 0x17, 0x16, 0xb1, + 0x77, 0x5d, 0xdd, 0xdf, 0x8b, 0xdb, 0x29, 0x62, 0xc7, 0x73, 0x5d, 0x7a, 0x00, 0x81, 0x33, 0xa8, + 0xd5, 0xa2, 0xc6, 0x8b, 0xf3, 0x0f, 0x61, 0x87, 0xab, 0xe3, 0x2a, 0x47, 0x69, 0x9c, 0xc2, 0xb8, + 0x53, 0x38, 0x70, 0x78, 0x7a, 0xc1, 0xa0, 0x9f, 0x60, 0x6c, 0x55, 0x0e, 0x45, 0x26, 0xff, 0xd9, + 0xa8, 0x24, 0x84, 0xed, 0x1c, 0xb5, 0x66, 0x19, 0x86, 0x23, 0x8b, 0x77, 0x25, 0x9d, 0xc3, 0xcd, + 0x4b, 0xf7, 0xbb, 0x11, 0x66, 0xb0, 0xab, 0x45, 0x26, 0x99, 0xa9, 0x4a, 0x74, 0x36, 0xfe, 0x00, + 0xf4, 0xab, 0x07, 0xc4, 0x9e, 0x79, 0x89, 0xa5, 0x78, 0xdb, 0xfc, 0x07, 0xd7, 0x7d, 0x83, 0xfe, + 0xa6, 0xc1, 0x07, 0x6e, 0xb1, 0x9d, 0x3f, 0x37, 0x55, 0x00, 0xa3, 0x9a, 0x2d, 0x9c, 0xc5, 0x9d, + 0xb4, 0x2d, 0xf6, 0xcf, 0x86, 0x30, 0xb2, 0x6c, 0x72, 0x08, 0x7e, 0xbb, 0x62, 0x12, 0x74, 0x0b, + 0xbb, 0x9c, 0xc0, 0xe9, 0x9d, 0x1e, 0xda, 0x4f, 0x0d, 0x9d, 0x7c, 0xfe, 0xfe, 0xeb, 0x6c, 0x38, + 0x26, 0x7b, 0x89, 0xcb, 0x7a, 0x9b, 0x12, 0xf2, 0x02, 0xb6, 0x5d, 0x40, 0xfe, 0xa2, 0x3a, 0xdb, + 0x40, 0x7b, 0x61, 0xa2, 0xb7, 0xad, 0xec, 0x0d, 0x72, 0xbd, 0x93, 0xfd, 0xc0, 0x05, 0xff, 0x48, + 0x5e, 0x83, 0xdf, 0x0e, 0x47, 0xa6, 0xbd, 0xe3, 0xbd, 0x8d, 0x6c, 0x18, 0xee, 0x7f, 0x0d, 0x3a, + 0xb3, 0xca, 0x13, 0x1a, 0xf4, 0x94, 0x93, 0xda, 0xb2, 0x9e, 0x3e, 0xfe, 0xb6, 0x8c, 0xbc, 0xf3, + 0x65, 0xe4, 0xfd, 0x5c, 0x46, 0xde, 0x97, 0x55, 0x34, 0x38, 0x5f, 0x45, 0x83, 0x1f, 0xab, 0x68, + 0xf0, 0x8a, 0x66, 0xc2, 0xbc, 0xab, 0x8e, 0xe2, 0x63, 0x95, 0x27, 0x4a, 0x6a, 0x25, 0xcb, 0xc4, + 0x3e, 0xde, 0x5b, 0x1d, 0xd3, 0x14, 0xa8, 0x8f, 0x7c, 0xfb, 0x0b, 0x3f, 0xfa, 0x1d, 0x00, 0x00, + 0xff, 0xff, 0x3f, 0xf8, 0xe6, 0x18, 0x14, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index c1d6c5817..3e25a3a4f 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -783,56 +783,55 @@ func init() { func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 775 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x8e, 0x09, 0x04, 0x72, 0x48, 0x08, 0x77, 0x6e, 0xae, 0x62, 0x2c, 0x48, 0x22, 0x23, 0x74, - 0x11, 0x2a, 0x89, 0xa0, 0x52, 0x85, 0x68, 0xd5, 0x0a, 0x54, 0x2a, 0x10, 0x8d, 0xd4, 0xba, 0x74, - 0xc3, 0x26, 0x35, 0xf6, 0xc8, 0x71, 0x49, 0x3c, 0x91, 0x67, 0x82, 0x92, 0x5d, 0xd5, 0x27, 0xe8, - 0x0b, 0xf4, 0x09, 0xba, 0x61, 0xd1, 0x55, 0xd5, 0x07, 0x60, 0x89, 0xba, 0xea, 0xaa, 0xaa, 0x40, - 0x2a, 0x4f, 0xd0, 0x65, 0xa5, 0x6a, 0xfc, 0x17, 0x3b, 0x3f, 0x05, 0x01, 0xea, 0x26, 0xf2, 0x39, - 0xdf, 0x39, 0xdf, 0x7c, 0xe7, 0xf3, 0xcc, 0xc4, 0x90, 0xd1, 0x4d, 0xbd, 0x7c, 0xb4, 0x52, 0x66, - 0xed, 0x52, 0xd3, 0x26, 0x8c, 0xa0, 0x84, 0x6e, 0xea, 0xa5, 0xa3, 0x15, 0x29, 0xa7, 0x11, 0xda, - 0x20, 0xb4, 0xdc, 0xa0, 0x06, 0xc7, 0x1b, 0xd4, 0x70, 0x0b, 0xa4, 0x19, 0x17, 0xa8, 0x3a, 0x51, - 0xd9, 0x0d, 0x3c, 0x28, 0xeb, 0x91, 0x19, 0xd8, 0xc2, 0xd4, 0xf4, 0xb3, 0xff, 0x7a, 0xd9, 0xa6, - 0x6a, 0xab, 0x8d, 0xa0, 0xd4, 0x20, 0x06, 0x71, 0x29, 0xf8, 0x93, 0x9b, 0x95, 0x7f, 0x08, 0xf0, - 0x5f, 0x85, 0x1a, 0x4f, 0x4d, 0xeb, 0x70, 0xa3, 0xc5, 0x6a, 0xd8, 0x62, 0xa6, 0xa6, 0x32, 0x93, - 0x58, 0x68, 0x0d, 0x40, 0x23, 0x16, 0xb3, 0x49, 0xbd, 0x8e, 0x6d, 0x51, 0x28, 0x0a, 0x8b, 0xc9, - 0x4d, 0xf1, 0xcb, 0xc7, 0xe5, 0xac, 0x27, 0x60, 0x43, 0xd7, 0x6d, 0x4c, 0xe9, 0x0b, 0x66, 0x9b, - 0x96, 0xa1, 0x84, 0x6a, 0x91, 0x08, 0xe3, 0xb4, 0x75, 0xf0, 0x1a, 0x6b, 0x4c, 0x1c, 0xe1, 0x6d, - 0x8a, 0x1f, 0xa2, 0x59, 0x48, 0xaa, 0x94, 0x62, 0x9b, 0x2f, 0x20, 0xc6, 0x1d, 0xac, 0x9b, 0x40, - 0xf3, 0x90, 0xd6, 0x6c, 0xac, 0x73, 0x0d, 0x6a, 0xbd, 0x6a, 0xea, 0xe2, 0x68, 0x51, 0x58, 0x4c, - 0x29, 0xa9, 0x6e, 0x72, 0x47, 0x47, 0x0b, 0x30, 0xd5, 0x50, 0x35, 0xd5, 0x26, 0xc4, 0xaa, 0x32, - 0x72, 0x88, 0x2d, 0x71, 0xcc, 0xe1, 0x49, 0xfb, 0xd9, 0x3d, 0x9e, 0x5c, 0xcf, 0xbc, 0xbd, 0x38, - 0x5e, 0x0a, 0x89, 0x92, 0x77, 0x61, 0x6e, 0xe0, 0x9c, 0x0a, 0xa6, 0x4d, 0x62, 0x51, 0xec, 0xaa, - 0xd6, 0x34, 0x4c, 0xa9, 0x33, 0xec, 0x84, 0xe2, 0x87, 0x68, 0x1a, 0xe2, 0xba, 0xa9, 0x7b, 0xb3, - 0xf0, 0x47, 0xf9, 0xb3, 0x00, 0xd3, 0x3e, 0x5b, 0x20, 0xff, 0xef, 0x1b, 0xd6, 0xef, 0xc5, 0xe8, - 0x95, 0xbc, 0x78, 0x02, 0x62, 0xaf, 0xfa, 0x6b, 0xd9, 0xf0, 0x4b, 0x80, 0x54, 0x85, 0x1a, 0x5b, - 0x6d, 0xac, 0xb5, 0x18, 0xde, 0x6b, 0xdf, 0xc0, 0x82, 0x87, 0x30, 0xd1, 0xc0, 0x94, 0xaa, 0x06, - 0xa6, 0xe2, 0x48, 0x31, 0xbe, 0x38, 0xb9, 0x2a, 0x97, 0xdc, 0x73, 0x51, 0x0a, 0xaf, 0x50, 0xaa, - 0x78, 0x45, 0x5b, 0x16, 0xb3, 0x3b, 0x4a, 0xd0, 0x33, 0xc0, 0x8a, 0xf8, 0x00, 0x2b, 0xa4, 0xfb, - 0x90, 0x8e, 0x30, 0xf0, 0xa1, 0x0e, 0x71, 0xc7, 0x95, 0xaa, 0xf0, 0x47, 0x94, 0x85, 0xb1, 0x23, - 0xb5, 0xde, 0xc2, 0xce, 0xa0, 0x29, 0xc5, 0x0d, 0xd6, 0x47, 0xd6, 0x84, 0x7e, 0x1f, 0x77, 0x20, - 0x1b, 0x16, 0x77, 0x05, 0x0f, 0x73, 0x30, 0xce, 0xda, 0xd5, 0x9a, 0x4a, 0x6b, 0x9e, 0x8f, 0x09, - 0xd6, 0xde, 0x56, 0x69, 0x4d, 0xfe, 0x20, 0x00, 0xaa, 0x50, 0xe3, 0xa5, 0x55, 0xbf, 0xa5, 0x3d, - 0x35, 0x0f, 0xe9, 0x60, 0xa3, 0x54, 0xbb, 0xef, 0x2d, 0x15, 0x24, 0x1f, 0x9b, 0xfa, 0x15, 0x5d, - 0xeb, 0x1f, 0x7c, 0x1b, 0xa4, 0x7e, 0xb1, 0xd7, 0xda, 0x42, 0x9f, 0x04, 0xc8, 0x75, 0xa9, 0x6e, - 0xeb, 0x06, 0x5a, 0x06, 0xa4, 0x46, 0xb8, 0x42, 0x0e, 0xfc, 0x13, 0x45, 0x6e, 0x62, 0x43, 0x05, - 0x0a, 0x43, 0xb4, 0x5f, 0xcb, 0x8b, 0xf7, 0x02, 0x64, 0x38, 0x5f, 0x53, 0x57, 0x19, 0x7e, 0xe6, - 0xdc, 0xdd, 0xe8, 0x1e, 0x24, 0xb9, 0x5e, 0x62, 0x9b, 0xac, 0x73, 0xa9, 0x05, 0xdd, 0x52, 0x74, - 0x07, 0x12, 0xee, 0xed, 0xef, 0x2c, 0x30, 0xb9, 0x3a, 0xe5, 0x9f, 0x26, 0x97, 0x77, 0x73, 0xf4, - 0xe4, 0x5b, 0x21, 0xa6, 0x78, 0x35, 0x7c, 0xcf, 0x87, 0xe7, 0x76, 0x83, 0xf5, 0x29, 0x3e, 0x6f, - 0x97, 0x53, 0x9e, 0x71, 0x5f, 0x55, 0x48, 0x9e, 0x3f, 0xe6, 0xea, 0xcf, 0x38, 0xc4, 0x2b, 0xd4, - 0x40, 0x8f, 0x20, 0xd9, 0xbd, 0x0d, 0xb2, 0x83, 0x4e, 0xb0, 0x34, 0x3b, 0x28, 0x1b, 0xf8, 0xb5, - 0x0b, 0xe9, 0xe8, 0xad, 0x2a, 0x86, 0xca, 0x23, 0x88, 0x54, 0x1c, 0x86, 0x04, 0x64, 0xfb, 0x80, - 0x06, 0xfc, 0xb1, 0xcd, 0xf5, 0xf6, 0x45, 0x60, 0x69, 0xe1, 0x8f, 0x70, 0xc0, 0xfd, 0x1c, 0x32, - 0xbd, 0x87, 0x55, 0x0a, 0x75, 0xf6, 0x60, 0x92, 0x3c, 0x1c, 0x0b, 0x28, 0x5f, 0x41, 0x76, 0xe0, - 0x39, 0x28, 0xf4, 0xf7, 0x46, 0x25, 0xff, 0x7f, 0x49, 0x41, 0xb0, 0xc2, 0x36, 0xa4, 0x22, 0xbb, - 0x2b, 0x17, 0x6e, 0x0c, 0x01, 0x52, 0x61, 0x08, 0xe0, 0x33, 0x49, 0x63, 0x6f, 0x2e, 0x8e, 0x97, - 0x84, 0xcd, 0x07, 0x27, 0x67, 0x79, 0xe1, 0xf4, 0x2c, 0x2f, 0x7c, 0x3f, 0xcb, 0x0b, 0xef, 0xce, - 0xf3, 0xb1, 0xd3, 0xf3, 0x7c, 0xec, 0xeb, 0x79, 0x3e, 0xb6, 0x2f, 0x1b, 0x26, 0xab, 0xb5, 0x0e, - 0x4a, 0x1a, 0x69, 0x94, 0x89, 0x45, 0x89, 0x65, 0x97, 0x9d, 0x9f, 0x76, 0x99, 0x7f, 0x9c, 0xb0, - 0x4e, 0x13, 0xd3, 0x83, 0x84, 0xf3, 0x0d, 0x72, 0xf7, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x35, - 0x86, 0x16, 0x4d, 0x13, 0x09, 0x00, 0x00, + // 767 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x4e, 0xdb, 0x4c, + 0x14, 0xcd, 0x10, 0x08, 0xe4, 0x92, 0x10, 0xbe, 0x51, 0x3e, 0xc5, 0x58, 0x90, 0x44, 0x46, 0xa8, + 0x08, 0x95, 0x44, 0x50, 0xa9, 0x42, 0xb4, 0x6a, 0x05, 0x2a, 0x15, 0x88, 0x46, 0x6a, 0x5d, 0xba, + 0x61, 0x93, 0x1a, 0x7b, 0xe4, 0xb8, 0x24, 0x9e, 0xc8, 0x33, 0x41, 0xc9, 0xae, 0xea, 0x13, 0xf4, + 0x05, 0xfa, 0x04, 0xdd, 0xb0, 0xe8, 0xaa, 0xea, 0x03, 0xb0, 0x44, 0x5d, 0x75, 0x55, 0x55, 0x20, + 0x95, 0x27, 0xe8, 0xb2, 0x52, 0x35, 0x76, 0xe2, 0xd8, 0xf9, 0x29, 0x08, 0x50, 0x37, 0x91, 0xef, + 0x3d, 0xf7, 0x9e, 0x39, 0xf7, 0x78, 0x66, 0x62, 0x48, 0x19, 0x96, 0x51, 0x3c, 0x5a, 0x29, 0xf2, + 0x66, 0xa1, 0xee, 0x50, 0x4e, 0x71, 0xcc, 0xb0, 0x8c, 0xc2, 0xd1, 0x8a, 0x9c, 0xd1, 0x29, 0xab, + 0x51, 0x56, 0xac, 0x31, 0x53, 0xe0, 0x35, 0x66, 0x7a, 0x05, 0xf2, 0x8c, 0x07, 0x94, 0xdd, 0xa8, + 0xe8, 0x05, 0x6d, 0x28, 0xdd, 0x26, 0x33, 0x89, 0x4d, 0x98, 0xe5, 0x67, 0x4d, 0x6a, 0x52, 0xaf, + 0x5a, 0x3c, 0x79, 0x59, 0xe5, 0x27, 0x82, 0xff, 0x4b, 0xcc, 0x7c, 0x66, 0xd9, 0x87, 0x1b, 0x0d, + 0x5e, 0x21, 0x36, 0xb7, 0x74, 0x8d, 0x5b, 0xd4, 0xc6, 0x6b, 0x00, 0x3a, 0xb5, 0xb9, 0x43, 0xab, + 0x55, 0xe2, 0x48, 0x28, 0x8f, 0x16, 0xe3, 0x9b, 0xd2, 0xd7, 0x4f, 0xcb, 0xe9, 0xf6, 0x5a, 0x1b, + 0x86, 0xe1, 0x10, 0xc6, 0x5e, 0x72, 0xc7, 0xb2, 0x4d, 0x35, 0x50, 0x8b, 0x25, 0x18, 0x67, 0x8d, + 0x83, 0x37, 0x44, 0xe7, 0xd2, 0x88, 0x68, 0x53, 0x3b, 0x21, 0x9e, 0x85, 0xb8, 0xc6, 0x18, 0x71, + 0xc4, 0x02, 0x52, 0xd4, 0xc5, 0xba, 0x09, 0x3c, 0x0f, 0x49, 0xdd, 0x21, 0x86, 0xd0, 0xa0, 0x55, + 0xcb, 0x96, 0x21, 0x8d, 0xe6, 0xd1, 0x62, 0x42, 0x4d, 0x74, 0x93, 0x3b, 0x06, 0x5e, 0x80, 0xa9, + 0x9a, 0xa6, 0x6b, 0x0e, 0xa5, 0x76, 0x99, 0xd3, 0x43, 0x62, 0x4b, 0x63, 0x2e, 0x4f, 0xb2, 0x93, + 0xdd, 0x13, 0xc9, 0xf5, 0xd4, 0xbb, 0x8b, 0xe3, 0xa5, 0x80, 0x28, 0x65, 0x17, 0xe6, 0x06, 0xce, + 0xa9, 0x12, 0x56, 0xa7, 0x36, 0x23, 0x9e, 0x6a, 0x5d, 0x27, 0x8c, 0xb9, 0xc3, 0x4e, 0xa8, 0x9d, + 0x10, 0x4f, 0x43, 0xd4, 0xb0, 0x8c, 0xf6, 0x2c, 0xe2, 0x51, 0xf9, 0x82, 0x60, 0xba, 0xc3, 0xe6, + 0xcb, 0xff, 0xf7, 0x86, 0xf5, 0x7b, 0x31, 0x7a, 0x25, 0x2f, 0x9e, 0x82, 0xd4, 0xab, 0xfe, 0x5a, + 0x36, 0xfc, 0x46, 0x90, 0x28, 0x31, 0x73, 0xab, 0x49, 0xf4, 0x06, 0x27, 0x7b, 0xcd, 0x1b, 0x58, + 0xf0, 0x08, 0x26, 0x6a, 0x84, 0x31, 0xcd, 0x24, 0x4c, 0x1a, 0xc9, 0x47, 0x17, 0x27, 0x57, 0x95, + 0x82, 0x77, 0x04, 0x0a, 0xc1, 0x15, 0x0a, 0xa5, 0x76, 0xd1, 0x96, 0xcd, 0x9d, 0x96, 0xea, 0xf7, + 0x0c, 0xb0, 0x22, 0x3a, 0xc0, 0x0a, 0xf9, 0x01, 0x24, 0x43, 0x0c, 0x62, 0xa8, 0x43, 0xd2, 0xf2, + 0xa4, 0xaa, 0xe2, 0x11, 0xa7, 0x61, 0xec, 0x48, 0xab, 0x36, 0x88, 0x3b, 0x68, 0x42, 0xf5, 0x82, + 0xf5, 0x91, 0x35, 0xd4, 0xef, 0xe3, 0x0e, 0xa4, 0x83, 0xe2, 0xae, 0xe0, 0x61, 0x06, 0xc6, 0x79, + 0xb3, 0x5c, 0xd1, 0x58, 0xa5, 0xed, 0x63, 0x8c, 0x37, 0xb7, 0x35, 0x56, 0x51, 0x3e, 0x22, 0xc0, + 0x25, 0x66, 0xbe, 0xb2, 0xab, 0xb7, 0xb4, 0xa7, 0xe6, 0x21, 0xe9, 0x6f, 0x94, 0x72, 0xf7, 0xbd, + 0x25, 0xfc, 0xe4, 0x13, 0xcb, 0xb8, 0xa2, 0x6b, 0xfd, 0x83, 0x6f, 0x83, 0xdc, 0x2f, 0xf6, 0x5a, + 0x5b, 0xe8, 0x33, 0x82, 0x4c, 0x97, 0xea, 0xb6, 0x6e, 0xa0, 0x65, 0xc0, 0x5a, 0x88, 0x2b, 0xe0, + 0xc0, 0x7f, 0x61, 0xe4, 0x26, 0x36, 0x94, 0x20, 0x37, 0x44, 0xfb, 0xb5, 0xbc, 0xf8, 0x80, 0x20, + 0x25, 0xf8, 0xea, 0x86, 0xc6, 0xc9, 0x73, 0xcd, 0xd1, 0x6a, 0x0c, 0xdf, 0x87, 0xb8, 0xd0, 0x4b, + 0x1d, 0x8b, 0xb7, 0x2e, 0xb5, 0xa0, 0x5b, 0x8a, 0xef, 0x42, 0xac, 0xee, 0x32, 0xb8, 0x0b, 0x4c, + 0xae, 0x4e, 0x75, 0x4e, 0x93, 0xc7, 0xbb, 0x39, 0x7a, 0xf2, 0x3d, 0x17, 0x51, 0xdb, 0x35, 0x62, + 0xcf, 0x07, 0xe7, 0xf6, 0x82, 0xf5, 0x29, 0x31, 0x6f, 0x97, 0x53, 0x99, 0xf1, 0x5e, 0x55, 0x40, + 0x5e, 0x67, 0xcc, 0xd5, 0x5f, 0x51, 0x88, 0x96, 0x98, 0x89, 0x1f, 0x43, 0xbc, 0x7b, 0x1b, 0xa4, + 0x07, 0x9d, 0x60, 0x79, 0x76, 0x50, 0xd6, 0xf7, 0x6b, 0x17, 0x92, 0xe1, 0x5b, 0x55, 0x0a, 0x94, + 0x87, 0x10, 0x39, 0x3f, 0x0c, 0xf1, 0xc9, 0xf6, 0x01, 0x0f, 0xf8, 0x63, 0x9b, 0xeb, 0xed, 0x0b, + 0xc1, 0xf2, 0xc2, 0x5f, 0x61, 0x9f, 0xfb, 0x05, 0xa4, 0x7a, 0x0f, 0xab, 0x1c, 0xe8, 0xec, 0xc1, + 0x64, 0x65, 0x38, 0xe6, 0x53, 0xbe, 0x86, 0xf4, 0xc0, 0x73, 0x90, 0xeb, 0xef, 0x0d, 0x4b, 0xbe, + 0x73, 0x49, 0x81, 0xbf, 0xc2, 0x36, 0x24, 0x42, 0xbb, 0x2b, 0x13, 0x6c, 0x0c, 0x00, 0x72, 0x6e, + 0x08, 0xd0, 0x61, 0x92, 0xc7, 0xde, 0x5e, 0x1c, 0x2f, 0xa1, 0xcd, 0x87, 0x27, 0x67, 0x59, 0x74, + 0x7a, 0x96, 0x45, 0x3f, 0xce, 0xb2, 0xe8, 0xfd, 0x79, 0x36, 0x72, 0x7a, 0x9e, 0x8d, 0x7c, 0x3b, + 0xcf, 0x46, 0xf6, 0x15, 0xd3, 0xe2, 0x95, 0xc6, 0x41, 0x41, 0xa7, 0xb5, 0x22, 0xb5, 0x19, 0xb5, + 0x9d, 0xa2, 0xfb, 0xd3, 0x2c, 0x8a, 0xaf, 0x13, 0xde, 0xaa, 0x13, 0x76, 0x10, 0x73, 0xbf, 0x41, + 0xee, 0xfd, 0x09, 0x00, 0x00, 0xff, 0xff, 0x93, 0x06, 0x64, 0x08, 0xfe, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/dwn/types/attns/ATN.pkl.go b/x/dwn/types/attns/ATN.pkl.go new file mode 100644 index 000000000..83be0a801 --- /dev/null +++ b/x/dwn/types/attns/ATN.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT. +package attns + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type ATN struct { +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a ATN +func LoadFromPath(ctx context.Context, path string) (ret *ATN, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a ATN +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*ATN, error) { + var ret ATN + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/x/dwn/types/attns/base.go b/x/dwn/types/attns/base.go new file mode 100644 index 000000000..4c2c35262 --- /dev/null +++ b/x/dwn/types/attns/base.go @@ -0,0 +1,109 @@ +package attns + +import ( + "github.com/onsonr/sonr/x/dwn/types/attns/capability" + "github.com/onsonr/sonr/x/dwn/types/attns/policytype" + "github.com/onsonr/sonr/x/dwn/types/attns/resourcetype" + "github.com/ucan-wg/go-ucan" +) + +const ( + CapOwner = capability.CAPOWNER + CapOperator = capability.CAPOPERATOR + CapObserver = capability.CAPOBSERVER + CapAuthenticate = capability.CAPAUTHENTICATE + CapAuthorize = capability.CAPAUTHORIZE + CapDelegate = capability.CAPDELEGATE + CapInvoke = capability.CAPINVOKE + CapExecute = capability.CAPEXECUTE + CapPropose = capability.CAPPROPOSE + CapSign = capability.CAPSIGN + CapSetPolicy = capability.CAPSETPOLICY + CapSetThreshold = capability.CAPSETTHRESHOLD + CapRecover = capability.CAPRECOVER + CapSocial = capability.CAPSOCIAL + + ResAccount = resourcetype.RESACCOUNT + ResTransaction = resourcetype.RESTRANSACTION + ResPolicy = resourcetype.RESPOLICY + ResRecovery = resourcetype.RESRECOVERY + ResVault = resourcetype.RESVAULT + + PolicyThreshold = policytype.POLICYTHRESHOLD + PolicyTimelock = policytype.POLICYTIMELOCK + PolicyWhitelist = policytype.POLICYWHITELIST +) + +// NewVaultResource creates a new resource identifier +func NewResource(resType resourcetype.ResourceType, path string) ucan.Resource { + return ucan.NewStringLengthResource(string(resType), path) +} + +// Attenuation represents the type of attenuation +type Attenuation string + +const ( + // AttentuationSmartAccount represents the smart account attenuation + AttentuationSmartAccount = Attenuation("smart_account") + + // AttentuationVault represents the vault attenuation + AttentuationVault = Attenuation("vault") +) + +// Cap returns the capability for the given Attenuation +func (a Attenuation) NewCap(c capability.Capability) ucan.Capability { + return a.GetCapabilities().Cap(c.String()) +} + +// NestedCapabilities returns the nested capabilities for the given Attenuation +func (a Attenuation) GetCapabilities() ucan.NestedCapabilities { + var caps []string + switch a { + case AttentuationSmartAccount: + caps = baseSmartAccountCapabilities() + case AttentuationVault: + caps = baseVaultCapabilities() + } + return ucan.NewNestedCapabilities(caps...) +} + +// Equals returns true if the given Attenuation is equal to the receiver +func (a Attenuation) Equals(b Attenuation) bool { + return a == b +} + +// String returns the string representation of the Attenuation +func (a Attenuation) String() string { + return string(a) +} + +// SmartAccountCapabilities defines the capability hierarchy +func baseSmartAccountCapabilities() []string { + return []string{ + CapOwner.String(), + CapOperator.String(), + CapObserver.String(), + CapExecute.String(), + CapPropose.String(), + CapSign.String(), + CapSetPolicy.String(), + CapSetThreshold.String(), + CapRecover.String(), + CapSocial.String(), + } +} + +// VaultCapabilities defines the capability hierarchy +func baseVaultCapabilities() []string { + return []string{ + CapOwner.String(), + CapOperator.String(), + CapObserver.String(), + CapAuthenticate.String(), + CapAuthorize.String(), + CapDelegate.String(), + CapInvoke.String(), + CapExecute.String(), + CapRecover.String(), + } +} diff --git a/x/dwn/types/attns/capability/Capability.pkl.go b/x/dwn/types/attns/capability/Capability.pkl.go new file mode 100644 index 000000000..f9d3dca83 --- /dev/null +++ b/x/dwn/types/attns/capability/Capability.pkl.go @@ -0,0 +1,73 @@ +// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT. +package capability + +import ( + "encoding" + "fmt" +) + +type Capability string + +const ( + CAPOWNER Capability = "CAP_OWNER" + CAPOPERATOR Capability = "CAP_OPERATOR" + CAPOBSERVER Capability = "CAP_OBSERVER" + CAPAUTHENTICATE Capability = "CAP_AUTHENTICATE" + CAPAUTHORIZE Capability = "CAP_AUTHORIZE" + CAPDELEGATE Capability = "CAP_DELEGATE" + CAPINVOKE Capability = "CAP_INVOKE" + CAPEXECUTE Capability = "CAP_EXECUTE" + CAPPROPOSE Capability = "CAP_PROPOSE" + CAPSIGN Capability = "CAP_SIGN" + CAPSETPOLICY Capability = "CAP_SET_POLICY" + CAPSETTHRESHOLD Capability = "CAP_SET_THRESHOLD" + CAPRECOVER Capability = "CAP_RECOVER" + CAPSOCIAL Capability = "CAP_SOCIAL" + CAPVOTE Capability = "CAP_VOTE" +) + +// String returns the string representation of Capability +func (rcv Capability) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(Capability) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for Capability. +func (rcv *Capability) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "CAP_OWNER": + *rcv = CAPOWNER + case "CAP_OPERATOR": + *rcv = CAPOPERATOR + case "CAP_OBSERVER": + *rcv = CAPOBSERVER + case "CAP_AUTHENTICATE": + *rcv = CAPAUTHENTICATE + case "CAP_AUTHORIZE": + *rcv = CAPAUTHORIZE + case "CAP_DELEGATE": + *rcv = CAPDELEGATE + case "CAP_INVOKE": + *rcv = CAPINVOKE + case "CAP_EXECUTE": + *rcv = CAPEXECUTE + case "CAP_PROPOSE": + *rcv = CAPPROPOSE + case "CAP_SIGN": + *rcv = CAPSIGN + case "CAP_SET_POLICY": + *rcv = CAPSETPOLICY + case "CAP_SET_THRESHOLD": + *rcv = CAPSETTHRESHOLD + case "CAP_RECOVER": + *rcv = CAPRECOVER + case "CAP_SOCIAL": + *rcv = CAPSOCIAL + case "CAP_VOTE": + *rcv = CAPVOTE + default: + return fmt.Errorf(`illegal: "%s" is not a valid Capability`, str) + } + return nil +} diff --git a/x/dwn/types/attns/init.pkl.go b/x/dwn/types/attns/init.pkl.go new file mode 100644 index 000000000..7df3d778f --- /dev/null +++ b/x/dwn/types/attns/init.pkl.go @@ -0,0 +1,8 @@ +// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT. +package attns + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("sonr.motr.ATN", ATN{}) +} diff --git a/x/dwn/types/attns/policytype/PolicyType.pkl.go b/x/dwn/types/attns/policytype/PolicyType.pkl.go new file mode 100644 index 000000000..9c15fa98a --- /dev/null +++ b/x/dwn/types/attns/policytype/PolicyType.pkl.go @@ -0,0 +1,37 @@ +// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT. +package policytype + +import ( + "encoding" + "fmt" +) + +type PolicyType string + +const ( + POLICYTHRESHOLD PolicyType = "POLICY_THRESHOLD" + POLICYTIMELOCK PolicyType = "POLICY_TIMELOCK" + POLICYWHITELIST PolicyType = "POLICY_WHITELIST" +) + +// String returns the string representation of PolicyType +func (rcv PolicyType) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(PolicyType) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for PolicyType. +func (rcv *PolicyType) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "POLICY_THRESHOLD": + *rcv = POLICYTHRESHOLD + case "POLICY_TIMELOCK": + *rcv = POLICYTIMELOCK + case "POLICY_WHITELIST": + *rcv = POLICYWHITELIST + default: + return fmt.Errorf(`illegal: "%s" is not a valid PolicyType`, str) + } + return nil +} diff --git a/x/dwn/types/attns/resourcetype/ResourceType.pkl.go b/x/dwn/types/attns/resourcetype/ResourceType.pkl.go new file mode 100644 index 000000000..870927624 --- /dev/null +++ b/x/dwn/types/attns/resourcetype/ResourceType.pkl.go @@ -0,0 +1,43 @@ +// Code generated from Pkl module `sonr.motr.ATN`. DO NOT EDIT. +package resourcetype + +import ( + "encoding" + "fmt" +) + +type ResourceType string + +const ( + RESACCOUNT ResourceType = "RES_ACCOUNT" + RESTRANSACTION ResourceType = "RES_TRANSACTION" + RESPOLICY ResourceType = "RES_POLICY" + RESRECOVERY ResourceType = "RES_RECOVERY" + RESVAULT ResourceType = "RES_VAULT" +) + +// String returns the string representation of ResourceType +func (rcv ResourceType) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(ResourceType) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for ResourceType. +func (rcv *ResourceType) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "RES_ACCOUNT": + *rcv = RESACCOUNT + case "RES_TRANSACTION": + *rcv = RESTRANSACTION + case "RES_POLICY": + *rcv = RESPOLICY + case "RES_RECOVERY": + *rcv = RESRECOVERY + case "RES_VAULT": + *rcv = RESVAULT + default: + return fmt.Errorf(`illegal: "%s" is not a valid ResourceType`, str) + } + return nil +} diff --git a/x/dwn/types/attns/smart_account.go b/x/dwn/types/attns/smart_account.go new file mode 100644 index 000000000..8251b4ddb --- /dev/null +++ b/x/dwn/types/attns/smart_account.go @@ -0,0 +1,46 @@ +package attns + +import ( + "fmt" + + "github.com/onsonr/sonr/x/dwn/types/attns/capability" + "github.com/onsonr/sonr/x/dwn/types/attns/policytype" + "github.com/ucan-wg/go-ucan" +) + +// CreateSmartAccountAttenuations creates default attenuations for a smart account +func CreateSmartAccountAttenuations( + accountAddr string, +) ucan.Attenuations { + caps := AttentuationSmartAccount.GetCapabilities() + return ucan.Attenuations{ + // Owner capabilities + {Cap: caps.Cap(CapOwner.String()), Rsc: NewResource(ResAccount, accountAddr)}, + + // Operation capabilities + {Cap: caps.Cap(capability.CAPEXECUTE.String()), Rsc: NewResource(ResTransaction, fmt.Sprintf("%s:*", accountAddr))}, + {Cap: caps.Cap(capability.CAPPROPOSE.String()), Rsc: NewResource(ResTransaction, fmt.Sprintf("%s:*", accountAddr))}, + {Cap: caps.Cap(capability.CAPSIGN.String()), Rsc: NewResource(ResTransaction, fmt.Sprintf("%s:*", accountAddr))}, + + // Policy capabilities + {Cap: caps.Cap(capability.CAPSETPOLICY.String()), Rsc: NewResource(ResPolicy, fmt.Sprintf("%s:*", accountAddr))}, + {Cap: caps.Cap(capability.CAPSETTHRESHOLD.String()), Rsc: NewResource(ResPolicy, fmt.Sprintf("%s:threshold", accountAddr))}, + } +} + +// CreateSmartAccountPolicyAttenuation creates attenuations for policy management +func CreateSmartAccountPolicyAttenuation( + accountAddr string, + policyType policytype.PolicyType, +) ucan.Attenuations { + caps := AttentuationSmartAccount.GetCapabilities() + return ucan.Attenuations{ + { + Cap: caps.Cap(capability.CAPSETPOLICY.String()), + Rsc: NewResource( + ResPolicy, + fmt.Sprintf("%s:%s", accountAddr, policyType), + ), + }, + } +} diff --git a/x/dwn/types/attns/vault.go b/x/dwn/types/attns/vault.go new file mode 100644 index 000000000..bf3b01eed --- /dev/null +++ b/x/dwn/types/attns/vault.go @@ -0,0 +1,47 @@ +package attns + +import ( + "fmt" + + "github.com/onsonr/sonr/x/dwn/types/attns/capability" + "github.com/onsonr/sonr/x/dwn/types/attns/policytype" + "github.com/onsonr/sonr/x/dwn/types/attns/resourcetype" + "github.com/ucan-wg/go-ucan" +) + +// CreateVaultAttenuations creates default attenuations for a smart account +func CreateVaultAttenuations( + accountAddr string, +) ucan.Attenuations { + caps := AttentuationVault.GetCapabilities() + return ucan.Attenuations{ + // Owner capabilities + {Cap: caps.Cap(capability.CAPOWNER.String()), Rsc: NewResource(resourcetype.RESACCOUNT, accountAddr)}, + + // Operation capabilities + {Cap: caps.Cap(capability.CAPEXECUTE.String()), Rsc: NewResource(resourcetype.RESTRANSACTION, fmt.Sprintf("%s:*", accountAddr))}, + {Cap: caps.Cap(capability.CAPPROPOSE.String()), Rsc: NewResource(resourcetype.RESTRANSACTION, fmt.Sprintf("%s:*", accountAddr))}, + {Cap: caps.Cap(capability.CAPSIGN.String()), Rsc: NewResource(resourcetype.RESTRANSACTION, fmt.Sprintf("%s:*", accountAddr))}, + + // Policy capabilities + {Cap: caps.Cap(capability.CAPSETPOLICY.String()), Rsc: NewResource(resourcetype.RESPOLICY, fmt.Sprintf("%s:*", accountAddr))}, + {Cap: caps.Cap(capability.CAPSETTHRESHOLD.String()), Rsc: NewResource(resourcetype.RESPOLICY, fmt.Sprintf("%s:threshold", accountAddr))}, + } +} + +// CreateVaultPolicyAttenuation creates attenuations for policy management +func CreateVaultPolicyAttenuation( + accountAddr string, + policyType policytype.PolicyType, +) ucan.Attenuations { + caps := AttentuationVault.GetCapabilities() + return ucan.Attenuations{ + { + Cap: caps.Cap(capability.CAPSETPOLICY.String()), + Rsc: NewResource( + resourcetype.RESPOLICY, + fmt.Sprintf("%s:%s", accountAddr, policyType), + ), + }, + } +} diff --git a/x/dwn/types/genesis.go b/x/dwn/types/genesis.go index 58200b59f..046242511 100644 --- a/x/dwn/types/genesis.go +++ b/x/dwn/types/genesis.go @@ -1,36 +1,18 @@ package types -// Define capability hierarchy for smart account operations -const ( - // Root capabilities - CAP_OWNER = "OWNER" // Full account control - CAP_OPERATOR = "OPERATOR" // Can perform operations - CAP_OBSERVER = "OBSERVER" // Can view account state - - // Operation capabilities - CAP_EXECUTE = "EXECUTE" // Can execute transactions - CAP_PROPOSE = "PROPOSE" // Can propose transactions - CAP_SIGN = "SIGN" // Can sign transactions - - // Policy capabilities - CAP_SET_POLICY = "SET_POLICY" // Can modify account policies - CAP_SET_THRESHOLD = "SET_THRESHOLD" // Can modify signing threshold - - // Recovery capabilities - CAP_RECOVER = "RECOVER" // Can initiate recovery - CAP_SOCIAL = "SOCIAL" // Can act as social recovery -) - -// Resource types for smart account operations -type ResourceType string - -const ( - RES_ACCOUNT = "account" - RES_TRANSACTION = "tx" - RES_POLICY = "policy" - RES_RECOVERY = "recovery" -) - +// Capability hierarchy for smart account operations +// ---------------------------------------------- +// OWNER +// +// └─ OPERATOR +// ├─ EXECUTE +// ├─ PROPOSE +// └─ SIGN +// └─ SET_POLICY +// └─ SET_THRESHOLD +// └─ RECOVER +// └─ SOCIAL +// // DefaultIndex is the default global index const DefaultIndex uint64 = 1 diff --git a/x/dwn/types/genesis.pb.go b/x/dwn/types/genesis.pb.go index 2a34727a0..8f186d934 100644 --- a/x/dwn/types/genesis.pb.go +++ b/x/dwn/types/genesis.pb.go @@ -72,9 +72,14 @@ func (m *GenesisState) GetParams() Params { // Params defines the set of module parameters. type Params struct { - IpfsActive bool `protobuf:"varint,1,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - LocalRegistrationEnabled bool `protobuf:"varint,2,opt,name=local_registration_enabled,json=localRegistrationEnabled,proto3" json:"local_registration_enabled,omitempty"` - Schema *Schema `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` + // Whitelisted Key Types + AllowedPublicKeys map[string]*KeyInfo `protobuf:"bytes,1,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // ConveyancePreference defines the conveyance preference + ConveyancePreference string `protobuf:"bytes,2,opt,name=conveyance_preference,json=conveyancePreference,proto3" json:"conveyance_preference,omitempty"` + // AttestationFormats defines the attestation formats + AttestationFormats []string `protobuf:"bytes,3,rep,name=attestation_formats,json=attestationFormats,proto3" json:"attestation_formats,omitempty"` + Schema *Schema `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` + AllowedOperators []string `protobuf:"bytes,5,rep,name=allowed_operators,json=allowedOperators,proto3" json:"allowed_operators,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -109,18 +114,25 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo -func (m *Params) GetIpfsActive() bool { +func (m *Params) GetAllowedPublicKeys() map[string]*KeyInfo { if m != nil { - return m.IpfsActive + return m.AllowedPublicKeys } - return false + return nil } -func (m *Params) GetLocalRegistrationEnabled() bool { +func (m *Params) GetConveyancePreference() string { if m != nil { - return m.LocalRegistrationEnabled + return m.ConveyancePreference } - return false + return "" +} + +func (m *Params) GetAttestationFormats() []string { + if m != nil { + return m.AttestationFormats + } + return nil } func (m *Params) GetSchema() *Schema { @@ -130,6 +142,13 @@ func (m *Params) GetSchema() *Schema { return nil } +func (m *Params) GetAllowedOperators() []string { + if m != nil { + return m.AllowedOperators + } + return nil +} + // Capability reprensents the available capabilities of a decentralized web node type Capability struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -199,6 +218,75 @@ func (m *Capability) GetResources() []string { return nil } +// KeyInfo defines information for accepted PubKey types +type KeyInfo struct { + Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Encoding string `protobuf:"bytes,3,opt,name=encoding,proto3" json:"encoding,omitempty"` + Curve string `protobuf:"bytes,4,opt,name=curve,proto3" json:"curve,omitempty"` +} + +func (m *KeyInfo) Reset() { *m = KeyInfo{} } +func (m *KeyInfo) String() string { return proto.CompactTextString(m) } +func (*KeyInfo) ProtoMessage() {} +func (*KeyInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_8e7492a25d5871dc, []int{3} +} +func (m *KeyInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KeyInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KeyInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *KeyInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_KeyInfo.Merge(m, src) +} +func (m *KeyInfo) XXX_Size() int { + return m.Size() +} +func (m *KeyInfo) XXX_DiscardUnknown() { + xxx_messageInfo_KeyInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_KeyInfo proto.InternalMessageInfo + +func (m *KeyInfo) GetRole() string { + if m != nil { + return m.Role + } + return "" +} + +func (m *KeyInfo) GetAlgorithm() string { + if m != nil { + return m.Algorithm + } + return "" +} + +func (m *KeyInfo) GetEncoding() string { + if m != nil { + return m.Encoding + } + return "" +} + +func (m *KeyInfo) GetCurve() string { + if m != nil { + return m.Curve + } + return "" +} + // Resource reprensents the available resources of a decentralized web node type Resource struct { Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` @@ -209,7 +297,7 @@ func (m *Resource) Reset() { *m = Resource{} } func (m *Resource) String() string { return proto.CompactTextString(m) } func (*Resource) ProtoMessage() {} func (*Resource) Descriptor() ([]byte, []int) { - return fileDescriptor_8e7492a25d5871dc, []int{3} + return fileDescriptor_8e7492a25d5871dc, []int{4} } func (m *Resource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -270,7 +358,7 @@ func (m *Schema) Reset() { *m = Schema{} } func (m *Schema) String() string { return proto.CompactTextString(m) } func (*Schema) ProtoMessage() {} func (*Schema) Descriptor() ([]byte, []int) { - return fileDescriptor_8e7492a25d5871dc, []int{4} + return fileDescriptor_8e7492a25d5871dc, []int{5} } func (m *Schema) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -372,7 +460,9 @@ func (m *Schema) GetProfile() string { func init() { proto.RegisterType((*GenesisState)(nil), "dwn.v1.GenesisState") proto.RegisterType((*Params)(nil), "dwn.v1.Params") + proto.RegisterMapType((map[string]*KeyInfo)(nil), "dwn.v1.Params.AllowedPublicKeysEntry") proto.RegisterType((*Capability)(nil), "dwn.v1.Capability") + proto.RegisterType((*KeyInfo)(nil), "dwn.v1.KeyInfo") proto.RegisterType((*Resource)(nil), "dwn.v1.Resource") proto.RegisterType((*Schema)(nil), "dwn.v1.Schema") } @@ -380,40 +470,50 @@ func init() { func init() { proto.RegisterFile("dwn/v1/genesis.proto", fileDescriptor_8e7492a25d5871dc) } var fileDescriptor_8e7492a25d5871dc = []byte{ - // 519 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x93, 0x31, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0x73, 0x34, 0xbd, 0xe6, 0x5e, 0x2b, 0x04, 0x56, 0x85, 0x4c, 0x84, 0x2e, 0x51, 0x06, - 0x54, 0x21, 0x94, 0x53, 0x61, 0xab, 0xb2, 0x50, 0x84, 0x58, 0xd1, 0x75, 0x63, 0x89, 0x9c, 0xbb, - 0xd7, 0x8b, 0x9b, 0x3b, 0xfb, 0x64, 0x3b, 0x49, 0xf3, 0x15, 0x98, 0x18, 0x19, 0x3b, 0x33, 0xf1, - 0x31, 0x3a, 0x76, 0x64, 0x42, 0x28, 0x19, 0xe0, 0x23, 0x30, 0x22, 0xdb, 0x97, 0x12, 0x16, 0xeb, - 0xfd, 0x7f, 0xff, 0xe7, 0xe7, 0xff, 0x8b, 0x72, 0x70, 0x9c, 0x2f, 0x45, 0xb2, 0x38, 0x4d, 0x0a, - 0x14, 0xa8, 0xb9, 0x1e, 0xd6, 0x4a, 0x1a, 0x49, 0xc2, 0x7c, 0x29, 0x86, 0x8b, 0xd3, 0xee, 0x71, - 0x21, 0x0b, 0xe9, 0x50, 0x62, 0x2b, 0xef, 0x76, 0x1f, 0xb3, 0x8a, 0x0b, 0x99, 0xb8, 0xd3, 0xa3, - 0xc1, 0x08, 0x8e, 0xde, 0xfb, 0x09, 0x17, 0x86, 0x19, 0x24, 0x2f, 0x21, 0xac, 0x99, 0x62, 0x95, - 0xa6, 0x41, 0x3f, 0x38, 0x39, 0x7c, 0xf5, 0x70, 0xe8, 0x27, 0x0e, 0x3f, 0x38, 0x7a, 0xde, 0xbe, - 0xfd, 0xd1, 0x6b, 0xa5, 0x4d, 0xcf, 0xe0, 0x6b, 0x00, 0xa1, 0x37, 0x48, 0x0f, 0x0e, 0x79, 0x7d, - 0xa9, 0xc7, 0x2c, 0x33, 0x7c, 0x81, 0xee, 0x76, 0x27, 0x05, 0x8b, 0xde, 0x38, 0x42, 0x46, 0xd0, - 0x2d, 0x65, 0xc6, 0xca, 0xb1, 0xc2, 0x82, 0x6b, 0xa3, 0x98, 0xe1, 0x52, 0x8c, 0x51, 0xb0, 0x49, - 0x89, 0x39, 0x7d, 0xe0, 0xfa, 0xa9, 0xeb, 0x48, 0x77, 0x1a, 0xde, 0x79, 0x9f, 0x3c, 0x87, 0x50, - 0x67, 0x53, 0xac, 0x18, 0x6d, 0xff, 0x9f, 0xeb, 0xc2, 0xd1, 0xb4, 0x71, 0xcf, 0x9e, 0x7e, 0xb9, - 0xe9, 0xb5, 0x7e, 0xdf, 0xf4, 0x82, 0x4f, 0xbf, 0xbe, 0xbd, 0x38, 0x5a, 0xb0, 0x79, 0x69, 0x92, - 0x26, 0xec, 0x35, 0xc0, 0x5b, 0x56, 0xb3, 0x09, 0x2f, 0xb9, 0x59, 0x11, 0x02, 0x6d, 0xc1, 0x2a, - 0x1f, 0x34, 0x4a, 0x5d, 0x4d, 0x9e, 0xb8, 0xe5, 0x51, 0x18, 0x17, 0x27, 0x4a, 0x1b, 0x45, 0xfa, - 0x70, 0x98, 0xa3, 0xce, 0x14, 0xaf, 0x6d, 0x24, 0xba, 0xe7, 0xcc, 0x5d, 0x44, 0x9e, 0x41, 0xa4, - 0x50, 0xcb, 0xb9, 0xca, 0x50, 0xd3, 0x76, 0x7f, 0xef, 0x24, 0x4a, 0xff, 0x81, 0xc1, 0x19, 0x74, - 0xd2, 0x46, 0xd8, 0x77, 0x67, 0x5c, 0xe4, 0xdb, 0x77, 0x6d, 0x4d, 0xba, 0xd0, 0x31, 0x58, 0xd5, - 0x25, 0x33, 0xd8, 0xbc, 0x7c, 0xaf, 0x07, 0x7f, 0x02, 0x08, 0xfd, 0x8e, 0x84, 0xc2, 0xc1, 0x02, - 0x95, 0xb6, 0x11, 0xec, 0xed, 0xfd, 0x74, 0x2b, 0xad, 0xc3, 0xb2, 0x4c, 0xce, 0xef, 0x93, 0x6f, - 0x25, 0x39, 0x86, 0x7d, 0xa6, 0x35, 0x9a, 0x26, 0xb4, 0x17, 0x96, 0x66, 0x53, 0xc6, 0x85, 0xfb, - 0x31, 0xa3, 0xd4, 0x0b, 0x12, 0x03, 0x64, 0x0a, 0x73, 0x14, 0x86, 0xb3, 0x92, 0xee, 0x3b, 0x6b, - 0x87, 0x90, 0x47, 0xb0, 0x97, 0xf3, 0x9c, 0x86, 0xce, 0xb0, 0xa5, 0x25, 0x57, 0xcb, 0x19, 0x3d, - 0xf0, 0xe4, 0x6a, 0x39, 0xb3, 0x93, 0x0b, 0xc5, 0x84, 0xa1, 0x1d, 0x3f, 0xd9, 0x09, 0xbb, 0xe0, - 0x0c, 0x57, 0x7a, 0xca, 0x14, 0xd2, 0xc8, 0x2f, 0xb8, 0xd5, 0x36, 0x7b, 0xad, 0xe4, 0x25, 0x2f, - 0x91, 0x82, 0xcf, 0xde, 0xc8, 0xf3, 0xd1, 0xed, 0x3a, 0x0e, 0xee, 0xd6, 0x71, 0xf0, 0x73, 0x1d, - 0x07, 0x9f, 0x37, 0x71, 0xeb, 0x6e, 0x13, 0xb7, 0xbe, 0x6f, 0xe2, 0xd6, 0xc7, 0x41, 0xc1, 0xcd, - 0x74, 0x3e, 0x19, 0x66, 0xb2, 0x4a, 0xa4, 0xd0, 0x52, 0xa8, 0xc4, 0x1d, 0xd7, 0x89, 0xfd, 0x2a, - 0xcc, 0xaa, 0x46, 0x3d, 0x09, 0xdd, 0x1f, 0xfc, 0xf5, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9d, - 0x36, 0x1c, 0x5c, 0x29, 0x03, 0x00, 0x00, + // 677 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x4f, 0x6f, 0xd3, 0x30, + 0x1c, 0x6d, 0xd6, 0x3f, 0x5b, 0xdd, 0x09, 0x36, 0xaf, 0x4c, 0xa1, 0x42, 0x5d, 0x55, 0x69, 0xa8, + 0x02, 0xd4, 0x68, 0xdb, 0x05, 0x4d, 0xbb, 0x30, 0x04, 0x08, 0xed, 0xc0, 0x94, 0x69, 0x17, 0x2e, + 0x95, 0x9b, 0xfc, 0xda, 0x7a, 0x4d, 0xec, 0xc8, 0x76, 0xd3, 0xe5, 0x2b, 0x20, 0x0e, 0x1c, 0x39, + 0xee, 0x23, 0xf0, 0x31, 0x76, 0xdc, 0x91, 0x13, 0x42, 0xdb, 0x01, 0x3e, 0x02, 0x47, 0x64, 0x3b, + 0xe9, 0x36, 0xc4, 0x25, 0xfa, 0xbd, 0xf7, 0x9c, 0xdf, 0x7b, 0x3f, 0xdb, 0x09, 0x6a, 0x86, 0x73, + 0xe6, 0xa5, 0x3b, 0xde, 0x18, 0x18, 0x48, 0x2a, 0xfb, 0x89, 0xe0, 0x8a, 0xe3, 0x5a, 0x38, 0x67, + 0xfd, 0x74, 0xa7, 0xd5, 0x1c, 0xf3, 0x31, 0x37, 0x94, 0xa7, 0x2b, 0xab, 0xb6, 0xd6, 0x49, 0x4c, + 0x19, 0xf7, 0xcc, 0xd3, 0x52, 0xdd, 0x03, 0xb4, 0xfa, 0xce, 0x76, 0x38, 0x51, 0x44, 0x01, 0x7e, + 0x81, 0x6a, 0x09, 0x11, 0x24, 0x96, 0xae, 0xd3, 0x71, 0x7a, 0x8d, 0xdd, 0x07, 0x7d, 0xdb, 0xb1, + 0x7f, 0x6c, 0xd8, 0xc3, 0xca, 0xe5, 0x8f, 0xad, 0x92, 0x9f, 0xaf, 0xe9, 0x7e, 0x2e, 0xa3, 0x9a, + 0x15, 0xf0, 0x29, 0xda, 0x20, 0x51, 0xc4, 0xe7, 0x10, 0x0e, 0x92, 0xd9, 0x30, 0xa2, 0xc1, 0x60, + 0x0a, 0x99, 0xee, 0x52, 0xee, 0x35, 0x76, 0xb7, 0xef, 0x77, 0xe9, 0xbf, 0xb2, 0x2b, 0x8f, 0xcd, + 0xc2, 0x23, 0xc8, 0xe4, 0x1b, 0xa6, 0x44, 0xe6, 0xaf, 0x93, 0x7f, 0x79, 0xbc, 0x87, 0x1e, 0x05, + 0x9c, 0xa5, 0x90, 0x11, 0x16, 0xc0, 0x20, 0x11, 0x30, 0x02, 0x01, 0x2c, 0x00, 0x77, 0xa9, 0xe3, + 0xf4, 0xea, 0x7e, 0xf3, 0x56, 0x3c, 0x5e, 0x68, 0xd8, 0x43, 0x1b, 0x44, 0x29, 0x90, 0x8a, 0x28, + 0xca, 0xd9, 0x60, 0xc4, 0x45, 0x4c, 0x94, 0x74, 0xcb, 0x9d, 0x72, 0xaf, 0xee, 0xe3, 0x3b, 0xd2, + 0x5b, 0xab, 0xe0, 0xa7, 0xa8, 0x26, 0x83, 0x09, 0xc4, 0xc4, 0xad, 0xdc, 0x9f, 0xfa, 0xc4, 0xb0, + 0x7e, 0xae, 0xe2, 0xe7, 0xa8, 0x88, 0x38, 0xe0, 0x09, 0x08, 0xa2, 0xb8, 0x90, 0x6e, 0xd5, 0xb4, + 0x5d, 0xcb, 0x85, 0x0f, 0x05, 0xdf, 0x3a, 0x45, 0x9b, 0xff, 0x9f, 0x13, 0xaf, 0xa1, 0xf2, 0x14, + 0x32, 0xb3, 0xc3, 0x75, 0x5f, 0x97, 0x78, 0x1b, 0x55, 0x53, 0x12, 0xcd, 0xec, 0x58, 0x8d, 0xdd, + 0x87, 0x85, 0xff, 0x11, 0x64, 0xef, 0xd9, 0x88, 0xfb, 0x56, 0xdd, 0x5f, 0x7a, 0xe9, 0xec, 0x3f, + 0xfe, 0x7a, 0xb1, 0x55, 0xfa, 0x7d, 0xb1, 0xe5, 0x7c, 0xfa, 0xf5, 0xed, 0xd9, 0x6a, 0x4a, 0x66, + 0x91, 0xf2, 0xf2, 0xe3, 0x38, 0x47, 0xe8, 0x35, 0x49, 0xc8, 0x90, 0x46, 0x54, 0x65, 0x18, 0xa3, + 0x0a, 0x23, 0x31, 0xe4, 0x36, 0xa6, 0xc6, 0x9b, 0xe6, 0x78, 0x81, 0xa9, 0x7c, 0xff, 0x72, 0x84, + 0x3b, 0xa8, 0x11, 0x82, 0x0c, 0x04, 0x4d, 0xf4, 0xb6, 0xb8, 0x65, 0x23, 0xde, 0xa5, 0xf0, 0x13, + 0x54, 0x17, 0x20, 0xf9, 0x4c, 0x04, 0x20, 0xdd, 0x8a, 0x19, 0xf9, 0x96, 0xe8, 0xc6, 0x68, 0x39, + 0x8f, 0xaa, 0x6d, 0x05, 0x8f, 0x16, 0xb6, 0xba, 0xd6, 0x2f, 0x93, 0x68, 0xcc, 0x05, 0x55, 0x93, + 0x38, 0x77, 0xbe, 0x25, 0x70, 0x0b, 0xad, 0x00, 0x0b, 0x78, 0x48, 0xd9, 0x38, 0x77, 0x5e, 0x60, + 0xdc, 0x44, 0xd5, 0x60, 0x26, 0x52, 0x30, 0x07, 0x53, 0xf7, 0x2d, 0xe8, 0xee, 0xa3, 0x15, 0x3f, + 0xf7, 0xd6, 0x7e, 0x53, 0xca, 0xc2, 0xc2, 0x4f, 0xd7, 0xba, 0xa3, 0x82, 0x38, 0x89, 0x88, 0x2a, + 0x2e, 0xca, 0x02, 0x77, 0xff, 0x38, 0xa8, 0x66, 0x8f, 0x15, 0xbb, 0x68, 0x39, 0x05, 0x21, 0xf5, + 0xc4, 0xfa, 0xed, 0xaa, 0x5f, 0x40, 0xad, 0x90, 0x20, 0xe0, 0xb3, 0xc5, 0x46, 0x15, 0x50, 0x07, + 0x22, 0x52, 0x82, 0xca, 0x93, 0x5a, 0x60, 0x62, 0x4e, 0x08, 0x65, 0x8b, 0x98, 0x1a, 0xe0, 0x36, + 0x42, 0x81, 0x80, 0x10, 0x98, 0xa2, 0x24, 0x72, 0xab, 0x46, 0xba, 0xc3, 0xe8, 0x7b, 0x10, 0xd2, + 0xd0, 0xad, 0xd9, 0x7b, 0x10, 0xd2, 0x50, 0x33, 0x67, 0xf3, 0xa9, 0xbb, 0x6c, 0x99, 0xb3, 0xf9, + 0x54, 0x77, 0x1e, 0x0b, 0xc2, 0x94, 0xbb, 0x62, 0x3b, 0x1b, 0xa0, 0x07, 0xd4, 0x9f, 0xd7, 0x84, + 0x08, 0x70, 0xeb, 0x76, 0xc0, 0x02, 0xeb, 0xec, 0x89, 0xe0, 0x23, 0x1a, 0x81, 0x8b, 0x6c, 0xf6, + 0x1c, 0x1e, 0x1e, 0x5c, 0x5e, 0xb7, 0x9d, 0xab, 0xeb, 0xb6, 0xf3, 0xf3, 0xba, 0xed, 0x7c, 0xb9, + 0x69, 0x97, 0xae, 0x6e, 0xda, 0xa5, 0xef, 0x37, 0xed, 0xd2, 0xc7, 0xee, 0x98, 0xaa, 0xc9, 0x6c, + 0xd8, 0x0f, 0x78, 0xec, 0x71, 0x26, 0x39, 0x13, 0x9e, 0x79, 0x9c, 0x7b, 0xfa, 0x37, 0xa3, 0xb2, + 0x04, 0xe4, 0xb0, 0x66, 0xfe, 0x18, 0x7b, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x1e, 0x28, + 0x08, 0x7a, 0x04, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -435,15 +535,36 @@ func (this *Params) Equal(that interface{}) bool { } else if this == nil { return false } - if this.IpfsActive != that1.IpfsActive { + if len(this.AllowedPublicKeys) != len(that1.AllowedPublicKeys) { return false } - if this.LocalRegistrationEnabled != that1.LocalRegistrationEnabled { + for i := range this.AllowedPublicKeys { + if !this.AllowedPublicKeys[i].Equal(that1.AllowedPublicKeys[i]) { + return false + } + } + if this.ConveyancePreference != that1.ConveyancePreference { return false } + if len(this.AttestationFormats) != len(that1.AttestationFormats) { + return false + } + for i := range this.AttestationFormats { + if this.AttestationFormats[i] != that1.AttestationFormats[i] { + return false + } + } if !this.Schema.Equal(that1.Schema) { return false } + if len(this.AllowedOperators) != len(that1.AllowedOperators) { + return false + } + for i := range this.AllowedOperators { + if this.AllowedOperators[i] != that1.AllowedOperators[i] { + return false + } + } return true } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -499,6 +620,15 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.AllowedOperators) > 0 { + for iNdEx := len(m.AllowedOperators) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AllowedOperators[iNdEx]) + copy(dAtA[i:], m.AllowedOperators[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AllowedOperators[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } if m.Schema != nil { { size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) @@ -511,25 +641,47 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.LocalRegistrationEnabled { - i-- - if m.LocalRegistrationEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.AttestationFormats) > 0 { + for iNdEx := len(m.AttestationFormats) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AttestationFormats[iNdEx]) + copy(dAtA[i:], m.AttestationFormats[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AttestationFormats[iNdEx]))) + i-- + dAtA[i] = 0x1a } - i-- - dAtA[i] = 0x10 } - if m.IpfsActive { + if len(m.ConveyancePreference) > 0 { + i -= len(m.ConveyancePreference) + copy(dAtA[i:], m.ConveyancePreference) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ConveyancePreference))) i-- - if m.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + dAtA[i] = 0x12 + } + if len(m.AllowedPublicKeys) > 0 { + for k := range m.AllowedPublicKeys { + v := m.AllowedPublicKeys[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGenesis(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -587,6 +739,57 @@ func (m *Capability) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *KeyInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KeyInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Curve) > 0 { + i -= len(m.Curve) + copy(dAtA[i:], m.Curve) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Curve))) + i-- + dAtA[i] = 0x22 + } + if len(m.Encoding) > 0 { + i -= len(m.Encoding) + copy(dAtA[i:], m.Encoding) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Encoding))) + i-- + dAtA[i] = 0x1a + } + if len(m.Algorithm) > 0 { + i -= len(m.Algorithm) + copy(dAtA[i:], m.Algorithm) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Algorithm))) + i-- + dAtA[i] = 0x12 + } + if len(m.Role) > 0 { + i -= len(m.Role) + copy(dAtA[i:], m.Role) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Role))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Resource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -743,16 +946,39 @@ func (m *Params) Size() (n int) { } var l int _ = l - if m.IpfsActive { - n += 2 + if len(m.AllowedPublicKeys) > 0 { + for k, v := range m.AllowedPublicKeys { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovGenesis(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + l + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } } - if m.LocalRegistrationEnabled { - n += 2 + l = len(m.ConveyancePreference) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.AttestationFormats) > 0 { + for _, s := range m.AttestationFormats { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } } if m.Schema != nil { l = m.Schema.Size() n += 1 + l + sovGenesis(uint64(l)) } + if len(m.AllowedOperators) > 0 { + for _, s := range m.AllowedOperators { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -783,6 +1009,31 @@ func (m *Capability) Size() (n int) { return n } +func (m *KeyInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Role) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Algorithm) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Encoding) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Curve) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + func (m *Resource) Size() (n int) { if m == nil { return 0 @@ -967,10 +1218,10 @@ func (m *Params) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedPublicKeys", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -980,17 +1231,126 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.IpfsActive = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AllowedPublicKeys == nil { + m.AllowedPublicKeys = make(map[string]*KeyInfo) + } + var mapkey string + var mapvalue *KeyInfo + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return 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 ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthGenesis + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthGenesis + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &KeyInfo{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.AllowedPublicKeys[mapkey] = mapvalue + iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocalRegistrationEnabled", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConveyancePreference", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -1000,12 +1360,56 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.LocalRegistrationEnabled = bool(v != 0) + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConveyancePreference = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttestationFormats", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttestationFormats = append(m.AttestationFormats, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) @@ -1042,6 +1446,38 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedOperators", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedOperators = append(m.AllowedOperators, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -1241,6 +1677,184 @@ func (m *Capability) Unmarshal(dAtA []byte) error { } return nil } +func (m *KeyInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return 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 fmt.Errorf("proto: KeyInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Role = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Algorithm = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Encoding = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Curve = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Resource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/dwn/types/msgs.go b/x/dwn/types/msgs.go index 63b70cec8..df261d920 100644 --- a/x/dwn/types/msgs.go +++ b/x/dwn/types/msgs.go @@ -18,9 +18,7 @@ func NewMsgUpdateParams( ) *MsgUpdateParams { return &MsgUpdateParams{ Authority: sender.String(), - Params: Params{ - IpfsActive: someValue, - }, + Params: Params{}, } } diff --git a/x/dwn/types/params.go b/x/dwn/types/params.go index 100d4f111..a8fb759fd 100644 --- a/x/dwn/types/params.go +++ b/x/dwn/types/params.go @@ -3,17 +3,24 @@ package types import ( "encoding/json" - "github.com/onsonr/sonr/pkg/common" - orm "github.com/onsonr/sonr/pkg/common/models" + "github.com/onsonr/sonr/pkg/common/models" + "github.com/onsonr/sonr/pkg/common/models/keyalgorithm" + "github.com/onsonr/sonr/pkg/common/models/keycurve" + "github.com/onsonr/sonr/pkg/common/models/keyencoding" + "github.com/onsonr/sonr/pkg/common/models/keyrole" ) // DefaultParams returns default module parameters. func DefaultParams() Params { - // TODO: return Params{ - IpfsActive: true, - LocalRegistrationEnabled: true, - Schema: DefaultSchema(), + ConveyancePreference: "direct", + AttestationFormats: []string{"packed", "android-key", "fido-u2f", "apple"}, + Schema: DefaultSchema(), + AllowedOperators: []string{ // TODO: + "localhost", + "didao.xyz", + "sonr.id", + }, } } @@ -36,13 +43,83 @@ func (p Params) Validate() error { // DefaultSchema returns the default schema func DefaultSchema() *Schema { return &Schema{ - Version: common.SchemaVersion, - Account: common.GetSchema(&orm.Account{}), - Asset: common.GetSchema(&orm.Asset{}), - Chain: common.GetSchema(&orm.Chain{}), - Credential: common.GetSchema(&orm.Credential{}), - Grant: common.GetSchema(&orm.Grant{}), - Keyshare: common.GetSchema(&orm.Keyshare{}), - Profile: common.GetSchema(&orm.Profile{}), + Version: SchemaVersion, + Account: GetSchema(&models.Account{}), + Asset: GetSchema(&models.Asset{}), + Chain: GetSchema(&models.Chain{}), + Credential: GetSchema(&models.Credential{}), + Grant: GetSchema(&models.Grant{}), + Keyshare: GetSchema(&models.Keyshare{}), + Profile: GetSchema(&models.Profile{}), } } + +func DefaultKeyInfos() map[string]*KeyInfo { + return map[string]*KeyInfo{ + // Identity Key Info + // Sonr Controller Key Info - From MPC + "auth.dwn": { + Role: keyrole.Invocation.String(), + Curve: keycurve.P256.String(), + Algorithm: keyalgorithm.Ecdsa.String(), + Encoding: keyencoding.Hex.String(), + }, + + // Sonr Vault Shared Key Info - From Registration + "auth.zk": { + Role: keyrole.Assertion.String(), + Curve: keycurve.Bls12381.String(), + Algorithm: keyalgorithm.Es256k.String(), + Encoding: keyencoding.Multibase.String(), + }, + + // Blockchain Key Info + // Ethereum Key Info + "auth.ethereum": { + Role: keyrole.Delegation.String(), + Curve: keycurve.Keccak256.String(), + Algorithm: keyalgorithm.Ecdsa.String(), + Encoding: keyencoding.Hex.String(), + }, + // Bitcoin/IBC Key Info + "auth.bitcoin": { + Role: keyrole.Delegation.String(), + Curve: keycurve.Secp256k1.String(), + Algorithm: keyalgorithm.Ecdsa.String(), + Encoding: keyencoding.Hex.String(), + }, + + // Authentication Key Info + // Browser based WebAuthn + "webauthn.browser": { + Role: keyrole.Authentication.String(), + Curve: keycurve.P256.String(), + Algorithm: keyalgorithm.Es256.String(), + Encoding: keyencoding.Raw.String(), + }, + // FIDO U2F + "webauthn.fido": { + Role: keyrole.Authentication.String(), + Curve: keycurve.P256.String(), + Algorithm: keyalgorithm.Es256.String(), + Encoding: keyencoding.Raw.String(), + }, + // Cross-Platform Passkeys + "webauthn.passkey": { + Role: keyrole.Authentication.String(), + Curve: keycurve.Ed25519.String(), + Algorithm: keyalgorithm.Eddsa.String(), + Encoding: keyencoding.Raw.String(), + }, + } +} + +// # Genesis Structures +// +// Equal returns true if two key infos are equal +func (k *KeyInfo) Equal(b *KeyInfo) bool { + if k == nil && b == nil { + return true + } + return false +} diff --git a/pkg/common/schema.go b/x/dwn/types/schema.go similarity index 97% rename from pkg/common/schema.go rename to x/dwn/types/schema.go index 9f48261e4..2912c951e 100644 --- a/pkg/common/schema.go +++ b/x/dwn/types/schema.go @@ -1,4 +1,4 @@ -package common +package types import ( "reflect" diff --git a/x/dwn/types/spawn.go b/x/dwn/types/spawn.go deleted file mode 100644 index 6fb6464dd..000000000 --- a/x/dwn/types/spawn.go +++ /dev/null @@ -1,42 +0,0 @@ -package types - -import ( - "github.com/ipfs/boxo/files" - - "github.com/onsonr/sonr/pkg/core/dwn" - "github.com/onsonr/sonr/x/dwn/types/static" -) - -const ( - kFileNameConfigJSON = "dwn.json" - kFileNameIndexHTML = "index.html" - kFileNameWorkerJS = "sw.js" -) - -type Vault = files.Directory - -func SpawnVault(keyshareJSON string, adddress string, chainID string, schema *dwn.Schema) (Vault, error) { - dwnCfg := &dwn.Config{ - MotrKeyshare: keyshareJSON, - MotrAddress: adddress, - IpfsGatewayUrl: "https://ipfs.sonr.land", - SonrApiUrl: "https://api.sonr.land", - SonrRpcUrl: "https://rpc.sonr.land", - SonrChainId: chainID, - VaultSchema: schema, - } - cnf, err := dwnCfg.MarshalJSON() - if err != nil { - return nil, err - } - return setupVaultDirectory(cnf), nil -} - -// spawnVaultDirectory creates a new directory with the default files -func setupVaultDirectory(cfgBz []byte) files.Directory { - return files.NewMapDirectory(map[string]files.Node{ - kFileNameConfigJSON: files.NewBytesFile(cfgBz), - kFileNameIndexHTML: files.NewBytesFile(static.IndexHTML), - kFileNameWorkerJS: files.NewBytesFile(static.WorkerJS), - }) -} diff --git a/x/dwn/types/static/index.html b/x/dwn/types/static/index.html deleted file mode 100644 index db7b1a844..000000000 --- a/x/dwn/types/static/index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - Sonr DWN - - - -
-
Loading...
-
- -