Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction

This commit is contained in:
Prad Nukala 2024-10-21 11:31:28 -04:00
commit a9caac47d7
75 changed files with 1673 additions and 1580 deletions

View File

@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: "1.22" go-version: "1.23"
check-latest: true check-latest: true
- run: make test-unit - run: make test-unit
@ -37,7 +37,7 @@ jobs:
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: "1.22" go-version: "1.23"
check-latest: true check-latest: true
- run: make test-race - run: make test-race
@ -55,6 +55,6 @@ jobs:
- uses: actions/setup-go@v5 - uses: actions/setup-go@v5
with: with:
go-version: "1.22" go-version: "1.23"
check-latest: true check-latest: true
- run: make test-cover - run: make test-cover

View File

@ -180,7 +180,7 @@ mod-tidy:
############################################################################### ###############################################################################
### Protobuf ### ### Protobuf ###
############################################################################### ###############################################################################
protoVer=0.13.2 protoVer=0.15.1
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

View File

@ -16,6 +16,7 @@ tasks:
hway:dev: hway:dev:
dir: cmd/hway dir: cmd/hway
cmds: cmds:
- task: nebula:build
- bunx wrangler dev - bunx wrangler dev
hway:deploy: hway:deploy:
@ -37,3 +38,4 @@ tasks:
- bun install - bun install
- bun run deps.mjs - bun run deps.mjs
- bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css - bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css
- templ generate

View File

@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
} }
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
} }
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() { switch descriptor.FullName() {
default: default:
if descriptor.IsExtension() { if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
} }
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", descriptor.FullName())) panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", descriptor.FullName()))
} }
} }
@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
} }
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
} }
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module"))
} }
panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() { switch d.FullName() {
default: default:
panic(fmt.Errorf("%s is not a oneof field in did.module.v1.Module", d.FullName())) panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.did.module.v1.Module", d.FullName()))
} }
panic("unreachable") panic("unreachable")
} }
@ -414,24 +414,29 @@ var File_did_module_v1_module_proto protoreflect.FileDescriptor
var file_did_module_v1_module_proto_rawDesc = []byte{ var file_did_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1a, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x0a, 0x1a, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x69, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x6e,
0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f,
0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f,
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64,
0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x06, 0x4d, 0x6f, 0x64,
0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x75, 0x6c, 0x65, 0x3a, 0x24, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x1e, 0x0a, 0x1c, 0x67, 0x69, 0x74,
0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73,
0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x6e, 0x72, 0x2f, 0x78, 0x2f, 0x64, 0x69, 0x64, 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64,
0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68,
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f,
0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04,
0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x4f, 0x53, 0x44, 0x4d, 0xaa, 0x02, 0x19, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f,
0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x6e, 0x72, 0x2e, 0x44, 0x69, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31,
0x61, 0xea, 0x02, 0x0f, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0xca, 0x02, 0x19, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44,
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x4f,
0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53,
0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -448,7 +453,7 @@ func file_did_module_v1_module_proto_rawDescGZIP() []byte {
var file_did_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_did_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_did_module_v1_module_proto_goTypes = []interface{}{ var file_did_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: did.module.v1.Module (*Module)(nil), // 0: onsonr.sonr.did.module.v1.Module
} }
var file_did_module_v1_module_proto_depIdxs = []int32{ var file_did_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method output_type

View File

@ -5357,28 +5357,29 @@ var file_did_v1_query_proto_rawDesc = []byte{
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 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, 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, 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, 0x32, 0xdc, 0x02, 0x0a, 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x32, 0xec, 0x02, 0x0a,
0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 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, 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, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x64, 0x69,
0x72, 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x54, 0x0a, 0x07, 0x52,
0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64,
0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c,
0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93,
0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x54, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x64, 0x69, 0x64,
0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x7d, 0x12, 0x57, 0x0a, 0x04, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e,
0x67, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x71, 0x75,
0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x22, 0x0f, 0x2f, 0x64, 0x72, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a,
0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x5c, 0x0a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x12, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f,
0x06, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x12, 0x5f, 0x0a, 0x06, 0x56, 0x65,
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x72, 0x69, 0x66, 0x79, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x65, 0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x72, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x56,
0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 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, 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, 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, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: did/v1/query.proto // source: did/v1/query.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Query_Params_FullMethodName = "/did.v1.Query/Params" Query_Params_FullMethodName = "/did.v1.Query/Params"
@ -28,6 +28,8 @@ const (
// QueryClient is the client API for Query service. // QueryClient is the client API for Query service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Query provides defines the gRPC querier service.
type QueryClient interface { type QueryClient interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
@ -48,8 +50,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
} }
func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryParamsResponse) out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -57,8 +60,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc
} }
func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryResolveResponse) out := new(QueryResolveResponse)
err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -66,8 +70,9 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp
} }
func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error) { func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...grpc.CallOption) (*QuerySignResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QuerySignResponse) out := new(QuerySignResponse)
err := c.cc.Invoke(ctx, Query_Sign_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Sign_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -75,8 +80,9 @@ func (c *queryClient) Sign(ctx context.Context, in *QuerySignRequest, opts ...gr
} }
func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) { func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts ...grpc.CallOption) (*QueryVerifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryVerifyResponse) out := new(QueryVerifyResponse)
err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Verify_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -85,7 +91,9 @@ func (c *queryClient) Verify(ctx context.Context, in *QueryVerifyRequest, opts .
// QueryServer is the server API for Query service. // QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer // All implementations must embed UnimplementedQueryServer
// for forward compatibility // for forward compatibility.
//
// Query provides defines the gRPC querier service.
type QueryServer interface { type QueryServer interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
@ -98,9 +106,12 @@ type QueryServer interface {
mustEmbedUnimplementedQueryServer() mustEmbedUnimplementedQueryServer()
} }
// UnimplementedQueryServer must be embedded to have forward compatible implementations. // UnimplementedQueryServer must be embedded to have
type UnimplementedQueryServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedQueryServer struct{}
func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) { func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
@ -115,6 +126,7 @@ func (UnimplementedQueryServer) Verify(context.Context, *QueryVerifyRequest) (*Q
return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented") return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
} }
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
func (UnimplementedQueryServer) testEmbeddedByValue() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will // Use of this interface is not recommended, as added methods to QueryServer will
@ -124,6 +136,13 @@ type UnsafeQueryServer interface {
} }
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
// If the following call pancis, it indicates UnimplementedQueryServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Query_ServiceDesc, srv) s.RegisterService(&Query_ServiceDesc, srv)
} }

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: did/v1/tx.proto // source: did/v1/tx.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx" Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx"
@ -30,6 +30,8 @@ const (
// MsgClient is the client API for Msg service. // MsgClient is the client API for Msg service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Msg defines the Msg service.
type MsgClient interface { type MsgClient interface {
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages // ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
// Macaroon for verification. // Macaroon for verification.
@ -55,8 +57,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
} }
func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error) { func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgExecuteTxResponse) out := new(MsgExecuteTxResponse)
err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -64,8 +67,9 @@ func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grp
} }
func (c *msgClient) LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error) { func (c *msgClient) LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgLinkAssertionResponse) out := new(MsgLinkAssertionResponse)
err := c.cc.Invoke(ctx, Msg_LinkAssertion_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_LinkAssertion_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -73,8 +77,9 @@ func (c *msgClient) LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opt
} }
func (c *msgClient) LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error) { func (c *msgClient) LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgLinkAuthenticationResponse) out := new(MsgLinkAuthenticationResponse)
err := c.cc.Invoke(ctx, Msg_LinkAuthentication_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_LinkAuthentication_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -82,8 +87,9 @@ func (c *msgClient) LinkAuthentication(ctx context.Context, in *MsgLinkAuthentic
} }
func (c *msgClient) UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error) { func (c *msgClient) UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgUnlinkAssertionResponse) out := new(MsgUnlinkAssertionResponse)
err := c.cc.Invoke(ctx, Msg_UnlinkAssertion_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_UnlinkAssertion_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -91,8 +97,9 @@ func (c *msgClient) UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion,
} }
func (c *msgClient) UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error) { func (c *msgClient) UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgUnlinkAuthenticationResponse) out := new(MsgUnlinkAuthenticationResponse)
err := c.cc.Invoke(ctx, Msg_UnlinkAuthentication_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_UnlinkAuthentication_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -100,8 +107,9 @@ func (c *msgClient) UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthe
} }
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgUpdateParamsResponse) out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -110,7 +118,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
// MsgServer is the server API for Msg service. // MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer // All implementations must embed UnimplementedMsgServer
// for forward compatibility // for forward compatibility.
//
// Msg defines the Msg service.
type MsgServer interface { type MsgServer interface {
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages // ExecuteTx executes a transaction on the Sonr Blockchain. It leverages
// Macaroon for verification. // Macaroon for verification.
@ -128,9 +138,12 @@ type MsgServer interface {
mustEmbedUnimplementedMsgServer() mustEmbedUnimplementedMsgServer()
} }
// UnimplementedMsgServer must be embedded to have forward compatible implementations. // UnimplementedMsgServer must be embedded to have
type UnimplementedMsgServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedMsgServer struct{}
func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) { func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented") return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented")
@ -151,6 +164,7 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
} }
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
func (UnimplementedMsgServer) testEmbeddedByValue() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will // Use of this interface is not recommended, as added methods to MsgServer will
@ -160,6 +174,13 @@ type UnsafeMsgServer interface {
} }
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
// If the following call pancis, it indicates UnimplementedMsgServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Msg_ServiceDesc, srv) s.RegisterService(&Msg_ServiceDesc, srv)
} }

View File

@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
} }
panic(fmt.Errorf("message macaroon.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
} }
panic(fmt.Errorf("message macaroon.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() { switch descriptor.FullName() {
default: default:
if descriptor.IsExtension() { if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
} }
panic(fmt.Errorf("message macaroon.module.v1.Module does not contain field %s", descriptor.FullName())) panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", descriptor.FullName()))
} }
} }
@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
} }
panic(fmt.Errorf("message macaroon.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
} }
panic(fmt.Errorf("message macaroon.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
} }
panic(fmt.Errorf("message macaroon.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() { switch d.FullName() {
default: default:
panic(fmt.Errorf("%s is not a oneof field in macaroon.module.v1.Module", d.FullName())) panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.macaroon.module.v1.Module", d.FullName()))
} }
panic("unreachable") panic("unreachable")
} }
@ -415,26 +415,31 @@ var File_macaroon_module_v1_module_proto protoreflect.FileDescriptor
var file_macaroon_module_v1_module_proto_rawDesc = []byte{ var file_macaroon_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x0a, 0x1f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x12, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6f, 0x12, 0x1e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6d,
0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76,
0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x29, 0xba,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0xc0, 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x72, 0x42, 0xc7, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x78, 0x2f,
0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x42, 0x86, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d,
0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6d, 0x61, 0x63,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42,
0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36,
0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e,
0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4d, 0x58, 0xaa, 0x02, 0x12, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x61, 0x72,
0x6f, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x4d, 0x4d, 0xaa, 0x02, 0x1e,
0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x4d, 0x61, 0x63, 0x61,
0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02,
0x12, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x1e, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4d, 0x61, 0x63,
0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x02, 0x2a, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4d, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31,
0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x4f,
0x74, 0x6f, 0x33, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x4d, 0x61, 0x63,
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56,
0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -451,7 +456,7 @@ func file_macaroon_module_v1_module_proto_rawDescGZIP() []byte {
var file_macaroon_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_macaroon_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_macaroon_module_v1_module_proto_goTypes = []interface{}{ var file_macaroon_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: macaroon.module.v1.Module (*Module)(nil), // 0: onsonr.sonr.macaroon.module.v1.Module
} }
var file_macaroon_module_v1_module_proto_depIdxs = []int32{ var file_macaroon_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method output_type

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: macaroon/v1/query.proto // source: macaroon/v1/query.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Query_Params_FullMethodName = "/macaroon.v1.Query/Params" Query_Params_FullMethodName = "/macaroon.v1.Query/Params"
@ -27,6 +27,8 @@ const (
// QueryClient is the client API for Query service. // QueryClient is the client API for Query service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Query provides defines the gRPC querier service.
type QueryClient interface { type QueryClient interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
@ -45,8 +47,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
} }
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryParamsResponse) out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -54,8 +57,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
} }
func (c *queryClient) RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error) { func (c *queryClient) RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryRefreshTokenResponse) out := new(QueryRefreshTokenResponse)
err := c.cc.Invoke(ctx, Query_RefreshToken_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_RefreshToken_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -63,8 +67,9 @@ func (c *queryClient) RefreshToken(ctx context.Context, in *QueryRefreshTokenReq
} }
func (c *queryClient) ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error) { func (c *queryClient) ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryValidateTokenResponse) out := new(QueryValidateTokenResponse)
err := c.cc.Invoke(ctx, Query_ValidateToken_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_ValidateToken_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -73,7 +78,9 @@ func (c *queryClient) ValidateToken(ctx context.Context, in *QueryValidateTokenR
// QueryServer is the server API for Query service. // QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer // All implementations must embed UnimplementedQueryServer
// for forward compatibility // for forward compatibility.
//
// Query provides defines the gRPC querier service.
type QueryServer interface { type QueryServer interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
@ -84,9 +91,12 @@ type QueryServer interface {
mustEmbedUnimplementedQueryServer() mustEmbedUnimplementedQueryServer()
} }
// UnimplementedQueryServer must be embedded to have forward compatible implementations. // UnimplementedQueryServer must be embedded to have
type UnimplementedQueryServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedQueryServer struct{}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
@ -98,6 +108,7 @@ func (UnimplementedQueryServer) ValidateToken(context.Context, *QueryValidateTok
return nil, status.Errorf(codes.Unimplemented, "method ValidateToken not implemented") return nil, status.Errorf(codes.Unimplemented, "method ValidateToken not implemented")
} }
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
func (UnimplementedQueryServer) testEmbeddedByValue() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will // Use of this interface is not recommended, as added methods to QueryServer will
@ -107,6 +118,13 @@ type UnsafeQueryServer interface {
} }
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
// If the following call pancis, it indicates UnimplementedQueryServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Query_ServiceDesc, srv) s.RegisterService(&Query_ServiceDesc, srv)
} }

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: macaroon/v1/tx.proto // source: macaroon/v1/tx.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams" Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams"
@ -26,6 +26,8 @@ const (
// MsgClient is the client API for Msg service. // MsgClient is the client API for Msg service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Msg defines the Msg service.
type MsgClient interface { type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters. // UpdateParams defines a governance operation for updating the parameters.
// //
@ -45,8 +47,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
} }
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgUpdateParamsResponse) out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -54,8 +57,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
} }
func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) { func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgIssueMacaroonResponse) out := new(MsgIssueMacaroonResponse)
err := c.cc.Invoke(ctx, Msg_IssueMacaroon_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_IssueMacaroon_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -64,7 +68,9 @@ func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opt
// MsgServer is the server API for Msg service. // MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer // All implementations must embed UnimplementedMsgServer
// for forward compatibility // for forward compatibility.
//
// Msg defines the Msg service.
type MsgServer interface { type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters. // UpdateParams defines a governance operation for updating the parameters.
// //
@ -76,9 +82,12 @@ type MsgServer interface {
mustEmbedUnimplementedMsgServer() mustEmbedUnimplementedMsgServer()
} }
// UnimplementedMsgServer must be embedded to have forward compatible implementations. // UnimplementedMsgServer must be embedded to have
type UnimplementedMsgServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedMsgServer struct{}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
@ -87,6 +96,7 @@ func (UnimplementedMsgServer) IssueMacaroon(context.Context, *MsgIssueMacaroon)
return nil, status.Errorf(codes.Unimplemented, "method IssueMacaroon not implemented") return nil, status.Errorf(codes.Unimplemented, "method IssueMacaroon not implemented")
} }
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
func (UnimplementedMsgServer) testEmbeddedByValue() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will // Use of this interface is not recommended, as added methods to MsgServer will
@ -96,6 +106,13 @@ type UnsafeMsgServer interface {
} }
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
// If the following call pancis, it indicates UnimplementedMsgServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Msg_ServiceDesc, srv) s.RegisterService(&Msg_ServiceDesc, srv)
} }

View File

@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.service.module.v1.Module"))
} }
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.service.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.service.module.v1.Module"))
} }
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.service.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() { switch descriptor.FullName() {
default: default:
if descriptor.IsExtension() { if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.service.module.v1.Module"))
} }
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", descriptor.FullName())) panic(fmt.Errorf("message onsonr.sonr.service.module.v1.Module does not contain field %s", descriptor.FullName()))
} }
} }
@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.service.module.v1.Module"))
} }
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.service.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.service.module.v1.Module"))
} }
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.service.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.service.module.v1.Module"))
} }
panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.service.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() { switch d.FullName() {
default: default:
panic(fmt.Errorf("%s is not a oneof field in service.module.v1.Module", d.FullName())) panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.service.module.v1.Module", d.FullName()))
} }
panic("unreachable") panic("unreachable")
} }
@ -415,25 +415,30 @@ var File_service_module_v1_module_proto protoreflect.FileDescriptor
var file_service_module_v1_module_proto_rawDesc = []byte{ var file_service_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1d, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x65,
0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a,
0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x6f, 0x22, 0x32, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x28, 0xba, 0xc0, 0x96,
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xda, 0x01, 0x22, 0x0a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0xc1, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x78, 0x2f, 0x73, 0x65,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x80, 0x02, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x6e,
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68,
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f,
0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d,
0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76,
0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x53, 0x4d, 0xaa, 0x02, 0x1d, 0x4f, 0x6e, 0x73, 0x6f, 0x6e,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d,
0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1d, 0x4f, 0x6e, 0x73, 0x6f, 0x6e,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x4d,
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x29, 0x4f, 0x6e, 0x73, 0x6f, 0x6e,
0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x4d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x21, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53,
0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -450,7 +455,7 @@ func file_service_module_v1_module_proto_rawDescGZIP() []byte {
var file_service_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_service_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_service_module_v1_module_proto_goTypes = []interface{}{ var file_service_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: service.module.v1.Module (*Module)(nil), // 0: onsonr.sonr.service.module.v1.Module
} }
var file_service_module_v1_module_proto_depIdxs = []int32{ var file_service_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method output_type

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: service/v1/query.proto // source: service/v1/query.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Query_Params_FullMethodName = "/service.v1.Query/Params" Query_Params_FullMethodName = "/service.v1.Query/Params"
@ -25,6 +25,8 @@ const (
// QueryClient is the client API for Query service. // QueryClient is the client API for Query service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Query provides defines the gRPC querier service.
type QueryClient interface { type QueryClient interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
@ -39,8 +41,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
} }
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryParamsResponse) out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -49,21 +52,27 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
// QueryServer is the server API for Query service. // QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer // All implementations must embed UnimplementedQueryServer
// for forward compatibility // for forward compatibility.
//
// Query provides defines the gRPC querier service.
type QueryServer interface { type QueryServer interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
mustEmbedUnimplementedQueryServer() mustEmbedUnimplementedQueryServer()
} }
// UnimplementedQueryServer must be embedded to have forward compatible implementations. // UnimplementedQueryServer must be embedded to have
type UnimplementedQueryServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedQueryServer struct{}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
} }
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
func (UnimplementedQueryServer) testEmbeddedByValue() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will // Use of this interface is not recommended, as added methods to QueryServer will
@ -73,6 +82,13 @@ type UnsafeQueryServer interface {
} }
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
// If the following call pancis, it indicates UnimplementedQueryServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Query_ServiceDesc, srv) s.RegisterService(&Query_ServiceDesc, srv)
} }

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: service/v1/tx.proto // source: service/v1/tx.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Msg_UpdateParams_FullMethodName = "/service.v1.Msg/UpdateParams" Msg_UpdateParams_FullMethodName = "/service.v1.Msg/UpdateParams"
@ -26,6 +26,8 @@ const (
// MsgClient is the client API for Msg service. // MsgClient is the client API for Msg service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Msg defines the Msg service.
type MsgClient interface { type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters. // UpdateParams defines a governance operation for updating the parameters.
// //
@ -45,8 +47,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
} }
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgUpdateParamsResponse) out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -54,8 +57,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
} }
func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) { func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgRegisterServiceResponse) out := new(MsgRegisterServiceResponse)
err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -64,7 +68,9 @@ func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService,
// MsgServer is the server API for Msg service. // MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer // All implementations must embed UnimplementedMsgServer
// for forward compatibility // for forward compatibility.
//
// Msg defines the Msg service.
type MsgServer interface { type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters. // UpdateParams defines a governance operation for updating the parameters.
// //
@ -76,9 +82,12 @@ type MsgServer interface {
mustEmbedUnimplementedMsgServer() mustEmbedUnimplementedMsgServer()
} }
// UnimplementedMsgServer must be embedded to have forward compatible implementations. // UnimplementedMsgServer must be embedded to have
type UnimplementedMsgServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedMsgServer struct{}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
@ -87,6 +96,7 @@ func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterServi
return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented") return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented")
} }
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
func (UnimplementedMsgServer) testEmbeddedByValue() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will // Use of this interface is not recommended, as added methods to MsgServer will
@ -96,6 +106,13 @@ type UnsafeMsgServer interface {
} }
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
// If the following call pancis, it indicates UnimplementedMsgServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Msg_ServiceDesc, srv) s.RegisterService(&Msg_ServiceDesc, srv)
} }

