mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 01:41:44 +00:00
feature/1114 implement account interface (#1167)
- **refactor: move session-related code to middleware package** - **refactor: update PKL build process and adjust related configurations** - **feat: integrate base.cosmos.v1 Genesis module** - **refactor: pass session context to modal rendering functions** - **refactor: move nebula package to app directory and update templ version** - **refactor: Move home section video view to dedicated directory** - **refactor: remove unused views file** - **refactor: move styles and UI components to global scope** - **refactor: Rename images.go to cdn.go** - **feat: Add Empty State Illustrations** - **refactor: Consolidate Vault Index Logic** - **fix: References to App.wasm and remove Vault Directory embedded CDN files** - **refactor: Move CDN types to Models** - **fix: Correct line numbers in templ error messages for arch_templ.go** - **refactor: use common types for peer roles** - **refactor: move common types and ORM to a shared package** - **fix: Config import dwn** - **refactor: move nebula directory to app** - **feat: Rebuild nebula** - **fix: correct file paths in panels templates** - **feat: Remove duplicate types** - **refactor: Move dwn to pkg/core** - **refactor: Binary Structure** - **feat: Introduce Crypto Pkg** - **fix: Broken Process Start** - **feat: Update pkg/* structure** - **feat: Refactor PKL Structure** - **build: update pkl build process** - **chore: Remove Empty Files** - **refactor: remove unused macaroon package** - **feat: Add WebAwesome Components** - **refactor: consolidate build and generation tasks into a single taskfile, remove redundant makefile targets** - **refactor: refactor server and move components to pkg/core/dwn** - **build: update go modules** - **refactor: move gateway logic into dedicated hway command** - **feat: Add KSS (Krawczyk-Song-Song) MPC cryptography module** - **feat: Implement MPC-based JWT signing and UCAN token generation** - **feat: add support for MPC-based JWT signing** - **feat: Implement MPC-based UCAN capabilities for smart accounts** - **feat: add address field to keyshareSource** - **feat: Add comprehensive MPC test suite for keyshares, UCAN tokens, and token attenuations** - **refactor: improve MPC keyshare management and signing process** - **feat: enhance MPC capability hierarchy documentation** - **refactor: rename GenerateKeyshares function to NewKeyshareSource for clarity** - **refactor: remove unused Ethereum address computation** - **feat: Add HasHandle and IsAuthenticated methods to HTTPContext** - **refactor: Add context.Context support to session HTTPContext** - **refactor: Resolve context interface conflicts in HTTPContext** - **feat: Add session ID context key and helper functions** - **feat: Update WebApp Page Rendering** - **refactor: Simplify context management by using single HTTPContext key** - **refactor: Simplify HTTPContext creation and context management in session middleware** - **refactor: refactor session middleware to use a single data structure** - **refactor: Simplify HTTPContext implementation and session data handling** - **refactor: Improve session context handling and prevent nil pointer errors** - **refactor: Improve session context handling with nil safety and type support** - **refactor: improve session data injection** - **feat: add full-screen modal component and update registration flow** - **chore: add .air.toml to .gitignore** - **feat: add Air to devbox and update dependencies**
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// Code generated from Pkl module `common.types.Ctx`. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/apple/pkl-go/pkl"
|
||||
)
|
||||
|
||||
type Ctx struct {
|
||||
}
|
||||
|
||||
// LoadFromPath loads the pkl module at the given path and evaluates it into a Ctx
|
||||
func LoadFromPath(ctx context.Context, path string) (ret *Ctx, 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 Ctx
|
||||
func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Ctx, error) {
|
||||
var ret Ctx
|
||||
if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ret, nil
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated from Pkl module `common.types.Ctx`. DO NOT EDIT.
|
||||
package types
|
||||
|
||||
type Session struct {
|
||||
Id string `pkl:"id" json:"id,omitempty"`
|
||||
|
||||
Challenge string `pkl:"challenge" json:"challenge,omitempty"`
|
||||
|
||||
BrowserName string `pkl:"browserName" json:"browserName,omitempty"`
|
||||
|
||||
BrowserVersion string `pkl:"browserVersion" json:"browserVersion,omitempty"`
|
||||
|
||||
UserArchitecture string `pkl:"userArchitecture" json:"userArchitecture,omitempty"`
|
||||
|
||||
Platform string `pkl:"platform" json:"platform,omitempty"`
|
||||
|
||||
PlatformVersion string `pkl:"platformVersion" json:"platformVersion,omitempty"`
|
||||
|
||||
DeviceModel string `pkl:"deviceModel" json:"deviceModel,omitempty"`
|
||||
|
||||
IsMobile bool `pkl:"isMobile" json:"isMobile,omitempty"`
|
||||
|
||||
VaultAddress string `pkl:"vaultAddress" json:"vaultAddress,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// Code generated from Pkl module `common.types.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{})
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc (unknown)
|
||||
// source: common/v1/ipfs.proto
|
||||
|
||||
package commonv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
var File_common_v1_ipfs_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_v1_ipfs_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x70, 0x66, 0x73,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,
|
||||
0x31, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
|
||||
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_common_v1_ipfs_proto_goTypes = []interface{}{}
|
||||
var file_common_v1_ipfs_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_common_v1_ipfs_proto_init() }
|
||||
func file_common_v1_ipfs_proto_init() {
|
||||
if File_common_v1_ipfs_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_common_v1_ipfs_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_common_v1_ipfs_proto_goTypes,
|
||||
DependencyIndexes: file_common_v1_ipfs_proto_depIdxs,
|
||||
}.Build()
|
||||
File_common_v1_ipfs_proto = out.File
|
||||
file_common_v1_ipfs_proto_rawDesc = nil
|
||||
file_common_v1_ipfs_proto_goTypes = nil
|
||||
file_common_v1_ipfs_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,377 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc (unknown)
|
||||
// source: common/v1/keys.proto
|
||||
|
||||
package commonv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
// PubKey defines a public key for a did
|
||||
type PubKey struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
|
||||
KeyType string `protobuf:"bytes,2,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"`
|
||||
RawKey *RawKey `protobuf:"bytes,3,opt,name=raw_key,json=rawKey,proto3" json:"raw_key,omitempty"`
|
||||
Jwk *JSONWebKey `protobuf:"bytes,4,opt,name=jwk,proto3" json:"jwk,omitempty"`
|
||||
}
|
||||
|
||||
func (x *PubKey) Reset() {
|
||||
*x = PubKey{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_v1_keys_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *PubKey) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*PubKey) ProtoMessage() {}
|
||||
|
||||
func (x *PubKey) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_v1_keys_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)
|
||||
}
|
||||
|
||||
// Deprecated: Use PubKey.ProtoReflect.Descriptor instead.
|
||||
func (*PubKey) Descriptor() ([]byte, []int) {
|
||||
return file_common_v1_keys_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *PubKey) GetRole() string {
|
||||
if x != nil {
|
||||
return x.Role
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PubKey) GetKeyType() string {
|
||||
if x != nil {
|
||||
return x.KeyType
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *PubKey) GetRawKey() *RawKey {
|
||||
if x != nil {
|
||||
return x.RawKey
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *PubKey) GetJwk() *JSONWebKey {
|
||||
if x != nil {
|
||||
return x.Jwk
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// JWK represents a JSON Web Key
|
||||
type JSONWebKey struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Kty string `protobuf:"bytes,1,opt,name=kty,proto3" json:"kty,omitempty"` // Key Type
|
||||
Crv string `protobuf:"bytes,2,opt,name=crv,proto3" json:"crv,omitempty"` // Curve (for EC and OKP keys)
|
||||
X string `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"` // X coordinate (for EC and OKP keys)
|
||||
Y string `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"` // Y coordinate (for EC keys)
|
||||
N string `protobuf:"bytes,5,opt,name=n,proto3" json:"n,omitempty"` // Modulus (for RSA keys)
|
||||
E string `protobuf:"bytes,6,opt,name=e,proto3" json:"e,omitempty"` // Exponent (for RSA keys)
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) Reset() {
|
||||
*x = JSONWebKey{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_v1_keys_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*JSONWebKey) ProtoMessage() {}
|
||||
|
||||
func (x *JSONWebKey) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_v1_keys_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)
|
||||
}
|
||||
|
||||
// Deprecated: Use JSONWebKey.ProtoReflect.Descriptor instead.
|
||||
func (*JSONWebKey) Descriptor() ([]byte, []int) {
|
||||
return file_common_v1_keys_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) GetKty() string {
|
||||
if x != nil {
|
||||
return x.Kty
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) GetCrv() string {
|
||||
if x != nil {
|
||||
return x.Crv
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) GetX() string {
|
||||
if x != nil {
|
||||
return x.X
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) GetY() string {
|
||||
if x != nil {
|
||||
return x.Y
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) GetN() string {
|
||||
if x != nil {
|
||||
return x.N
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *JSONWebKey) GetE() string {
|
||||
if x != nil {
|
||||
return x.E
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RawKey struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Algorithm string `protobuf:"bytes,1,opt,name=algorithm,proto3" json:"algorithm,omitempty"`
|
||||
Encoding string `protobuf:"bytes,2,opt,name=encoding,proto3" json:"encoding,omitempty"`
|
||||
Curve string `protobuf:"bytes,3,opt,name=curve,proto3" json:"curve,omitempty"`
|
||||
Key []byte `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RawKey) Reset() {
|
||||
*x = RawKey{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_v1_keys_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RawKey) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RawKey) ProtoMessage() {}
|
||||
|
||||
func (x *RawKey) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_v1_keys_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)
|
||||
}
|
||||
|
||||
// Deprecated: Use RawKey.ProtoReflect.Descriptor instead.
|
||||
func (*RawKey) Descriptor() ([]byte, []int) {
|
||||
return file_common_v1_keys_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *RawKey) GetAlgorithm() string {
|
||||
if x != nil {
|
||||
return x.Algorithm
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RawKey) GetEncoding() string {
|
||||
if x != nil {
|
||||
return x.Encoding
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RawKey) GetCurve() string {
|
||||
if x != nil {
|
||||
return x.Curve
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RawKey) GetKey() []byte {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_common_v1_keys_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_v1_keys_proto_rawDesc = []byte{
|
||||
0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,
|
||||
0x31, 0x22, 0x8c, 0x01, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65,
|
||||
0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x72,
|
||||
0x61, 0x77, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x52,
|
||||
0x06, 0x72, 0x61, 0x77, 0x4b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6a, 0x77, 0x6b,
|
||||
0x22, 0x68, 0x0a, 0x0a, 0x4a, 0x53, 0x4f, 0x4e, 0x57, 0x65, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x74, 0x79,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x63, 0x72, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63,
|
||||
0x72, 0x76, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x78,
|
||||
0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x79, 0x12, 0x0c,
|
||||
0x0a, 0x01, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x6e, 0x12, 0x0c, 0x0a, 0x01,
|
||||
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x01, 0x65, 0x22, 0x6a, 0x0a, 0x06, 0x52, 0x61,
|
||||
0x77, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68,
|
||||
0x6d, 0x18, 0x01, 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, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63,
|
||||
0x75, 0x72, 0x76, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72,
|
||||
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65,
|
||||
0x73, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_common_v1_keys_proto_rawDescOnce sync.Once
|
||||
file_common_v1_keys_proto_rawDescData = file_common_v1_keys_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_common_v1_keys_proto_rawDescGZIP() []byte {
|
||||
file_common_v1_keys_proto_rawDescOnce.Do(func() {
|
||||
file_common_v1_keys_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_v1_keys_proto_rawDescData)
|
||||
})
|
||||
return file_common_v1_keys_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_common_v1_keys_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_common_v1_keys_proto_goTypes = []interface{}{
|
||||
(*PubKey)(nil), // 0: common.v1.PubKey
|
||||
(*JSONWebKey)(nil), // 1: common.v1.JSONWebKey
|
||||
(*RawKey)(nil), // 2: common.v1.RawKey
|
||||
}
|
||||
var file_common_v1_keys_proto_depIdxs = []int32{
|
||||
2, // 0: common.v1.PubKey.raw_key:type_name -> common.v1.RawKey
|
||||
1, // 1: common.v1.PubKey.jwk:type_name -> common.v1.JSONWebKey
|
||||
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_common_v1_keys_proto_init() }
|
||||
func file_common_v1_keys_proto_init() {
|
||||
if File_common_v1_keys_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_common_v1_keys_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PubKey); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_v1_keys_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JSONWebKey); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_v1_keys_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RawKey); 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_common_v1_keys_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_common_v1_keys_proto_goTypes,
|
||||
DependencyIndexes: file_common_v1_keys_proto_depIdxs,
|
||||
MessageInfos: file_common_v1_keys_proto_msgTypes,
|
||||
}.Build()
|
||||
File_common_v1_keys_proto = out.File
|
||||
file_common_v1_keys_proto_rawDesc = nil
|
||||
file_common_v1_keys_proto_goTypes = nil
|
||||
file_common_v1_keys_proto_depIdxs = nil
|
||||
}
|
||||
@@ -1,215 +0,0 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc (unknown)
|
||||
// source: common/v1/uri.proto
|
||||
|
||||
package commonv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
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)
|
||||
)
|
||||
|
||||
type URI_URIProtocol int32
|
||||
|
||||
const (
|
||||
URI_HTTPS URI_URIProtocol = 0
|
||||
URI_IPFS URI_URIProtocol = 1
|
||||
URI_IPNS URI_URIProtocol = 2
|
||||
URI_DID URI_URIProtocol = 3
|
||||
)
|
||||
|
||||
// Enum value maps for URI_URIProtocol.
|
||||
var (
|
||||
URI_URIProtocol_name = map[int32]string{
|
||||
0: "HTTPS",
|
||||
1: "IPFS",
|
||||
2: "IPNS",
|
||||
3: "DID",
|
||||
}
|
||||
URI_URIProtocol_value = map[string]int32{
|
||||
"HTTPS": 0,
|
||||
"IPFS": 1,
|
||||
"IPNS": 2,
|
||||
"DID": 3,
|
||||
}
|
||||
)
|
||||
|
||||
func (x URI_URIProtocol) Enum() *URI_URIProtocol {
|
||||
p := new(URI_URIProtocol)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x URI_URIProtocol) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (URI_URIProtocol) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_common_v1_uri_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (URI_URIProtocol) Type() protoreflect.EnumType {
|
||||
return &file_common_v1_uri_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x URI_URIProtocol) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use URI_URIProtocol.Descriptor instead.
|
||||
func (URI_URIProtocol) EnumDescriptor() ([]byte, []int) {
|
||||
return file_common_v1_uri_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type URI struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Protocol URI_URIProtocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=common.v1.URI_URIProtocol" json:"protocol,omitempty"`
|
||||
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *URI) Reset() {
|
||||
*x = URI{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_v1_uri_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *URI) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*URI) ProtoMessage() {}
|
||||
|
||||
func (x *URI) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_v1_uri_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)
|
||||
}
|
||||
|
||||
// Deprecated: Use URI.ProtoReflect.Descriptor instead.
|
||||
func (*URI) Descriptor() ([]byte, []int) {
|
||||
return file_common_v1_uri_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *URI) GetProtocol() URI_URIProtocol {
|
||||
if x != nil {
|
||||
return x.Protocol
|
||||
}
|
||||
return URI_HTTPS
|
||||
}
|
||||
|
||||
func (x *URI) GetValue() string {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_common_v1_uri_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_v1_uri_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x72, 0x69, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
|
||||
0x22, 0x8a, 0x01, 0x0a, 0x03, 0x55, 0x52, 0x49, 0x12, 0x36, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x52, 0x49, 0x2e, 0x55, 0x52, 0x49, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x35, 0x0a, 0x0b, 0x55, 0x52, 0x49, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x53, 0x10, 0x00,
|
||||
0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x46, 0x53, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50,
|
||||
0x4e, 0x53, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x49, 0x44, 0x10, 0x03, 0x42, 0x32, 0x5a,
|
||||
0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
|
||||
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76,
|
||||
0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_common_v1_uri_proto_rawDescOnce sync.Once
|
||||
file_common_v1_uri_proto_rawDescData = file_common_v1_uri_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_common_v1_uri_proto_rawDescGZIP() []byte {
|
||||
file_common_v1_uri_proto_rawDescOnce.Do(func() {
|
||||
file_common_v1_uri_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_v1_uri_proto_rawDescData)
|
||||
})
|
||||
return file_common_v1_uri_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_common_v1_uri_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_common_v1_uri_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_common_v1_uri_proto_goTypes = []interface{}{
|
||||
(URI_URIProtocol)(0), // 0: common.v1.URI.URIProtocol
|
||||
(*URI)(nil), // 1: common.v1.URI
|
||||
}
|
||||
var file_common_v1_uri_proto_depIdxs = []int32{
|
||||
0, // 0: common.v1.URI.protocol:type_name -> common.v1.URI.URIProtocol
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_common_v1_uri_proto_init() }
|
||||
func file_common_v1_uri_proto_init() {
|
||||
if File_common_v1_uri_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_common_v1_uri_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*URI); 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_common_v1_uri_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_common_v1_uri_proto_goTypes,
|
||||
DependencyIndexes: file_common_v1_uri_proto_depIdxs,
|
||||
EnumInfos: file_common_v1_uri_proto_enumTypes,
|
||||
MessageInfos: file_common_v1_uri_proto_msgTypes,
|
||||
}.Build()
|
||||
File_common_v1_uri_proto = out.File
|
||||
file_common_v1_uri_proto_rawDesc = nil
|
||||
file_common_v1_uri_proto_goTypes = nil
|
||||
file_common_v1_uri_proto_depIdxs = nil
|
||||
}
|
||||
Reference in New Issue
Block a user