View File

@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.vault.module.v1.Module"))
} }
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.vault.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.vault.module.v1.Module"))
} }
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.vault.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
switch descriptor.FullName() { switch descriptor.FullName() {
default: default:
if descriptor.IsExtension() { if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.vault.module.v1.Module"))
} }
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", descriptor.FullName())) panic(fmt.Errorf("message onsonr.sonr.vault.module.v1.Module does not contain field %s", descriptor.FullName()))
} }
} }
@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.vault.module.v1.Module"))
} }
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.vault.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.vault.module.v1.Module"))
} }
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.vault.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
switch fd.FullName() { switch fd.FullName() {
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.vault.module.v1.Module"))
} }
panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) panic(fmt.Errorf("message onsonr.sonr.vault.module.v1.Module does not contain field %s", fd.FullName()))
} }
} }
@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() { switch d.FullName() {
default: default:
panic(fmt.Errorf("%s is not a oneof field in vault.module.v1.Module", d.FullName())) panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.vault.module.v1.Module", d.FullName()))
} }
panic("unreachable") panic("unreachable")
} }
@ -414,25 +414,30 @@ var File_vault_module_v1_module_proto protoreflect.FileDescriptor
var file_vault_module_v1_module_proto_rawDesc = []byte{ var file_vault_module_v1_module_proto_rawDesc = []byte{
0x0a, 0x1c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x0a, 0x1c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76,
0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b,
0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x76, 0x61, 0x75, 0x6c,
0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73,
0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x30, 0x0a,
0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x26, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x20, 0x0a,
0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xb5, 0x01, 0x0a, 0x13, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f,
0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x78, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x42,
0xf4, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73,
0x6f, 0x6e, 0x72, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x50, 0x01, 0x5a, 0x33, 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, 0x76, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x4d, 0x58, 0xaa, 0x02, 0x0f, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x56, 0x4d, 0xaa, 0x02,
0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x1b, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x56, 0x61, 0x75,
0x02, 0x0f, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x6c, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1b, 0x4f,
0x31, 0xe2, 0x02, 0x1b, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x56, 0x61, 0x75, 0x6c, 0x74,
0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x27, 0x4f, 0x6e, 0x73,
0x02, 0x11, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d,
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1f, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53,
0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -449,7 +454,7 @@ func file_vault_module_v1_module_proto_rawDescGZIP() []byte {
var file_vault_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_vault_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_vault_module_v1_module_proto_goTypes = []interface{}{ var file_vault_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: vault.module.v1.Module (*Module)(nil), // 0: onsonr.sonr.vault.module.v1.Module
} }
var file_vault_module_v1_module_proto_depIdxs = []int32{ var file_vault_module_v1_module_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method output_type

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: vault/v1/query.proto // source: vault/v1/query.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Query_Params_FullMethodName = "/vault.v1.Query/Params" Query_Params_FullMethodName = "/vault.v1.Query/Params"
@ -28,6 +28,8 @@ const (
// QueryClient is the client API for Query service. // QueryClient is the client API for Query service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Query provides defines the gRPC querier service.
type QueryClient interface { type QueryClient interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
@ -36,10 +38,10 @@ type QueryClient interface {
Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error)
// Allocate initializes a Target Vault available for claims with a compatible // Allocate initializes a Target Vault available for claims with a compatible
// Authentication mechanism. The default authentication mechanism is WebAuthn. // Authentication mechanism. The default authentication mechanism is WebAuthn.
Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error)
// Sync queries the DID document by its id. And returns the required PKL // Sync queries the DID document by its id. And returns the required PKL
// information // information
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error)
} }
type queryClient struct { type queryClient struct {
@ -51,8 +53,9 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
} }
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryParamsResponse) out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -60,26 +63,29 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
} }
func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) { func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QuerySchemaResponse) out := new(QuerySchemaResponse)
err := c.cc.Invoke(ctx, Query_Schema_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Query_Schema_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) { func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) {
out := new(AllocateResponse) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
err := c.cc.Invoke(ctx, Query_Allocate_FullMethodName, in, out, opts...) out := new(QueryAllocateResponse)
err := c.cc.Invoke(ctx, Query_Allocate_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { func (c *queryClient) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) {
out := new(SyncResponse) cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...) out := new(QuerySyncResponse)
err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -88,7 +94,9 @@ func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.Ca
// QueryServer is the server API for Query service. // QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer // All implementations must embed UnimplementedQueryServer
// for forward compatibility // for forward compatibility.
//
// Query provides defines the gRPC querier service.
type QueryServer interface { type QueryServer interface {
// Params queries all parameters of the module. // Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
@ -97,16 +105,19 @@ type QueryServer interface {
Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error)
// Allocate initializes a Target Vault available for claims with a compatible // Allocate initializes a Target Vault available for claims with a compatible
// Authentication mechanism. The default authentication mechanism is WebAuthn. // Authentication mechanism. The default authentication mechanism is WebAuthn.
Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error)
// Sync queries the DID document by its id. And returns the required PKL // Sync queries the DID document by its id. And returns the required PKL
// information // information
Sync(context.Context, *SyncRequest) (*SyncResponse, error) Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error)
mustEmbedUnimplementedQueryServer() mustEmbedUnimplementedQueryServer()
} }
// UnimplementedQueryServer must be embedded to have forward compatible implementations. // UnimplementedQueryServer must be embedded to have
type UnimplementedQueryServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedQueryServer struct{}
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
@ -114,13 +125,14 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*Q
func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) { func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented")
} }
func (UnimplementedQueryServer) Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) { func (UnimplementedQueryServer) Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented")
} }
func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { func (UnimplementedQueryServer) Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
} }
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
func (UnimplementedQueryServer) testEmbeddedByValue() {}
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to QueryServer will // Use of this interface is not recommended, as added methods to QueryServer will
@ -130,6 +142,13 @@ type UnsafeQueryServer interface {
} }
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
// If the following call pancis, it indicates UnimplementedQueryServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Query_ServiceDesc, srv) s.RegisterService(&Query_ServiceDesc, srv)
} }
@ -170,7 +189,7 @@ func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interf
} }
func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AllocateRequest) in := new(QueryAllocateRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
@ -182,13 +201,13 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: Query_Allocate_FullMethodName, FullMethod: Query_Allocate_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Allocate(ctx, req.(*AllocateRequest)) return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncRequest) in := new(QuerySyncRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
@ -200,7 +219,7 @@ func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interfac
FullMethod: Query_Sync_FullMethodName, FullMethod: Query_Sync_FullMethodName,
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) return srv.(QueryServer).Sync(ctx, req.(*QuerySyncRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.3.0 // - protoc-gen-go-grpc v1.5.1
// - protoc (unknown) // - protoc (unknown)
// source: vault/v1/tx.proto // source: vault/v1/tx.proto
@ -15,8 +15,8 @@ import (
// This is a compile-time assertion to ensure that this generated file // This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against. // is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later. // Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion7 const _ = grpc.SupportPackageIsVersion9
const ( const (
Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams" Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams"
@ -25,6 +25,8 @@ const (
// MsgClient is the client API for Msg service. // MsgClient is the client API for Msg service.
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// Msg defines the Msg service.
type MsgClient interface { type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters. // UpdateParams defines a governance operation for updating the parameters.
// //
@ -41,8 +43,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
} }
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgUpdateParamsResponse) out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -51,7 +54,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
// MsgServer is the server API for Msg service. // MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer // All implementations must embed UnimplementedMsgServer
// for forward compatibility // for forward compatibility.
//
// Msg defines the Msg service.
type MsgServer interface { type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters. // UpdateParams defines a governance operation for updating the parameters.
// //
@ -60,14 +65,18 @@ type MsgServer interface {
mustEmbedUnimplementedMsgServer() mustEmbedUnimplementedMsgServer()
} }
// UnimplementedMsgServer must be embedded to have forward compatible implementations. // UnimplementedMsgServer must be embedded to have
type UnimplementedMsgServer struct { // forward compatible implementations.
} //
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedMsgServer struct{}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
} }
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
func (UnimplementedMsgServer) testEmbeddedByValue() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MsgServer will // Use of this interface is not recommended, as added methods to MsgServer will
@ -77,6 +86,13 @@ type UnsafeMsgServer interface {
} }
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
// If the following call pancis, it indicates UnimplementedMsgServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&Msg_ServiceDesc, srv) s.RegisterService(&Msg_ServiceDesc, srv)
} }

10
go.mod
View File

@ -63,7 +63,7 @@ require (
github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.2.0 github.com/cosmos/ibc-go/v8 v8.2.0
github.com/ethereum/go-ethereum v1.14.6 github.com/ethereum/go-ethereum v1.14.6
github.com/go-webauthn/webauthn v0.10.2 github.com/go-webauthn/webauthn v0.11.2
github.com/golang/protobuf v1.5.4 github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1 github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0
@ -72,7 +72,7 @@ require (
github.com/joho/godotenv v1.5.1 github.com/joho/godotenv v1.5.1
github.com/labstack/echo/v4 v4.10.2 github.com/labstack/echo/v4 v4.10.2
github.com/nlepage/go-js-promise v1.0.0 github.com/nlepage/go-js-promise v1.0.0
github.com/onsonr/crypto v1.33.0 github.com/onsonr/crypto v1.35.0
github.com/segmentio/ksuid v1.0.4 github.com/segmentio/ksuid v1.0.4
github.com/spf13/cast v1.6.0 github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0 github.com/spf13/cobra v1.8.0
@ -156,14 +156,14 @@ require (
github.com/fatih/color v1.16.0 // indirect github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.6.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-webauthn/x v0.1.9 // indirect github.com/go-webauthn/x v0.1.14 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
@ -174,7 +174,7 @@ require (
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-tpm v0.9.0 // indirect github.com/google/go-tpm v0.9.1 // indirect
github.com/google/gopacket v1.1.19 // indirect github.com/google/gopacket v1.1.19 // indirect
github.com/google/orderedcode v0.0.1 // indirect github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.7 // indirect github.com/google/s2a-go v0.1.7 // indirect

20
go.sum
View File

@ -1153,8 +1153,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/fxamacker/cbor/v2 v2.6.0 h1:sU6J2usfADwWlYDAFhZBQ6TnLFBHxgesMrQfQgk1tWA= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I= github.com/gabriel-vasile/mimetype v1.4.4 h1:QjV6pZ7/XZ7ryI2KuyeEDE8wnh7fHP9YnQy+R0LnH8I=
github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s= github.com/gabriel-vasile/mimetype v1.4.4/go.mod h1:JwLei5XPtWdGiMFB5Pjle1oEeoSeEuJfJE+TtfvdB/s=
github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps=
@ -1201,10 +1201,10 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= 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-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/go-webauthn/webauthn v0.10.2 h1:OG7B+DyuTytrEPFmTX503K77fqs3HDK/0Iv+z8UYbq4= github.com/go-webauthn/webauthn v0.11.2 h1:Fgx0/wlmkClTKlnOsdOQ+K5HcHDsDcYIvtYmfhEOSUc=
github.com/go-webauthn/webauthn v0.10.2/go.mod h1:Gd1IDsGAybuvK1NkwUTLbGmeksxuRJjVN2PE/xsPxHs= github.com/go-webauthn/webauthn v0.11.2/go.mod h1:aOtudaF94pM71g3jRwTYYwQTG1KyTILTcZqN1srkmD0=
github.com/go-webauthn/x v0.1.9 h1:v1oeLmoaa+gPOaZqUdDentu6Rl7HkSSsmOT6gxEQHhE= github.com/go-webauthn/x v0.1.14 h1:1wrB8jzXAofojJPAaRxnZhRgagvLGnLjhCAwg3kTpT0=
github.com/go-webauthn/x v0.1.9/go.mod h1:pJNMlIMP1SU7cN8HNlKJpLEnFHCygLCvaLZ8a1xeoQA= 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/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/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/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
@ -1293,8 +1293,8 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= 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-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY=
github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk= github.com/google/go-tpm v0.9.1 h1:0pGc4X//bAlmZzMKf8iz6IsDo1nYTbYJ6FZN/rg4zdM=
github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU= github.com/google/go-tpm v0.9.1/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
@ -1829,8 +1829,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.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 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
github.com/onsonr/crypto v1.33.0 h1:K0KgEQXrzppw/nPXn1swY1a7oUmMdQGcLycuipoqjqM= github.com/onsonr/crypto v1.35.0 h1:IA5Umt4jWDT9XWpR+a7o55mVbVr7T4qntZnrm1tul7w=
github.com/onsonr/crypto v1.33.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0= github.com/onsonr/crypto v1.35.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= 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 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI=

View File

@ -8,6 +8,11 @@ import (
dwngen "github.com/onsonr/sonr/internal/dwn/gen" dwngen "github.com/onsonr/sonr/internal/dwn/gen"
) )
// ╭───────────────────────────────────────────────────────────╮
// │ DWNContext struct methods │
// ╰───────────────────────────────────────────────────────────╯
// DWNContext is the context for DWN endpoints.
type DWNContext struct { type DWNContext struct {
echo.Context echo.Context
@ -15,15 +20,18 @@ type DWNContext struct {
id string // Generated ksuid http cookie; Initialized on first request id string // Generated ksuid http cookie; Initialized on first request
} }
// HasAuthorization returns true if the request has an Authorization header.
func (s *DWNContext) HasAuthorization() bool { func (s *DWNContext) HasAuthorization() bool {
v := ReadHeader(s.Context, HeaderAuthorization) v := ReadHeader(s.Context, HeaderAuthorization)
return v != "" return v != ""
} }
// ID returns the ksuid http cookie.
func (s *DWNContext) ID() string { func (s *DWNContext) ID() string {
return s.id return s.id
} }
// Address returns the sonr address from the cookies.
func (s *DWNContext) Address() string { func (s *DWNContext) Address() string {
v, err := ReadCookie(s.Context, CookieKeySonrAddr) v, err := ReadCookie(s.Context, CookieKeySonrAddr)
if err != nil { if err != nil {
@ -32,14 +40,17 @@ func (s *DWNContext) Address() string {
return v return v
} }
// IPFSGatewayURL returns the IPFS gateway URL from the headers.
func (s *DWNContext) IPFSGatewayURL() string { func (s *DWNContext) IPFSGatewayURL() string {
return ReadHeader(s.Context, HeaderIPFSGatewayURL) return ReadHeader(s.Context, HeaderIPFSGatewayURL)
} }
// ChainID returns the chain ID from the headers.
func (s *DWNContext) ChainID() string { func (s *DWNContext) ChainID() string {
return ReadHeader(s.Context, HeaderSonrChainID) return ReadHeader(s.Context, HeaderSonrChainID)
} }
// Schema returns the vault schema from the cookies.
func (s *DWNContext) Schema() *dwngen.Schema { func (s *DWNContext) Schema() *dwngen.Schema {
v, err := ReadCookie(s.Context, CookieKeyVaultSchema) v, err := ReadCookie(s.Context, CookieKeyVaultSchema)
if err != nil { if err != nil {
@ -53,6 +64,7 @@ func (s *DWNContext) Schema() *dwngen.Schema {
return &schema return &schema
} }
// GetDWNContext returns the DWNContext from the echo context.
func GetDWNContext(c echo.Context) (*DWNContext, error) { func GetDWNContext(c echo.Context) (*DWNContext, error) {
ctx, ok := c.(*DWNContext) ctx, ok := c.(*DWNContext)
if !ok { if !ok {

View File

@ -6,6 +6,11 @@ import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
) )
// ╭───────────────────────────────────────────────────────────╮
// │ HwayContext struct methods │
// ╰───────────────────────────────────────────────────────────╯
// HwayContext is the context for Highway endpoints.
type HwayContext struct { type HwayContext struct {
echo.Context echo.Context
@ -13,10 +18,12 @@ type HwayContext struct {
id string // Generated ksuid http cookie; Initialized on first request id string // Generated ksuid http cookie; Initialized on first request
} }
// ID returns the ksuid http cookie
func (s *HwayContext) ID() string { func (s *HwayContext) ID() string {
return s.id return s.id
} }
// GetHwayContext returns the HwayContext from the echo context.
func GetHWAYContext(c echo.Context) (*HwayContext, error) { func GetHWAYContext(c echo.Context) (*HwayContext, error) {
ctx, ok := c.(*HwayContext) ctx, ok := c.(*HwayContext)
if !ok { if !ok {

View File

@ -2079,10 +2079,6 @@ select{
vertical-align: top; vertical-align: top;
} }
.font-fancy{
font-family: "ZT Bros Oskon 90s", sans-serif;
}
.font-inter{ .font-inter{
font-family: Inter, sans-serif; font-family: Inter, sans-serif;
} }

2
pkg/nebula/assets/js/d3.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
pkg/nebula/assets/js/topojson.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,15 +1,13 @@
package sections package sections
import ( import "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms"
"github.com/onsonr/sonr/pkg/nebula/components/authentication/forms"
"github.com/onsonr/sonr/pkg/nebula/global/styles"
"github.com/onsonr/sonr/pkg/nebula/global/ui"
)
templ RegisterStart() { templ RegisterStart() {
@ui.Breadcrumbs()
@forms.BasicDetailsForm() @forms.BasicDetailsForm()
@styles.Spacer() @registerStartFooter()
}
templ registerStartFooter() {
<div class="flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2"> <div class="flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2">
<button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2">Cancel</button> <button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2">Cancel</button>
<button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900">Next</button> <button @click="modalOpen=false" type="button" class="inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900">Next</button>

View File

@ -8,11 +8,7 @@ package sections
import "github.com/a-h/templ" import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime" import templruntime "github.com/a-h/templ/runtime"
import ( import "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms"
"github.com/onsonr/sonr/pkg/nebula/components/authentication/forms"
"github.com/onsonr/sonr/pkg/nebula/global/styles"
"github.com/onsonr/sonr/pkg/nebula/global/ui"
)
func RegisterStart() templ.Component { func RegisterStart() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
@ -35,18 +31,39 @@ func RegisterStart() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent templ_7745c5c3_Var1 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = ui.Breadcrumbs().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = forms.BasicDetailsForm().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = forms.BasicDetailsForm().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = styles.Spacer().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = registerStartFooter().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
return templ_7745c5c3_Err
})
}
func registerStartFooter() 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("<div class=\"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2\"><button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2\">Cancel</button> <button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900\">Next</button></div>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2\"><button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors border rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-100 focus:ring-offset-2\">Cancel</button> <button @click=\"modalOpen=false\" type=\"button\" class=\"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium text-white transition-colors border border-transparent rounded-md focus:outline-none focus:ring-2 focus:ring-neutral-900 focus:ring-offset-2 bg-neutral-950 hover:bg-neutral-900\">Next</button></div>")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err

View File

@ -14,7 +14,7 @@ templ Hero(hero *models.Hero) {
<div class="px-4 sm:px-6"> <div class="px-4 sm:px-6">
<div class="max-w-3xl mx-auto"> <div class="max-w-3xl mx-auto">
<div class="text-center pb-12 md:pb-16"> <div class="text-center pb-12 md:pb-16">
<h1 class="font-fancy text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4"> <h1 class="font-inter-tight text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4">
{ hero.TitleFirst } { hero.TitleFirst }
<em class="italic relative inline-flex justify-center items-center text-zinc-900"> <em class="italic relative inline-flex justify-center items-center text-zinc-900">
{ hero.TitleEmphasis } { hero.TitleEmphasis }
@ -59,7 +59,7 @@ templ stats(stats []*models.Stat) {
<div class="max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-end md:max-w-none"> <div class="max-w-sm mx-auto grid gap-12 sm:grid-cols-2 md:grid-cols-4 md:-mx-5 md:gap-0 items-end md:max-w-none">
for _, item := range stats { for _, item := range stats {
<div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden"> <div class="relative text-center md:px-5 after:hidden md:after:block after:absolute after:right-0 after:top-1/2 after:-translate-y-1/2 after:w-px after:h-8 after:border-l after:border-zinc-300 after:border-dashed last:after:hidden">
<h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data={ getCounter(item.Value) } x-text="counterValue">{ item.Value }</span>{ item.Denom }</h4> <h4 class="font-inter-tight text-2xl md:text-3xl font-bold tabular-nums mb-2"><span x-data={ counterXData(item.Value) } x-text="counterValue">{ item.Value }</span>{ item.Denom }</h4>
<p class="text-sm text-zinc-500">{ item.Label }</p> <p class="text-sm text-zinc-500">{ item.Label }</p>
</div> </div>
} }
@ -68,7 +68,7 @@ templ stats(stats []*models.Stat) {
</div> </div>
} }
func getCounter(value string) string { func counterXData(value string) string {
return fmt.Sprintf("counter(%s)", value) return fmt.Sprintf("counter(%s)", value)
} }

View File

@ -35,14 +35,14 @@ func Hero(hero *models.Hero) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent templ_7745c5c3_Var1 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Hero --><section class=\"relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10\"><div class=\"pt-32 pb-12 md:pt-40 md:pb-20\"><!-- Section content --><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"text-center pb-12 md:pb-16\"><h1 class=\"font-fancy text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Hero --><section class=\"relative before:absolute before:inset-0 before:h-80 before:pointer-events-none before:bg-gradient-to-b before:from-zinc-100 before:-z-10\"><div class=\"pt-32 pb-12 md:pt-40 md:pb-20\"><!-- Section content --><div class=\"px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto\"><div class=\"text-center pb-12 md:pb-16\"><h1 class=\"font-inter-tight text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zinc-500 via-zinc-900 to-zinc-900 pb-4\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var2 string var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleFirst) templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleFirst)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 18, Col: 24} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 18, Col: 24}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -55,7 +55,7 @@ func Hero(hero *models.Hero) templ.Component {
var templ_7745c5c3_Var3 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleEmphasis) templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleEmphasis)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 20, Col: 28} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 20, Col: 28}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -68,7 +68,7 @@ func Hero(hero *models.Hero) templ.Component {
var templ_7745c5c3_Var4 string var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleSecond) templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleSecond)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 25, Col: 25} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 25, Col: 25}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -81,7 +81,7 @@ func Hero(hero *models.Hero) templ.Component {
var templ_7745c5c3_Var5 string var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle) templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 28, Col: 22} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 28, Col: 22}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -147,7 +147,7 @@ func heroImage(hero *models.Hero) templ.Component {
var templ_7745c5c3_Var7 string var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Src) templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Src)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 48, Col: 23} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 48, Col: 23}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -160,7 +160,7 @@ func heroImage(hero *models.Hero) templ.Component {
var templ_7745c5c3_Var8 string var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Width) templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Width)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 49, Col: 27} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 49, Col: 27}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -173,7 +173,7 @@ func heroImage(hero *models.Hero) templ.Component {
var templ_7745c5c3_Var9 string var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Height) templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Height)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 50, Col: 29} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 50, Col: 29}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -218,9 +218,9 @@ func stats(stats []*models.Stat) templ.Component {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var11 string var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(getCounter(item.Value)) templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(counterXData(item.Value))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 62, Col: 120} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 62, Col: 122}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -233,7 +233,7 @@ func stats(stats []*models.Stat) templ.Component {
var templ_7745c5c3_Var12 string var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Value) templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Value)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 62, Col: 157} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 62, Col: 159}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -246,7 +246,7 @@ func stats(stats []*models.Stat) templ.Component {
var templ_7745c5c3_Var13 string var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Denom) templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Denom)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 62, Col: 178} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 62, Col: 180}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -259,7 +259,7 @@ func stats(stats []*models.Stat) templ.Component {
var templ_7745c5c3_Var14 string var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label) templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 63, Col: 50} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 63, Col: 50}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -286,7 +286,7 @@ func stats(stats []*models.Stat) templ.Component {
}) })
} }
func getCounter(value string) string { func counterXData(value string) string {
return fmt.Sprintf("counter(%s)", value) return fmt.Sprintf("counter(%s)", value)
} }

View File

@ -41,7 +41,7 @@ func Highlights(highlights *models.Highlights) templ.Component {
var templ_7745c5c3_Var2 string var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Heading) templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Heading)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 17, Col: 26} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 17, Col: 26}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -54,7 +54,7 @@ func Highlights(highlights *models.Highlights) templ.Component {
var templ_7745c5c3_Var3 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Subtitle) templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Subtitle)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 20, Col: 27} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 20, Col: 27}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -72,6 +72,14 @@ func Highlights(highlights *models.Highlights) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = highlightTab(3, highlights.Features[2]).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = highlightTab(4, highlights.Features[3]).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div></div></section>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></div></div></section>")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
@ -108,7 +116,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var5 string var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(getSelectedClass(index)) templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(getSelectedClass(index))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 37, Col: 34} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 39, Col: 34}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -121,7 +129,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var6 string var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(getClickPrevent(index)) templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(getClickPrevent(index))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 39, Col: 41} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 41, Col: 41}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -134,7 +142,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var7 string var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title) templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 43, Col: 21} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 45, Col: 21}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -147,7 +155,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var8 string var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(getShowBorder(index)) templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(getShowBorder(index))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 46, Col: 33} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 48, Col: 33}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -160,7 +168,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var9 string var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Desc) templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Desc)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 58, Col: 19} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 60, Col: 19}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -202,7 +210,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var11 string var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(getXShow(index)) templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(getXShow(index))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 66, Col: 26} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 68, Col: 26}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -215,7 +223,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var12 string var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Src) templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Src)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 77, Col: 29} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 79, Col: 29}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -228,7 +236,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var13 string var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Width) templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Width)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 78, Col: 33} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 80, Col: 33}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -241,7 +249,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var14 string var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Height) templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Height)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 79, Col: 35} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 81, Col: 35}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -254,7 +262,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component {
var templ_7745c5c3_Var15 string var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title) templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 80, Col: 25} return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/highlights.templ`, Line: 82, Col: 25}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {

View File

@ -10,7 +10,6 @@ import templruntime "github.com/a-h/templ/runtime"
var ( var (
serviceWorkerInstall = templ.NewOnceHandle() serviceWorkerInstall = templ.NewOnceHandle()
serviceWorkerReady = templ.NewOnceHandle()
) )
func RegisterServiceWorker() templ.Component { func RegisterServiceWorker() templ.Component {

View File

@ -8,15 +8,22 @@ package styles
import "github.com/a-h/templ" import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime" import templruntime "github.com/a-h/templ/runtime"
// Icon is a component that renders an icon
type Icon interface { type Icon interface {
Render() templ.Component Render() templ.Component
} }
// Variant is a component that has attributes
type Variant interface { type Variant interface {
Attributes() templ.Attributes Attributes() templ.Attributes
} }
func Spacer() templ.Component { // ╭───────────────────────────────────────────────────────────╮
// │ 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) { 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 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
@ -37,7 +44,15 @@ func Spacer() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent templ_7745c5c3_Var1 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<br>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-col h-full w-full gap-3 md:gap-6 md:flex-row\">")
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("</div>")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -45,7 +60,8 @@ func Spacer() templ.Component {
}) })
} }
func Rows() templ.Component { // Layout is a component that renders the general layout of the application
func Layout(title string, remote bool) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 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 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
@ -66,80 +82,6 @@ func Rows() templ.Component {
templ_7745c5c3_Var2 = templ.NopComponent templ_7745c5c3_Var2 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-row w-full gap-2 md:gap-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ_7745c5c3_Var2.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
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_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("<div class=\"flex flex-col h-full w-full gap-3 md:gap-6 md:flex-row\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ_7745c5c3_Var3.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func Layout(title string, remote bool) 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("<!doctype html><html lang=\"en\"><head>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head>")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
@ -164,12 +106,12 @@ func Layout(title string, remote bool) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var5 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(title) templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 38, Col: 17} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/layout.templ`, Line: 36, Col: 17}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -177,7 +119,7 @@ func Layout(title string, remote bool) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Var6 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_Var4 := 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_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer { if !templ_7745c5c3_IsBuffer {
@ -193,7 +135,7 @@ func Layout(title string, remote bool) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = templ_7745c5c3_Var4.Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = templ_7745c5c3_Var2.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -203,7 +145,7 @@ func Layout(title string, remote bool) templ.Component {
} }
return templ_7745c5c3_Err return templ_7745c5c3_Err
}) })
templ_7745c5c3_Err = Toaster().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer) templ_7745c5c3_Err = Toaster().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -215,6 +157,7 @@ func Layout(title string, remote bool) templ.Component {
}) })
} }
// LayoutNoBody is a component that renders the general layout of the application without the body tag
func LayoutNoBody(title string, remote bool) templ.Component { func LayoutNoBody(title string, remote bool) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 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 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
@ -231,9 +174,9 @@ func LayoutNoBody(title string, remote bool) templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var7 := templ.GetChildren(ctx) templ_7745c5c3_Var5 := templ.GetChildren(ctx)
if templ_7745c5c3_Var7 == nil { if templ_7745c5c3_Var5 == nil {
templ_7745c5c3_Var7 = templ.NopComponent templ_7745c5c3_Var5 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head>")
@ -260,12 +203,12 @@ func LayoutNoBody(title string, remote bool) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var8 string var templ_7745c5c3_Var6 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(title) templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 65, Col: 17} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/layout.templ`, Line: 64, Col: 17}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -273,7 +216,7 @@ func LayoutNoBody(title string, remote bool) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Var9 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_Var7 := 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_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer { if !templ_7745c5c3_IsBuffer {
@ -289,7 +232,7 @@ func LayoutNoBody(title string, remote bool) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = templ_7745c5c3_Var7.Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = templ_7745c5c3_Var5.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -299,7 +242,7 @@ func LayoutNoBody(title string, remote bool) templ.Component {
} }
return templ_7745c5c3_Err return templ_7745c5c3_Err
}) })
templ_7745c5c3_Err = Toaster().Render(templ.WithChildren(ctx, templ_7745c5c3_Var9), templ_7745c5c3_Buffer) templ_7745c5c3_Err = Toaster().Render(templ.WithChildren(ctx, templ_7745c5c3_Var7), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -311,6 +254,7 @@ func LayoutNoBody(title string, remote bool) templ.Component {
}) })
} }
// OpenModal is a component that renders a modal with a title and description
func OpenModal(title, description string) templ.Component { func OpenModal(title, description string) templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { 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 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
@ -327,21 +271,21 @@ func OpenModal(title, description string) templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var10 := templ.GetChildren(ctx) templ_7745c5c3_Var8 := templ.GetChildren(ctx)
if templ_7745c5c3_Var10 == nil { if templ_7745c5c3_Var8 == nil {
templ_7745c5c3_Var10 = templ.NopComponent templ_7745c5c3_Var8 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{ modalOpen: true }\" @keydown.escape=\"modalOpen=false\" :class=\"{ &#39;z-40&#39;: modalOpen }\" class=\"relative w-auto h-auto\"><template x-teleport=\"body\"><div x-show=\"modalOpen\" class=\"fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen\" x-cloak><div x-show=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0\" x-transition:enter-end=\"opacity-100\" x-transition:leave=\"ease-in duration-300\" x-transition:leave-start=\"opacity-100\" x-transition:leave-end=\"opacity-0\" @click=\"modalOpen=false\" class=\"absolute inset-0 w-full h-full bg-zinc-900 bg-opacity-90 backdrop-blur-sm\"></div><div x-show=\"modalOpen\" x-trap.inert.noscroll=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0 scale-90\" x-transition:enter-end=\"opacity-100 scale-100\" x-transition:leave=\"ease-in duration-200\" x-transition:leave-start=\"opacity-100 scale-100\" x-transition:leave-end=\"opacity-0 scale-90\" class=\"relative w-full py-6 bg-white shadow-md px-7 bg-opacity-90 drop-shadow-md backdrop-blur-sm sm:max-w-lg sm:rounded-lg\"><div class=\"flex items-center justify-between pb-3\"><h3 class=\"text-lg font-semibold\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div x-data=\"{ modalOpen: true }\" @keydown.escape=\"modalOpen=false\" :class=\"{ &#39;z-40&#39;: modalOpen }\" class=\"relative w-auto h-auto\"><template x-teleport=\"body\"><div x-show=\"modalOpen\" class=\"fixed top-0 left-0 z-[99] flex items-center justify-center w-screen h-screen\" x-cloak><div x-show=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0\" x-transition:enter-end=\"opacity-100\" x-transition:leave=\"ease-in duration-300\" x-transition:leave-start=\"opacity-100\" x-transition:leave-end=\"opacity-0\" @click=\"modalOpen=false\" class=\"absolute inset-0 w-full h-full bg-zinc-900 bg-opacity-90 backdrop-blur-sm\"></div><div x-show=\"modalOpen\" x-trap.inert.noscroll=\"modalOpen\" x-transition:enter=\"ease-out duration-300\" x-transition:enter-start=\"opacity-0 scale-90\" x-transition:enter-end=\"opacity-100 scale-100\" x-transition:leave=\"ease-in duration-200\" x-transition:leave-start=\"opacity-100 scale-100\" x-transition:leave-end=\"opacity-0 scale-90\" class=\"relative w-full py-6 bg-white shadow-md px-7 bg-opacity-90 drop-shadow-md backdrop-blur-sm sm:max-w-lg sm:rounded-lg\"><div class=\"flex items-center justify-between pb-3\"><h3 class=\"text-lg font-semibold\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var11 string var templ_7745c5c3_Var9 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(title) templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 115, Col: 47} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/layout.templ`, Line: 115, Col: 47}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -349,12 +293,12 @@ func OpenModal(title, description string) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var12 string var templ_7745c5c3_Var10 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(description) templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(description)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 121, Col: 22} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/layout.templ`, Line: 121, Col: 22}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -362,7 +306,7 @@ func OpenModal(title, description string) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = templ_7745c5c3_Var10.Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = templ_7745c5c3_Var8.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@ -374,4 +318,72 @@ func OpenModal(title, description string) templ.Component {
}) })
} }
// Rows is a component that renders a flex container with a gap of 2 and a max width of 100%
func Rows() 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_Var11 := templ.GetChildren(ctx)
if templ_7745c5c3_Var11 == nil {
templ_7745c5c3_Var11 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"flex flex-row w-full gap-2 md:gap-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ_7745c5c3_Var11.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
// Spacer is a component that renders a <br/> tag
func Spacer() 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_Var12 := templ.GetChildren(ctx)
if templ_7745c5c3_Var12 == nil {
templ_7745c5c3_Var12 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<br>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate var _ = templruntime.GeneratedTemplate

View File

@ -76,7 +76,7 @@ func Styles() templ.Component {
var templ_7745c5c3_Var3 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/css/styles.css") templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/css/styles.css")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 20, Col: 50} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 20, Col: 50}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -118,7 +118,7 @@ func Alpine() templ.Component {
var templ_7745c5c3_Var5 string var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine-focus.min.js") templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine-focus.min.js")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 24, Col: 59} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 24, Col: 59}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -131,7 +131,7 @@ func Alpine() templ.Component {
var templ_7745c5c3_Var6 string var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine.min.js") templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/alpine.min.js")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 25, Col: 53} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 25, Col: 53}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -173,7 +173,7 @@ func Dexie() templ.Component {
var templ_7745c5c3_Var8 string var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/dexie.min.js") templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/dexie.min.js")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 29, Col: 52} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 29, Col: 52}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -215,7 +215,7 @@ func Htmx() templ.Component {
var templ_7745c5c3_Var10 string var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/htmx.min.js") templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs("https://cdn.sonr.id/js/htmx.min.js")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/scripts.templ`, Line: 33, Col: 51} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/scripts.templ`, Line: 33, Col: 51}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {

View File

@ -54,7 +54,7 @@ func renderText(level int, text string) templ.Component {
var templ_7745c5c3_Var2 string var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 23, Col: 10} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 23, Col: 10}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -72,7 +72,7 @@ func renderText(level int, text string) templ.Component {
var templ_7745c5c3_Var3 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 27, Col: 10} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 27, Col: 10}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -90,7 +90,7 @@ func renderText(level int, text string) templ.Component {
var templ_7745c5c3_Var4 string var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 31, Col: 10} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 31, Col: 10}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -108,7 +108,7 @@ func renderText(level int, text string) templ.Component {
var templ_7745c5c3_Var5 string var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 35, Col: 10} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 35, Col: 10}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -159,7 +159,7 @@ func renderLink(attrs templ.Attributes, text string) templ.Component {
var templ_7745c5c3_Var7 string var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 42, Col: 8} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 42, Col: 8}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -209,7 +209,7 @@ func renderStrong(attrs templ.Attributes, text string) templ.Component {
var templ_7745c5c3_Var9 string var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 48, Col: 8} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 48, Col: 8}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -259,7 +259,7 @@ func renderEmphasis(attrs templ.Attributes, text string) templ.Component {
var templ_7745c5c3_Var11 string var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 54, Col: 8} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 54, Col: 8}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -309,7 +309,7 @@ func renderCode(attrs templ.Attributes, text string) templ.Component {
var templ_7745c5c3_Var13 string var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/typography.templ`, Line: 60, Col: 8} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/styles/typography.templ`, Line: 60, Col: 8}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {

View File

@ -38,7 +38,7 @@ func PrimaryButton(href string, text string) templ.Component {
var templ_7745c5c3_Var2 string var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(href) templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(href)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 7, Col: 124} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 7, Col: 124}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -51,7 +51,7 @@ func PrimaryButton(href string, text string) templ.Component {
var templ_7745c5c3_Var3 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 7, Col: 133} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 7, Col: 133}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -93,7 +93,7 @@ func SecondaryButton(href string, text string) templ.Component {
var templ_7745c5c3_Var5 string var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text) templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(text)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 13, Col: 175} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 13, Col: 175}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -256,7 +256,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var8 string var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxGet) templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxGet)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 102, Col: 25} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 102, Col: 25}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -269,7 +269,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var9 string var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget) templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 102, Col: 69} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 102, Col: 69}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -282,7 +282,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var10 string var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger) templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 102, Col: 96} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 102, Col: 96}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -295,7 +295,7 @@ func renderHxGetButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var11 string var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap) templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 102, Col: 117} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 102, Col: 117}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -353,7 +353,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var13 string var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxPost) templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxPost)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 108, Col: 27} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 108, Col: 27}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -366,7 +366,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var14 string var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget) templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTarget)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 108, Col: 52} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 108, Col: 52}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -379,7 +379,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var15 string var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger) templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxTrigger)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 108, Col: 79} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 108, Col: 79}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -392,7 +392,7 @@ func renderHxPostButton(c *button, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var16 string var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap) templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(c.hxSwap)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/button.templ`, Line: 108, Col: 100} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/button.templ`, Line: 108, Col: 100}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {

View File

@ -42,7 +42,7 @@ func renderCard(id string, attrs templ.Attributes) templ.Component {
var templ_7745c5c3_Var2 string var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id) templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(id)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/card.templ`, Line: 10, Col: 13} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/card.templ`, Line: 10, Col: 13}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {

View File

@ -100,7 +100,7 @@ func breadcrumbItem(title string, active bool) templ.Component {
var templ_7745c5c3_Var3 string var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title) templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/panel.templ`, Line: 26, Col: 126} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/panel.templ`, Line: 26, Col: 126}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
@ -118,7 +118,7 @@ func breadcrumbItem(title string, active bool) templ.Component {
var templ_7745c5c3_Var4 string var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title) templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/ui/panel.templ`, Line: 28, Col: 118} return templ.Error{Err: templ_7745c5c3_Err, FileName: `global/ui/panel.templ`, Line: 28, Col: 118}
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {

View File

@ -269,5 +269,6 @@ class Profile {
@JsonField @JsonField
updatedAt: String? updatedAt: String?
} }
db_name: String = "vault" db_name: String = "vault"
db_version: Int = 1 db_version: Int = 1

View File

@ -17,3 +17,13 @@ processes:
max_restarts: 1 max_restarts: 1
depends: depends:
- ipfs - ipfs
hway:
namespace: testnet
background: true
command: "task hway:dev"
restart: never
max_restarts: 1
depends:
- ipfs
- sonr

View File

@ -1,9 +1,9 @@
version: v1 version: v1
name: buf.build/onsonr/sonr name: buf.build/onsonr/sonr
deps: deps:
- buf.build/cosmos/cosmos-sdk:05419252bcc241ea8023acf1ed4cadc5 - buf.build/cosmos/cosmos-sdk
- buf.build/cosmos/cosmos-proto:04467658e59e44bbb22fe568206e1f70 - buf.build/cosmos/cosmos-proto
- buf.build/cosmos/gogo-proto:88ef6483f90f478fb938c37dde52ece3 - buf.build/cosmos/gogo-proto
- buf.build/googleapis/googleapis - buf.build/googleapis/googleapis
breaking: breaking:
use: use:
@ -14,7 +14,6 @@ lint:
- COMMENTS - COMMENTS
- FILE_LOWER_SNAKE_CASE - FILE_LOWER_SNAKE_CASE
except: except:
- PACKAGE_NO_IMPORT_CYCLE
- UNARY_RPC - UNARY_RPC
- COMMENT_FIELD - COMMENT_FIELD
- COMMENT_MESSAGE - COMMENT_MESSAGE
@ -31,5 +30,8 @@ lint:
- COMMENT_ENUM - COMMENT_ENUM
- ENUM_ZERO_VALUE_SUFFIX - ENUM_ZERO_VALUE_SUFFIX
ignore: ignore:
- PACKAGE_NO_IMPORT_CYCLE
- IMPORT_USED
- tendermint - tendermint
- amino - amino
- cosmos

View File

@ -1,11 +1,11 @@
syntax = "proto3"; syntax = "proto3";
package did.module.v1; package onsonr.sonr.did.module.v1;
import "cosmos/app/v1alpha1/module.proto"; import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module. // Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject // Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module { message Module {
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr"}; option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr/x/did"};
} }

View File

@ -10,22 +10,22 @@ option go_package = "github.com/onsonr/sonr/x/did/types";
service Query { service Query {
// Params queries all parameters of the module. // Params queries all parameters of the module.
rpc Params(QueryRequest) returns (QueryParamsResponse) { rpc Params(QueryRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/params"; option (google.api.http).get = "/did/v1/params";
} }
// Resolve queries the DID document by its id. // Resolve queries the DID document by its id.
rpc Resolve(QueryRequest) returns (QueryResolveResponse) { rpc Resolve(QueryRequest) returns (QueryResolveResponse) {
option (google.api.http).get = "/did/{did}"; option (google.api.http).get = "/did/v1/{did}";
} }
// Sign signs a message with the DID document // Sign signs a message with the DID document
rpc Sign(QuerySignRequest) returns (QuerySignResponse) { rpc Sign(QuerySignRequest) returns (QuerySignResponse) {
option (google.api.http).post = "/did/{did}/sign"; option (google.api.http).post = "/did/v1/{did}/sign";
} }
// Verify verifies a message with the DID document // Verify verifies a message with the DID document
rpc Verify(QueryVerifyRequest) returns (QueryVerifyResponse) { rpc Verify(QueryVerifyRequest) returns (QueryVerifyResponse) {
option (google.api.http).post = "/did/{did}/verify"; option (google.api.http).post = "/did/v1/{did}/verify";
} }
} }

View File

@ -1,13 +1,11 @@
syntax = "proto3"; syntax = "proto3";
package macaroon.module.v1; package onsonr.sonr.macaroon.module.v1;
import "cosmos/app/v1alpha1/module.proto"; import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module. // Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject // Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module { message Module {
option (cosmos.app.v1alpha1.module) = { option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr/x/macaroon"};
go_import : "github.com/onsonr/sonr"
};
} }

View File

@ -1,13 +1,11 @@
syntax = "proto3"; syntax = "proto3";
package service.module.v1; package onsonr.sonr.service.module.v1;
import "cosmos/app/v1alpha1/module.proto"; import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module. // Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject // Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module { message Module {
option (cosmos.app.v1alpha1.module) = { option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr/x/service"};
go_import : "github.com/onsonr/sonr"
};
} }

View File

@ -1,13 +1,11 @@
syntax = "proto3"; syntax = "proto3";
package vault.module.v1; package onsonr.sonr.vault.module.v1;
import "cosmos/app/v1alpha1/module.proto"; import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module. // Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject // Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module { message Module {
option (cosmos.app.v1alpha1.module) = { option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr/x/vault"};
go_import : "github.com/onsonr/sonr"
};
} }

View File

@ -6,6 +6,10 @@ import "vault/v1/genesis.proto";
option go_package = "github.com/onsonr/sonr/x/vault/types"; option go_package = "github.com/onsonr/sonr/x/vault/types";
//
// RPC Query Service
//
// Query provides defines the gRPC querier service. // Query provides defines the gRPC querier service.
service Query { service Query {
// Params queries all parameters of the module. // Params queries all parameters of the module.
@ -21,17 +25,21 @@ service Query {
// Allocate initializes a Target Vault available for claims with a compatible // Allocate initializes a Target Vault available for claims with a compatible
// Authentication mechanism. The default authentication mechanism is WebAuthn. // Authentication mechanism. The default authentication mechanism is WebAuthn.
rpc Allocate(AllocateRequest) returns (AllocateResponse) { rpc Allocate(QueryAllocateRequest) returns (QueryAllocateResponse) {
option (google.api.http).get = "/vault/v1/allocate/{origin}/{subject}"; option (google.api.http).get = "/vault/v1/allocate";
} }
// Sync queries the DID document by its id. And returns the required PKL // Sync queries the DID document by its id. And returns the required PKL
// information // information
rpc Sync(SyncRequest) returns (SyncResponse) { rpc Sync(QuerySyncRequest) returns (QuerySyncResponse) {
option (google.api.http).post = "/vault/v1/sync-initial"; option (google.api.http).get = "/vault/v1/sync-initial";
} }
} }
//
// RPC Query Messages
//
// QueryParamsRequest is the request type for the Query/Params RPC method. // QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest {} message QueryParamsRequest {}
@ -50,14 +58,11 @@ message QuerySchemaResponse {
Schema schema = 1; Schema schema = 1;
} }
// AllocateRequest is the request type for the Allocate RPC method. // QueryAllocateRequest is the request type for the Allocate RPC method.
message AllocateRequest { message QueryAllocateRequest {}
string origin = 1;
string subject = 2;
}
// AllocateResponse is the response type for the Allocate RPC method. // AllocateResponse is the response type for the Allocate RPC method.
message AllocateResponse { message QueryAllocateResponse {
bool success = 1; bool success = 1;
string cid = 2; string cid = 2;
string macaroon = 3; string macaroon = 3;
@ -66,12 +71,12 @@ message AllocateResponse {
} }
// SyncRequest is the request type for the Sync RPC method. // SyncRequest is the request type for the Sync RPC method.
message SyncRequest { message QuerySyncRequest {
string did = 1; string did = 1;
} }
// SyncResponse is the response type for the Sync RPC method. // SyncResponse is the response type for the Sync RPC method.
message SyncResponse { message QuerySyncResponse {
bool success = 1; bool success = 1;
// Schema is the DID document. // Schema is the DID document.

42
slumber.yml Normal file
View File

@ -0,0 +1,42 @@
# For basic usage info, see:
# https://slumber.lucaspickering.me/book/getting_started.html
# For all collection options, see:
# https://slumber.lucaspickering.me/book/api/request_collection/index.html
# Profiles are groups of data you can easily switch between. A common usage is
# to define profiles for various environments of a REST service
# slumber.yml
profiles:
local:
data:
host: http://localhost:1317
production:
data:
host: https://api.sonr.id
requests:
did: !folder
name: Params
requests:
did_params: !request
method: GET
url: "{{host}}/did/v1/params"
macaroon_params: !request
method: GET
url: "{{host}}/macaroon/v1/params"
service_params: !request
method: GET
url: "{{host}}/service/v1/params"
vault_params: !request
method: GET
url: "{{host}}/vault/v1/params"
vault: !folder
name: Vault
requests:
vault_schema: !request
method: GET
url: "{{host}}/vault/v1/schema"
vault_allocate: !request
method: GET
url: "{{host}}/vault/v1/allocate"

View File

@ -6,24 +6,16 @@ import (
"github.com/onsonr/sonr/x/did/types" "github.com/onsonr/sonr/x/did/types"
) )
func (k Keeper) NewController(ctx sdk.Context) (uint64, types.ControllerI, error) { func (k Keeper) NewController(ctx sdk.Context) (types.ControllerI, error) {
shares, err := mpc.GenerateKeyshares() shares, err := mpc.GenerateKeyshares()
if err != nil { if err != nil {
return 0, nil, err return nil, err
} }
controller, err := types.NewController(ctx, shares) controller, err := types.NewController(shares)
if err != nil { if err != nil {
return 0, nil, err return nil, err
} }
entry, err := controller.GetTableEntry() return controller, nil
if err != nil {
return 0, nil, err
}
num, err := k.OrmDB.ControllerTable().InsertReturningNumber(ctx, entry)
if err != nil {
return 0, nil, err
}
return num, controller, nil
} }
func (k Keeper) ResolveController(ctx sdk.Context, did string) (types.ControllerI, error) { func (k Keeper) ResolveController(ctx sdk.Context, did string) (types.ControllerI, error) {

View File

@ -1,8 +1,6 @@
package types package types
import ( import (
fmt "fmt"
"github.com/onsonr/crypto/mpc" "github.com/onsonr/crypto/mpc"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
@ -13,52 +11,34 @@ type ControllerI interface {
ChainID() string ChainID() string
GetPubKey() *didv1.PubKey GetPubKey() *didv1.PubKey
SonrAddress() string SonrAddress() string
EthAddress() string RawPublicKey() []byte
BtcAddress() string
PublicKey() []byte
GetTableEntry() (*didv1.Controller, error)
ExportUserKs() (string, error)
} }
func NewController(ctx sdk.Context, shares []mpc.Share) (ControllerI, error) { func NewController(shares []mpc.Share) (ControllerI, error) {
var ( var (
valKs = shares[0] valKs = shares[0]
userKs = shares[1] userKs = shares[1]
) )
pbBz := valKs.GetPublicKey() pb, err := valKs.PublicKey()
sonrAddr, err := ComputeSonrAddress(pbBz)
if err != nil { if err != nil {
return nil, err return nil, err
} }
sonrAddr, err := ComputeSonrAddress(pb)
btcAddr, err := ComputeBitcoinAddress(pbBz)
if err != nil { if err != nil {
return nil, err return nil, err
} }
ecdsaPub, err := valKs.ECDSAPublicKey()
if err != nil {
return nil, err
}
ethAddr := ComputeEthAddress(ecdsaPub)
return &controller{ return &controller{
valKs: valKs, valKs: valKs,
userKs: userKs, userKs: userKs,
address: sonrAddr, address: sonrAddr,
btcAddr: btcAddr, publicKey: pb,
ethAddr: ethAddr,
chainID: ctx.ChainID(),
publicKey: pbBz,
}, nil }, nil
} }
func LoadControllerFromTableEntry(ctx sdk.Context, entry *didv1.Controller) (ControllerI, error) { func LoadControllerFromTableEntry(ctx sdk.Context, entry *didv1.Controller) (ControllerI, error) {
return &controller{ return &controller{
address: entry.Did, address: entry.Did,
btcAddr: entry.BtcAddress,
ethAddr: entry.EthAddress,
chainID: ctx.ChainID(), chainID: ctx.ChainID(),
publicKey: entry.PublicKey.RawKey.Key, publicKey: entry.PublicKey.RawKey.Key,
}, nil }, nil
@ -69,28 +49,14 @@ type controller struct {
valKs mpc.Share valKs mpc.Share
address string address string
chainID string chainID string
ethAddr string
btcAddr string
publicKey []byte publicKey []byte
did string did string
} }
func (c *controller) BtcAddress() string {
return c.btcAddr
}
func (c *controller) ChainID() string { func (c *controller) ChainID() string {
return c.chainID return c.chainID
} }
func (c *controller) EthAddress() string {
return c.ethAddr
}
func (c *controller) ExportUserKs() (string, error) {
return c.userKs.Marshal()
}
func (c *controller) GetPubKey() *didv1.PubKey { func (c *controller) GetPubKey() *didv1.PubKey {
return &didv1.PubKey{ return &didv1.PubKey{
KeyType: "ecdsa", KeyType: "ecdsa",
@ -102,25 +68,14 @@ func (c *controller) GetPubKey() *didv1.PubKey {
} }
} }
func (c *controller) GetTableEntry() (*didv1.Controller, error) { func (c *controller) RawPublicKey() []byte {
valKs, err := c.valKs.Marshal()
if err != nil {
return nil, err
}
return &didv1.Controller{
KsVal: valKs,
Did: fmt.Sprintf("did:sonr:%s", c.address),
SonrAddress: c.address,
EthAddress: c.ethAddr,
BtcAddress: c.btcAddr,
PublicKey: c.GetPubKey(),
}, nil
}
func (c *controller) PublicKey() []byte {
return c.publicKey return c.publicKey
} }
// func (c *controller) StdPublicKey() cryptotypes.PubKey {
// return c.stdPubKey
// }
func (c *controller) SonrAddress() string { func (c *controller) SonrAddress() string {
return c.address return c.address
} }

View File

@ -7,11 +7,4 @@ var (
ErrInvalidETHAddressFormat = sdkerrors.Register(ModuleName, 200, "invalid ETH address format") ErrInvalidETHAddressFormat = sdkerrors.Register(ModuleName, 200, "invalid ETH address format")
ErrInvalidBTCAddressFormat = sdkerrors.Register(ModuleName, 201, "invalid BTC address format") ErrInvalidBTCAddressFormat = sdkerrors.Register(ModuleName, 201, "invalid BTC address format")
ErrInvalidIDXAddressFormat = sdkerrors.Register(ModuleName, 202, "invalid IDX address format") ErrInvalidIDXAddressFormat = sdkerrors.Register(ModuleName, 202, "invalid IDX address format")
ErrInvalidOriginFormat = sdkerrors.Register(ModuleName, 203, "invalid origin format")
ErrInvalidServiceOrigin = sdkerrors.Register(ModuleName, 300, "invalid service origin")
ErrUnrecognizedService = sdkerrors.Register(ModuleName, 301, "unrecognized service")
ErrUnsupportedKeyEncoding = sdkerrors.Register(ModuleName, 400, "unsupported key encoding")
ErrUnsopportedChainCode = sdkerrors.Register(ModuleName, 401, "unsupported chain code")
ErrUnsupportedKeyCurve = sdkerrors.Register(ModuleName, 402, "unsupported key curve")
ErrInvalidSignature = sdkerrors.Register(ModuleName, 403, "invalid signature")
) )

1
x/did/types/formatter.go Normal file
View File

@ -0,0 +1 @@
package types

View File

@ -0,0 +1,68 @@
package mpc
import (
"bytes"
"fmt"
"github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/golang/protobuf/proto"
)
// CustomPubKey represents a custom secp256k1 public key.
type CustomPubKey struct {
proto.Message
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
// NewCustomPubKeyFromRawBytes creates a new CustomPubKey from raw bytes.
func NewCustomPubKeyFromRawBytes(key []byte) (*CustomPubKey, error) {
// Validate the key length and format
if len(key) != 33 {
return nil, fmt.Errorf("invalid key length; expected 33 bytes, got %d", len(key))
}
if key[0] != 0x02 && key[0] != 0x03 {
return nil, fmt.Errorf("invalid key format; expected 0x02 or 0x03 as the first byte, got 0x%02x", key[0])
}
return &CustomPubKey{Key: key}, nil
}
// Bytes returns the byte representation of the public key.
func (pk *CustomPubKey) Bytes() []byte {
return pk.Key
}
// Equals checks if two public keys are equal.
func (pk *CustomPubKey) Equals(other types.PubKey) bool {
return bytes.EqualFold(pk.Bytes(), other.Bytes())
}
// Type returns the type of the public key.
func (pk *CustomPubKey) Type() string {
return "custom-secp256k1"
}
// Marshal implements the proto.Message interface.
func (pk *CustomPubKey) Marshal() ([]byte, error) {
return proto.Marshal(pk)
}
// Unmarshal implements the proto.Message interface.
func (pk *CustomPubKey) Unmarshal(data []byte) error {
return proto.Unmarshal(data, pk)
}
// Address returns the address derived from the public key.
func (pk *CustomPubKey) Address() []byte {
// Implement address derivation logic here
// For simplicity, this example uses a placeholder
return []byte("derived-address")
}
// VerifySignature verifies a signature using the public key.
func (pk *CustomPubKey) VerifySignature(msg []byte, sig []byte) bool {
// Implement signature verification logic here
// For simplicity, this example uses a placeholder
return true
}

View File

@ -0,0 +1,76 @@
package pubkey
import (
"strings"
didv1 "github.com/onsonr/sonr/api/did/v1"
)
type PubKeyI interface {
GetRole() string
GetKeyType() string
GetRawKey() *didv1.RawKey
GetJwk() *didv1.JSONWebKey
}
// PubKey defines a generic pubkey.
type PublicKey interface {
VerifySignature(msg, sig []byte) bool
}
type PubKeyG[T any] interface {
*T
PublicKey
}
type pubKeyImpl struct {
decode func(b []byte) (PublicKey, error)
validate func(key PublicKey) error
}
// func WithSecp256K1PubKey() Option {
// return WithPubKeyWithValidationFunc(func(pt *secp256k1.PubKey) error {
// _, err := dcrd_secp256k1.ParsePubKey(pt.Key)
// return err
// })
// }
//
// func WithPubKey[T any, PT PubKeyG[T]]() Option {
// return WithPubKeyWithValidationFunc[T, PT](func(_ PT) error {
// return nil
// })
// }
//
// func WithPubKeyWithValidationFunc[T any, PT PubKeyG[T]](validateFn func(PT) error) Option {
// pkImpl := pubKeyImpl{
// decode: func(b []byte) (PublicKey, error) {
// key := PT(new(T))
// err := gogoproto.Unmarshal(b, key)
// if err != nil {
// return nil, err
// }
// return key, nil
// },
// validate: func(k PublicKey) error {
// concrete, ok := k.(PT)
// if !ok {
// return fmt.Errorf(
// "invalid pubkey type passed for validation, wanted: %T, got: %T",
// concrete,
// k,
// )
// }
// return validateFn(concrete)
// },
// }
// return func(a *Account) {
// a.supportedPubKeys[gogoproto.MessageName(PT(new(T)))] = pkImpl
// }
// }
func nameFromTypeURL(url string) string {
name := url
if i := strings.LastIndexByte(url, '/'); i >= 0 {
name = name[i+len("/"):]
}
return name
}

View File

@ -551,45 +551,45 @@ func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb62
var fileDescriptor_ae1fa9bb626e2869 = []byte{ var fileDescriptor_ae1fa9bb626e2869 = []byte{
// 625 bytes of a gzipped FileDescriptorProto // 625 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0x41, 0x6b, 0x13, 0x41, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0x41, 0x6f, 0xd3, 0x4c,
0x14, 0x6e, 0x92, 0x66, 0xd3, 0x3c, 0x4b, 0x9b, 0x4e, 0xa3, 0x6e, 0x63, 0x59, 0xca, 0x1c, 0x4a, 0x10, 0x6d, 0x92, 0xc6, 0x6d, 0xe7, 0xfb, 0x48, 0xc3, 0xe2, 0x56, 0x26, 0x44, 0x56, 0xb5, 0x87,
0x45, 0xc9, 0xd2, 0xf6, 0xaa, 0x17, 0xe9, 0x45, 0x50, 0xb0, 0x51, 0x3c, 0x88, 0x50, 0xa7, 0x99, 0xaa, 0x08, 0x14, 0xab, 0xed, 0x15, 0x2e, 0xa8, 0x17, 0x0e, 0x48, 0x90, 0x22, 0x90, 0xb8, 0x94,
0xe7, 0x76, 0xe8, 0x66, 0x26, 0xdd, 0x99, 0x2c, 0x06, 0xd1, 0x83, 0xbf, 0x40, 0xf1, 0xee, 0xef, 0x6d, 0x76, 0x70, 0x57, 0x75, 0x76, 0x53, 0xef, 0xc6, 0x22, 0x42, 0x70, 0xe0, 0x17, 0x80, 0xb8,
0xf1, 0x58, 0xf0, 0xe2, 0xc1, 0x83, 0xb4, 0xfe, 0x10, 0xd9, 0xd9, 0xc9, 0x36, 0xbb, 0xe8, 0x51, 0xf3, 0x7b, 0x38, 0x56, 0xe2, 0xc2, 0x11, 0xb5, 0x1c, 0xf9, 0x11, 0xc8, 0xeb, 0x75, 0x1a, 0x5b,
0xbc, 0x84, 0xbc, 0xef, 0xbd, 0xf7, 0xcd, 0xfb, 0x76, 0xbe, 0x37, 0x40, 0xb8, 0xe0, 0x61, 0xba, 0x70, 0x44, 0x5c, 0xa2, 0xcc, 0x9b, 0x99, 0xb7, 0x6f, 0x76, 0xdf, 0x18, 0x08, 0x17, 0x3c, 0xca,
0x1b, 0x9e, 0x4d, 0x30, 0x99, 0xf6, 0xc7, 0x89, 0x32, 0x8a, 0x78, 0x5c, 0xf0, 0x7e, 0xba, 0xdb, 0x76, 0xa3, 0xb3, 0x29, 0xa6, 0xb3, 0xc1, 0x24, 0x55, 0x46, 0x11, 0x8f, 0x0b, 0x3e, 0xc8, 0x76,
0xeb, 0xba, 0x5c, 0x84, 0x12, 0xb5, 0xd0, 0x79, 0xb6, 0xb7, 0x19, 0x29, 0x15, 0xc5, 0x18, 0xb2, 0x7b, 0xbe, 0xcb, 0xc5, 0x28, 0x51, 0x0b, 0x5d, 0x64, 0x7b, 0xfd, 0x58, 0xa9, 0x38, 0xc1, 0x88,
0xb1, 0x08, 0x99, 0x94, 0xca, 0x30, 0x23, 0x94, 0x74, 0x59, 0xfa, 0x0a, 0x96, 0x0f, 0x33, 0xaa, 0x4d, 0x44, 0xc4, 0xa4, 0x54, 0x86, 0x19, 0xa1, 0xa4, 0xcb, 0xd2, 0x97, 0xf0, 0xff, 0x93, 0x9c,
0x01, 0x9e, 0x4d, 0x50, 0x1b, 0xd2, 0x81, 0x06, 0x17, 0xdc, 0xaf, 0x6d, 0xd5, 0x76, 0xda, 0x83, 0x6a, 0x88, 0x67, 0x53, 0xd4, 0x86, 0x74, 0xa1, 0xc5, 0x05, 0x0f, 0x1a, 0x5b, 0x8d, 0x9d, 0xb5,
0xec, 0x2f, 0xb9, 0x01, 0x9e, 0x4a, 0x44, 0x24, 0xa4, 0x5f, 0xb7, 0xa0, 0x8b, 0xb2, 0xca, 0x53, 0x61, 0xfe, 0x97, 0x6c, 0x82, 0xa7, 0x52, 0x11, 0x0b, 0x19, 0x34, 0x2d, 0xe8, 0xa2, 0xbc, 0xf2,
0x9c, 0xfa, 0x8d, 0xbc, 0xf2, 0x14, 0xa7, 0xa4, 0x0b, 0x4d, 0xa6, 0x35, 0x1a, 0x7f, 0xd1, 0x62, 0x14, 0x67, 0x41, 0xab, 0xa8, 0x3c, 0xc5, 0x19, 0xf1, 0xa1, 0xcd, 0xb4, 0x46, 0x13, 0x2c, 0x5b,
0x79, 0x40, 0xef, 0xc3, 0xba, 0x3d, 0xe1, 0x09, 0x4b, 0xd8, 0x48, 0x0f, 0x50, 0x8f, 0x95, 0xd4, 0xac, 0x08, 0xe8, 0x7d, 0xb8, 0x61, 0x4f, 0x78, 0xcc, 0x52, 0x36, 0xd6, 0x43, 0xd4, 0x13, 0x25,
0x48, 0xb6, 0xc1, 0x1b, 0x5b, 0xc4, 0x9e, 0x75, 0x6d, 0x6f, 0xa5, 0x9f, 0xab, 0xe8, 0xbb, 0x3a, 0x35, 0x92, 0x6d, 0xf0, 0x26, 0x16, 0xb1, 0x67, 0xfd, 0xb7, 0xd7, 0x19, 0x14, 0x53, 0x0c, 0x5c,
0x97, 0xa5, 0x07, 0xd0, 0x75, 0x03, 0x6a, 0x15, 0xa7, 0x58, 0xf4, 0xdf, 0x85, 0x25, 0xae, 0x86, 0x9d, 0xcb, 0xd2, 0x03, 0xf0, 0x9d, 0x40, 0xad, 0x92, 0x0c, 0xe7, 0xfd, 0x77, 0x61, 0x95, 0xab,
0x93, 0x11, 0x4a, 0xe3, 0x18, 0x3a, 0x33, 0x86, 0x03, 0x87, 0x0f, 0x8a, 0x0a, 0xfa, 0x1e, 0x3a, 0xd1, 0x74, 0x8c, 0xd2, 0x38, 0x86, 0x6e, 0xc9, 0x70, 0xe0, 0xf0, 0xe1, 0xbc, 0x82, 0xbe, 0x83,
0x96, 0xe5, 0xa9, 0x88, 0xe4, 0x3f, 0x93, 0x4a, 0x7c, 0x68, 0x8d, 0x50, 0x6b, 0x16, 0xa1, 0xdf, 0xae, 0x65, 0x39, 0x14, 0xb1, 0xfc, 0x6b, 0xa3, 0x92, 0x00, 0x56, 0xc6, 0xa8, 0x35, 0x8b, 0x31,
0xb4, 0xf8, 0x2c, 0xa4, 0xbb, 0xb0, 0x36, 0x77, 0xbe, 0x93, 0xb0, 0x09, 0x6d, 0x2d, 0x22, 0xc9, 0x68, 0x5b, 0xbc, 0x0c, 0xe9, 0x2e, 0x5c, 0x5f, 0x38, 0xdf, 0x8d, 0xd0, 0x87, 0x35, 0x2d, 0x62,
0xcc, 0x24, 0x41, 0x37, 0xc6, 0x15, 0x40, 0xbf, 0xd4, 0x80, 0xd8, 0x9e, 0xe7, 0x98, 0x88, 0xd7, 0xc9, 0xcc, 0x34, 0x45, 0x27, 0xe3, 0x0a, 0xa0, 0x9f, 0x1b, 0x40, 0x6c, 0xcf, 0x33, 0x4c, 0xc5,
0xd3, 0xff, 0x30, 0x75, 0x79, 0x40, 0xaf, 0x3a, 0xe0, 0x1d, 0x77, 0xb1, 0xb3, 0xf9, 0x9c, 0xaa, 0xab, 0xd9, 0x3f, 0x50, 0x5d, 0x15, 0xe8, 0xd5, 0x05, 0xde, 0x71, 0x0f, 0x5b, 0xea, 0x73, 0x53,
0x2e, 0x34, 0x53, 0x16, 0xbb, 0x11, 0x97, 0x06, 0x79, 0x40, 0x3f, 0xd5, 0x61, 0x69, 0x76, 0x2f, 0xf9, 0xd0, 0xce, 0x58, 0xe2, 0x24, 0xae, 0x0e, 0x8b, 0x80, 0x7e, 0x6c, 0xc2, 0x6a, 0xf9, 0x2e,
0x64, 0x05, 0xea, 0x85, 0x84, 0xba, 0xe0, 0x24, 0x00, 0x18, 0x2a, 0x69, 0x12, 0x15, 0xc7, 0x98, 0xa4, 0x03, 0xcd, 0xf9, 0x08, 0x4d, 0xc1, 0x49, 0x08, 0x30, 0x52, 0xd2, 0xa4, 0x2a, 0x49, 0x30,
0x38, 0x15, 0x73, 0x08, 0xd9, 0x86, 0x15, 0x36, 0x31, 0x27, 0x28, 0x8d, 0x18, 0x5a, 0xf7, 0xfa, 0x75, 0x53, 0x2c, 0x20, 0x64, 0x1b, 0x3a, 0x6c, 0x6a, 0x4e, 0x50, 0x1a, 0x31, 0xb2, 0xee, 0x0d,
0x8d, 0xad, 0xc6, 0x4e, 0x7b, 0x50, 0x41, 0xc9, 0x6d, 0xe8, 0x64, 0x92, 0x92, 0x2c, 0x38, 0x1a, 0x5a, 0x5b, 0xad, 0x9d, 0xb5, 0x61, 0x0d, 0x25, 0xb7, 0xa1, 0x9b, 0x8f, 0x94, 0xe6, 0xc1, 0xd1,
0xa1, 0x39, 0x51, 0xdc, 0x5f, 0xb4, 0x95, 0xab, 0x05, 0xfe, 0xd8, 0xc2, 0x64, 0x1f, 0xae, 0x0f, 0x18, 0xcd, 0x89, 0xe2, 0xc1, 0xb2, 0xad, 0x5c, 0x9f, 0xe3, 0x8f, 0x2c, 0x4c, 0xf6, 0x61, 0x63,
0xd9, 0x98, 0x1d, 0x8b, 0x58, 0x98, 0xe9, 0x11, 0xc7, 0x18, 0xa3, 0x9c, 0xb9, 0x69, 0xeb, 0xbb, 0xc4, 0x26, 0xec, 0x58, 0x24, 0xc2, 0xcc, 0x8e, 0x38, 0x26, 0x18, 0x17, 0xcc, 0x6d, 0x5b, 0xef,
0x57, 0xc9, 0x83, 0x22, 0x57, 0x69, 0x12, 0x32, 0x55, 0x6e, 0x1c, 0xaf, 0xda, 0xf4, 0xb0, 0xc8, 0x5f, 0x25, 0x0f, 0xe6, 0xb9, 0x5a, 0x93, 0x90, 0x99, 0x72, 0x72, 0xbc, 0x7a, 0xd3, 0xc3, 0x79,
0x65, 0x9f, 0x57, 0x63, 0x92, 0x8a, 0x21, 0xfa, 0x2d, 0x5b, 0x36, 0x0b, 0xf7, 0x7e, 0xd4, 0xa1, 0x2e, 0xbf, 0x5e, 0x8d, 0x69, 0x26, 0x46, 0x18, 0xac, 0xd8, 0xb2, 0x32, 0xdc, 0xfb, 0xd9, 0x84,
0x69, 0xbf, 0x20, 0x79, 0x04, 0x5e, 0x6e, 0x7b, 0xd2, 0x9d, 0x99, 0x78, 0x7e, 0x2b, 0x7b, 0xb7, 0xb6, 0xbd, 0x41, 0x72, 0x08, 0x5e, 0x61, 0x7b, 0xe2, 0x97, 0x26, 0x5e, 0xdc, 0xca, 0xde, 0xad,
0x4a, 0x68, 0x79, 0x93, 0xe8, 0xea, 0x87, 0x6f, 0xbf, 0x3e, 0xd7, 0xdb, 0xa4, 0x15, 0xe6, 0x2b, 0x0a, 0x5a, 0xdd, 0x24, 0xba, 0xf9, 0xfe, 0xeb, 0x8f, 0x4f, 0xcd, 0x2e, 0xe9, 0x44, 0x6e, 0xff,
0x43, 0x0e, 0xa1, 0xe5, 0xb6, 0xe5, 0x2f, 0x74, 0x9b, 0x15, 0xb4, 0xb4, 0x59, 0x94, 0x58, 0xbe, 0x8b, 0xcd, 0x21, 0x4f, 0x61, 0xc5, 0x2d, 0xcd, 0x1f, 0x58, 0xfb, 0x35, 0xb4, 0xb2, 0x60, 0x74,
0x65, 0x02, 0x61, 0xf6, 0x9e, 0xbc, 0xe5, 0x82, 0xbf, 0x23, 0xcf, 0x60, 0x31, 0xb3, 0x2e, 0xf1, 0xc3, 0xd2, 0xae, 0x93, 0x6b, 0x25, 0xed, 0x1b, 0x2e, 0xf8, 0x5b, 0xf2, 0x1c, 0x96, 0x73, 0x13,
0x4b, 0x9d, 0x73, 0xdb, 0xd4, 0xdb, 0xf8, 0x43, 0xc6, 0x11, 0xde, 0xb4, 0x84, 0x6b, 0x74, 0xf5, 0x93, 0xa0, 0xd2, 0xbc, 0xb0, 0x57, 0xbd, 0x9b, 0xbf, 0xc9, 0x38, 0xce, 0x9e, 0xe5, 0xf4, 0x29,
0x8a, 0x30, 0xcc, 0x6c, 0x44, 0x5e, 0x82, 0x97, 0x9b, 0x87, 0xf4, 0x4a, 0xdd, 0x25, 0xc7, 0x57, 0xa9, 0x70, 0x46, 0xb9, 0xa7, 0xc8, 0x11, 0x78, 0x85, 0x93, 0x48, 0xaf, 0x42, 0x50, 0xb1, 0x7f,
0xc4, 0x97, 0xdd, 0x46, 0x37, 0x2c, 0xf7, 0x3a, 0x5d, 0x9b, 0xe3, 0x4e, 0x6d, 0xc9, 0x83, 0x7b, 0xed, 0x26, 0xaa, 0xd6, 0xa3, 0x7d, 0x4b, 0xbf, 0x49, 0xfd, 0x2a, 0x7d, 0x66, 0xab, 0x1e, 0xdc,
0x5f, 0x2f, 0x82, 0xda, 0xf9, 0x45, 0x50, 0xfb, 0x79, 0x11, 0xd4, 0x3e, 0x5e, 0x06, 0x0b, 0xe7, 0xfb, 0x72, 0x11, 0x36, 0xce, 0x2f, 0xc2, 0xc6, 0xf7, 0x8b, 0xb0, 0xf1, 0xe1, 0x32, 0x5c, 0x3a,
0x97, 0xc1, 0xc2, 0xf7, 0xcb, 0x60, 0xe1, 0x05, 0x8d, 0x84, 0x39, 0x99, 0x1c, 0xf7, 0x87, 0x6a, 0xbf, 0x0c, 0x97, 0xbe, 0x5d, 0x86, 0x4b, 0x2f, 0x68, 0x2c, 0xcc, 0xc9, 0xf4, 0x78, 0x30, 0x52,
0x14, 0x2a, 0xa9, 0x95, 0x4c, 0x42, 0xfb, 0xf3, 0xc6, 0x92, 0x98, 0xe9, 0x18, 0xf5, 0xb1, 0x67, 0xe3, 0x48, 0x49, 0xad, 0x64, 0x1a, 0xd9, 0x9f, 0xd7, 0x96, 0xc7, 0xcc, 0x26, 0xa8, 0x8f, 0x3d,
0xdf, 0xc7, 0xfd, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xfc, 0xed, 0xdf, 0x71, 0x05, 0x00, 0xfb, 0xbd, 0xdc, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xb9, 0xc1, 0x21, 0x0f, 0x81, 0x05, 0x00,
0x00, 0x00,
} }
@ -764,6 +764,7 @@ func _Query_Verify_Handler(srv interface{}, ctx context.Context, dec func(interf
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Query_serviceDesc = _Query_serviceDesc
var _Query_serviceDesc = grpc.ServiceDesc{ var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "did.v1.Query", ServiceName: "did.v1.Query",
HandlerType: (*QueryServer)(nil), HandlerType: (*QueryServer)(nil),

View File

@ -508,13 +508,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
} }
var ( var (
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"params"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"did", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"did"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0}, []string{"did", "v1"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Sign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "sign"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Sign_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0, 2, 2}, []string{"did", "v1", "sign"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Verify_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "verify"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Verify_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0, 2, 2}, []string{"did", "v1", "verify"}, "", runtime.AssumeColonVerbOpt(false)))
) )
var ( var (

View File

@ -1075,6 +1075,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Msg_serviceDesc = _Msg_serviceDesc
var _Msg_serviceDesc = grpc.ServiceDesc{ var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "did.v1.Msg", ServiceName: "did.v1.Msg",
HandlerType: (*MsgServer)(nil), HandlerType: (*MsgServer)(nil),

View File

@ -15,7 +15,7 @@ var fourYears = time.Hour * 24 * 365 * 4
// IssueAdminMacaroon creates a macaroon with the specified parameters. // IssueAdminMacaroon creates a macaroon with the specified parameters.
func (k Keeper) IssueAdminMacaroon(sdkctx sdk.Context, controller didtypes.ControllerI) (*macaroon.Macaroon, error) { func (k Keeper) IssueAdminMacaroon(sdkctx sdk.Context, controller didtypes.ControllerI) (*macaroon.Macaroon, error) {
// Derive the root key by hashing the shared MPC public key // Derive the root key by hashing the shared MPC public key
rootKey := sha256.Sum256([]byte(controller.PublicKey())) rootKey := sha256.Sum256([]byte(controller.RawPublicKey()))
// Create the macaroon // Create the macaroon
m, err := macaroon.New(rootKey[:], []byte(controller.SonrAddress()), controller.ChainID(), macaroon.LatestVersion) m, err := macaroon.New(rootKey[:], []byte(controller.SonrAddress()), controller.ChainID(), macaroon.LatestVersion)
if err != nil { if err != nil {

View File

@ -0,0 +1,11 @@
package types
import sdkerrors "cosmossdk.io/errors"
var (
ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 100, "invalid genesis state")
ErrUnauthorizedMacaroonToken = sdkerrors.Register(ModuleName, 200, "unauthorized macaroon token")
ErrInvalidMacaroonScopes = sdkerrors.Register(ModuleName, 201, "invalid macaroon scopes")
ErrInvalidMacaroonController = sdkerrors.Register(ModuleName, 202, "invalid macaroon controller")
ErrInvalidTransactionSignature = sdkerrors.Register(ModuleName, 203, "invalid supplied transaction signature")
)

View File

@ -0,0 +1 @@
package types

View File

@ -475,6 +475,7 @@ func _Query_ValidateToken_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Query_serviceDesc = _Query_serviceDesc
var _Query_serviceDesc = grpc.ServiceDesc{ var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "macaroon.v1.Query", ServiceName: "macaroon.v1.Query",
HandlerType: (*QueryServer)(nil), HandlerType: (*QueryServer)(nil),

View File

@ -411,6 +411,7 @@ func _Msg_IssueMacaroon_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Msg_serviceDesc = _Msg_serviceDesc
var _Msg_serviceDesc = grpc.ServiceDesc{ var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "macaroon.v1.Msg", ServiceName: "macaroon.v1.Msg",
HandlerType: (*MsgServer)(nil), HandlerType: (*MsgServer)(nil),

View File

@ -0,0 +1,9 @@
package types
import sdkerrors "cosmossdk.io/errors"
var (
ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 100, "invalid genesis state")
ErrInvalidServiceOrigin = sdkerrors.Register(ModuleName, 200, "invalid service origin")
ErrUnrecognizedService = sdkerrors.Register(ModuleName, 201, "unrecognized service")
)

View File

@ -0,0 +1 @@
package types

View File

@ -207,6 +207,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Query_serviceDesc = _Query_serviceDesc
var _Query_serviceDesc = grpc.ServiceDesc{ var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "service.v1.Query", ServiceName: "service.v1.Query",
HandlerType: (*QueryServer)(nil), HandlerType: (*QueryServer)(nil),

View File

@ -387,6 +387,7 @@ func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Msg_serviceDesc = _Msg_serviceDesc
var _Msg_serviceDesc = grpc.ServiceDesc{ var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "service.v1.Msg", ServiceName: "service.v1.Msg",
HandlerType: (*MsgServer)(nil), HandlerType: (*MsgServer)(nil),

View File

@ -1,61 +0,0 @@
package keeper
import (
"context"
"time"
sdk "github.com/cosmos/cosmos-sdk/types"
dwngen "github.com/onsonr/sonr/internal/dwn/gen"
"github.com/onsonr/sonr/x/vault/types"
)
// assembleVault assembles the initial vault
func (k Keeper) assembleVault(cotx sdk.Context) (string, int64, error) {
_, con, err := k.DIDKeeper.NewController(cotx)
if err != nil {
return "", 0, err
}
usrKs, err := con.ExportUserKs()
if err != nil {
return "", 0, err
}
sch, err := k.currentSchema(cotx)
if err != nil {
return "", 0, err
}
v, err := types.NewVault(usrKs, con.SonrAddress(), con.ChainID(), sch)
if err != nil {
return "", 0, err
}
cid, err := k.ipfsClient.Unixfs().Add(context.Background(), v.FS)
if err != nil {
return "", 0, err
}
return cid.String(), calculateBlockExpiry(cotx, time.Second*30), nil
}
// currentSchema returns the current schema
func (k Keeper) currentSchema(ctx sdk.Context) (*dwngen.Schema, error) {
p, err := k.Params.Get(ctx)
if err != nil {
return nil, err
}
schema := p.Schema
return &dwngen.Schema{
Version: int(schema.Version),
Account: schema.Account,
Asset: schema.Asset,
Chain: schema.Chain,
Credential: schema.Credential,
Jwk: schema.Jwk,
Grant: schema.Grant,
Keyshare: schema.Keyshare,
Profile: schema.Profile,
}, nil
}
func calculateBlockExpiry(sdkctx sdk.Context, duration time.Duration) int64 {
blockTime := sdkctx.BlockTime()
avgBlockTime := float64(blockTime.Sub(blockTime).Seconds())
return int64(duration.Seconds() / avgBlockTime)
}

View File

@ -6,7 +6,6 @@ import (
"cosmossdk.io/log" "cosmossdk.io/log"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ipfs/boxo/path" "github.com/ipfs/boxo/path"
"github.com/ipfs/kubo/client/rpc"
"github.com/onsonr/sonr/x/vault/types" "github.com/onsonr/sonr/x/vault/types"
) )
@ -41,14 +40,7 @@ func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
// IPFSConnected returns true if the IPFS client is initialized // IPFSConnected returns true if the IPFS client is initialized
func (c Keeper) IPFSConnected() bool { func (c Keeper) IPFSConnected() bool {
if c.ipfsClient == nil { return c.hasIpfsConn
ipfsClient, err := rpc.NewLocalApi()
if err != nil {
return false
}
c.ipfsClient = ipfsClient
}
return c.ipfsClient != nil
} }
// HasPathInIPFS checks if a file is in the local IPFS node // HasPathInIPFS checks if a file is in the local IPFS node

View File

@ -1,17 +1,21 @@
package keeper package keeper
import ( import (
"time"
"cosmossdk.io/collections" "cosmossdk.io/collections"
storetypes "cosmossdk.io/core/store" storetypes "cosmossdk.io/core/store"
"cosmossdk.io/log" "cosmossdk.io/log"
"cosmossdk.io/orm/model/ormdb" "cosmossdk.io/orm/model/ormdb"
"github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/ipfs/kubo/client/rpc" "github.com/ipfs/kubo/client/rpc"
apiv1 "github.com/onsonr/sonr/api/vault/v1" apiv1 "github.com/onsonr/sonr/api/vault/v1"
dwngen "github.com/onsonr/sonr/internal/dwn/gen"
didkeeper "github.com/onsonr/sonr/x/did/keeper" didkeeper "github.com/onsonr/sonr/x/did/keeper"
macaroonkeeper "github.com/onsonr/sonr/x/macaroon/keeper" macaroonkeeper "github.com/onsonr/sonr/x/macaroon/keeper"
"github.com/onsonr/sonr/x/vault/types" "github.com/onsonr/sonr/x/vault/types"
@ -30,6 +34,7 @@ type Keeper struct {
authority string authority string
ipfsClient *rpc.HttpApi ipfsClient *rpc.HttpApi
hasIpfsConn bool
AccountKeeper authkeeper.AccountKeeper AccountKeeper authkeeper.AccountKeeper
DIDKeeper didkeeper.Keeper DIDKeeper didkeeper.Keeper
@ -43,9 +48,10 @@ func NewKeeper(
logger log.Logger, logger log.Logger,
authority string, authority string,
authKeeper authkeeper.AccountKeeper, authKeeper authkeeper.AccountKeeper,
didk didkeeper.Keeper, didKeeper didkeeper.Keeper,
macaroonKeeper macaroonkeeper.Keeper, macaroonKeeper macaroonkeeper.Keeper,
) Keeper { ) Keeper {
var hasIpfs bool
logger = logger.With(log.ModuleKey, "x/"+types.ModuleName) logger = logger.With(log.ModuleKey, "x/"+types.ModuleName)
sb := collections.NewSchemaBuilder(storeService) sb := collections.NewSchemaBuilder(storeService)
@ -64,17 +70,26 @@ func NewKeeper(
panic(err) panic(err)
} }
ipfsClient, _ := rpc.NewLocalApi() ipfsClient, err := rpc.NewLocalApi()
if err != nil {
hasIpfs = false
}
if ipfsClient != nil {
hasIpfs = true
}
k := Keeper{ k := Keeper{
cdc: cdc, cdc: cdc,
logger: logger, logger: logger,
DIDKeeper: didk, DIDKeeper: didKeeper,
MacaroonKeeper: macaroonKeeper, MacaroonKeeper: macaroonKeeper,
AccountKeeper: authKeeper, AccountKeeper: authKeeper,
Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)), Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)),
OrmDB: store, OrmDB: store,
ipfsClient: ipfsClient, ipfsClient: ipfsClient,
hasIpfsConn: hasIpfs,
authority: authority, authority: authority,
} }
@ -87,3 +102,29 @@ func NewKeeper(
return k return k
} }
// currentSchema returns the current schema
func (k Keeper) currentSchema(ctx sdk.Context) (*dwngen.Schema, error) {
p, err := k.Params.Get(ctx)
if err != nil {
return nil, err
}
schema := p.Schema
return &dwngen.Schema{
Version: int(schema.Version),
Account: schema.Account,
Asset: schema.Asset,
Chain: schema.Chain,
Credential: schema.Credential,
Jwk: schema.Jwk,
Grant: schema.Grant,
Keyshare: schema.Keyshare,
Profile: schema.Profile,
}, nil
}
func calculateBlockExpiry(sdkctx sdk.Context, duration time.Duration) int64 {
blockTime := sdkctx.BlockTime()
avgBlockTime := float64(blockTime.Sub(blockTime).Seconds())
return int64(duration.Seconds() / avgBlockTime)
}

View File

@ -2,8 +2,12 @@ package keeper
import ( import (
"context" "context"
"fmt"
"time"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/onsonr/crypto/mpc"
didtypes "github.com/onsonr/sonr/x/did/types"
"github.com/onsonr/sonr/x/vault/types" "github.com/onsonr/sonr/x/vault/types"
) )
@ -50,19 +54,41 @@ func (k Querier) Schema(goCtx context.Context, req *types.QuerySchemaRequest) (*
// ╰───────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────╯
// Allocate implements types.QueryServer. // Allocate implements types.QueryServer.
func (k Querier) Allocate(goCtx context.Context, req *types.AllocateRequest) (*types.AllocateResponse, error) { func (k Querier) Allocate(goCtx context.Context, req *types.QueryAllocateRequest) (*types.QueryAllocateResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx) ctx := sdk.UnwrapSDKContext(goCtx)
// 2.Allocate the vault msg.GetSubject(), msg.GetOrigin() // 1. Get current schema
cid, expiryBlock, err := k.assembleVault(ctx) sch, err := k.currentSchema(ctx)
if err != nil { if err != nil {
return nil, err ctx.Logger().Error(fmt.Sprintf("Error getting current schema: %s", err.Error()))
return nil, types.ErrInvalidSchema.Wrap(err.Error())
}
shares, err := mpc.GenerateKeyshares()
if err != nil {
ctx.Logger().Error(fmt.Sprintf("Error generating keyshares: %s", err.Error()))
return nil, types.ErrInvalidSchema.Wrap(err.Error())
} }
return &types.AllocateResponse{ con, err := didtypes.NewController(shares)
if err != nil {
ctx.Logger().Error(fmt.Sprintf("Error creating controller: %s", err.Error()))
return nil, err
}
v, err := types.NewVault("", con.SonrAddress(), con.ChainID(), sch)
if err != nil {
ctx.Logger().Error(fmt.Sprintf("Error creating vault: %s", err.Error()))
return nil, types.ErrInvalidSchema.Wrap(err.Error())
}
cid, err := k.ipfsClient.Unixfs().Add(context.Background(), v.FS)
if err != nil {
ctx.Logger().Error(fmt.Sprintf("Error adding to IPFS: %s", err.Error()))
return nil, types.ErrVaultAssembly.Wrap(err.Error())
}
return &types.QueryAllocateResponse{
Success: true, Success: true,
Cid: cid, Cid: cid.String(),
ExpiryBlock: expiryBlock, ExpiryBlock: calculateBlockExpiry(ctx, time.Second*30),
}, nil }, nil
} }
@ -71,7 +97,7 @@ func (k Querier) Allocate(goCtx context.Context, req *types.AllocateRequest) (*t
// ╰───────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────╯
// Sync implements types.QueryServer. // Sync implements types.QueryServer.
func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.SyncResponse, error) { func (k Querier) Sync(goCtx context.Context, req *types.QuerySyncRequest) (*types.QuerySyncResponse, error) {
ctx := sdk.UnwrapSDKContext(goCtx) ctx := sdk.UnwrapSDKContext(goCtx)
p, err := k.Keeper.Params.Get(ctx) p, err := k.Keeper.Params.Get(ctx)
if err != nil { if err != nil {
@ -79,13 +105,13 @@ func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.Syn
} }
c, _ := k.DIDKeeper.ResolveController(ctx, req.Did) c, _ := k.DIDKeeper.ResolveController(ctx, req.Did)
if c == nil { if c == nil {
return &types.SyncResponse{ return &types.QuerySyncResponse{
Success: false, Success: false,
Schema: p.Schema, Schema: p.Schema,
ChainID: ctx.ChainID(), ChainID: ctx.ChainID(),
}, nil }, nil
} }
return &types.SyncResponse{ return &types.QuerySyncResponse{
Success: true, Success: true,
Schema: p.Schema, Schema: p.Schema,
ChainID: ctx.ChainID(), ChainID: ctx.ChainID(),

12
x/vault/types/errors.go Normal file
View File

@ -0,0 +1,12 @@
package types
import sdkerrors "cosmossdk.io/errors"
var (
ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 100, "invalid genesis state")
ErrInvalidSchema = sdkerrors.Register(ModuleName, 200, "invalid schema")
ErrVaultAssembly = sdkerrors.Register(ModuleName, 201, "vault assembly")
ErrUnsupportedKeyEncoding = sdkerrors.Register(ModuleName, 300, "unsupported key encoding")
ErrUnsopportedChainCode = sdkerrors.Register(ModuleName, 301, "unsupported chain code")
ErrUnsupportedKeyCurve = sdkerrors.Register(ModuleName, 302, "unsupported key curve")
)

View File

@ -0,0 +1 @@
package types

View File

@ -11,6 +11,7 @@ func DefaultParams() Params {
// TODO: // TODO:
return Params{ return Params{
IpfsActive: true, IpfsActive: true,
LocalRegistrationEnabled: true,
Schema: DefaultSchema(), Schema: DefaultSchema(),
} }
} }

View File

@ -194,24 +194,22 @@ func (m *QuerySchemaResponse) GetSchema() *Schema {
return nil return nil
} }
// AllocateRequest is the request type for the Allocate RPC method. // QueryAllocateRequest is the request type for the Allocate RPC method.
type AllocateRequest struct { type QueryAllocateRequest struct {
Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
} }
func (m *AllocateRequest) Reset() { *m = AllocateRequest{} } func (m *QueryAllocateRequest) Reset() { *m = QueryAllocateRequest{} }
func (m *AllocateRequest) String() string { return proto.CompactTextString(m) } func (m *QueryAllocateRequest) String() string { return proto.CompactTextString(m) }
func (*AllocateRequest) ProtoMessage() {} func (*QueryAllocateRequest) ProtoMessage() {}
func (*AllocateRequest) Descriptor() ([]byte, []int) { func (*QueryAllocateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e6d49a2800ab3e4b, []int{4} return fileDescriptor_e6d49a2800ab3e4b, []int{4}
} }
func (m *AllocateRequest) XXX_Unmarshal(b []byte) error { func (m *QueryAllocateRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
} }
func (m *AllocateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *QueryAllocateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic { if deterministic {
return xxx_messageInfo_AllocateRequest.Marshal(b, m, deterministic) return xxx_messageInfo_QueryAllocateRequest.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b) n, err := m.MarshalToSizedBuffer(b)
@ -221,34 +219,20 @@ func (m *AllocateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err
return b[:n], nil return b[:n], nil
} }
} }
func (m *AllocateRequest) XXX_Merge(src proto.Message) { func (m *QueryAllocateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AllocateRequest.Merge(m, src) xxx_messageInfo_QueryAllocateRequest.Merge(m, src)
} }
func (m *AllocateRequest) XXX_Size() int { func (m *QueryAllocateRequest) XXX_Size() int {
return m.Size() return m.Size()
} }
func (m *AllocateRequest) XXX_DiscardUnknown() { func (m *QueryAllocateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AllocateRequest.DiscardUnknown(m) xxx_messageInfo_QueryAllocateRequest.DiscardUnknown(m)
} }
var xxx_messageInfo_AllocateRequest proto.InternalMessageInfo var xxx_messageInfo_QueryAllocateRequest proto.InternalMessageInfo
func (m *AllocateRequest) GetOrigin() string {
if m != nil {
return m.Origin
}
return ""
}
func (m *AllocateRequest) GetSubject() string {
if m != nil {
return m.Subject
}
return ""
}
// AllocateResponse is the response type for the Allocate RPC method. // AllocateResponse is the response type for the Allocate RPC method.
type AllocateResponse struct { type QueryAllocateResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"`
Macaroon string `protobuf:"bytes,3,opt,name=macaroon,proto3" json:"macaroon,omitempty"` Macaroon string `protobuf:"bytes,3,opt,name=macaroon,proto3" json:"macaroon,omitempty"`
@ -256,18 +240,18 @@ type AllocateResponse struct {
ExpiryBlock int64 `protobuf:"varint,5,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` ExpiryBlock int64 `protobuf:"varint,5,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"`
} }
func (m *AllocateResponse) Reset() { *m = AllocateResponse{} } func (m *QueryAllocateResponse) Reset() { *m = QueryAllocateResponse{} }
func (m *AllocateResponse) String() string { return proto.CompactTextString(m) } func (m *QueryAllocateResponse) String() string { return proto.CompactTextString(m) }
func (*AllocateResponse) ProtoMessage() {} func (*QueryAllocateResponse) ProtoMessage() {}
func (*AllocateResponse) Descriptor() ([]byte, []int) { func (*QueryAllocateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e6d49a2800ab3e4b, []int{5} return fileDescriptor_e6d49a2800ab3e4b, []int{5}
} }
func (m *AllocateResponse) XXX_Unmarshal(b []byte) error { func (m *QueryAllocateResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
} }
func (m *AllocateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *QueryAllocateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic { if deterministic {
return xxx_messageInfo_AllocateResponse.Marshal(b, m, deterministic) return xxx_messageInfo_QueryAllocateResponse.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b) n, err := m.MarshalToSizedBuffer(b)
@ -277,47 +261,47 @@ func (m *AllocateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er
return b[:n], nil return b[:n], nil
} }
} }
func (m *AllocateResponse) XXX_Merge(src proto.Message) { func (m *QueryAllocateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_AllocateResponse.Merge(m, src) xxx_messageInfo_QueryAllocateResponse.Merge(m, src)
} }
func (m *AllocateResponse) XXX_Size() int { func (m *QueryAllocateResponse) XXX_Size() int {
return m.Size() return m.Size()
} }
func (m *AllocateResponse) XXX_DiscardUnknown() { func (m *QueryAllocateResponse) XXX_DiscardUnknown() {
xxx_messageInfo_AllocateResponse.DiscardUnknown(m) xxx_messageInfo_QueryAllocateResponse.DiscardUnknown(m)
} }
var xxx_messageInfo_AllocateResponse proto.InternalMessageInfo var xxx_messageInfo_QueryAllocateResponse proto.InternalMessageInfo
func (m *AllocateResponse) GetSuccess() bool { func (m *QueryAllocateResponse) GetSuccess() bool {
if m != nil { if m != nil {
return m.Success return m.Success
} }
return false return false
} }
func (m *AllocateResponse) GetCid() string { func (m *QueryAllocateResponse) GetCid() string {
if m != nil { if m != nil {
return m.Cid return m.Cid
} }
return "" return ""
} }
func (m *AllocateResponse) GetMacaroon() string { func (m *QueryAllocateResponse) GetMacaroon() string {
if m != nil { if m != nil {
return m.Macaroon return m.Macaroon
} }
return "" return ""
} }
func (m *AllocateResponse) GetPublicUri() string { func (m *QueryAllocateResponse) GetPublicUri() string {
if m != nil { if m != nil {
return m.PublicUri return m.PublicUri
} }
return "" return ""
} }
func (m *AllocateResponse) GetExpiryBlock() int64 { func (m *QueryAllocateResponse) GetExpiryBlock() int64 {
if m != nil { if m != nil {
return m.ExpiryBlock return m.ExpiryBlock
} }
@ -325,22 +309,22 @@ func (m *AllocateResponse) GetExpiryBlock() int64 {
} }
// SyncRequest is the request type for the Sync RPC method. // SyncRequest is the request type for the Sync RPC method.
type SyncRequest struct { type QuerySyncRequest struct {
Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"`
} }
func (m *SyncRequest) Reset() { *m = SyncRequest{} } func (m *QuerySyncRequest) Reset() { *m = QuerySyncRequest{} }
func (m *SyncRequest) String() string { return proto.CompactTextString(m) } func (m *QuerySyncRequest) String() string { return proto.CompactTextString(m) }
func (*SyncRequest) ProtoMessage() {} func (*QuerySyncRequest) ProtoMessage() {}
func (*SyncRequest) Descriptor() ([]byte, []int) { func (*QuerySyncRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e6d49a2800ab3e4b, []int{6} return fileDescriptor_e6d49a2800ab3e4b, []int{6}
} }
func (m *SyncRequest) XXX_Unmarshal(b []byte) error { func (m *QuerySyncRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
} }
func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *QuerySyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic { if deterministic {
return xxx_messageInfo_SyncRequest.Marshal(b, m, deterministic) return xxx_messageInfo_QuerySyncRequest.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b) n, err := m.MarshalToSizedBuffer(b)
@ -350,19 +334,19 @@ func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return b[:n], nil return b[:n], nil
} }
} }
func (m *SyncRequest) XXX_Merge(src proto.Message) { func (m *QuerySyncRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncRequest.Merge(m, src) xxx_messageInfo_QuerySyncRequest.Merge(m, src)
} }
func (m *SyncRequest) XXX_Size() int { func (m *QuerySyncRequest) XXX_Size() int {
return m.Size() return m.Size()
} }
func (m *SyncRequest) XXX_DiscardUnknown() { func (m *QuerySyncRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SyncRequest.DiscardUnknown(m) xxx_messageInfo_QuerySyncRequest.DiscardUnknown(m)
} }
var xxx_messageInfo_SyncRequest proto.InternalMessageInfo var xxx_messageInfo_QuerySyncRequest proto.InternalMessageInfo
func (m *SyncRequest) GetDid() string { func (m *QuerySyncRequest) GetDid() string {
if m != nil { if m != nil {
return m.Did return m.Did
} }
@ -370,7 +354,7 @@ func (m *SyncRequest) GetDid() string {
} }
// SyncResponse is the response type for the Sync RPC method. // SyncResponse is the response type for the Sync RPC method.
type SyncResponse struct { type QuerySyncResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// Schema is the DID document. // Schema is the DID document.
Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
@ -380,18 +364,18 @@ type SyncResponse struct {
ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"`
} }
func (m *SyncResponse) Reset() { *m = SyncResponse{} } func (m *QuerySyncResponse) Reset() { *m = QuerySyncResponse{} }
func (m *SyncResponse) String() string { return proto.CompactTextString(m) } func (m *QuerySyncResponse) String() string { return proto.CompactTextString(m) }
func (*SyncResponse) ProtoMessage() {} func (*QuerySyncResponse) ProtoMessage() {}
func (*SyncResponse) Descriptor() ([]byte, []int) { func (*QuerySyncResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e6d49a2800ab3e4b, []int{7} return fileDescriptor_e6d49a2800ab3e4b, []int{7}
} }
func (m *SyncResponse) XXX_Unmarshal(b []byte) error { func (m *QuerySyncResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
} }
func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { func (m *QuerySyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic { if deterministic {
return xxx_messageInfo_SyncResponse.Marshal(b, m, deterministic) return xxx_messageInfo_QuerySyncResponse.Marshal(b, m, deterministic)
} else { } else {
b = b[:cap(b)] b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b) n, err := m.MarshalToSizedBuffer(b)
@ -401,40 +385,40 @@ func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
return b[:n], nil return b[:n], nil
} }
} }
func (m *SyncResponse) XXX_Merge(src proto.Message) { func (m *QuerySyncResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncResponse.Merge(m, src) xxx_messageInfo_QuerySyncResponse.Merge(m, src)
} }
func (m *SyncResponse) XXX_Size() int { func (m *QuerySyncResponse) XXX_Size() int {
return m.Size() return m.Size()
} }
func (m *SyncResponse) XXX_DiscardUnknown() { func (m *QuerySyncResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SyncResponse.DiscardUnknown(m) xxx_messageInfo_QuerySyncResponse.DiscardUnknown(m)
} }
var xxx_messageInfo_SyncResponse proto.InternalMessageInfo var xxx_messageInfo_QuerySyncResponse proto.InternalMessageInfo
func (m *SyncResponse) GetSuccess() bool { func (m *QuerySyncResponse) GetSuccess() bool {
if m != nil { if m != nil {
return m.Success return m.Success
} }
return false return false
} }
func (m *SyncResponse) GetSchema() *Schema { func (m *QuerySyncResponse) GetSchema() *Schema {
if m != nil { if m != nil {
return m.Schema return m.Schema
} }
return nil return nil
} }
func (m *SyncResponse) GetAddress() string { func (m *QuerySyncResponse) GetAddress() string {
if m != nil { if m != nil {
return m.Address return m.Address
} }
return "" return ""
} }
func (m *SyncResponse) GetChainID() string { func (m *QuerySyncResponse) GetChainID() string {
if m != nil { if m != nil {
return m.ChainID return m.ChainID
} }
@ -446,51 +430,49 @@ func init() {
proto.RegisterType((*QueryParamsResponse)(nil), "vault.v1.QueryParamsResponse") proto.RegisterType((*QueryParamsResponse)(nil), "vault.v1.QueryParamsResponse")
proto.RegisterType((*QuerySchemaRequest)(nil), "vault.v1.QuerySchemaRequest") proto.RegisterType((*QuerySchemaRequest)(nil), "vault.v1.QuerySchemaRequest")
proto.RegisterType((*QuerySchemaResponse)(nil), "vault.v1.QuerySchemaResponse") proto.RegisterType((*QuerySchemaResponse)(nil), "vault.v1.QuerySchemaResponse")
proto.RegisterType((*AllocateRequest)(nil), "vault.v1.AllocateRequest") proto.RegisterType((*QueryAllocateRequest)(nil), "vault.v1.QueryAllocateRequest")
proto.RegisterType((*AllocateResponse)(nil), "vault.v1.AllocateResponse") proto.RegisterType((*QueryAllocateResponse)(nil), "vault.v1.QueryAllocateResponse")
proto.RegisterType((*SyncRequest)(nil), "vault.v1.SyncRequest") proto.RegisterType((*QuerySyncRequest)(nil), "vault.v1.QuerySyncRequest")
proto.RegisterType((*SyncResponse)(nil), "vault.v1.SyncResponse") proto.RegisterType((*QuerySyncResponse)(nil), "vault.v1.QuerySyncResponse")
} }
func init() { proto.RegisterFile("vault/v1/query.proto", fileDescriptor_e6d49a2800ab3e4b) } func init() { proto.RegisterFile("vault/v1/query.proto", fileDescriptor_e6d49a2800ab3e4b) }
var fileDescriptor_e6d49a2800ab3e4b = []byte{ var fileDescriptor_e6d49a2800ab3e4b = []byte{
// 548 bytes of a gzipped FileDescriptorProto // 520 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x41, 0x6f, 0xd3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x3f, 0x6f, 0xd3, 0x40,
0x14, 0x6e, 0xda, 0xad, 0x74, 0xaf, 0x93, 0xa8, 0xcc, 0xa8, 0x42, 0xb4, 0x85, 0x11, 0x81, 0xe8, 0x18, 0xc6, 0xe3, 0xa4, 0x0d, 0xc9, 0x95, 0x21, 0x1c, 0x21, 0xb2, 0x4c, 0x6b, 0x82, 0xd5, 0x21,
0x65, 0x8d, 0x36, 0xee, 0x20, 0x06, 0x17, 0x6e, 0xd0, 0x69, 0x17, 0x2e, 0x95, 0xeb, 0x5a, 0xad, 0x0b, 0xb6, 0x5a, 0x76, 0x10, 0x15, 0x0b, 0x1b, 0x18, 0xb1, 0xb0, 0x44, 0x97, 0xf3, 0xc9, 0x39,
0x21, 0xb5, 0xb3, 0xd8, 0xa9, 0x16, 0x4d, 0xbb, 0x70, 0xe0, 0x8c, 0xe0, 0xca, 0x0f, 0xe2, 0x38, 0xe1, 0xdc, 0xb9, 0x3e, 0x3b, 0xaa, 0x57, 0x56, 0x16, 0xa4, 0x7e, 0x02, 0xbe, 0x0d, 0x63, 0x25,
0x89, 0x0b, 0x47, 0xd4, 0xf2, 0x43, 0x50, 0x6c, 0xa7, 0x59, 0xdb, 0xc1, 0x2e, 0x55, 0xde, 0xf7, 0x16, 0x46, 0x94, 0xf0, 0x41, 0xd0, 0xfd, 0x71, 0xdc, 0x38, 0x0d, 0x5d, 0x22, 0xdf, 0xf3, 0xbc,
0x9e, 0xbf, 0xcf, 0x9f, 0xdf, 0xa7, 0xc2, 0xce, 0x14, 0xa7, 0x91, 0x0a, 0xa7, 0x87, 0xe1, 0x59, 0xf9, 0x3d, 0xef, 0xeb, 0x7b, 0x0d, 0x86, 0x4b, 0x54, 0x24, 0x79, 0xb0, 0x3c, 0x0b, 0x2e, 0x0b,
0x4a, 0x93, 0xac, 0x1b, 0x27, 0x42, 0x09, 0xd4, 0xd0, 0x68, 0x77, 0x7a, 0xe8, 0xed, 0x8e, 0x84, 0x92, 0x95, 0x7e, 0x9a, 0xf1, 0x9c, 0xc3, 0x9e, 0x52, 0xfd, 0xe5, 0x99, 0x73, 0x1c, 0x73, 0x1e,
0x18, 0x45, 0x34, 0xc4, 0x31, 0x0b, 0x31, 0xe7, 0x42, 0x61, 0xc5, 0x04, 0x97, 0x66, 0xce, 0x6b, 0x27, 0x24, 0x40, 0x29, 0x0d, 0x10, 0x63, 0x3c, 0x47, 0x39, 0xe5, 0x4c, 0xe8, 0x3a, 0x67, 0xb4,
0x2f, 0x4e, 0x8f, 0x28, 0xa7, 0x92, 0x59, 0x3c, 0xd8, 0x01, 0xf4, 0x2e, 0xa7, 0x7b, 0x8b, 0x13, 0xf9, 0x77, 0x4c, 0x18, 0x11, 0xd4, 0xe8, 0xde, 0x10, 0xc0, 0x0f, 0x12, 0xf7, 0x1e, 0x65, 0x68,
0x3c, 0x91, 0x3d, 0x7a, 0x96, 0x52, 0xa9, 0x82, 0x17, 0x70, 0x6f, 0x09, 0x95, 0xb1, 0xe0, 0x92, 0x21, 0x42, 0x72, 0x59, 0x10, 0x91, 0x7b, 0xaf, 0xc1, 0xe3, 0x2d, 0x55, 0xa4, 0x9c, 0x09, 0x02,
0xa2, 0x0e, 0xd4, 0x63, 0x8d, 0xb8, 0xce, 0xbe, 0xd3, 0x69, 0x1e, 0xb5, 0xba, 0x85, 0x7a, 0xd7, 0x27, 0xa0, 0x9b, 0x2a, 0xc5, 0xb6, 0xc6, 0xd6, 0xe4, 0xe8, 0x7c, 0xe0, 0x57, 0xe9, 0xbe, 0xa9,
0x4e, 0xda, 0xfe, 0x82, 0xf6, 0x84, 0x8c, 0xe9, 0x04, 0xaf, 0xd2, 0x16, 0x68, 0x49, 0x2b, 0x35, 0x34, 0xfe, 0x06, 0xfb, 0x11, 0xcf, 0xc9, 0x02, 0x35, 0xb1, 0x95, 0x5a, 0x63, 0x85, 0x52, 0x76,
0xb2, 0x4e, 0x6b, 0x27, 0x6d, 0x3f, 0x78, 0x05, 0x77, 0x5f, 0x46, 0x91, 0x20, 0x58, 0x51, 0xcb, 0xb1, 0xa6, 0xd2, 0xf8, 0xde, 0x08, 0x0c, 0x15, 0xe0, 0x4d, 0x92, 0x70, 0x8c, 0x72, 0x52, 0x81,
0x89, 0xda, 0x50, 0x17, 0x09, 0x1b, 0x31, 0xae, 0x0f, 0x6f, 0xf5, 0x6c, 0x85, 0x5c, 0xb8, 0x23, 0x7f, 0x58, 0xe0, 0x49, 0xc3, 0x30, 0x6c, 0x1b, 0x3c, 0x10, 0x05, 0xc6, 0x44, 0xe8, 0x9e, 0x7b,
0xd3, 0xc1, 0x07, 0x4a, 0x94, 0x5b, 0xd5, 0x8d, 0xa2, 0x0c, 0xbe, 0x3b, 0xd0, 0x2a, 0x59, 0xec, 0x61, 0x75, 0x84, 0x03, 0xd0, 0xc1, 0x34, 0xb2, 0xdb, 0x63, 0x6b, 0xd2, 0x0f, 0xe5, 0x23, 0x74,
0x1d, 0xf4, 0x38, 0x21, 0x54, 0x1a, 0x6f, 0x8d, 0x5e, 0x51, 0xa2, 0x16, 0xd4, 0x08, 0x1b, 0x5a, 0x40, 0x6f, 0x81, 0x30, 0xca, 0x38, 0x67, 0x76, 0x47, 0xc9, 0x9b, 0x33, 0x3c, 0x01, 0x20, 0x2d,
0x92, 0xfc, 0x13, 0x79, 0xd0, 0x98, 0x60, 0x82, 0x13, 0x21, 0xb8, 0x5b, 0xd3, 0xf0, 0xa2, 0x46, 0x66, 0x09, 0xc5, 0xd3, 0x22, 0xa3, 0xf6, 0x81, 0x72, 0xfb, 0x5a, 0xf9, 0x94, 0x51, 0xf8, 0x1c,
0x7b, 0x00, 0x71, 0x3a, 0x88, 0x18, 0xe9, 0xa7, 0x09, 0x73, 0x37, 0x74, 0x77, 0xcb, 0x20, 0xa7, 0x3c, 0x24, 0x57, 0x29, 0xcd, 0xca, 0xe9, 0x2c, 0xe1, 0xf8, 0x8b, 0x7d, 0x38, 0xb6, 0x26, 0x9d,
0x09, 0x43, 0x8f, 0x60, 0x9b, 0x9e, 0xc7, 0x2c, 0xc9, 0xfa, 0x83, 0x48, 0x90, 0x8f, 0xee, 0xe6, 0xf0, 0x48, 0x6b, 0x17, 0x52, 0xf2, 0x4e, 0xc1, 0x40, 0x0f, 0x5f, 0x32, 0x6c, 0xfa, 0x96, 0x3d,
0xbe, 0xd3, 0xa9, 0xf5, 0x9a, 0x06, 0x3b, 0xce, 0xa1, 0xe0, 0x21, 0x34, 0x4f, 0x32, 0x4e, 0x0a, 0x44, 0x34, 0x52, 0x9d, 0xf5, 0x43, 0xf9, 0xe8, 0x7d, 0xb3, 0xc0, 0xa3, 0x5b, 0x65, 0xf7, 0x4e,
0x7f, 0x2d, 0xa8, 0x0d, 0xd9, 0xd0, 0x9a, 0xcb, 0x3f, 0x83, 0xcf, 0x0e, 0x6c, 0x9b, 0x89, 0x5b, 0x51, 0xbf, 0xbb, 0xf6, 0xff, 0xdf, 0x9d, 0x64, 0xa0, 0x28, 0xca, 0x24, 0x43, 0x0f, 0x57, 0x1d,
0xef, 0x5e, 0xbe, 0x6c, 0xf5, 0xff, 0x2f, 0x9b, 0x73, 0xe0, 0xe1, 0x30, 0xc9, 0x39, 0x8c, 0xa5, 0xa5, 0x83, 0xe7, 0x88, 0xb2, 0x77, 0x6f, 0xcd, 0x60, 0xd5, 0xf1, 0xfc, 0xba, 0x03, 0x0e, 0x55,
0xa2, 0xcc, 0x3b, 0x64, 0x8c, 0x19, 0x7f, 0xf3, 0xda, 0xda, 0x29, 0xca, 0xa3, 0xaf, 0x35, 0xd8, 0x37, 0x70, 0x0a, 0xba, 0xfa, 0x8a, 0xe1, 0x71, 0x9d, 0xb0, 0xbb, 0x39, 0xce, 0xc9, 0x1e, 0x57,
0xd4, 0xfb, 0x44, 0x7d, 0xa8, 0x9b, 0x00, 0xa0, 0xdd, 0x52, 0x61, 0x3d, 0x57, 0xde, 0xde, 0x3f, 0x0f, 0xe2, 0xd9, 0x5f, 0x7f, 0xfd, 0xbd, 0x6e, 0x43, 0x38, 0x08, 0x36, 0xfb, 0xa8, 0x37, 0x46,
0xba, 0xc6, 0x48, 0xe0, 0x7e, 0xfa, 0xf9, 0xe7, 0x5b, 0x15, 0xa1, 0x56, 0xb8, 0x48, 0xab, 0xc9, 0x06, 0xe8, 0x86, 0x77, 0x02, 0xb6, 0x76, 0x68, 0x27, 0x60, 0x7b, 0x97, 0xee, 0x0a, 0x30, 0xf3,
0x53, 0x2e, 0x60, 0x2e, 0xbc, 0x26, 0xb0, 0x94, 0xb0, 0x35, 0x81, 0xe5, 0xa4, 0xdd, 0x24, 0x60, 0xc7, 0xa0, 0x57, 0x6d, 0x07, 0x74, 0x1b, 0x90, 0xc6, 0x3e, 0x39, 0xcf, 0xf6, 0xfa, 0x26, 0xc6,
0xfd, 0xc7, 0xd0, 0x28, 0x32, 0x81, 0x1e, 0x94, 0x24, 0x2b, 0x69, 0xf3, 0xbc, 0x9b, 0x5a, 0x96, 0x51, 0x31, 0x43, 0x08, 0xeb, 0x18, 0x54, 0xc1, 0xa7, 0xe0, 0x40, 0x5e, 0x1e, 0x74, 0x9a, 0x9d,
0xfc, 0x40, 0x93, 0x3f, 0x45, 0x4f, 0x4a, 0x72, 0x6c, 0x67, 0xc2, 0x0b, 0x93, 0xca, 0xcb, 0xf0, 0xd6, 0x17, 0xef, 0x3c, 0xbd, 0xd3, 0x33, 0x70, 0x57, 0xc1, 0x6d, 0x38, 0xba, 0x35, 0x43, 0xc9,
0xc2, 0xa6, 0xf0, 0x12, 0x9d, 0xc2, 0x46, 0xbe, 0x45, 0x74, 0xff, 0xda, 0x4e, 0xca, 0xbd, 0x7b, 0xf0, 0x0b, 0xca, 0x68, 0x4e, 0x51, 0x72, 0xf1, 0xea, 0xe7, 0xca, 0xb5, 0x6e, 0x56, 0xae, 0xf5,
0xed, 0x55, 0xd8, 0xaa, 0xf8, 0x5a, 0xc5, 0x0d, 0xda, 0xd7, 0x2c, 0x64, 0x9c, 0x1c, 0x30, 0xce, 0x67, 0xe5, 0x5a, 0xdf, 0xd7, 0x6e, 0xeb, 0x66, 0xed, 0xb6, 0x7e, 0xaf, 0xdd, 0xd6, 0xe7, 0xd3,
0x14, 0xc3, 0xd1, 0xf1, 0xf3, 0x1f, 0x33, 0xdf, 0xb9, 0x9a, 0xf9, 0xce, 0xef, 0x99, 0xef, 0x7c, 0x98, 0xe6, 0xf3, 0x62, 0xe6, 0x63, 0xbe, 0x08, 0x38, 0x13, 0x9c, 0x65, 0x81, 0xfa, 0xb9, 0x32,
0x99, 0xfb, 0x95, 0xab, 0xb9, 0x5f, 0xf9, 0x35, 0xf7, 0x2b, 0xef, 0x1f, 0x8f, 0x98, 0x1a, 0xa7, 0xa4, 0xbc, 0x4c, 0x89, 0x98, 0x75, 0xd5, 0xa7, 0xff, 0xf2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff,
0x83, 0x2e, 0x11, 0x93, 0x50, 0x70, 0x29, 0x78, 0x12, 0xea, 0x9f, 0x73, 0xcb, 0xa4, 0xb2, 0x98, 0xd7, 0xbb, 0xa9, 0x67, 0x52, 0x04, 0x00, 0x00,
0xca, 0x41, 0x5d, 0xff, 0x2f, 0x3c, 0xfb, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x9f, 0x2a, 0xf0,
0x6f, 0x04, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -512,10 +494,10 @@ type QueryClient interface {
Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error)
// Allocate initializes a Target Vault available for claims with a compatible // Allocate initializes a Target Vault available for claims with a compatible
// Authentication mechanism. The default authentication mechanism is WebAuthn. // Authentication mechanism. The default authentication mechanism is WebAuthn.
Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error)
// Sync queries the DID document by its id. And returns the required PKL // Sync queries the DID document by its id. And returns the required PKL
// information // information
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error)
} }
type queryClient struct { type queryClient struct {
@ -544,8 +526,8 @@ func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts .
return out, nil return out, nil
} }
func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) { func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) {
out := new(AllocateResponse) out := new(QueryAllocateResponse)
err := c.cc.Invoke(ctx, "/vault.v1.Query/Allocate", in, out, opts...) err := c.cc.Invoke(ctx, "/vault.v1.Query/Allocate", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -553,8 +535,8 @@ func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts ..
return out, nil return out, nil
} }
func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { func (c *queryClient) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) {
out := new(SyncResponse) out := new(QuerySyncResponse)
err := c.cc.Invoke(ctx, "/vault.v1.Query/Sync", in, out, opts...) err := c.cc.Invoke(ctx, "/vault.v1.Query/Sync", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
@ -571,10 +553,10 @@ type QueryServer interface {
Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error)
// Allocate initializes a Target Vault available for claims with a compatible // Allocate initializes a Target Vault available for claims with a compatible
// Authentication mechanism. The default authentication mechanism is WebAuthn. // Authentication mechanism. The default authentication mechanism is WebAuthn.
Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error)
// Sync queries the DID document by its id. And returns the required PKL // Sync queries the DID document by its id. And returns the required PKL
// information // information
Sync(context.Context, *SyncRequest) (*SyncResponse, error) Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error)
} }
// UnimplementedQueryServer can be embedded to have forward compatible implementations. // UnimplementedQueryServer can be embedded to have forward compatible implementations.
@ -587,10 +569,10 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq
func (*UnimplementedQueryServer) Schema(ctx context.Context, req *QuerySchemaRequest) (*QuerySchemaResponse, error) { func (*UnimplementedQueryServer) Schema(ctx context.Context, req *QuerySchemaRequest) (*QuerySchemaResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented")
} }
func (*UnimplementedQueryServer) Allocate(ctx context.Context, req *AllocateRequest) (*AllocateResponse, error) { func (*UnimplementedQueryServer) Allocate(ctx context.Context, req *QueryAllocateRequest) (*QueryAllocateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented")
} }
func (*UnimplementedQueryServer) Sync(ctx context.Context, req *SyncRequest) (*SyncResponse, error) { func (*UnimplementedQueryServer) Sync(ctx context.Context, req *QuerySyncRequest) (*QuerySyncResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
} }
@ -635,7 +617,7 @@ func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interf
} }
func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AllocateRequest) in := new(QueryAllocateRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
@ -647,13 +629,13 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte
FullMethod: "/vault.v1.Query/Allocate", FullMethod: "/vault.v1.Query/Allocate",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Allocate(ctx, req.(*AllocateRequest)) return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SyncRequest) in := new(QuerySyncRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
@ -665,11 +647,12 @@ func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interfac
FullMethod: "/vault.v1.Query/Sync", FullMethod: "/vault.v1.Query/Sync",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) return srv.(QueryServer).Sync(ctx, req.(*QuerySyncRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Query_serviceDesc = _Query_serviceDesc
var _Query_serviceDesc = grpc.ServiceDesc{ var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "vault.v1.Query", ServiceName: "vault.v1.Query",
HandlerType: (*QueryServer)(nil), HandlerType: (*QueryServer)(nil),
@ -811,7 +794,7 @@ func (m *QuerySchemaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *AllocateRequest) Marshal() (dAtA []byte, err error) { func (m *QueryAllocateRequest) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size]) n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -821,34 +804,20 @@ func (m *AllocateRequest) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *AllocateRequest) MarshalTo(dAtA []byte) (int, error) { func (m *QueryAllocateRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size() size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size]) return m.MarshalToSizedBuffer(dAtA[:size])
} }
func (m *AllocateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { func (m *QueryAllocateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA) i := len(dAtA)
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.Subject) > 0 {
i -= len(m.Subject)
copy(dAtA[i:], m.Subject)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject)))
i--
dAtA[i] = 0x12
}
if len(m.Origin) > 0 {
i -= len(m.Origin)
copy(dAtA[i:], m.Origin)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *AllocateResponse) Marshal() (dAtA []byte, err error) { func (m *QueryAllocateResponse) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size]) n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -858,12 +827,12 @@ func (m *AllocateResponse) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *AllocateResponse) MarshalTo(dAtA []byte) (int, error) { func (m *QueryAllocateResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size() size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size]) return m.MarshalToSizedBuffer(dAtA[:size])
} }
func (m *AllocateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { func (m *QueryAllocateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA) i := len(dAtA)
_ = i _ = i
var l int var l int
@ -907,7 +876,7 @@ func (m *AllocateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *SyncRequest) Marshal() (dAtA []byte, err error) { func (m *QuerySyncRequest) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size]) n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -917,12 +886,12 @@ func (m *SyncRequest) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *SyncRequest) MarshalTo(dAtA []byte) (int, error) { func (m *QuerySyncRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size() size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size]) return m.MarshalToSizedBuffer(dAtA[:size])
} }
func (m *SyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { func (m *QuerySyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA) i := len(dAtA)
_ = i _ = i
var l int var l int
@ -937,7 +906,7 @@ func (m *SyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *SyncResponse) Marshal() (dAtA []byte, err error) { func (m *QuerySyncResponse) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size]) n, err := m.MarshalToSizedBuffer(dAtA[:size])
@ -947,12 +916,12 @@ func (m *SyncResponse) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil return dAtA[:n], nil
} }
func (m *SyncResponse) MarshalTo(dAtA []byte) (int, error) { func (m *QuerySyncResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size() size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size]) return m.MarshalToSizedBuffer(dAtA[:size])
} }
func (m *SyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { func (m *QuerySyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA) i := len(dAtA)
_ = i _ = i
var l int var l int
@ -1051,24 +1020,16 @@ func (m *QuerySchemaResponse) Size() (n int) {
return n return n
} }
func (m *AllocateRequest) Size() (n int) { func (m *QueryAllocateRequest) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
} }
var l int var l int
_ = l _ = l
l = len(m.Origin)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
l = len(m.Subject)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n return n
} }
func (m *AllocateResponse) Size() (n int) { func (m *QueryAllocateResponse) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
} }
@ -1095,7 +1056,7 @@ func (m *AllocateResponse) Size() (n int) {
return n return n
} }
func (m *SyncRequest) Size() (n int) { func (m *QuerySyncRequest) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
} }
@ -1108,7 +1069,7 @@ func (m *SyncRequest) Size() (n int) {
return n return n
} }
func (m *SyncResponse) Size() (n int) { func (m *QuerySyncResponse) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
} }
@ -1410,7 +1371,7 @@ func (m *QuerySchemaResponse) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *AllocateRequest) Unmarshal(dAtA []byte) error { func (m *QueryAllocateRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -1433,76 +1394,12 @@ func (m *AllocateRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: AllocateRequest: wiretype end group for non-group") return fmt.Errorf("proto: QueryAllocateRequest: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: AllocateRequest: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: QueryAllocateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
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 ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowQuery
}
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 ErrInvalidLengthQuery
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthQuery
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipQuery(dAtA[iNdEx:]) skippy, err := skipQuery(dAtA[iNdEx:])
@ -1524,7 +1421,7 @@ func (m *AllocateRequest) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *AllocateResponse) Unmarshal(dAtA []byte) error { func (m *QueryAllocateResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -1547,10 +1444,10 @@ func (m *AllocateResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: AllocateResponse: wiretype end group for non-group") return fmt.Errorf("proto: QueryAllocateResponse: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: AllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: QueryAllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
@ -1709,7 +1606,7 @@ func (m *AllocateResponse) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *SyncRequest) Unmarshal(dAtA []byte) error { func (m *QuerySyncRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -1732,10 +1629,10 @@ func (m *SyncRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") return fmt.Errorf("proto: QuerySyncRequest: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: SyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: QuerySyncRequest: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
@ -1791,7 +1688,7 @@ func (m *SyncRequest) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *SyncResponse) Unmarshal(dAtA []byte) error { func (m *QuerySyncResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
for iNdEx < l { for iNdEx < l {
@ -1814,10 +1711,10 @@ func (m *SyncResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3) fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7) wireType := int(wire & 0x7)
if wireType == 4 { if wireType == 4 {
return fmt.Errorf("proto: SyncResponse: wiretype end group for non-group") return fmt.Errorf("proto: QuerySyncResponse: wiretype end group for non-group")
} }
if fieldNum <= 0 { if fieldNum <= 0 {
return fmt.Errorf("proto: SyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: QuerySyncResponse: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1: case 1:

View File

@ -70,76 +70,18 @@ func local_request_Query_Schema_0(ctx context.Context, marshaler runtime.Marshal
} }
func request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AllocateRequest var protoReq QueryAllocateRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["origin"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
}
protoReq.Origin, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
}
val, ok = pathParams["subject"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subject")
}
protoReq.Subject, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subject", err)
}
msg, err := client.Allocate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) msg, err := client.Allocate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err return msg, metadata, err
} }
func local_request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func local_request_Query_Allocate_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq AllocateRequest var protoReq QueryAllocateRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["origin"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
}
protoReq.Origin, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
}
val, ok = pathParams["subject"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subject")
}
protoReq.Subject, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subject", err)
}
msg, err := server.Allocate(ctx, &protoReq) msg, err := server.Allocate(ctx, &protoReq)
return msg, metadata, err return msg, metadata, err
@ -150,7 +92,7 @@ var (
) )
func request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncRequest var protoReq QuerySyncRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil { if err := req.ParseForm(); err != nil {
@ -166,7 +108,7 @@ func request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, clie
} }
func local_request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { func local_request_Query_Sync_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq SyncRequest var protoReq QuerySyncRequest
var metadata runtime.ServerMetadata var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil { if err := req.ParseForm(); err != nil {
@ -256,7 +198,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
}) })
mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
var stream runtime.ServerTransportStream var stream runtime.ServerTransportStream
@ -380,7 +322,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}) })
mux.Handle("POST", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { mux.Handle("GET", pattern_Query_Sync_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context()) ctx, cancel := context.WithCancel(req.Context())
defer cancel() defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
@ -408,7 +350,7 @@ var (
pattern_Query_Schema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "schema"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Schema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "schema"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Allocate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4}, []string{"vault", "v1", "allocate", "origin", "subject"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Allocate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "allocate"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "sync-initial"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "sync-initial"}, "", runtime.AssumeColonVerbOpt(false)))
) )

View File

@ -236,6 +236,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
var Msg_serviceDesc = _Msg_serviceDesc
var _Msg_serviceDesc = grpc.ServiceDesc{ var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "vault.v1.Msg", ServiceName: "vault.v1.Msg",
HandlerType: (*MsgServer)(nil), HandlerType: (*MsgServer)(nil),