Compare commits

...
49 Commits
Author SHA1 Message Date
github-actions[bot] 9375960745 bump: version 0.5.17 → 0.5.18 2024-11-06 18:34:48 +00:00
Prad NukalaandGitHub d8cb2cbbf6 feature/1126 implement pkl config (#1161)
- **refactor: move marketing pages to**
- **feat: add role select input**
2024-11-06 13:32:51 -05:00
github-actions[bot] 82ec2664f3 bump: version 0.5.16 → 0.5.17 2024-11-05 14:47:26 +00:00
Prad Nukala 9372db6279 feat: add remote client constructor 2024-11-05 09:43:10 -05:00
Prad Nukala e76c4a5902 refactor: update marketing section architecture 2024-11-05 08:14:26 -05:00
Prad Nukala 075b54883b fix: update file paths in error messages 2024-11-04 13:45:28 -05:00
Prad Nukala 99861266c6 refactor: change verification table id 2024-11-04 13:38:58 -05:00
Prad Nukala 006f69e0d2 feat: add avatar image components 2024-11-04 10:42:35 -05:00
Prad Nukala de4d62e63e feat: add SVG CDN Illustrations to marketing architecture 2024-11-04 10:08:06 -05:00
Prad Nukala dd272bf194 <no value> 2024-11-01 14:42:56 -04:00
Prad Nukala 388ca462a4 refactor(proto): remove macaroon proto 2024-11-01 14:42:08 -04:00
Prad Nukala 5b85868993 refactor: rename ValidateBasic to Validate 2024-10-30 13:44:50 -04:00
Prad Nukala f70fa75e86 docs: update README with dependencies and state info 2024-10-30 09:58:47 -04:00
Prad Nukala bbfd3e5171 docs: add caveat description 2024-10-28 10:12:05 -04:00
Prad Nukala b1422bc97e refactor: rename session cookie key 2024-10-24 16:18:27 -04:00
Prad Nukala f14f6ff536 docs(marketing): improve section data model and section rendering 2024-10-24 16:11:30 -04:00
Prad Nukala c8657022a2 feat(marketing): refactor marketing page components 2024-10-24 10:31:40 -04:00
Prad Nukala (aider) 7b5ee7b0ed feat: Refactor intro video component to use a proper script template 2024-10-23 12:51:49 -04:00
Prad Nukala bda52d5f3d fix: update intro video modal script 2024-10-23 12:51:48 -04:00
Prad Nukala (aider) 137f0ed7f3 feat: Move Alpine.js script initialization to separate component 2024-10-23 12:50:38 -04:00
Prad Nukala cf839c9491 feat: Add intro video modal component 2024-10-23 12:50:37 -04:00
Prad Nukala 0d12487c65 feat: add homepage architecture section 2024-10-23 12:26:01 -04:00
Prad Nukala dc20befb86 feat: add Hero section component with stats and buttons 2024-10-23 11:37:11 -04:00
Prad Nukala 6c6b38a2e3 feat(css): add new utility classes for group hover 2024-10-23 11:36:59 -04:00
Prad Nukala 1ca706744e Merge branch 'feature/1119-allocate-vault-macaroon' into feature/1149-fix-vault-allocation 2024-10-23 10:08:55 -04:00
Prad Nukala 5e6fc4a82b Merge branch 'feature/1126-implement-pkl-config' into feature/1149-fix-vault-allocation 2024-10-23 10:08:54 -04:00
Prad Nukala 7cbc9e0bb1 feat: implement authentication register finish endpoint 2024-10-23 09:52:07 -04:00
Prad Nukala 1ae8a8675e Merge branch 'feature/1119-allocate-vault-macaroon' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 17:02:36 -04:00
Prad Nukala d3f5e613ea Merge branch 'feature/1119-allocate-vault-macaroon' into feature/1126-implement-pkl-config 2024-10-21 17:02:31 -04:00
Prad Nukala (aider) 2479bae12e feat: Update service module README based on protobuf files 2024-10-21 17:02:12 -04:00
Prad Nukala (aider) fd62b6ec67 feat: Update x/macaroon/README.md with details from protobuf files 2024-10-21 17:00:59 -04:00
Prad Nukala (aider) 348555981b docs: update DID Modules Readme files 2024-10-21 16:59:29 -04:00
Prad Nukala (aider) 6faf2e172b feat: update Vault README with details from proto files 2024-10-21 16:57:35 -04:00
Prad Nukala 54953ccb4b refactor: remove formatter.go from service module 2024-10-21 16:22:35 -04:00
Prad Nukala f84773f1f8 refactor: remove unused sync-initial endpoint 2024-10-21 13:15:02 -04:00
Prad Nukala 603da5560f feat: add controller creation step to allocate 2024-10-21 13:07:38 -04:00
Prad Nukala 10f5bfef67 fix: include assets generation in wasm build 2024-10-21 13:01:51 -04:00
github-actions[bot] 4613e91a13 bump: version 0.5.15 → 0.5.16 2024-10-21 16:36:06 +00:00
Prad Nukala 937b65ae95 Merge branch 'feature/1110-implement-dwn-wallet-abstraction' into develop 2024-10-21 12:32:10 -04:00
Prad Nukala 39ce73284e chore: upgrade go version to 1.23 in version-bump workflow 2024-10-21 12:32:04 -04:00
Prad Nukala 59f59311b4 Merge branch 'feature/1126-implement-pkl-config' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:25:45 -04:00
Prad Nukala 8239bd3fbd Merge branch 'feature/1126-implement-pkl-config' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:16:38 -04:00
Prad Nukala 14aa60891c Merge branch 'feature/1126-implement-pkl-config' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:13:43 -04:00
Prad Nukala 6ca0dc7dfc Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:11:20 -04:00
Prad Nukala 2e7729ce84 Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:05:47 -04:00
Prad Nukala 6c39e1a2ab Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 12:03:36 -04:00
Prad Nukala a9caac47d7 Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-21 11:31:28 -04:00
Prad Nukala 381a09d87e Merge branch 'develop' into feature/1110-implement-dwn-wallet-abstraction 2024-10-18 13:18:32 -04:00
Prad Nukala 08e28b0a5f docs: Add README for protobuf directory 2024-10-18 13:18:00 -04:00
142 changed files with 6272 additions and 21404 deletions
+1 -1
View File
@@ -2,6 +2,6 @@
name = "cz_conventional_commits" name = "cz_conventional_commits"
tag_format = "v$version" tag_format = "v$version"
version_scheme = "semver" version_scheme = "semver"
version = "0.5.15" version = "0.5.18"
update_changelog_on_bump = true update_changelog_on_bump = true
major_version_zero = true major_version_zero = true
+1 -1
View File
@@ -24,7 +24,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
- name: Login to Docker Hub - name: Login to Docker Hub
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- 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
- name: Run tests - name: Run tests
run: make test run: make test
+40
View File
@@ -1,3 +1,43 @@
## v0.5.18 (2024-11-06)
## v0.5.17 (2024-11-05)
### Feat
- add remote client constructor
- add avatar image components
- add SVG CDN Illustrations to marketing architecture
- **marketing**: refactor marketing page components
- Refactor intro video component to use a proper script template
- Move Alpine.js script initialization to separate component
- Add intro video modal component
- add homepage architecture section
- add Hero section component with stats and buttons
- **css**: add new utility classes for group hover
- implement authentication register finish endpoint
- add controller creation step to allocate
- Update service module README based on protobuf files
- Update x/macaroon/README.md with details from protobuf files
- update Vault README with details from proto files
### Fix
- update file paths in error messages
- update intro video modal script
- include assets generation in wasm build
### Refactor
- update marketing section architecture
- change verification table id
- **proto**: remove macaroon proto
- rename ValidateBasic to Validate
- rename session cookie key
- remove unused sync-initial endpoint
- remove formatter.go from service module
## v0.5.16 (2024-10-21)
## v0.5.15 (2024-10-21) ## v0.5.15 (2024-10-21)
## v0.5.14 (2024-10-21) ## v0.5.14 (2024-10-21)
+1
View File
@@ -22,6 +22,7 @@ tasks:
hway:deploy: hway:deploy:
dir: cmd/hway dir: cmd/hway
cmds: cmds:
- task: nebula:build
- bunx wrangler deploy - bunx wrangler deploy
motr:build: motr:build:
+358
View File
@@ -591,6 +591,340 @@ func NewControllerTable(db ormtable.Schema) (ControllerTable, error) {
return controllerTable{table.(ormtable.AutoIncrementTable)}, nil return controllerTable{table.(ormtable.AutoIncrementTable)}, nil
} }
type GrantTable interface {
Insert(ctx context.Context, grant *Grant) error
InsertReturningId(ctx context.Context, grant *Grant) (uint64, error)
LastInsertedSequence(ctx context.Context) (uint64, error)
Update(ctx context.Context, grant *Grant) error
Save(ctx context.Context, grant *Grant) error
Delete(ctx context.Context, grant *Grant) error
Has(ctx context.Context, id uint64) (found bool, err error)
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
Get(ctx context.Context, id uint64) (*Grant, error)
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Grant, error)
List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error
DeleteRange(ctx context.Context, from, to GrantIndexKey) error
doNotImplement()
}
type GrantIterator struct {
ormtable.Iterator
}
func (i GrantIterator) Value() (*Grant, error) {
var grant Grant
err := i.UnmarshalMessage(&grant)
return &grant, err
}
type GrantIndexKey interface {
id() uint32
values() []interface{}
grantIndexKey()
}
// primary key starting index..
type GrantPrimaryKey = GrantIdIndexKey
type GrantIdIndexKey struct {
vs []interface{}
}
func (x GrantIdIndexKey) id() uint32 { return 0 }
func (x GrantIdIndexKey) values() []interface{} { return x.vs }
func (x GrantIdIndexKey) grantIndexKey() {}
func (this GrantIdIndexKey) WithId(id uint64) GrantIdIndexKey {
this.vs = []interface{}{id}
return this
}
type GrantSubjectOriginIndexKey struct {
vs []interface{}
}
func (x GrantSubjectOriginIndexKey) id() uint32 { return 1 }
func (x GrantSubjectOriginIndexKey) values() []interface{} { return x.vs }
func (x GrantSubjectOriginIndexKey) grantIndexKey() {}
func (this GrantSubjectOriginIndexKey) WithSubject(subject string) GrantSubjectOriginIndexKey {
this.vs = []interface{}{subject}
return this
}
func (this GrantSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) GrantSubjectOriginIndexKey {
this.vs = []interface{}{subject, origin}
return this
}
type grantTable struct {
table ormtable.AutoIncrementTable
}
func (this grantTable) Insert(ctx context.Context, grant *Grant) error {
return this.table.Insert(ctx, grant)
}
func (this grantTable) Update(ctx context.Context, grant *Grant) error {
return this.table.Update(ctx, grant)
}
func (this grantTable) Save(ctx context.Context, grant *Grant) error {
return this.table.Save(ctx, grant)
}
func (this grantTable) Delete(ctx context.Context, grant *Grant) error {
return this.table.Delete(ctx, grant)
}
func (this grantTable) InsertReturningId(ctx context.Context, grant *Grant) (uint64, error) {
return this.table.InsertReturningPKey(ctx, grant)
}
func (this grantTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
return this.table.LastInsertedSequence(ctx)
}
func (this grantTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this grantTable) Get(ctx context.Context, id uint64) (*Grant, error) {
var grant Grant
found, err := this.table.PrimaryKey().Get(ctx, &grant, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &grant, nil
}
func (this grantTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
subject,
origin,
)
}
func (this grantTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Grant, error) {
var grant Grant
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &grant,
subject,
origin,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &grant, nil
}
func (this grantTable) List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return GrantIterator{it}, err
}
func (this grantTable) ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return GrantIterator{it}, err
}
func (this grantTable) DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this grantTable) DeleteRange(ctx context.Context, from, to GrantIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this grantTable) doNotImplement() {}
var _ GrantTable = grantTable{}
func NewGrantTable(db ormtable.Schema) (GrantTable, error) {
table := db.GetTable(&Grant{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Grant{}).ProtoReflect().Descriptor().FullName()))
}
return grantTable{table.(ormtable.AutoIncrementTable)}, nil
}
type MacaroonTable interface {
Insert(ctx context.Context, macaroon *Macaroon) error
InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error)
LastInsertedSequence(ctx context.Context) (uint64, error)
Update(ctx context.Context, macaroon *Macaroon) error
Save(ctx context.Context, macaroon *Macaroon) error
Delete(ctx context.Context, macaroon *Macaroon) error
Has(ctx context.Context, id uint64) (found bool, err error)
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
Get(ctx context.Context, id uint64) (*Macaroon, error)
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Macaroon, error)
List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error
DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error
doNotImplement()
}
type MacaroonIterator struct {
ormtable.Iterator
}
func (i MacaroonIterator) Value() (*Macaroon, error) {
var macaroon Macaroon
err := i.UnmarshalMessage(&macaroon)
return &macaroon, err
}
type MacaroonIndexKey interface {
id() uint32
values() []interface{}
macaroonIndexKey()
}
// primary key starting index..
type MacaroonPrimaryKey = MacaroonIdIndexKey
type MacaroonIdIndexKey struct {
vs []interface{}
}
func (x MacaroonIdIndexKey) id() uint32 { return 0 }
func (x MacaroonIdIndexKey) values() []interface{} { return x.vs }
func (x MacaroonIdIndexKey) macaroonIndexKey() {}
func (this MacaroonIdIndexKey) WithId(id uint64) MacaroonIdIndexKey {
this.vs = []interface{}{id}
return this
}
type MacaroonSubjectOriginIndexKey struct {
vs []interface{}
}
func (x MacaroonSubjectOriginIndexKey) id() uint32 { return 1 }
func (x MacaroonSubjectOriginIndexKey) values() []interface{} { return x.vs }
func (x MacaroonSubjectOriginIndexKey) macaroonIndexKey() {}
func (this MacaroonSubjectOriginIndexKey) WithSubject(subject string) MacaroonSubjectOriginIndexKey {
this.vs = []interface{}{subject}
return this
}
func (this MacaroonSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) MacaroonSubjectOriginIndexKey {
this.vs = []interface{}{subject, origin}
return this
}
type macaroonTable struct {
table ormtable.AutoIncrementTable
}
func (this macaroonTable) Insert(ctx context.Context, macaroon *Macaroon) error {
return this.table.Insert(ctx, macaroon)
}
func (this macaroonTable) Update(ctx context.Context, macaroon *Macaroon) error {
return this.table.Update(ctx, macaroon)
}
func (this macaroonTable) Save(ctx context.Context, macaroon *Macaroon) error {
return this.table.Save(ctx, macaroon)
}
func (this macaroonTable) Delete(ctx context.Context, macaroon *Macaroon) error {
return this.table.Delete(ctx, macaroon)
}
func (this macaroonTable) InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error) {
return this.table.InsertReturningPKey(ctx, macaroon)
}
func (this macaroonTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
return this.table.LastInsertedSequence(ctx)
}
func (this macaroonTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this macaroonTable) Get(ctx context.Context, id uint64) (*Macaroon, error) {
var macaroon Macaroon
found, err := this.table.PrimaryKey().Get(ctx, &macaroon, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &macaroon, nil
}
func (this macaroonTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
subject,
origin,
)
}
func (this macaroonTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Macaroon, error) {
var macaroon Macaroon
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &macaroon,
subject,
origin,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &macaroon, nil
}
func (this macaroonTable) List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return MacaroonIterator{it}, err
}
func (this macaroonTable) ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return MacaroonIterator{it}, err
}
func (this macaroonTable) DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this macaroonTable) DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this macaroonTable) doNotImplement() {}
var _ MacaroonTable = macaroonTable{}
func NewMacaroonTable(db ormtable.Schema) (MacaroonTable, error) {
table := db.GetTable(&Macaroon{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Macaroon{}).ProtoReflect().Descriptor().FullName()))
}
return macaroonTable{table.(ormtable.AutoIncrementTable)}, nil
}
type VerificationTable interface { type VerificationTable interface {
Insert(ctx context.Context, verification *Verification) error Insert(ctx context.Context, verification *Verification) error
Update(ctx context.Context, verification *Verification) error Update(ctx context.Context, verification *Verification) error
@@ -852,6 +1186,8 @@ type StateStore interface {
AssertionTable() AssertionTable AssertionTable() AssertionTable
AuthenticationTable() AuthenticationTable AuthenticationTable() AuthenticationTable
ControllerTable() ControllerTable ControllerTable() ControllerTable
GrantTable() GrantTable
MacaroonTable() MacaroonTable
VerificationTable() VerificationTable VerificationTable() VerificationTable
doNotImplement() doNotImplement()
@@ -861,6 +1197,8 @@ type stateStore struct {
assertion AssertionTable assertion AssertionTable
authentication AuthenticationTable authentication AuthenticationTable
controller ControllerTable controller ControllerTable
grant GrantTable
macaroon MacaroonTable
verification VerificationTable verification VerificationTable
} }
@@ -876,6 +1214,14 @@ func (x stateStore) ControllerTable() ControllerTable {
return x.controller return x.controller
} }
func (x stateStore) GrantTable() GrantTable {
return x.grant
}
func (x stateStore) MacaroonTable() MacaroonTable {
return x.macaroon
}
func (x stateStore) VerificationTable() VerificationTable { func (x stateStore) VerificationTable() VerificationTable {
return x.verification return x.verification
} }
@@ -900,6 +1246,16 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) {
return nil, err return nil, err
} }
grantTable, err := NewGrantTable(db)
if err != nil {
return nil, err
}
macaroonTable, err := NewMacaroonTable(db)
if err != nil {
return nil, err
}
verificationTable, err := NewVerificationTable(db) verificationTable, err := NewVerificationTable(db)
if err != nil { if err != nil {
return nil, err return nil, err
@@ -909,6 +1265,8 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) {
assertionTable, assertionTable,
authenticationTable, authenticationTable,
controllerTable, controllerTable,
grantTable,
macaroonTable,
verificationTable, verificationTable,
}, nil }, nil
} }
+1605 -58
View File
File diff suppressed because it is too large Load Diff
-506
View File
@@ -1,506 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package modulev1
import (
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
fmt "fmt"
runtime "github.com/cosmos/cosmos-proto/runtime"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoiface "google.golang.org/protobuf/runtime/protoiface"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
io "io"
reflect "reflect"
sync "sync"
)
var (
md_Module protoreflect.MessageDescriptor
)
func init() {
file_macaroon_module_v1_module_proto_init()
md_Module = File_macaroon_module_v1_module_proto.Messages().ByName("Module")
}
var _ protoreflect.Message = (*fastReflection_Module)(nil)
type fastReflection_Module Module
func (x *Module) ProtoReflect() protoreflect.Message {
return (*fastReflection_Module)(x)
}
func (x *Module) slowProtoReflect() protoreflect.Message {
mi := &file_macaroon_module_v1_module_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
var _fastReflection_Module_messageType fastReflection_Module_messageType
var _ protoreflect.MessageType = fastReflection_Module_messageType{}
type fastReflection_Module_messageType struct{}
func (x fastReflection_Module_messageType) Zero() protoreflect.Message {
return (*fastReflection_Module)(nil)
}
func (x fastReflection_Module_messageType) New() protoreflect.Message {
return new(fastReflection_Module)
}
func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_Module
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor {
return md_Module
}
// Type returns the message type, which encapsulates both Go and protobuf
// type information. If the Go type information is not needed,
// it is recommended that the message descriptor be used instead.
func (x *fastReflection_Module) Type() protoreflect.MessageType {
return _fastReflection_Module_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_Module) New() protoreflect.Message {
return new(fastReflection_Module)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage {
return (*Module)(x)
}
// Range iterates over every populated field in an undefined order,
// calling f for each field descriptor and value encountered.
// Range returns immediately if f returns false.
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
}
// Has reports whether a field is populated.
//
// Some fields have the property of nullability where it is possible to
// distinguish between the default value of a field and whether the field
// was explicitly populated with the default value. Singular message fields,
// member fields of a oneof, and proto2 scalar fields are nullable. Such
// fields are populated only if explicitly set.
//
// In other cases (aside from the nullable cases above),
// a proto3 scalar field is populated if it contains a non-zero value, and
// a repeated field is populated if it is non-empty.
func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
}
}
// Clear clears the field such that a subsequent Has call reports false.
//
// Clearing an extension field clears both the extension type and value
// associated with the given field number.
//
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
}
}
// Get retrieves the value for a field.
//
// For unpopulated scalars, it returns the default value, where
// the default value of a bytes scalar is guaranteed to be a copy.
// For unpopulated composite types, it returns an empty, read-only view
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", descriptor.FullName()))
}
}
// Set stores the value for a field.
//
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType.
// When setting a composite type, it is unspecified whether the stored value
// aliases the source's memory in any way. If the composite value is an
// empty, read-only value, then it panics.
//
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
}
}
// Mutable returns a mutable reference to a composite type.
//
// If the field is unpopulated, it may allocate a composite value.
// For a field belonging to a oneof, it implicitly clears any other field
// that may be currently set within the same oneof.
// For extension fields, it implicitly stores the provided ExtensionType
// if not already stored.
// It panics if the field does not contain a composite type.
//
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
}
}
// NewField returns a new value that is assignable to the field
// for the given descriptor. For scalars, this returns the default value.
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.macaroon.module.v1.Module"))
}
panic(fmt.Errorf("message onsonr.sonr.macaroon.module.v1.Module does not contain field %s", fd.FullName()))
}
}
// WhichOneof reports which field within the oneof is populated,
// returning nil if none are populated.
// It panics if the oneof descriptor does not belong to this message.
func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.macaroon.module.v1.Module", d.FullName()))
}
panic("unreachable")
}
// GetUnknown retrieves the entire list of unknown fields.
// The caller may only mutate the contents of the RawFields
// if the mutated bytes are stored back into the message with SetUnknown.
func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields {
return x.unknownFields
}
// SetUnknown stores an entire list of unknown fields.
// The raw fields must be syntactically valid according to the wire format.
// An implementation may panic if this is not the case.
// Once stored, the caller must not mutate the content of the RawFields.
// An empty RawFields may be passed to clear the fields.
//
// SetUnknown is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) {
x.unknownFields = fields
}
// IsValid reports whether the message is valid.
//
// An invalid message is an empty, read-only value.
//
// An invalid message often corresponds to a nil pointer of the concrete
// message type, but the details are implementation dependent.
// Validity is not part of the protobuf data model, and may not
// be preserved in marshaling or other operations.
func (x *fastReflection_Module) IsValid() bool {
return x != nil
}
// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations.
// This method may return nil.
//
// The returned methods type is identical to
// "google.golang.org/protobuf/runtime/protoiface".Methods.
// Consult the protoiface package documentation for details.
func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*Module)
if x == nil {
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: 0,
}
}
options := runtime.SizeInputToOptions(input)
_ = options
var n int
var l int
_ = l
if x.unknownFields != nil {
n += len(x.unknownFields)
}
return protoiface.SizeOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Size: n,
}
}
marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
x := input.Message.Interface().(*Module)
if x == nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
options := runtime.MarshalInputToOptions(input)
_ = options
size := options.Size(x)
dAtA := make([]byte, size)
i := len(dAtA)
_ = i
var l int
_ = l
if x.unknownFields != nil {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...)
} else {
input.Buf = dAtA
}
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, nil
}
unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
x := input.Message.Interface().(*Module)
if x == nil {
return protoiface.UnmarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Flags: input.Flags,
}, nil
}
options := runtime.UnmarshalInputToOptions(input)
_ = options
dAtA := input.Buf
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: macaroon/module/v1/module.proto
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
type Module struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *Module) Reset() {
*x = Module{}
if protoimpl.UnsafeEnabled {
mi := &file_macaroon_module_v1_module_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Module) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Module) ProtoMessage() {}
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
func (*Module) Descriptor() ([]byte, []int) {
return file_macaroon_module_v1_module_proto_rawDescGZIP(), []int{0}
}
var File_macaroon_module_v1_module_proto protoreflect.FileDescriptor
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,
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x1e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6d,
0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76,
0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31,
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x29, 0xba,
0xc0, 0x96, 0xda, 0x01, 0x23, 0x0a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x78, 0x2f,
0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x42, 0x86, 0x02, 0x0a, 0x22, 0x63, 0x6f, 0x6d,
0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6d, 0x61, 0x63,
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42,
0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36,
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, 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,
0x1e, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4d, 0x61, 0x63,
0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2,
0x02, 0x2a, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4d, 0x61,
0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31,
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x22, 0x4f,
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 (
file_macaroon_module_v1_module_proto_rawDescOnce sync.Once
file_macaroon_module_v1_module_proto_rawDescData = file_macaroon_module_v1_module_proto_rawDesc
)
func file_macaroon_module_v1_module_proto_rawDescGZIP() []byte {
file_macaroon_module_v1_module_proto_rawDescOnce.Do(func() {
file_macaroon_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_macaroon_module_v1_module_proto_rawDescData)
})
return file_macaroon_module_v1_module_proto_rawDescData
}
var file_macaroon_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_macaroon_module_v1_module_proto_goTypes = []interface{}{
(*Module)(nil), // 0: onsonr.sonr.macaroon.module.v1.Module
}
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 input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_macaroon_module_v1_module_proto_init() }
func file_macaroon_module_v1_module_proto_init() {
if File_macaroon_module_v1_module_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_macaroon_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Module); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_macaroon_module_v1_module_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_macaroon_module_v1_module_proto_goTypes,
DependencyIndexes: file_macaroon_module_v1_module_proto_depIdxs,
MessageInfos: file_macaroon_module_v1_module_proto_msgTypes,
}.Build()
File_macaroon_module_v1_module_proto = out.File
file_macaroon_module_v1_module_proto_rawDesc = nil
file_macaroon_module_v1_module_proto_goTypes = nil
file_macaroon_module_v1_module_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-207
View File
@@ -1,207 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: macaroon/v1/query.proto
package macaroonv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Query_Params_FullMethodName = "/macaroon.v1.Query/Params"
Query_RefreshToken_FullMethodName = "/macaroon.v1.Query/RefreshToken"
Query_ValidateToken_FullMethodName = "/macaroon.v1.Query/ValidateToken"
)
// 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.
//
// Query provides defines the gRPC querier service.
type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// RefreshToken refreshes a macaroon token as post authentication.
RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error)
// ValidateToken validates a macaroon token as pre authentication.
ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error)
}
type queryClient struct {
cc grpc.ClientConnInterface
}
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
return &queryClient{cc}
}
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryParamsResponse)
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) RefreshToken(ctx context.Context, in *QueryRefreshTokenRequest, opts ...grpc.CallOption) (*QueryRefreshTokenResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryRefreshTokenResponse)
err := c.cc.Invoke(ctx, Query_RefreshToken_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) ValidateToken(ctx context.Context, in *QueryValidateTokenRequest, opts ...grpc.CallOption) (*QueryValidateTokenResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(QueryValidateTokenResponse)
err := c.cc.Invoke(ctx, Query_ValidateToken_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service.
// All implementations must embed UnimplementedQueryServer
// for forward compatibility.
//
// Query provides defines the gRPC querier service.
type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// RefreshToken refreshes a macaroon token as post authentication.
RefreshToken(context.Context, *QueryRefreshTokenRequest) (*QueryRefreshTokenResponse, error)
// ValidateToken validates a macaroon token as pre authentication.
ValidateToken(context.Context, *QueryValidateTokenRequest) (*QueryValidateTokenResponse, error)
mustEmbedUnimplementedQueryServer()
}
// UnimplementedQueryServer must be embedded to have
// 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) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) RefreshToken(context.Context, *QueryRefreshTokenRequest) (*QueryRefreshTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RefreshToken not implemented")
}
func (UnimplementedQueryServer) ValidateToken(context.Context, *QueryValidateTokenRequest) (*QueryValidateTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidateToken not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
func (UnimplementedQueryServer) testEmbeddedByValue() {}
// 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
// result in compilation errors.
type UnsafeQueryServer interface {
mustEmbedUnimplementedQueryServer()
}
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)
}
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryParamsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).Params(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_Params_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_RefreshToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRefreshTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).RefreshToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_RefreshToken_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).RefreshToken(ctx, req.(*QueryRefreshTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_ValidateToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryValidateTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).ValidateToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_ValidateToken_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).ValidateToken(ctx, req.(*QueryValidateTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Query_ServiceDesc = grpc.ServiceDesc{
ServiceName: "macaroon.v1.Query",
HandlerType: (*QueryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Params",
Handler: _Query_Params_Handler,
},
{
MethodName: "RefreshToken",
Handler: _Query_RefreshToken_Handler,
},
{
MethodName: "ValidateToken",
Handler: _Query_ValidateToken_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "macaroon/v1/query.proto",
}
-385
View File
@@ -1,385 +0,0 @@
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
package macaroonv1
import (
context "context"
ormlist "cosmossdk.io/orm/model/ormlist"
ormtable "cosmossdk.io/orm/model/ormtable"
ormerrors "cosmossdk.io/orm/types/ormerrors"
)
type GrantTable interface {
Insert(ctx context.Context, grant *Grant) error
InsertReturningId(ctx context.Context, grant *Grant) (uint64, error)
LastInsertedSequence(ctx context.Context) (uint64, error)
Update(ctx context.Context, grant *Grant) error
Save(ctx context.Context, grant *Grant) error
Delete(ctx context.Context, grant *Grant) error
Has(ctx context.Context, id uint64) (found bool, err error)
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
Get(ctx context.Context, id uint64) (*Grant, error)
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Grant, error)
List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error)
DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error
DeleteRange(ctx context.Context, from, to GrantIndexKey) error
doNotImplement()
}
type GrantIterator struct {
ormtable.Iterator
}
func (i GrantIterator) Value() (*Grant, error) {
var grant Grant
err := i.UnmarshalMessage(&grant)
return &grant, err
}
type GrantIndexKey interface {
id() uint32
values() []interface{}
grantIndexKey()
}
// primary key starting index..
type GrantPrimaryKey = GrantIdIndexKey
type GrantIdIndexKey struct {
vs []interface{}
}
func (x GrantIdIndexKey) id() uint32 { return 0 }
func (x GrantIdIndexKey) values() []interface{} { return x.vs }
func (x GrantIdIndexKey) grantIndexKey() {}
func (this GrantIdIndexKey) WithId(id uint64) GrantIdIndexKey {
this.vs = []interface{}{id}
return this
}
type GrantSubjectOriginIndexKey struct {
vs []interface{}
}
func (x GrantSubjectOriginIndexKey) id() uint32 { return 1 }
func (x GrantSubjectOriginIndexKey) values() []interface{} { return x.vs }
func (x GrantSubjectOriginIndexKey) grantIndexKey() {}
func (this GrantSubjectOriginIndexKey) WithSubject(subject string) GrantSubjectOriginIndexKey {
this.vs = []interface{}{subject}
return this
}
func (this GrantSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) GrantSubjectOriginIndexKey {
this.vs = []interface{}{subject, origin}
return this
}
type grantTable struct {
table ormtable.AutoIncrementTable
}
func (this grantTable) Insert(ctx context.Context, grant *Grant) error {
return this.table.Insert(ctx, grant)
}
func (this grantTable) Update(ctx context.Context, grant *Grant) error {
return this.table.Update(ctx, grant)
}
func (this grantTable) Save(ctx context.Context, grant *Grant) error {
return this.table.Save(ctx, grant)
}
func (this grantTable) Delete(ctx context.Context, grant *Grant) error {
return this.table.Delete(ctx, grant)
}
func (this grantTable) InsertReturningId(ctx context.Context, grant *Grant) (uint64, error) {
return this.table.InsertReturningPKey(ctx, grant)
}
func (this grantTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
return this.table.LastInsertedSequence(ctx)
}
func (this grantTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this grantTable) Get(ctx context.Context, id uint64) (*Grant, error) {
var grant Grant
found, err := this.table.PrimaryKey().Get(ctx, &grant, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &grant, nil
}
func (this grantTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
subject,
origin,
)
}
func (this grantTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Grant, error) {
var grant Grant
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &grant,
subject,
origin,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &grant, nil
}
func (this grantTable) List(ctx context.Context, prefixKey GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return GrantIterator{it}, err
}
func (this grantTable) ListRange(ctx context.Context, from, to GrantIndexKey, opts ...ormlist.Option) (GrantIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return GrantIterator{it}, err
}
func (this grantTable) DeleteBy(ctx context.Context, prefixKey GrantIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this grantTable) DeleteRange(ctx context.Context, from, to GrantIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this grantTable) doNotImplement() {}
var _ GrantTable = grantTable{}
func NewGrantTable(db ormtable.Schema) (GrantTable, error) {
table := db.GetTable(&Grant{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Grant{}).ProtoReflect().Descriptor().FullName()))
}
return grantTable{table.(ormtable.AutoIncrementTable)}, nil
}
type MacaroonTable interface {
Insert(ctx context.Context, macaroon *Macaroon) error
InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error)
LastInsertedSequence(ctx context.Context) (uint64, error)
Update(ctx context.Context, macaroon *Macaroon) error
Save(ctx context.Context, macaroon *Macaroon) error
Delete(ctx context.Context, macaroon *Macaroon) error
Has(ctx context.Context, id uint64) (found bool, err error)
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
Get(ctx context.Context, id uint64) (*Macaroon, error)
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Macaroon, error)
List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error)
DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error
DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error
doNotImplement()
}
type MacaroonIterator struct {
ormtable.Iterator
}
func (i MacaroonIterator) Value() (*Macaroon, error) {
var macaroon Macaroon
err := i.UnmarshalMessage(&macaroon)
return &macaroon, err
}
type MacaroonIndexKey interface {
id() uint32
values() []interface{}
macaroonIndexKey()
}
// primary key starting index..
type MacaroonPrimaryKey = MacaroonIdIndexKey
type MacaroonIdIndexKey struct {
vs []interface{}
}
func (x MacaroonIdIndexKey) id() uint32 { return 0 }
func (x MacaroonIdIndexKey) values() []interface{} { return x.vs }
func (x MacaroonIdIndexKey) macaroonIndexKey() {}
func (this MacaroonIdIndexKey) WithId(id uint64) MacaroonIdIndexKey {
this.vs = []interface{}{id}
return this
}
type MacaroonSubjectOriginIndexKey struct {
vs []interface{}
}
func (x MacaroonSubjectOriginIndexKey) id() uint32 { return 1 }
func (x MacaroonSubjectOriginIndexKey) values() []interface{} { return x.vs }
func (x MacaroonSubjectOriginIndexKey) macaroonIndexKey() {}
func (this MacaroonSubjectOriginIndexKey) WithSubject(subject string) MacaroonSubjectOriginIndexKey {
this.vs = []interface{}{subject}
return this
}
func (this MacaroonSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) MacaroonSubjectOriginIndexKey {
this.vs = []interface{}{subject, origin}
return this
}
type macaroonTable struct {
table ormtable.AutoIncrementTable
}
func (this macaroonTable) Insert(ctx context.Context, macaroon *Macaroon) error {
return this.table.Insert(ctx, macaroon)
}
func (this macaroonTable) Update(ctx context.Context, macaroon *Macaroon) error {
return this.table.Update(ctx, macaroon)
}
func (this macaroonTable) Save(ctx context.Context, macaroon *Macaroon) error {
return this.table.Save(ctx, macaroon)
}
func (this macaroonTable) Delete(ctx context.Context, macaroon *Macaroon) error {
return this.table.Delete(ctx, macaroon)
}
func (this macaroonTable) InsertReturningId(ctx context.Context, macaroon *Macaroon) (uint64, error) {
return this.table.InsertReturningPKey(ctx, macaroon)
}
func (this macaroonTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
return this.table.LastInsertedSequence(ctx)
}
func (this macaroonTable) Has(ctx context.Context, id uint64) (found bool, err error) {
return this.table.PrimaryKey().Has(ctx, id)
}
func (this macaroonTable) Get(ctx context.Context, id uint64) (*Macaroon, error) {
var macaroon Macaroon
found, err := this.table.PrimaryKey().Get(ctx, &macaroon, id)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &macaroon, nil
}
func (this macaroonTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
subject,
origin,
)
}
func (this macaroonTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Macaroon, error) {
var macaroon Macaroon
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &macaroon,
subject,
origin,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &macaroon, nil
}
func (this macaroonTable) List(ctx context.Context, prefixKey MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return MacaroonIterator{it}, err
}
func (this macaroonTable) ListRange(ctx context.Context, from, to MacaroonIndexKey, opts ...ormlist.Option) (MacaroonIterator, error) {
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
return MacaroonIterator{it}, err
}
func (this macaroonTable) DeleteBy(ctx context.Context, prefixKey MacaroonIndexKey) error {
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
}
func (this macaroonTable) DeleteRange(ctx context.Context, from, to MacaroonIndexKey) error {
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
}
func (this macaroonTable) doNotImplement() {}
var _ MacaroonTable = macaroonTable{}
func NewMacaroonTable(db ormtable.Schema) (MacaroonTable, error) {
table := db.GetTable(&Macaroon{})
if table == nil {
return nil, ormerrors.TableNotFound.Wrap(string((&Macaroon{}).ProtoReflect().Descriptor().FullName()))
}
return macaroonTable{table.(ormtable.AutoIncrementTable)}, nil
}
type StateStore interface {
GrantTable() GrantTable
MacaroonTable() MacaroonTable
doNotImplement()
}
type stateStore struct {
grant GrantTable
macaroon MacaroonTable
}
func (x stateStore) GrantTable() GrantTable {
return x.grant
}
func (x stateStore) MacaroonTable() MacaroonTable {
return x.macaroon
}
func (stateStore) doNotImplement() {}
var _ StateStore = stateStore{}
func NewStateStore(db ormtable.Schema) (StateStore, error) {
grantTable, err := NewGrantTable(db)
if err != nil {
return nil, err
}
macaroonTable, err := NewMacaroonTable(db)
if err != nil {
return nil, err
}
return stateStore{
grantTable,
macaroonTable,
}, nil
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-173
View File
@@ -1,173 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc (unknown)
// source: macaroon/v1/tx.proto
package macaroonv1
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
Msg_UpdateParams_FullMethodName = "/macaroon.v1.Msg/UpdateParams"
Msg_IssueMacaroon_FullMethodName = "/macaroon.v1.Msg/IssueMacaroon"
)
// 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.
//
// Msg defines the Msg service.
type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// IssueMacaroon asserts the given controller is the owner of the given
// address.
IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error)
}
type msgClient struct {
cc grpc.ClientConnInterface
}
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *msgClient) IssueMacaroon(ctx context.Context, in *MsgIssueMacaroon, opts ...grpc.CallOption) (*MsgIssueMacaroonResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MsgIssueMacaroonResponse)
err := c.cc.Invoke(ctx, Msg_IssueMacaroon_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility.
//
// Msg defines the Msg service.
type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// IssueMacaroon asserts the given controller is the owner of the given
// address.
IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error)
mustEmbedUnimplementedMsgServer()
}
// UnimplementedMsgServer must be embedded to have
// 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) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) IssueMacaroon(context.Context, *MsgIssueMacaroon) (*MsgIssueMacaroonResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IssueMacaroon not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
func (UnimplementedMsgServer) testEmbeddedByValue() {}
// 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
// result in compilation errors.
type UnsafeMsgServer interface {
mustEmbedUnimplementedMsgServer()
}
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)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_IssueMacaroon_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgIssueMacaroon)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).IssueMacaroon(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_IssueMacaroon_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).IssueMacaroon(ctx, req.(*MsgIssueMacaroon))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Msg_ServiceDesc = grpc.ServiceDesc{
ServiceName: "macaroon.v1.Msg",
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
{
MethodName: "IssueMacaroon",
Handler: _Msg_IssueMacaroon_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "macaroon/v1/tx.proto",
}
+14 -14
View File
@@ -4015,7 +4015,7 @@ var file_vault_v1_query_proto_rawDesc = []byte{
0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68,
0x61, 0x69, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61,
0x69, 0x6e, 0x49, 0x44, 0x32, 0x93, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, 0x69, 0x6e, 0x49, 0x44, 0x32, 0x8b, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f,
0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74,
0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76,
@@ -4034,22 +4034,22 @@ var file_vault_v1_query_proto_rawDesc = []byte{
0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c,
0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31,
0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x5f, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x04, 0x53, 0x79, 0x6e,
0x63, 0x12, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x63, 0x12, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65,
0x72, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x72, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x79, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x79,
0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x18, 0x12, 0x16, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79,
0x6e, 0x63, 0x2d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6e, 0x63, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74,
0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61,
0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02,
0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca,
0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75,
0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
+1 -23
View File
@@ -148,9 +148,6 @@ import (
did "github.com/onsonr/sonr/x/did" did "github.com/onsonr/sonr/x/did"
didkeeper "github.com/onsonr/sonr/x/did/keeper" didkeeper "github.com/onsonr/sonr/x/did/keeper"
didtypes "github.com/onsonr/sonr/x/did/types" didtypes "github.com/onsonr/sonr/x/did/types"
macaroon "github.com/onsonr/sonr/x/macaroon"
macaroonkeeper "github.com/onsonr/sonr/x/macaroon/keeper"
macaroontypes "github.com/onsonr/sonr/x/macaroon/types"
service "github.com/onsonr/sonr/x/service" service "github.com/onsonr/sonr/x/service"
servicekeeper "github.com/onsonr/sonr/x/service/keeper" servicekeeper "github.com/onsonr/sonr/x/service/keeper"
servicetypes "github.com/onsonr/sonr/x/service/types" servicetypes "github.com/onsonr/sonr/x/service/types"
@@ -236,7 +233,6 @@ type SonrApp struct {
UpgradeKeeper *upgradekeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper
legacyAmino *codec.LegacyAmino legacyAmino *codec.LegacyAmino
VaultKeeper vaultkeeper.Keeper VaultKeeper vaultkeeper.Keeper
MacaroonKeeper macaroonkeeper.Keeper
ServiceKeeper servicekeeper.Keeper ServiceKeeper servicekeeper.Keeper
sm *module.SimulationManager sm *module.SimulationManager
BasicModuleManager module.BasicManager BasicModuleManager module.BasicManager
@@ -371,7 +367,6 @@ func NewChainApp(
packetforwardtypes.StoreKey, packetforwardtypes.StoreKey,
didtypes.StoreKey, didtypes.StoreKey,
vaulttypes.StoreKey, vaulttypes.StoreKey,
macaroontypes.StoreKey,
servicetypes.StoreKey, servicetypes.StoreKey,
) )
@@ -632,16 +627,6 @@ func NewChainApp(
app.StakingKeeper, app.StakingKeeper,
) )
// Create the macaroon Keeper
app.MacaroonKeeper = macaroonkeeper.NewKeeper(
appCodec,
sdkruntime.NewKVStoreService(keys[macaroontypes.StoreKey]),
logger,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
app.AccountKeeper,
app.DidKeeper,
)
// Create the vault Keeper // Create the vault Keeper
app.VaultKeeper = vaultkeeper.NewKeeper( app.VaultKeeper = vaultkeeper.NewKeeper(
appCodec, appCodec,
@@ -650,7 +635,6 @@ func NewChainApp(
authtypes.NewModuleAddress(govtypes.ModuleName).String(), authtypes.NewModuleAddress(govtypes.ModuleName).String(),
app.AccountKeeper, app.AccountKeeper,
app.DidKeeper, app.DidKeeper,
app.MacaroonKeeper,
) )
// Create the service Keeper // Create the service Keeper
@@ -661,7 +645,6 @@ func NewChainApp(
authtypes.NewModuleAddress(govtypes.ModuleName).String(), authtypes.NewModuleAddress(govtypes.ModuleName).String(),
app.DidKeeper, app.DidKeeper,
app.GroupKeeper, app.GroupKeeper,
app.MacaroonKeeper,
app.NFTKeeper, app.NFTKeeper,
app.VaultKeeper, app.VaultKeeper,
) )
@@ -924,10 +907,9 @@ func NewChainApp(
did.NewAppModule(appCodec, app.DidKeeper, app.NFTKeeper), did.NewAppModule(appCodec, app.DidKeeper, app.NFTKeeper),
macaroon.NewAppModule(appCodec, app.MacaroonKeeper, app.DidKeeper),
vault.NewAppModule(appCodec, app.VaultKeeper, app.DidKeeper), vault.NewAppModule(appCodec, app.VaultKeeper, app.DidKeeper),
service.NewAppModule(appCodec, app.ServiceKeeper, app.DidKeeper, app.MacaroonKeeper), service.NewAppModule(appCodec, app.ServiceKeeper, app.DidKeeper),
) )
// BasicModuleManager defines the module BasicManager is in charge of setting up basic, // BasicModuleManager defines the module BasicManager is in charge of setting up basic,
@@ -977,7 +959,6 @@ func NewChainApp(
packetforwardtypes.ModuleName, packetforwardtypes.ModuleName,
didtypes.ModuleName, didtypes.ModuleName,
vaulttypes.ModuleName, vaulttypes.ModuleName,
macaroontypes.ModuleName,
servicetypes.ModuleName, servicetypes.ModuleName,
) )
@@ -999,7 +980,6 @@ func NewChainApp(
packetforwardtypes.ModuleName, packetforwardtypes.ModuleName,
didtypes.ModuleName, didtypes.ModuleName,
vaulttypes.ModuleName, vaulttypes.ModuleName,
macaroontypes.ModuleName,
servicetypes.ModuleName, servicetypes.ModuleName,
) )
@@ -1030,7 +1010,6 @@ func NewChainApp(
packetforwardtypes.ModuleName, packetforwardtypes.ModuleName,
didtypes.ModuleName, didtypes.ModuleName,
vaulttypes.ModuleName, vaulttypes.ModuleName,
macaroontypes.ModuleName,
servicetypes.ModuleName, servicetypes.ModuleName,
} }
app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...) app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
@@ -1491,7 +1470,6 @@ func initParamsKeeper(
WithKeyTable(packetforwardtypes.ParamKeyTable()) WithKeyTable(packetforwardtypes.ParamKeyTable())
paramsKeeper.Subspace(didtypes.ModuleName) paramsKeeper.Subspace(didtypes.ModuleName)
paramsKeeper.Subspace(vaulttypes.ModuleName) paramsKeeper.Subspace(vaulttypes.ModuleName)
paramsKeeper.Subspace(macaroontypes.ModuleName)
paramsKeeper.Subspace(servicetypes.ModuleName) paramsKeeper.Subspace(servicetypes.ModuleName)
return paramsKeeper return paramsKeeper
+43 -33
View File
@@ -2,98 +2,98 @@
"lockfile_version": "1", "lockfile_version": "1",
"packages": { "packages": {
"bun@latest": { "bun@latest": {
"last_modified": "2024-09-20T22:35:44Z", "last_modified": "2024-10-23T04:36:58Z",
"resolved": "github:NixOS/nixpkgs/a1d92660c6b3b7c26fb883500a80ea9d33321be2#bun", "resolved": "github:NixOS/nixpkgs/dfffb2e7a52d29a0ef8e21ec8a0f30487b227f1a#bun",
"source": "devbox-search", "source": "devbox-search",
"version": "1.1.29", "version": "1.1.31",
"systems": { "systems": {
"aarch64-darwin": { "aarch64-darwin": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/1hn8dddmy3l99x502d0fqz901gfk74px-bun-1.1.29", "path": "/nix/store/yw0z6rg88lx3mk3990a8hv1p9n81c5rs-bun-1.1.31",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/1hn8dddmy3l99x502d0fqz901gfk74px-bun-1.1.29" "store_path": "/nix/store/yw0z6rg88lx3mk3990a8hv1p9n81c5rs-bun-1.1.31"
}, },
"aarch64-linux": { "aarch64-linux": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/q1k3hsk9hwsg6xllgd25pb0lrh51ym7z-bun-1.1.29", "path": "/nix/store/00n6cawnzgxmih6vrkp7sg269njdlqfv-bun-1.1.31",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/q1k3hsk9hwsg6xllgd25pb0lrh51ym7z-bun-1.1.29" "store_path": "/nix/store/00n6cawnzgxmih6vrkp7sg269njdlqfv-bun-1.1.31"
}, },
"x86_64-darwin": { "x86_64-darwin": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/0wi8b58g19k1gpvniyvax2hpb77sp0w6-bun-1.1.29", "path": "/nix/store/4wg235mszvs98csdbk66lgdm6l9mzmnq-bun-1.1.31",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/0wi8b58g19k1gpvniyvax2hpb77sp0w6-bun-1.1.29" "store_path": "/nix/store/4wg235mszvs98csdbk66lgdm6l9mzmnq-bun-1.1.31"
}, },
"x86_64-linux": { "x86_64-linux": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/mqzlk40bnhx54by2m4lyyc02syippzad-bun-1.1.29", "path": "/nix/store/hilx2jwdslc05d38q4fzpsli6pgc56sa-bun-1.1.31",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/mqzlk40bnhx54by2m4lyyc02syippzad-bun-1.1.29" "store_path": "/nix/store/hilx2jwdslc05d38q4fzpsli6pgc56sa-bun-1.1.31"
} }
} }
}, },
"go@1.22": { "go@1.22": {
"last_modified": "2024-09-12T11:58:09Z", "last_modified": "2024-10-13T23:44:06Z",
"resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#go", "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#go_1_22",
"source": "devbox-search", "source": "devbox-search",
"version": "1.22.7", "version": "1.22.8",
"systems": { "systems": {
"aarch64-darwin": { "aarch64-darwin": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/rfcwglhhspqx5v5h0sl4b3py14i6vpxa-go-1.22.7", "path": "/nix/store/8mll7mf53m2hx3hx158gcls70ngcmhxi-go-1.22.8",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/rfcwglhhspqx5v5h0sl4b3py14i6vpxa-go-1.22.7" "store_path": "/nix/store/8mll7mf53m2hx3hx158gcls70ngcmhxi-go-1.22.8"
}, },
"aarch64-linux": { "aarch64-linux": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/64z59pb0ss407rbv1fcvq0ynngrwfa6k-go-1.22.7", "path": "/nix/store/20v33h47dgf8h7baxh81d3dzdfbgxw33-go-1.22.8",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/64z59pb0ss407rbv1fcvq0ynngrwfa6k-go-1.22.7" "store_path": "/nix/store/20v33h47dgf8h7baxh81d3dzdfbgxw33-go-1.22.8"
}, },
"x86_64-darwin": { "x86_64-darwin": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/r8199g59rmp6ac0lnx86fpk57fbxc3bk-go-1.22.7", "path": "/nix/store/dzrq6b65b9wvd6xjrn0qy7prx2s6pnym-go-1.22.8",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/r8199g59rmp6ac0lnx86fpk57fbxc3bk-go-1.22.7" "store_path": "/nix/store/dzrq6b65b9wvd6xjrn0qy7prx2s6pnym-go-1.22.8"
}, },
"x86_64-linux": { "x86_64-linux": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/chzgk756zb2cqlzbjr86m0lfxi63cdfy-go-1.22.7", "path": "/nix/store/gh9fsnl6gxrfzkrxwykbrp9lhnirmv9h-go-1.22.8",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/chzgk756zb2cqlzbjr86m0lfxi63cdfy-go-1.22.7" "store_path": "/nix/store/gh9fsnl6gxrfzkrxwykbrp9lhnirmv9h-go-1.22.8"
} }
} }
}, },
@@ -101,11 +101,21 @@
"last_modified": "2023-02-24T09:01:09Z", "last_modified": "2023-02-24T09:01:09Z",
"resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs", "resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs",
"source": "devbox-search", "source": "devbox-search",
"version": "0.17.0" "version": "0.17.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"path": "/nix/store/1azparhiwjzxgpkswpqnapzw0bfb7vl7-kubo-0.17.0",
"default": true
}
]
}
}
}, },
"templ@latest": { "templ@latest": {
"last_modified": "2024-09-10T15:01:03Z", "last_modified": "2024-10-13T23:44:06Z",
"resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#templ", "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#templ",
"source": "devbox-search", "source": "devbox-search",
"version": "0.2.778", "version": "0.2.778",
"systems": { "systems": {
@@ -113,41 +123,41 @@
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/n3yqslisz9v81k4w4vhci1v2bl1sqf9s-templ-0.2.778", "path": "/nix/store/n7bmbwk126kiclzi317yprpnc6rkn0jv-templ-0.2.778",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/n3yqslisz9v81k4w4vhci1v2bl1sqf9s-templ-0.2.778" "store_path": "/nix/store/n7bmbwk126kiclzi317yprpnc6rkn0jv-templ-0.2.778"
}, },
"aarch64-linux": { "aarch64-linux": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/i4xjiw0vc25qpr3g01q0x401351w28hr-templ-0.2.778", "path": "/nix/store/9fi535j2qw60x28vb5wlcz989z2wz959-templ-0.2.778",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/i4xjiw0vc25qpr3g01q0x401351w28hr-templ-0.2.778" "store_path": "/nix/store/9fi535j2qw60x28vb5wlcz989z2wz959-templ-0.2.778"
}, },
"x86_64-darwin": { "x86_64-darwin": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/77w522agb5fgsr36jkifcccr9x4xwkf9-templ-0.2.778", "path": "/nix/store/6r17bj68ahbf41xlk87pilbhj394anyy-templ-0.2.778",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/77w522agb5fgsr36jkifcccr9x4xwkf9-templ-0.2.778" "store_path": "/nix/store/6r17bj68ahbf41xlk87pilbhj394anyy-templ-0.2.778"
}, },
"x86_64-linux": { "x86_64-linux": {
"outputs": [ "outputs": [
{ {
"name": "out", "name": "out",
"path": "/nix/store/1g5ji5930j03cycpcjy12z6lr24l9c65-templ-0.2.778", "path": "/nix/store/6c1sqrhl7a68npksq7jicsa310qj9k1q-templ-0.2.778",
"default": true "default": true
} }
], ],
"store_path": "/nix/store/1g5ji5930j03cycpcjy12z6lr24l9c65-templ-0.2.778" "store_path": "/nix/store/6c1sqrhl7a68npksq7jicsa310qj9k1q-templ-0.2.778"
} }
} }
} }
+42 -4
View File
@@ -1,24 +1,40 @@
package ctx package ctx
import ( import (
"github.com/go-webauthn/webauthn/protocol"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/segmentio/ksuid" "github.com/segmentio/ksuid"
) )
// CookieKey is a type alias for string.
type CookieKey string type CookieKey string
const ( const (
CookieKeySessionID CookieKey = "session.id" // CookieKeySessionID is the key for the session ID cookie.
CookieKeySonrAddr CookieKey = "sonr.addr" CookieKeySessionID CookieKey = "session.id"
CookieKeySonrDID CookieKey = "sonr.did"
CookieKeyVaultCID CookieKey = "vault.cid" // CookieKeySessionChal is the key for the session challenge cookie.
CookieKeySessionChal CookieKey = "session.chal"
// CookieKeySonrAddr is the key for the Sonr address cookie.
CookieKeySonrAddr CookieKey = "sonr.addr"
// CookieKeySonrDID is the key for the Sonr DID cookie.
CookieKeySonrDID CookieKey = "sonr.did"
// CookieKeyVaultCID is the key for the Vault CID cookie.
CookieKeyVaultCID CookieKey = "vault.cid"
// CookieKeyVaultSchema is the key for the Vault schema cookie.
CookieKeyVaultSchema CookieKey = "vault.schema" CookieKeyVaultSchema CookieKey = "vault.schema"
) )
// String returns the string representation of the CookieKey.
func (c CookieKey) String() string { func (c CookieKey) String() string {
return string(c) return string(c)
} }
// GetSessionID returns the session ID from the cookies.
func GetSessionID(c echo.Context) string { func GetSessionID(c echo.Context) string {
// Attempt to read the session ID from the "session" cookie // Attempt to read the session ID from the "session" cookie
sessionID, err := ReadCookie(c, CookieKeySessionID) sessionID, err := ReadCookie(c, CookieKeySessionID)
@@ -28,3 +44,25 @@ func GetSessionID(c echo.Context) string {
} }
return sessionID return sessionID
} }
// GetSessionChallenge returns the session challenge from the cookies.
func GetSessionChallenge(c echo.Context) (*protocol.URLEncodedBase64, error) {
// TODO: Implement a way to regenerate the challenge if it is invalid.
chal := new(protocol.URLEncodedBase64)
// Attempt to read the session challenge from the "session" cookie
sessionChal, err := ReadCookie(c, CookieKeySessionChal)
if err != nil {
// Generate a new challenge if the session cookie is missing or invalid
ch, errb := protocol.CreateChallenge()
if errb != nil {
return nil, err
}
WriteCookie(c, CookieKeySessionChal, ch.String())
return &ch, nil
}
err = chal.UnmarshalJSON([]byte(sessionChal))
if err != nil {
return nil, err
}
return chal, nil
}
Binary file not shown.
+2 -2
View File
@@ -6,7 +6,7 @@ import (
"github.com/ipfs/boxo/files" "github.com/ipfs/boxo/files"
"github.com/onsonr/sonr/internal/dwn/gen" "github.com/onsonr/sonr/internal/dwn/gen"
"github.com/onsonr/sonr/pkg/nebula/components/vaultindex" "github.com/onsonr/sonr/pkg/nebula"
) )
const ( const (
@@ -24,7 +24,7 @@ var swJSData []byte
// NewVaultDirectory creates a new directory with the default files // NewVaultDirectory creates a new directory with the default files
func NewVaultDirectory(cnfg *gen.Config) (files.Node, error) { func NewVaultDirectory(cnfg *gen.Config) (files.Node, error) {
idxFile, err := vaultindex.BuildFile(cnfg) idxFile, err := nebula.BuildVaultFile(cnfg)
if err != nil { if err != nil {
return nil, err return nil, err
} }
+14 -9
View File
@@ -5,6 +5,16 @@ type Button struct {
Href string Href string
} }
type Image struct {
Src string
Width string
Height string
}
// ╭──────────────────────────────────────────────────────────╮
// │ Generic Models │
// ╰──────────────────────────────────────────────────────────╯
type Feature struct { type Feature struct {
Title string Title string
Desc string Desc string
@@ -12,12 +22,6 @@ type Feature struct {
Image *Image Image *Image
} }
type Image struct {
Src string
Width string
Height string
}
type Stat struct { type Stat struct {
Value string Value string
Denom string Denom string
@@ -34,7 +38,7 @@ type Technology struct {
type Testimonial struct { type Testimonial struct {
FullName string FullName string
Username string Username string
Avatar string Avatar *Image
Quote string Quote string
} }
@@ -80,8 +84,9 @@ type Architecture struct {
} }
type Lowlights struct { type Lowlights struct {
Heading string Heading string
Quotes []*Testimonial UpperQuotes []*Testimonial
LowerQuotes []*Testimonial
} }
type CallToAction struct { type CallToAction struct {
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
package sections package auth
import ( import (
"github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/forms"
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
"github.com/onsonr/sonr/pkg/nebula/global/ui" "github.com/onsonr/sonr/pkg/nebula/global/ui"
) )
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package sections package auth
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -9,7 +9,7 @@ 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/forms"
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
"github.com/onsonr/sonr/pkg/nebula/global/ui" "github.com/onsonr/sonr/pkg/nebula/global/ui"
) )
@@ -1,7 +1,7 @@
package sections package auth
import ( import (
"github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/forms"
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
"github.com/onsonr/sonr/pkg/nebula/global/ui" "github.com/onsonr/sonr/pkg/nebula/global/ui"
) )
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package sections package auth
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -9,7 +9,7 @@ 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/forms"
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
"github.com/onsonr/sonr/pkg/nebula/global/ui" "github.com/onsonr/sonr/pkg/nebula/global/ui"
) )
@@ -1,6 +1,6 @@
package sections package auth
import "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" import "github.com/onsonr/sonr/pkg/nebula/forms"
templ RegisterStart() { templ RegisterStart() {
@forms.BasicDetailsForm() @forms.BasicDetailsForm()
@@ -1,14 +1,14 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package sections package auth
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
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 "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" import "github.com/onsonr/sonr/pkg/nebula/forms"
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) {
@@ -1,23 +0,0 @@
package authentication
import echo "github.com/labstack/echo/v4"
templ CurrentView(c echo.Context) {
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Current Account</h3>
</div>
<div class="card-body">
<p class="card-text">
<a href="/logout">Logout</a>
</p>
</div>
</div>
</div>
</div>
</div>
}
@@ -1,19 +0,0 @@
package marketing
import (
"github.com/onsonr/sonr/pkg/nebula/components/marketing/sections"
"github.com/onsonr/sonr/pkg/nebula/global/styles"
)
templ View() {
@styles.LayoutNoBody("Sonr.ID", true) {
@sections.Header()
@sections.Hero(hero)
@sections.Highlights(highlights)
@sections.Mission()
@sections.Architecture()
@sections.Lowlights()
@sections.CallToAction()
@sections.Footer()
}
}
-18
View File
@@ -1,18 +0,0 @@
package marketing
import (
"log"
"github.com/labstack/echo/v4"
"github.com/onsonr/sonr/internal/ctx"
)
func HomeRoute(c echo.Context) error {
s, err := ctx.GetHWAYContext(c)
if err != nil {
return err
}
log.Printf("Session ID: %s", s.ID())
return ctx.RenderTempl(c, View())
}
File diff suppressed because one or more lines are too long
@@ -1,71 +0,0 @@
package sections
templ CallToAction() {
<section>
<div class="py-12 md:py-20">
<div class="max-w-5xl mx-auto px-4 sm:px-6">
<div class="relative max-w-3xl mx-auto text-center pb-12 md:pb-16">
<div class="inline-flex items-center justify-center w-20 h-20 bg-white rounded-xl shadow-md mb-8 relative before:absolute before:-top-12 before:w-52 before:h-52 before:bg-zinc-900 before:opacity-[.08] before:rounded-full before:blur-3xl before:-z-10">
<a href="index.html">
<img src="https://cdn.sonr.id/logo-zinc.svg" width="60" height="60" alt="Logo"/>
</a>
</div>
<h2 class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4">
Take control of your Identity
<em class="relative not-italic inline-flex justify-center items-end">
today
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="120" height="10" viewBox="0 0 120 10" aria-hidden="true" preserveAspectRatio="none">
<path d="M118.273 6.09C79.243 4.558 40.297 5.459 1.305 9.034c-1.507.13-1.742-1.521-.199-1.81C39.81-.228 79.647-1.568 118.443 4.2c1.63.233 1.377 1.943-.17 1.89Z"></path>
</svg>
</em>
</h2>
<p class="text-lg text-zinc-500 mb-8">Sonr removes creative distances by connecting beginners, pros, and every team in between. Are you ready to start your journey?</p>
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
<div>
<a class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href="request-demo.html">Register</a>
</div>
<div>
<a class="btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" href="#0">Log in</a>
</div>
</div>
</div>
<!-- Clients -->
<div class="text-center">
<ul class="inline-flex flex-wrap items-center justify-center -m-2 [mask-image:linear-gradient(to_right,transparent_8px,_theme(colors.white/.7)_64px,_theme(colors.white)_50%,_theme(colors.white/.7)_calc(100%-64px),_transparent_calc(100%-8px))]">
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Adobe">
<path d="m21.966 31-1.69-4.231h-4.154l3.892-9.037L25.676 31h-3.71Zm-5.082-21H8v21l8.884-21ZM32 10h-8.884L32 31V10Z"></path>
</svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Unsplash">
<path d="M16.119 9h8.762v6.571h-8.762zM24.881 18.857H32V32H9V18.857h7.119v6.572h8.762z"></path>
</svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Google">
<path d="M8.407 26.488a13.458 13.458 0 0 1 0-11.98A13.48 13.48 0 0 1 29.63 10.57l-4.012 3.821a7.934 7.934 0 0 0-5.12-1.87 7.986 7.986 0 0 0-7.568 5.473 7.94 7.94 0 0 0-.408 2.504A7.94 7.94 0 0 0 12.93 23a7.986 7.986 0 0 0 7.567 5.472 8.577 8.577 0 0 0 4.566-1.127l4.489 3.459a13.415 13.415 0 0 1-9.055 3.19 13.512 13.512 0 0 1-12.09-7.507Zm25.036-8.444c.664 6.002-1.021 10.188-3.89 12.762l-4.488-3.46a6.581 6.581 0 0 0 2.795-3.78h-7.301v-5.522h12.884Z"></path>
</svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="WordPress">
<path d="M8.061 20.5c0-1.804.387-3.516 1.077-5.063l5.934 16.257c-4.15-2.016-7.01-6.271-7.01-11.194Zm20.836-.628c0 1.065-.41 2.3-.946 4.021L26.71 28.04l-4.496-13.371c.749-.04 1.424-.119 1.424-.119.67-.079.591-1.064-.08-1.025 0 0-2.014.158-3.315.158-1.222 0-3.276-.158-3.276-.158-.67-.039-.75.986-.079 1.025 0 0 .635.08 1.305.119l1.938 5.31-2.723 8.163-4.53-13.473c.75-.04 1.424-.119 1.424-.119.67-.079.591-1.064-.08-1.025 0 0-2.014.158-3.314.158-.234 0-.509-.005-.801-.015A12.425 12.425 0 0 1 20.5 8.061c3.238 0 6.187 1.238 8.4 3.266-.054-.004-.106-.01-.162-.01-1.221 0-2.088 1.064-2.088 2.207 0 1.025.591 1.893 1.221 2.918.474.828 1.026 1.892 1.026 3.43Zm-8.179 1.716 3.824 10.475c.025.061.056.118.089.171a12.434 12.434 0 0 1-7.645.198l3.732-10.844Zm10.697-7.056a12.378 12.378 0 0 1 1.524 5.968c0 4.589-2.487 8.595-6.185 10.751l3.799-10.985c.71-1.774.946-3.193.946-4.455 0-.458-.03-.883-.084-1.279ZM20.5 6C28.495 6 35 12.504 35 20.5 35 28.495 28.495 35 20.5 35S6 28.495 6 20.5C6 12.504 12.505 6 20.5 6Zm0 28.335c7.628 0 13.835-6.207 13.835-13.835 0-7.629-6.207-13.835-13.835-13.835-7.629 0-13.835 6.206-13.835 13.835 0 7.628 6.206 13.835 13.835 13.835Z"></path>
</svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Windows">
<path d="m8 11.408 9.808-1.335.004 9.46-9.803.056L8 11.41Zm9.803 9.215.008 9.47-9.803-1.348-.001-8.185 9.796.063Zm1.19-10.725L31.996 8v11.413l-13.005.103V9.898ZM32 20.712l-.003 11.362-13.005-1.835-.018-9.548L32 20.712Z"></path>
</svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg class="fill-zinc-400" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Pinterest">
<path d="M19.482 6.455c-7.757 0-14.045 6.288-14.045 14.045 0 5.95 3.702 11.032 8.926 13.079-.123-1.112-.233-2.816.05-4.03.254-1.095 1.646-6.98 1.646-6.98s-.42-.842-.42-2.086c0-1.953 1.132-3.41 2.541-3.41 1.198 0 1.777.899 1.777 1.978 0 1.205-.767 3.006-1.163 4.676-.33 1.398.701 2.538 2.08 2.538 2.496 0 4.415-2.632 4.415-6.431 0-3.363-2.416-5.714-5.867-5.714-3.996 0-6.342 2.997-6.342 6.095 0 1.207.466 2.501 1.046 3.205a.42.42 0 0 1 .097.403c-.107.443-.343 1.397-.39 1.592-.061.258-.204.312-.47.188-1.754-.816-2.85-3.38-2.85-5.44 0-4.431 3.218-8.5 9.28-8.5 4.872 0 8.658 3.472 8.658 8.112 0 4.84-3.052 8.736-7.288 8.736-1.423 0-2.761-.74-3.22-1.613l-.874 3.339c-.317 1.22-1.173 2.749-1.746 3.682a14.04 14.04 0 0 0 4.159.626c7.757 0 14.045-6.288 14.045-14.045S27.238 6.455 19.482 6.455Z"></path>
</svg>
</li>
</ul>
</div>
</div>
</div>
</section>
}
File diff suppressed because one or more lines are too long
@@ -1,161 +0,0 @@
package sections
templ Lowlights() {
<section class="bg-zinc-800">
<div class="py-12 md:py-20">
<div class="max-w-5xl mx-auto px-4 sm:px-6">
<div class="max-w-3xl mx-auto text-center pb-12 md:pb-20">
<h2 class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-200">The Fragmentation Problem in the Existing Web is seeping into Crypto</h2>
</div>
</div>
<div class="max-w-[94rem] mx-auto space-y-6">
<!-- Row #1 -->
<div
x-data="{}"
x-init="$nextTick(() => {
let ul = $refs.testimonials;
ul.insertAdjacentHTML('afterend', ul.outerHTML);
ul.nextSibling.setAttribute('aria-hidden', 'true');
})"
class="w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group"
>
<div x-ref="testimonials" class="flex items-start justify-center md:justify-start [&>div]:mx-3 animate-infinite-scroll group-hover:[animation-play-state:paused]">
<!-- Item #1 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-01.jpg" width="44" height="44" alt="Testimonial 01"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Lina James</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">linaj87</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
<!-- Item #2 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-02.jpg" width="44" height="44" alt="Testimonial 02"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Sarah Mendes</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">saramendes</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
<!-- Item #3 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-03.jpg" width="44" height="44" alt="Testimonial 03"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Michał Rutt</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">michrutt</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
<!-- Item #4 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-04.jpg" width="44" height="44" alt="Testimonial 04"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Mary Kahl</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">marykahl</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
</div>
</div>
<!-- Row #2 -->
<div
x-data="{}"
x-init="$nextTick(() => {
let ul = $refs.testimonials;
ul.insertAdjacentHTML('afterend', ul.outerHTML);
ul.nextSibling.setAttribute('aria-hidden', 'true');
})"
class="w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group"
>
<div x-ref="testimonials" class="flex items-start justify-center md:justify-start [&>div]:mx-3 animate-infinite-scroll-inverse group-hover:[animation-play-state:paused] [animation-delay:-7.5s]">
<!-- Item #5 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-05.jpg" width="44" height="44" alt="Testimonial 05"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Katy Dragán</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">katyd</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
<!-- Item #6 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-06.jpg" width="44" height="44" alt="Testimonial 06"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Karl Ahmed</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">karl87</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
<!-- Item #7 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-07.jpg" width="44" height="44" alt="Testimonial 07"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Carlotta Grech</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">carlagrech</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
<!-- Item #8 -->
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src="./images/testimonial-08.jpg" width="44" height="44" alt="Testimonial 08"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">Alejandra Gok</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">alejandraIT</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
Extremely thoughtful approaches to business. I highly recommend this product to anyone wanting to jump into something new.
</div>
</div>
</div>
</div>
</div>
</div>
</section>
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-71
View File
@@ -1,71 +0,0 @@
package marketing
import models "github.com/onsonr/sonr/internal/orm/marketing"
var hero = &models.Hero{
TitleFirst: "Simplified",
TitleEmphasis: "self-custody",
TitleSecond: "for everyone",
Subtitle: "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.",
PrimaryButton: &models.Button{Text: "Get Started", Href: "/register"},
SecondaryButton: &models.Button{Text: "Learn More", Href: "/about"},
Image: &models.Image{
Src: "https://cdn.sonr.id/img/hero-clipped.svg",
Width: "500",
Height: "500",
},
Stats: []*models.Stat{
{Value: "476", Label: "Assets packed with power beyond your imagination.", Denom: "K"},
{Value: "1.44", Label: "Assets packed with power beyond your imagination.", Denom: "K"},
{Value: "1.5", Label: "Assets packed with power beyond your imagination.", Denom: "M+"},
{Value: "750", Label: "Assets packed with power beyond your imagination.", Denom: "K"},
},
}
var highlights = &models.Highlights{
Heading: "The Internet Rebuilt for You",
Subtitle: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.",
Features: []*models.Feature{
{
Title: "∞-Factor Auth",
Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.",
Icon: nil,
},
{
Title: "Data Ownership",
Desc: "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server.",
Icon: nil,
},
{
Title: "Everyday Transactions",
Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Icon: nil,
},
{
Title: "Limitless Possibilities",
Desc: "Sonr is a proudly American Project which operates under the new Wyoming DUNA Legal Framework, ensuring the protection of your digital rights.",
Icon: nil,
},
},
}
var mission = &models.Mission{
Eyebrow: "L1 Blockchain",
Heading: "The Protocol for Decentralized Identity & Authentication",
Subtitle: "We're creating the Global Standard for Decentralized Identity. Authenticate users with PassKeys, Issue Crypto Wallets, Build Payment flows, Send Encrypted Messages - all on a single platform.",
Experience: &models.Feature{
Title: "Less is More",
Desc: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.",
Icon: nil,
},
Compliance: &models.Feature{
Title: "Works where there's Internet",
Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.",
Icon: nil,
},
Interoperability: &models.Feature{
Title: "American Made DUNA",
Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Icon: nil,
},
}
@@ -3,12 +3,49 @@ package forms
templ BasicDetailsForm() { templ BasicDetailsForm() {
<div class="border rounded-lg shadow-sm bg-card text-zinc-900"> <div class="border rounded-lg shadow-sm bg-card text-zinc-900">
<div class="flex flex-col space-y-1.5 p-6"></div> <div class="flex flex-col space-y-1.5 p-6"></div>
@roleSelectInput()
@nameInput() @nameInput()
@usernameInput() @usernameInput()
<div class="p-6 pt-0 space-y-2"></div> <div class="p-6 pt-0 space-y-2"></div>
</div> </div>
} }
templ roleSelectInput() {
<div
x-data="{
radioGroupSelectedValue: null,
radioGroupOptions: [
{
title: 'Trader',
description: 'You are experienced with DeFi.',
value: 'trader'
},
{
title: 'Developer',
description: 'You want to build on or integrate with the protocol.',
value: 'developer'
},
{
title: 'Hobbyist',
description: 'You are interested in what Sonr is all about.',
value: 'hobbyist'
}
]
}"
class="space-y-3"
>
<template x-for="(option, index) in radioGroupOptions" :key="index">
<label @click="radioGroupSelectedValue=option.value" class="flex items-start p-5 space-x-3 bg-white border rounded-md shadow-sm hover:bg-gray-50 border-neutral-200/70">
<input type="radio" name="radio-group" :value="option.value" class="text-gray-900 translate-y-px focus:ring-gray-700"/>
<span class="relative flex flex-col text-left space-y-1.5 leading-none">
<span x-text="option.title" class="font-semibold"></span>
<span x-text="option.description" class="text-sm opacity-50"></span>
</span>
</label>
</template>
</div>
}
templ nameInput() { templ nameInput() {
<div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div> <div class="space-y-1"><label class="text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" for="name">Name</label><input type="text" id="name" placeholder="Adam Wathan" class="flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50"/></div>
} }
@@ -33,6 +33,10 @@ func BasicDetailsForm() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = roleSelectInput().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = nameInput().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = nameInput().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
@@ -49,6 +53,35 @@ func BasicDetailsForm() templ.Component {
}) })
} }
func roleSelectInput() 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 x-data=\"{\n radioGroupSelectedValue: null,\n radioGroupOptions: [\n {\n title: &#39;Trader&#39;,\n description: &#39;You are experienced with DeFi.&#39;,\n value: &#39;trader&#39;\n },\n {\n title: &#39;Developer&#39;,\n description: &#39;You want to build on or integrate with the protocol.&#39;,\n value: &#39;developer&#39;\n },\n {\n title: &#39;Hobbyist&#39;,\n description: &#39;You are interested in what Sonr is all about.&#39;,\n value: &#39;hobbyist&#39;\n }\n ]\n}\" class=\"space-y-3\"><template x-for=\"(option, index) in radioGroupOptions\" :key=\"index\"><label @click=\"radioGroupSelectedValue=option.value\" class=\"flex items-start p-5 space-x-3 bg-white border rounded-md shadow-sm hover:bg-gray-50 border-neutral-200/70\"><input type=\"radio\" name=\"radio-group\" :value=\"option.value\" class=\"text-gray-900 translate-y-px focus:ring-gray-700\"> <span class=\"relative flex flex-col text-left space-y-1.5 leading-none\"><span x-text=\"option.title\" class=\"font-semibold\"></span> <span x-text=\"option.description\" class=\"text-sm opacity-50\"></span></span></label></template></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func nameInput() templ.Component { func nameInput() 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
@@ -65,9 +98,9 @@ func nameInput() templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var2 := templ.GetChildren(ctx) templ_7745c5c3_Var3 := templ.GetChildren(ctx)
if templ_7745c5c3_Var2 == nil { if templ_7745c5c3_Var3 == nil {
templ_7745c5c3_Var2 = templ.NopComponent templ_7745c5c3_Var3 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"name\">Name</label><input type=\"text\" id=\"name\" placeholder=\"Adam Wathan\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
@@ -94,9 +127,9 @@ func usernameInput() templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var3 := templ.GetChildren(ctx) templ_7745c5c3_Var4 := templ.GetChildren(ctx)
if templ_7745c5c3_Var3 == nil { if templ_7745c5c3_Var4 == nil {
templ_7745c5c3_Var3 = templ.NopComponent templ_7745c5c3_Var4 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"space-y-1\"><label class=\"text-xs font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\" for=\"username\">Handle</label><input type=\"text\" id=\"handle\" placeholder=\"angelo.snr\" class=\"flex w-full h-10 px-3 py-2 text-sm bg-white border rounded-md peer border-zinc-300 ring-offset-background placeholder:text-zinc-400 focus:border-zinc-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-neutral-400 disabled:cursor-not-allowed disabled:opacity-50\"></div>")
+70
View File
@@ -0,0 +1,70 @@
package global
import "fmt"
// ╭───────────────────────────────────────────────────────────╮
// │ Avatar Image Components │
// ╰───────────────────────────────────────────────────────────╯
type Avatar string
const (
Avatar0xDesigner Avatar = "0xdesigner.jpg"
AvatarAccountless Avatar = "accountless.jpg"
AvatarAlexRecouso Avatar = "alexrecouso.jpg"
AvatarChjango Avatar = "chjango.jpg"
AvatarGwart Avatar = "gwart.jpg"
AvatarHTMXOrg Avatar = "htmx_org.jpg"
AvatarJelenaNoble Avatar = "jelena_noble.jpg"
AvatarSonr Avatar = "sonr.svg"
AvatarTanishqXYZ Avatar = "tanishqxyz.jpg"
AvatarUnusualWhales Avatar = "unusual_whales.png"
AvatarWinnieLaux Avatar = "winnielaux_.jpg"
)
func (a Avatar) Src() string {
return fmt.Sprintf("https://cdn.sonr.id/img/avatars/%s", string(a))
}
// ╭───────────────────────────────────────────────────────────╮
// │ SVG CDN Illustrations │
// ╰───────────────────────────────────────────────────────────╯
type Illustration string
const (
BlockchainExplorer Illustration = "blockchain-explorer"
BlockchainStructure Illustration = "blockchain-structure"
CrossChainBridge Illustration = "cross-chain-bridge"
CrossChainTransfer Illustration = "cross-chain-transfer"
CryptoAirdrop Illustration = "crypto-airdrop"
CryptoCard Illustration = "crypto-card"
CryptoExchange Illustration = "crypto-exchange"
CryptoMining Illustration = "crypto-mining"
CryptoPayments Illustration = "crypto-payments"
CryptoSecurity Illustration = "crypto-security"
CryptoStaking Illustration = "crypto-staking"
CryptoYield Illustration = "crypto-yield"
CurrencyConversion Illustration = "currency-conversion"
DecentralizedNetwork Illustration = "decentralized-network"
DecentralizedWebNode Illustration = "decentralized-web-node"
DefiDashboard Illustration = "defi-dashboard"
GovernanceToken Illustration = "governance-token"
HardwareWallet Illustration = "hardware-wallet"
InitialCoinOffering Illustration = "initial-coin-offering"
LiquidityPool Illustration = "liquidity-pool"
MarketAnalysis Illustration = "market-analysis"
MarketVolatility Illustration = "market-volatility"
MultiCoinWallet Illustration = "multi-coin-wallet"
NetworkLatency Illustration = "network-latency"
PortfolioBalance Illustration = "portfolio-balance"
PrivateKey Illustration = "private-key"
ProofOfStake Illustration = "proof-of-stake"
TokenFractioning Illustration = "token-fractioning"
TokenMinting Illustration = "token-minting"
TokenSwap Illustration = "token-swap"
)
func (i Illustration) Src() string {
return fmt.Sprintf("https://cdn.sonr.id/img/illustrations/%s.svg", string(i))
}
@@ -1,4 +1,4 @@
package vaultindex package nebula
import ( import (
"bytes" "bytes"
@@ -6,12 +6,13 @@ import (
"github.com/ipfs/boxo/files" "github.com/ipfs/boxo/files"
"github.com/onsonr/sonr/internal/dwn/gen" "github.com/onsonr/sonr/internal/dwn/gen"
"github.com/onsonr/sonr/pkg/nebula/views"
) )
// BuildFile builds the index.html file for the vault // BuildVaultFile builds the index.html file for the vault
func BuildFile(cnfg *gen.Config) (files.Node, error) { func BuildVaultFile(cnfg *gen.Config) (files.Node, error) {
w := bytes.NewBuffer(nil) w := bytes.NewBuffer(nil)
err := IndexFile().Render(context.Background(), w) err := views.VaultIndexFile().Render(context.Background(), w)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -1,4 +1,4 @@
package sections package marketing
templ Footer() { templ Footer() {
<!-- Site footer --> <!-- Site footer -->
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package sections package marketing
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -1,4 +1,4 @@
package sections package marketing
templ Header() { templ Header() {
<!-- Site header --> <!-- Site header -->
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package sections package marketing
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
+21
View File
@@ -0,0 +1,21 @@
package marketing
import "github.com/onsonr/sonr/pkg/nebula/global/styles"
// ╭─────────────────────────────────────────────────────────╮
// │ Final Rendering │
// ╰─────────────────────────────────────────────────────────╯
// View renders the home page
templ View() {
@styles.LayoutNoBody("Sonr.ID", true) {
@Header()
@Hero()
@Highlights()
@Mission()
@Architecture()
@Lowlights()
@CallToAction()
@Footer()
}
}
@@ -8,11 +8,13 @@ package marketing
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/global/styles"
"github.com/onsonr/sonr/pkg/nebula/components/marketing/sections"
"github.com/onsonr/sonr/pkg/nebula/global/styles"
)
// ╭─────────────────────────────────────────────────────────╮
// │ Final Rendering │
// ╰─────────────────────────────────────────────────────────╯
// View renders the home page
func View() templ.Component { func View() 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
@@ -46,7 +48,7 @@ func View() templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = sections.Header().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = Header().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -54,7 +56,7 @@ func View() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = sections.Hero(hero).Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = Hero().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -62,7 +64,7 @@ func View() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = sections.Highlights(highlights).Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = Highlights().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -70,7 +72,7 @@ func View() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = sections.Mission().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = Mission().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -78,7 +80,7 @@ func View() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = sections.Architecture().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = Architecture().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -86,7 +88,7 @@ func View() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = sections.Lowlights().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = Lowlights().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -94,7 +96,7 @@ func View() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = sections.CallToAction().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = CallToAction().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -102,7 +104,7 @@ func View() templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
templ_7745c5c3_Err = sections.Footer().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = Footer().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -1,5 +1,70 @@
package sections package marketing
import (
models "github.com/onsonr/sonr/internal/orm/marketing"
"github.com/onsonr/sonr/pkg/nebula/global"
)
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// architecture is the (4th) home page architecture section
var arch = &models.Architecture{
Heading: "Onchain Security with Offchain Privacy",
Subtitle: "Whenever you are ready, just hit publish to turn your site sketches into an actual designs. No creating, no skills, no reshaping.",
Primary: &models.Technology{
Title: "Decentralized Identity",
Desc: "Sonr leverages the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Image: &models.Image{
Src: global.HardwareWallet.Src(),
Width: "721",
Height: "280",
},
},
Secondary: &models.Technology{
Title: "IPFS Vaults",
Desc: "Completely distributed, encrypted, and decentralized storage for your data.",
Image: &models.Image{
Src: global.DecentralizedNetwork.Src(),
Width: "342",
Height: "280",
},
},
Tertiary: &models.Technology{
Title: "Service Records",
Desc: "On-chain validated services created by Developers for secure transmission of user data.",
Image: &models.Image{
Src: global.DefiDashboard.Src(),
Width: "342",
Height: "280",
},
},
Quaternary: &models.Technology{
Title: "Authentication & Authorization",
Desc: "Sonr leverages decentralized Macaroons and Multi-Party Computation to provide a secure and decentralized authentication and authorization system.",
Image: &models.Image{
Src: global.PrivateKey.Src(),
Width: "342",
Height: "280",
},
},
Quinary: &models.Technology{
Title: "First-Class Exchange",
Desc: "Sonr integrates with the IBC protocol allowing for seamless integration with popular exchanges such as OKX, Binance, and Osmosis.",
Image: &models.Image{
Src: global.CrossChainBridge.Src(),
Width: "342",
Height: "280",
},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Architecture is the (4th) home page architecture section
templ Architecture() { templ Architecture() {
<!-- Features #2 --> <!-- Features #2 -->
<section> <section>
@@ -11,12 +76,10 @@ templ Architecture() {
<h2 <h2
class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4" class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4"
> >
Onchain Security with Offchain Privacy { arch.Heading }
</h2> </h2>
<p class="text-lg text-zinc-500"> <p class="text-lg text-zinc-500">
Whenever you are ready, just hit publish to turn your site { arch.Subtitle }
sketches into an actual designs. No creating, no skills, no
reshaping.
</p> </p>
</div> </div>
<div <div
@@ -38,18 +101,17 @@ templ Architecture() {
></path> ></path>
</svg> </svg>
<h3 class="font-inter-tight font-semibold text-zinc-900"> <h3 class="font-inter-tight font-semibold text-zinc-900">
Decentralized Identity { arch.Primary.Title }
</h3> </h3>
</div> </div>
<p class="grow max-w-md text-sm text-zinc-500"> <p class="grow max-w-md text-sm text-zinc-500">
Create teams and organize your designs into folders using { arch.Primary.Desc }
project specs and insights.
</p> </p>
</div> </div>
<figure> <figure>
<img <img
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto" class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
src="./images/feature-post-01.png" src={ arch.Primary.Image.Src }
width="721" width="721"
height="280" height="280"
alt="Feature Post 01" alt="Feature Post 01"
@@ -72,18 +134,17 @@ templ Architecture() {
></path> ></path>
</svg> </svg>
<h3 class="font-inter-tight font-semibold text-zinc-900"> <h3 class="font-inter-tight font-semibold text-zinc-900">
IPFS Vaults { arch.Secondary.Title }
</h3> </h3>
</div> </div>
<p class="grow max-w-md text-sm text-zinc-500"> <p class="grow max-w-md text-sm text-zinc-500">
Generate images and explore new ways of presenting your { arch.Secondary.Desc }
designs with AI.
</p> </p>
</div> </div>
<figure> <figure>
<img <img
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto" class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
src="./images/feature-post-02.png" src={ arch.Secondary.Image.Src }
width="342" width="342"
height="280" height="280"
alt="Feature Post 02" alt="Feature Post 02"
@@ -106,18 +167,17 @@ templ Architecture() {
></path> ></path>
</svg> </svg>
<h3 class="font-inter-tight font-semibold text-zinc-900"> <h3 class="font-inter-tight font-semibold text-zinc-900">
Service Records { arch.Tertiary.Title }
</h3> </h3>
</div> </div>
<p class="grow max-w-md text-sm text-zinc-500"> <p class="grow max-w-md text-sm text-zinc-500">
Get your scenes inside your projects using simple embed { arch.Tertiary.Desc }
code/snippets.
</p> </p>
</div> </div>
<figure> <figure>
<img <img
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto" class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
src="./images/feature-post-03.png" src={ arch.Tertiary.Image.Src }
width="342" width="342"
height="280" height="280"
alt="Feature Post 03" alt="Feature Post 03"
@@ -140,17 +200,17 @@ templ Architecture() {
></path> ></path>
</svg> </svg>
<h3 class="font-inter-tight font-semibold text-zinc-900"> <h3 class="font-inter-tight font-semibold text-zinc-900">
Authentication & Authorization { arch.Quaternary.Title }
</h3> </h3>
</div> </div>
<p class="grow max-w-md text-sm text-zinc-500"> <p class="grow max-w-md text-sm text-zinc-500">
Easily make drag and drop interactions without coding. { arch.Quaternary.Desc }
</p> </p>
</div> </div>
<figure> <figure>
<img <img
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto" class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
src="./images/feature-post-04.png" src={ arch.Quaternary.Image.Src }
width="342" width="342"
height="280" height="280"
alt="Feature Post 04" alt="Feature Post 04"
@@ -173,17 +233,17 @@ templ Architecture() {
></path> ></path>
</svg> </svg>
<h3 class="font-inter-tight font-semibold text-zinc-900"> <h3 class="font-inter-tight font-semibold text-zinc-900">
Decentralized Exchange { arch.Quinary.Title }
</h3> </h3>
</div> </div>
<p class="grow max-w-md text-sm text-zinc-500"> <p class="grow max-w-md text-sm text-zinc-500">
Create tasks, projects, issues and more in just seconds. { arch.Quinary.Desc }
</p> </p>
</div> </div>
<figure> <figure>
<img <img
class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto" class="h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto"
src="./images/feature-post-05.png" src={ arch.Quinary.Image.Src }
width="342" width="342"
height="280" height="280"
alt="Feature Post 05" alt="Feature Post 05"
+326
View File
@@ -0,0 +1,326 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778
package marketing
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import (
models "github.com/onsonr/sonr/internal/orm/marketing"
"github.com/onsonr/sonr/pkg/nebula/global"
)
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// architecture is the (4th) home page architecture section
var arch = &models.Architecture{
Heading: "Onchain Security with Offchain Privacy",
Subtitle: "Whenever you are ready, just hit publish to turn your site sketches into an actual designs. No creating, no skills, no reshaping.",
Primary: &models.Technology{
Title: "Decentralized Identity",
Desc: "Sonr leverages the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Image: &models.Image{
Src: global.HardwareWallet.Src(),
Width: "721",
Height: "280",
},
},
Secondary: &models.Technology{
Title: "IPFS Vaults",
Desc: "Completely distributed, encrypted, and decentralized storage for your data.",
Image: &models.Image{
Src: global.DecentralizedNetwork.Src(),
Width: "342",
Height: "280",
},
},
Tertiary: &models.Technology{
Title: "Service Records",
Desc: "On-chain validated services created by Developers for secure transmission of user data.",
Image: &models.Image{
Src: global.DefiDashboard.Src(),
Width: "342",
Height: "280",
},
},
Quaternary: &models.Technology{
Title: "Authentication & Authorization",
Desc: "Sonr leverages decentralized Macaroons and Multi-Party Computation to provide a secure and decentralized authentication and authorization system.",
Image: &models.Image{
Src: global.PrivateKey.Src(),
Width: "342",
Height: "280",
},
},
Quinary: &models.Technology{
Title: "First-Class Exchange",
Desc: "Sonr integrates with the IBC protocol allowing for seamless integration with popular exchanges such as OKX, Binance, and Osmosis.",
Image: &models.Image{
Src: global.CrossChainBridge.Src(),
Width: "342",
Height: "280",
},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Architecture is the (4th) home page architecture section
func Architecture() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Features #2 --><section><div class=\"py-12 md:py-20\"><div class=\"max-w-5xl mx-auto px-4 sm:px-6\"><div class=\"relative max-w-3xl mx-auto text-center pb-12 md:pb-20\"><h2 class=\"font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Heading)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 79, Col: 20}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h2><p class=\"text-lg text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Subtitle)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 82, Col: 21}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><div class=\"max-w-xs mx-auto sm:max-w-none grid sm:grid-cols-2 md:grid-cols-3 gap-8 sm:gap-4 lg:gap-8\"><article class=\"sm:col-span-2 flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg\"><div class=\"grow flex flex-col p-5 pt-6\"><div class=\"flex items-center space-x-3 mb-1\"><svg class=\"inline-flex fill-zinc-400\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M17 9c.6 0 1 .4 1 1v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h6c.6 0 1 .4 1 1s-.4 1-1 1H4v12h12v-6c0-.6.4-1 1-1Zm-.7-6.7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-8 8c-.2.2-.4.3-.7.3-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l8-8Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Primary.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 104, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></div><p class=\"grow max-w-md text-sm text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Primary.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 108, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><figure><img class=\"h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto\" src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Primary.Image.Src)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 114, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" width=\"721\" height=\"280\" alt=\"Feature Post 01\"></figure></article><article class=\"flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg\"><div class=\"grow flex flex-col p-5 pt-6\"><div class=\"flex items-center space-x-3 mb-1\"><svg class=\"inline-flex fill-zinc-400\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"m6.035 17.335-4-14c-.2-.8.5-1.5 1.3-1.3l14 4c.9.3 1 1.5.1 1.9l-6.6 2.9-2.8 6.6c-.5.9-1.7.8-2-.1Zm-1.5-12.8 2.7 9.5 1.9-4.4c.1-.2.3-.4.5-.5l4.4-1.9-9.5-2.7Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Secondary.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 137, Col: 31}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></div><p class=\"grow max-w-md text-sm text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Secondary.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 141, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><figure><img class=\"h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto\" src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Secondary.Image.Src)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 147, Col: 38}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" width=\"342\" height=\"280\" alt=\"Feature Post 02\"></figure></article><article class=\"flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg\"><div class=\"grow flex flex-col p-5 pt-6\"><div class=\"flex items-center space-x-3 mb-1\"><svg class=\"inline-flex fill-zinc-400\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M8.974 16c-.3 0-.7-.2-.9-.5l-2.2-3.7-2.1 2.8c-.3.4-1 .5-1.4.2-.4-.3-.5-1-.2-1.4l3-4c.2-.3.5-.4.9-.4.3 0 .6.2.8.5l2 3.3 3.3-8.1c0-.4.4-.7.8-.7s.8.2.9.6l4 8c.2.5 0 1.1-.4 1.3-.5.2-1.1 0-1.3-.4l-3-6-3.2 7.9c-.2.4-.6.6-1 .6Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Tertiary.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 170, Col: 30}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></div><p class=\"grow max-w-md text-sm text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var11 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Tertiary.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 174, Col: 28}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><figure><img class=\"h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto\" src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Tertiary.Image.Src)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 180, Col: 37}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" width=\"342\" height=\"280\" alt=\"Feature Post 03\"></figure></article><article class=\"flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg\"><div class=\"grow flex flex-col p-5 pt-6\"><div class=\"flex items-center space-x-3 mb-1\"><svg class=\"inline-flex fill-zinc-400\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M9.3 11.7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0ZM9.3 17.7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0ZM2.3 12.7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var13 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quaternary.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 203, Col: 32}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></div><p class=\"grow max-w-md text-sm text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quaternary.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 207, Col: 30}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><figure><img class=\"h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto\" src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var15 string
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quaternary.Image.Src)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 213, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" width=\"342\" height=\"280\" alt=\"Feature Post 04\"></figure></article><article class=\"flex flex-col border border-transparent [background:linear-gradient(theme(colors.white),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] rounded-lg\"><div class=\"grow flex flex-col p-5 pt-6\"><div class=\"flex items-center space-x-3 mb-1\"><svg class=\"inline-flex fill-zinc-400\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"><path d=\"M16 2H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h8.667l3.733 2.8A1 1 0 0 0 18 17V4a2 2 0 0 0-2-2Zm0 13-2.4-1.8a1 1 0 0 0-.6-.2H4V4h12v11Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var16 string
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quinary.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 236, Col: 29}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3></div><p class=\"grow max-w-md text-sm text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var17 string
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quinary.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 240, Col: 27}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><figure><img class=\"h-[280px] object-cover object-left mx-auto sm:object-contain sm:h-auto\" src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var18 string
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(arch.Quinary.Image.Src)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_arch.templ`, Line: 246, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" width=\"342\" height=\"280\" alt=\"Feature Post 05\"></figure></article></div></div></div></section>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
+91
View File
@@ -0,0 +1,91 @@
package marketing
import models "github.com/onsonr/sonr/internal/orm/marketing"
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
var cta = &models.CallToAction{
Logo: &models.Image{
Src: "https://cdn.sonr.id/logo-zinc.svg",
Width: "60",
Height: "60",
},
Heading: "Take control of your Identity",
Subtitle: "Sonr is a decentralized, permissionless, and censorship-resistant identity network.",
Primary: &models.Button{
Href: "request-demo.html",
Text: "Register",
},
Secondary: &models.Button{
Href: "#0",
Text: "Learn More",
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
templ CallToAction() {
<section>
<div class="py-12 md:py-20">
<div class="max-w-5xl mx-auto px-4 sm:px-6">
<div class="relative max-w-3xl mx-auto text-center pb-12 md:pb-16">
<div class="inline-flex items-center justify-center w-20 h-20 bg-white rounded-xl shadow-md mb-8 relative before:absolute before:-top-12 before:w-52 before:h-52 before:bg-zinc-900 before:opacity-[.08] before:rounded-full before:blur-3xl before:-z-10">
<a href="index.html">
<img src="https://cdn.sonr.id/logo-zinc.svg" width="60" height="60" alt="Logo"/>
</a>
</div>
<h2 class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-900 mb-4">
Take control of your Identity
<em class="relative not-italic inline-flex justify-center items-end">
today
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="120" height="10" viewBox="0 0 120 10" aria-hidden="true" preserveAspectRatio="none">
<path d="M118.273 6.09C79.243 4.558 40.297 5.459 1.305 9.034c-1.507.13-1.742-1.521-.199-1.81C39.81-.228 79.647-1.568 118.443 4.2c1.63.233 1.377 1.943-.17 1.89Z"></path>
</svg>
</em>
</h2>
<p class="text-lg text-zinc-500 mb-8">Sonr removes creative distances by connecting beginners, pros, and every team in between. Are you ready to start your journey?</p>
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
<div>
<a class="btn text-zinc-100 bg-zinc-900 hover:bg-zinc-800 w-full shadow" href="request-demo.html">Register</a>
</div>
<div>
<a class="btn text-zinc-600 bg-white hover:text-zinc-900 w-full shadow" href="#0">Log in</a>
</div>
</div>
</div>
<!-- Clients -->
<div class="text-center">
<ul class="inline-flex flex-wrap items-center justify-center -m-2 [mask-image:linear-gradient(to_right,transparent_8px,_theme(colors.white/.7)_64px,_theme(colors.white)_50%,_theme(colors.white/.7)_calc(100%-64px),_transparent_calc(100%-8px))]">
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-label="Fido Alliance" height="40" width="40"><path d="M7.849 7.513a1.085 1.085 0 1 0 1.085 1.086v-.001c0-.599-.486-1.085-1.085-1.085zM4.942 10.553v1.418H6.89v4.793h.704V14.04h.509v2.724h.71v-6.211H4.941zM14.122 11.089H14.1c-.287-.416-.862-.702-1.639-.702-1.489 0-2.797 1.224-2.786 3.319 0 1.936 1.181 3.201 2.659 3.201.797 0 1.56-.361 1.935-1.04l.117.893h1.669V7.651h-1.934zm0 2.904c0 .158-.012.313-.034.465l.002-.017c-.11.532-.574.925-1.13.925h-.014.001c-.797 0-1.318-.659-1.318-1.723 0-.978.446-1.767 1.329-1.767.606 0 1.022.437 1.138.947.014.09.023.194.023.3l-.001.054v-.003zM4.802 8.89l.475-1.6a2.914 2.914 0 0 0-.384-.101l-.019-.003a3.654 3.654 0 0 0-.829-.092 3.73 3.73 0 0 0-1.084.159l.027-.007a2.022 2.022 0 0 0-.38.153l.011-.005a2.624 2.624 0 0 0-.663.475c-.5.49-.754 1.155-.754 1.975v.708H-.001v1.418h1.199v4.793h1.921V11.97h1.199v-1.416H3.119v-.75a1.019 1.019 0 0 1 .23-.713l-.001.002a.736.736 0 0 1 .063-.062l.001-.001s.414-.41 1.389-.14zM20.306 10.388c-2.01 0-3.327 1.286-3.327 3.307s1.393 3.212 3.213 3.212c1.664 0 3.276-1.04 3.276-3.327-.002-1.874-1.267-3.192-3.162-3.192zm-.063 5.126c-.832 0-1.276-.797-1.276-1.871 0-.915.361-1.861 1.276-1.861.871 0 1.234.936 1.234 1.851 0 1.137-.482 1.882-1.234 1.882zM22.493 9.761h.232v.589h.14v-.589h.231v-.117h-.603v.117zM23.799 9.644l-.182.505-.181-.505h-.203v.707h.13V9.78l.198.571h.113l.195-.571v.571h.13v-.707h-.201z"></path></svg>
<!-- <svg role="img" viewBox="0 0 24 24" width="40" height="40" aria-label="IPFS" xmlns="http://www.w3.org/2000/svg"><path d="M12 0L1.608 6v12L12 24l10.392-6V6zm-1.073 1.445h.001a1.8 1.8 0 002.138 0l7.534 4.35a1.794 1.794 0 000 .403l-7.535 4.35a1.8 1.8 0 00-2.137 0l-7.536-4.35a1.795 1.795 0 000-.402zM21.324 7.4c.109.08.226.147.349.201v8.7a1.8 1.8 0 00-1.069 1.852l-7.535 4.35a1.8 1.8 0 00-.349-.2l-.009-8.653a1.8 1.8 0 001.07-1.851zm-18.648.048l7.535 4.35a1.8 1.8 0 001.069 1.852v8.7c-.124.054-.24.122-.349.202l-7.535-4.35a1.8 1.8 0 00-1.069-1.852v-8.7c.124-.054.24-.122.35-.202z"></path></svg> -->
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" height="40" width="40" aria-label="Ethereum"><path d="M11.944 17.97L4.58 13.62 11.943 24l7.37-10.38-7.372 4.35h.003zM12.056 0L4.69 12.223l7.365 4.354 7.365-4.35L12.056 0z"></path></svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg role="img" viewBox="0 0 24 24" width="40" height="40" aria-label="Bitcoin" xmlns="http://www.w3.org/2000/svg"><path d="M23.638 14.904c-1.602 6.43-8.113 10.34-14.542 8.736C2.67 22.05-1.244 15.525.362 9.105 1.962 2.67 8.475-1.243 14.9.358c6.43 1.605 10.342 8.115 8.738 14.548v-.002zm-6.35-4.613c.24-1.59-.974-2.45-2.64-3.03l.54-2.153-1.315-.33-.525 2.107c-.345-.087-.705-.167-1.064-.25l.526-2.127-1.32-.33-.54 2.165c-.285-.067-.565-.132-.84-.2l-1.815-.45-.35 1.407s.975.225.955.236c.535.136.63.486.615.766l-1.477 5.92c-.075.166-.24.406-.614.314.015.02-.96-.24-.96-.24l-.66 1.51 1.71.426.93.242-.54 2.19 1.32.327.54-2.17c.36.1.705.19 1.05.273l-.51 2.154 1.32.33.545-2.19c2.24.427 3.93.257 4.64-1.774.57-1.637-.03-2.58-1.217-3.196.854-.193 1.5-.76 1.68-1.93h.01zm-3.01 4.22c-.404 1.64-3.157.75-4.05.53l.72-2.9c.896.23 3.757.67 3.33 2.37zm.41-4.24c-.37 1.49-2.662.735-3.405.55l.654-2.64c.744.18 3.137.524 2.75 2.084v.006z"></path></svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Solana"><path d="m23.8764 18.0313-3.962 4.1393a.9201.9201 0 0 1-.306.2106.9407.9407 0 0 1-.367.0742H.4599a.4689.4689 0 0 1-.2522-.0733.4513.4513 0 0 1-.1696-.1962.4375.4375 0 0 1-.0314-.2545.4438.4438 0 0 1 .117-.2298l3.9649-4.1393a.92.92 0 0 1 .3052-.2102.9407.9407 0 0 1 .3658-.0746H23.54a.4692.4692 0 0 1 .2523.0734.4531.4531 0 0 1 .1697.196.438.438 0 0 1 .0313.2547.4442.4442 0 0 1-.1169.2297zm-3.962-8.3355a.9202.9202 0 0 0-.306-.2106.941.941 0 0 0-.367-.0742H.4599a.4687.4687 0 0 0-.2522.0734.4513.4513 0 0 0-.1696.1961.4376.4376 0 0 0-.0314.2546.444.444 0 0 0 .117.2297l3.9649 4.1394a.9204.9204 0 0 0 .3052.2102c.1154.049.24.0744.3658.0746H23.54a.469.469 0 0 0 .2523-.0734.453.453 0 0 0 .1697-.1961.4382.4382 0 0 0 .0313-.2546.4444.4444 0 0 0-.1169-.2297zM.46 6.7225h18.7815a.9411.9411 0 0 0 .367-.0742.9202.9202 0 0 0 .306-.2106l3.962-4.1394a.4442.4442 0 0 0 .117-.2297.4378.4378 0 0 0-.0314-.2546.453.453 0 0 0-.1697-.196.469.469 0 0 0-.2523-.0734H4.7596a.941.941 0 0 0-.3658.0745.9203.9203 0 0 0-.3052.2102L.1246 5.9687a.4438.4438 0 0 0-.1169.2295.4375.4375 0 0 0 .0312.2544.4512.4512 0 0 0 .1692.196.4689.4689 0 0 0 .2518.0739z"></path></svg>
<!-- <svg width="40" height="40" viewBox="0 0 164 164" xmlns="http://www.w3.org/2000/svg" aria-label="Sonr"> -->
<!-- <path d="M71.8077 133.231C74.5054 135.928 78.1636 137.443 81.978 137.443C85.7924 137.443 89.4506 135.928 92.1483 133.231L133.219 92.1638C135.909 89.4654 137.42 85.8102 137.42 81.9998C137.42 78.1895 135.909 74.5345 133.219 71.8361L112.886 51.5272L131.665 32.7499L152.031 53.1143C159.696 60.7963 164 71.2046 164 82.0559C164 92.9072 159.696 103.315 152.031 110.997L110.95 152.065C107.154 155.869 102.642 158.883 97.6739 160.931C92.7059 162.98 87.3809 164.023 82.0071 164L82.0052 164C76.622 164.019 71.2886 162.969 66.3145 160.91C61.3405 158.852 56.8247 155.826 53.0294 152.009L53.0289 152.008L48.7187 147.699L67.4974 128.921L71.8077 133.231Z"></path> -->
<!-- <path d="M110.95 11.9912L115.26 16.3011L96.481 35.0785L92.1707 30.7685C89.4731 28.072 85.8148 26.5572 82.0004 26.5572C78.186 26.5572 74.5277 28.072 71.8301 30.7685L30.7597 71.8359C29.4247 73.1706 28.3658 74.7552 27.6433 76.4991C26.9208 78.2431 26.549 80.1122 26.549 81.9999C26.549 83.8876 26.9208 85.7567 27.6433 87.5007C28.3658 89.2446 29.4247 90.8292 30.7597 92.1639L51.1256 112.528L32.3138 131.306L11.9923 110.941C8.19043 107.141 5.17433 102.629 3.1167 97.6635C1.05907 92.6976 0 87.3751 0 81.9999C0 76.6247 1.05907 71.3022 3.1167 66.3363C5.17433 61.3705 8.19021 56.8587 11.9921 53.0586L53.0625 11.9912C56.8629 8.18964 61.3751 5.17395 66.3413 3.11647C71.3075 1.05899 76.6304 0 82.006 0C87.3816 0 92.7045 1.05899 97.6707 3.11647C102.637 5.17395 107.149 8.18964 110.95 11.9912Z"></path> -->
<!-- <path d="M55.603 76.6744L76.6993 55.5798C79.6327 52.6465 84.3888 52.6465 87.3223 55.5797L108.419 76.6744C111.352 79.6077 111.352 84.3634 108.419 87.2966L87.3223 108.391C84.3888 111.325 79.6327 111.325 76.6993 108.391L55.603 87.2966C52.6696 84.3634 52.6696 79.6077 55.603 76.6744Z"></path> -->
<!-- </svg> -->
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Meta"><path d="M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z"></path></svg>
</li>
<li class="m-2 p-4 relative rounded-lg border border-transparent [background:linear-gradient(theme(colors.zinc.50),theme(colors.zinc.50))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box]">
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="40" height="40" aria-label="Apple"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"></path></svg>
</li>
</ul>
</div>
</div>
</div>
</section>
}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
package sections package marketing
import ( import (
"fmt" "fmt"
@@ -6,7 +6,37 @@ import (
"github.com/onsonr/sonr/pkg/nebula/global/ui" "github.com/onsonr/sonr/pkg/nebula/global/ui"
) )
templ Hero(hero *models.Hero) { // ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// hero is the (1st) home page hero section
var hero = &models.Hero{
TitleFirst: "Simplified",
TitleEmphasis: "self-custody",
TitleSecond: "for everyone",
Subtitle: "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.",
PrimaryButton: &models.Button{Text: "Get Started", Href: "/register"},
SecondaryButton: &models.Button{Text: "Learn More", Href: "/about"},
Image: &models.Image{
Src: "https://cdn.sonr.id/img/hero-clipped.svg",
Width: "500",
Height: "500",
},
Stats: []*models.Stat{
{Value: "476", Label: "Tradeable Crypto Assets", Denom: "+"},
{Value: "1.44", Label: "Verified Identities", Denom: "K"},
{Value: "1.5", Label: "Encrypted Messages Sent", Denom: "M+"},
{Value: "50", Label: "Decentralized Global Nodes", Denom: "+"},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Hero Section
templ Hero() {
<!-- Hero --> <!-- 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"> <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"> <div class="pt-32 pb-12 md:pt-40 md:pb-20">
@@ -14,16 +44,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-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"> @heroTitle(hero.TitleFirst, hero.TitleEmphasis, hero.TitleSecond)
{ hero.TitleFirst }
<em class="italic relative inline-flex justify-center items-center text-zinc-900">
{ hero.TitleEmphasis }
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="223" height="62" viewBox="0 0 223 62" aria-hidden="true" preserveAspectRatio="none">
<path d="M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852"></path>
</svg>
</em>
{ hero.TitleSecond }
</h1>
<p class="text-lg text-zinc-500 mb-8"> <p class="text-lg text-zinc-500 mb-8">
{ hero.Subtitle } { hero.Subtitle }
</p> </p>
@@ -40,6 +61,19 @@ templ Hero(hero *models.Hero) {
</section> </section>
} }
templ heroTitle(first string, emphasis string, second string) {
<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">
{ first }
<em class="italic relative inline-flex justify-center items-center text-zinc-900">
{ emphasis }
<svg class="absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10" xmlns="http://www.w3.org/2000/svg" width="223" height="62" viewBox="0 0 223 62" aria-hidden="true" preserveAspectRatio="none">
<path d="M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852"></path>
</svg>
</em>
{ second }
</h1>
}
templ heroImage(hero *models.Hero) { templ heroImage(hero *models.Hero) {
<!-- Image --> <!-- Image -->
<div class="max-w-5xl motion-preset-slide-up motion-opacity-in-0 motion-scale-in-50 mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white"> <div class="max-w-5xl motion-preset-slide-up motion-opacity-in-0 motion-scale-in-50 mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white">
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package sections package marketing
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -14,7 +14,37 @@ import (
"github.com/onsonr/sonr/pkg/nebula/global/ui" "github.com/onsonr/sonr/pkg/nebula/global/ui"
) )
func Hero(hero *models.Hero) templ.Component { // ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// hero is the (1st) home page hero section
var hero = &models.Hero{
TitleFirst: "Simplified",
TitleEmphasis: "self-custody",
TitleSecond: "for everyone",
Subtitle: "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.",
PrimaryButton: &models.Button{Text: "Get Started", Href: "/register"},
SecondaryButton: &models.Button{Text: "Learn More", Href: "/about"},
Image: &models.Image{
Src: "https://cdn.sonr.id/img/hero-clipped.svg",
Width: "500",
Height: "500",
},
Stats: []*models.Stat{
{Value: "476", Label: "Tradeable Crypto Assets", Denom: "+"},
{Value: "1.44", Label: "Verified Identities", Denom: "K"},
{Value: "1.5", Label: "Encrypted Messages Sent", Denom: "M+"},
{Value: "50", Label: "Decentralized Global Nodes", Denom: "+"},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Hero Section
func Hero() 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 {
@@ -35,58 +65,27 @@ 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-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\">") _, 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\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = heroTitle(hero.TitleFirst, hero.TitleEmphasis, hero.TitleSecond).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<p class=\"text-lg text-zinc-500 mb-8\">")
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.Subtitle)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/marketing/sections/hero.templ`, Line: 18, Col: 24} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 49, Col: 22}
} }
_, 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 {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <em class=\"italic relative inline-flex justify-center items-center text-zinc-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleEmphasis)
if templ_7745c5c3_Err != nil {
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))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <svg class=\"absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10\" xmlns=\"http://www.w3.org/2000/svg\" width=\"223\" height=\"62\" viewBox=\"0 0 223 62\" aria-hidden=\"true\" preserveAspectRatio=\"none\"><path d=\"M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852\"></path></svg></em> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleSecond)
if templ_7745c5c3_Err != nil {
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))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1><p class=\"text-lg text-zinc-500 mb-8\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle)
if templ_7745c5c3_Err != nil {
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))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\">")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
@@ -119,6 +118,74 @@ func Hero(hero *models.Hero) templ.Component {
}) })
} }
func heroTitle(first string, emphasis string, second string) 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("<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 {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(first)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 66, Col: 9}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <em class=\"italic relative inline-flex justify-center items-center text-zinc-900\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(emphasis)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 68, Col: 13}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <svg class=\"absolute fill-zinc-300 w-[calc(100%+1rem)] -z-10\" xmlns=\"http://www.w3.org/2000/svg\" width=\"223\" height=\"62\" viewBox=\"0 0 223 62\" aria-hidden=\"true\" preserveAspectRatio=\"none\"><path d=\"M45.654 53.62c17.666 3.154 35.622 4.512 53.558 4.837 17.94.288 35.91-.468 53.702-2.54 8.89-1.062 17.742-2.442 26.455-4.352 8.684-1.945 17.338-4.3 25.303-7.905 3.94-1.81 7.79-3.962 10.634-6.777 1.38-1.41 2.424-2.994 2.758-4.561.358-1.563-.078-3.143-1.046-4.677-.986-1.524-2.43-2.96-4.114-4.175a37.926 37.926 0 0 0-5.422-3.32c-3.84-1.977-7.958-3.563-12.156-4.933-8.42-2.707-17.148-4.653-25.95-6.145-8.802-1.52-17.702-2.56-26.622-3.333-17.852-1.49-35.826-1.776-53.739-.978-8.953.433-17.898 1.125-26.79 2.22-8.887 1.095-17.738 2.541-26.428 4.616-4.342 1.037-8.648 2.226-12.853 3.676-4.197 1.455-8.314 3.16-12.104 5.363-1.862 1.13-3.706 2.333-5.218 3.829-1.52 1.47-2.79 3.193-3.285 5.113-.528 1.912-.127 3.965.951 5.743 1.07 1.785 2.632 3.335 4.348 4.68 2.135 1.652 3.2 2.672 2.986 3.083-.18.362-1.674.114-4.08-1.638-1.863-1.387-3.63-3.014-4.95-5.09C.94 35.316.424 34.148.171 32.89c-.275-1.253-.198-2.579.069-3.822.588-2.515 2.098-4.582 3.76-6.276 1.673-1.724 3.612-3.053 5.57-4.303 3.96-2.426 8.177-4.278 12.457-5.868 4.287-1.584 8.654-2.89 13.054-4.036 8.801-2.292 17.74-3.925 26.716-5.19C70.777 2.131 79.805 1.286 88.846.723c18.087-1.065 36.236-.974 54.325.397 9.041.717 18.07 1.714 27.042 3.225 8.972 1.485 17.895 3.444 26.649 6.253 4.37 1.426 8.697 3.083 12.878 5.243a42.11 42.11 0 0 1 6.094 3.762c1.954 1.44 3.823 3.2 5.283 5.485a12.515 12.515 0 0 1 1.63 3.88c.164.706.184 1.463.253 2.193-.063.73-.094 1.485-.247 2.195-.652 2.886-2.325 5.141-4.09 6.934-3.635 3.533-7.853 5.751-12.083 7.688-8.519 3.778-17.394 6.09-26.296 7.998-8.917 1.86-17.913 3.152-26.928 4.104-18.039 1.851-36.17 2.295-54.239 1.622-18.062-.713-36.112-2.535-53.824-6.23-5.941-1.31-5.217-2.91.361-1.852\"></path></svg></em> ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(second)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 73, Col: 10}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h1>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func heroImage(hero *models.Hero) templ.Component { func heroImage(hero *models.Hero) 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
@@ -135,21 +202,21 @@ func heroImage(hero *models.Hero) templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var6 := templ.GetChildren(ctx) templ_7745c5c3_Var7 := templ.GetChildren(ctx)
if templ_7745c5c3_Var6 == nil { if templ_7745c5c3_Var7 == nil {
templ_7745c5c3_Var6 = templ.NopComponent templ_7745c5c3_Var7 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl motion-preset-slide-up motion-opacity-in-0 motion-scale-in-50 mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg \" src=\"") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl motion-preset-slide-up motion-opacity-in-0 motion-scale-in-50 mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg \" src=\"")
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var7 string var templ_7745c5c3_Var8 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Src) templ_7745c5c3_Var8, 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: `components/marketing/sections/hero.templ`, Line: 48, Col: 23} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 82, 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_Var8))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -157,12 +224,12 @@ func heroImage(hero *models.Hero) 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_Var9 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Width) templ_7745c5c3_Var9, 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: `components/marketing/sections/hero.templ`, Line: 49, Col: 27} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 83, 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_Var9))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -170,12 +237,12 @@ func heroImage(hero *models.Hero) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var9 string var templ_7745c5c3_Var10 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Height) templ_7745c5c3_Var10, 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: `components/marketing/sections/hero.templ`, Line: 50, Col: 29} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 84, 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_Var10))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -203,9 +270,9 @@ func stats(stats []*models.Stat) templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var10 := templ.GetChildren(ctx) templ_7745c5c3_Var11 := templ.GetChildren(ctx)
if templ_7745c5c3_Var10 == nil { if templ_7745c5c3_Var11 == nil {
templ_7745c5c3_Var10 = templ.NopComponent templ_7745c5c3_Var11 = templ.NopComponent
} }
ctx = templ.ClearChildren(ctx) ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Stats --><div class=\"max-w-4xl mx-auto px-4 sm:px-6 justify-center items-center\"><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\">") _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Stats --><div class=\"max-w-4xl mx-auto px-4 sm:px-6 justify-center items-center\"><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\">")
@@ -217,12 +284,12 @@ func stats(stats []*models.Stat) templ.Component {
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_Var12 string
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(counterXData(item.Value)) templ_7745c5c3_Var12, 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: `components/marketing/sections/hero.templ`, Line: 62, Col: 122} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 96, 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_Var12))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -230,12 +297,12 @@ func stats(stats []*models.Stat) 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_Var13 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Value) templ_7745c5c3_Var13, 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: `components/marketing/sections/hero.templ`, Line: 62, Col: 159} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 96, 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_Var13))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -243,12 +310,12 @@ func stats(stats []*models.Stat) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var13 string var templ_7745c5c3_Var14 string
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Denom) templ_7745c5c3_Var14, 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: `components/marketing/sections/hero.templ`, Line: 62, Col: 180} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 96, 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_Var14))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -256,12 +323,12 @@ func stats(stats []*models.Stat) templ.Component {
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
var templ_7745c5c3_Var14 string var templ_7745c5c3_Var15 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label) templ_7745c5c3_Var15, 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: `components/marketing/sections/hero.templ`, Line: 63, Col: 50} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_hero.templ`, Line: 97, 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_Var15))
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -1,11 +1,46 @@
package sections package marketing
import ( import (
"fmt" "fmt"
models "github.com/onsonr/sonr/internal/orm/marketing" models "github.com/onsonr/sonr/internal/orm/marketing"
) )
templ Highlights(highlights *models.Highlights) { // ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// highlights is the (2nd) home page highlights section
var highlights = &models.Highlights{
Heading: "The Internet Rebuilt for You",
Subtitle: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.",
Features: []*models.Feature{
{
Title: "∞ Factor Auth",
Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.",
Icon: nil,
},
{
Title: "Control Your Data",
Desc: "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server.",
Icon: nil,
},
{
Title: "Crypto Enabled",
Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Icon: nil,
},
{
Title: "Works Everywhere",
Desc: "Sonr anonymously associates your online identities with a Quantum-Resistant Vault which only you can access.",
Icon: nil,
},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
templ Highlights() {
<!-- Features --> <!-- Features -->
<section class="relative bg-zinc-50"> <section class="relative bg-zinc-50">
<div class="py-12 md:py-20"> <div class="py-12 md:py-20">
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package sections package marketing
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -13,7 +13,42 @@ import (
models "github.com/onsonr/sonr/internal/orm/marketing" models "github.com/onsonr/sonr/internal/orm/marketing"
) )
func Highlights(highlights *models.Highlights) templ.Component { // ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
// highlights is the (2nd) home page highlights section
var highlights = &models.Highlights{
Heading: "The Internet Rebuilt for You",
Subtitle: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.",
Features: []*models.Feature{
{
Title: "∞ Factor Auth",
Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.",
Icon: nil,
},
{
Title: "Control Your Data",
Desc: "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server.",
Icon: nil,
},
{
Title: "Crypto Enabled",
Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Icon: nil,
},
{
Title: "Works Everywhere",
Desc: "Sonr anonymously associates your online identities with a Quantum-Resistant Vault which only you can access.",
Icon: nil,
},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
func Highlights() 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 {
@@ -41,7 +76,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: `components/marketing/sections/highlights.templ`, Line: 17, Col: 26} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 52, 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 +89,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: `components/marketing/sections/highlights.templ`, Line: 20, Col: 27} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 55, 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 {
@@ -116,7 +151,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: `components/marketing/sections/highlights.templ`, Line: 39, Col: 34} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 74, 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 {
@@ -129,7 +164,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: `components/marketing/sections/highlights.templ`, Line: 41, Col: 41} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 76, 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 {
@@ -142,7 +177,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: `components/marketing/sections/highlights.templ`, Line: 45, Col: 21} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 80, 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 {
@@ -155,7 +190,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: `components/marketing/sections/highlights.templ`, Line: 48, Col: 33} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 83, 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 {
@@ -168,7 +203,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: `components/marketing/sections/highlights.templ`, Line: 60, Col: 19} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 95, 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 {
@@ -210,7 +245,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: `components/marketing/sections/highlights.templ`, Line: 68, Col: 26} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 103, 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 {
@@ -223,7 +258,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: `components/marketing/sections/highlights.templ`, Line: 79, Col: 29} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 114, 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 {
@@ -236,7 +271,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: `components/marketing/sections/highlights.templ`, Line: 80, Col: 33} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 115, 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 {
@@ -249,7 +284,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: `components/marketing/sections/highlights.templ`, Line: 81, Col: 35} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 116, 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 {
@@ -262,7 +297,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: `components/marketing/sections/highlights.templ`, Line: 82, Col: 25} return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_highlights.templ`, Line: 117, 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 {
@@ -0,0 +1,168 @@
package marketing
import (
models "github.com/onsonr/sonr/internal/orm/marketing"
global "github.com/onsonr/sonr/pkg/nebula/global"
)
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
var lowlights = &models.Lowlights{
Heading: "The Fragmentation Problem in the Existing Web is seeping into Crypto",
UpperQuotes: []*models.Testimonial{
{
FullName: "0xDesigner",
Username: "@0xDesigner",
Avatar: &models.Image{
Src: global.Avatar0xDesigner.Src(),
Width: "44",
Height: "44",
},
Quote: "what if the wallet ui appeared next to the click instead of in a new browser window?",
},
{
FullName: "Alex Recouso",
Username: "@alexrecouso",
Avatar: &models.Image{
Src: global.AvatarAlexRecouso.Src(),
Width: "44",
Height: "44",
},
Quote: "2024 resembles 1984, but it doesn't have to be that way for you",
},
{
FullName: "Chjango Unchained",
Username: "@chjango",
Avatar: &models.Image{
Src: global.AvatarChjango.Src(),
Width: "44",
Height: "44",
},
Quote: "IBC is the inter-blockchain highway of @cosmos. While not very cypherpunk, charging a 1.5 basis pt fee would go a long way if priced in $ATOM.",
},
{
FullName: "Gwart",
Username: "@GwartyGwart",
Avatar: &models.Image{
Src: global.AvatarGwart.Src(),
Width: "44",
Height: "44",
},
Quote: " Base is incredible. Most centralized l2. Least details about their plans to decentralize. Keeps OP cabal quiet by pretending to care about quadratic voting and giving 10% tithe. Pays Ethereum mainnet virtually nothing. Runs yuppie granola ad campaigns.",
},
},
LowerQuotes: []*models.Testimonial{
{
FullName: "winnie",
Username: "@winnielaux_",
Avatar: &models.Image{
Src: global.AvatarWinnieLaux.Src(),
Width: "44",
Height: "44",
},
Quote: "the ability to download apps directly from the web or from “crypto-only” app stores will be a massive unlock for web3",
},
{
FullName: "Jelena",
Username: "@jelena_noble",
Avatar: &models.Image{
Src: global.AvatarJelenaNoble.Src(),
Width: "44",
Height: "44",
},
Quote: "Excited for all the @cosmos nerds to be vindicated in the next bull run",
},
{
FullName: "accountless",
Username: "@alexanderchopan",
Avatar: &models.Image{
Src: global.AvatarAccountless.Src(),
Width: "44",
Height: "44",
},
Quote: "sounds like webThree. Single key pair Requires the same signer At risk of infinite approvals Public history of all transactions different account on each chain different addresses for each account",
},
{
FullName: "Unusual Whales",
Username: "@unusual_whales",
Avatar: &models.Image{
Src: global.AvatarUnusualWhales.Src(),
Width: "44",
Height: "44",
},
Quote: "BREAKING: Fidelity & Fidelity Investments has confirmed that over 77,000 customers had personal information compromised, including Social Security numbers and drivers licenses.",
},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Lowlights is the (4th) home page lowlights section
templ Lowlights() {
<section class="bg-zinc-800">
<div class="py-12 md:py-20">
<div class="max-w-5xl mx-auto px-4 sm:px-6">
<div class="max-w-3xl mx-auto text-center pb-12 md:pb-20">
<h2 class="font-inter-tight text-3xl md:text-4xl font-bold text-zinc-200">
{ lowlights.Heading }
</h2>
</div>
</div>
<div class="max-w-[94rem] mx-auto space-y-6">
<!-- Row #1 -->
<div
x-data="{}"
x-init="$nextTick(() => {
let ul = $refs.testimonials;
ul.insertAdjacentHTML('afterend', ul.outerHTML);
ul.nextSibling.setAttribute('aria-hidden', 'true');
})"
class="w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group"
>
<div x-ref="testimonials" class="flex items-start justify-center md:justify-start [&>div]:mx-3 animate-infinite-scroll group-hover:[animation-play-state:paused]">
for _,quote := range lowlights.UpperQuotes {
@quoteItem(quote)
}
</div>
</div>
<!-- Row #2 -->
<div
x-data="{}"
x-init="$nextTick(() => {
let ul = $refs.testimonials;
ul.insertAdjacentHTML('afterend', ul.outerHTML);
ul.nextSibling.setAttribute('aria-hidden', 'true');
})"
class="w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group"
>
<div x-ref="testimonials" class="flex items-start justify-center md:justify-start [&>div]:mx-3 animate-infinite-scroll-inverse group-hover:[animation-play-state:paused] [animation-delay:-7.5s]">
for _,quote := range lowlights.LowerQuotes {
@quoteItem(quote)
}
</div>
</div>
</div>
</div>
</section>
}
templ quoteItem(quote *models.Testimonial) {
<div class="rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5">
<div class="flex items-center mb-4">
<img class="shrink-0 rounded-full mr-3" src={ quote.Avatar.Src } width={ quote.Avatar.Width } height={ quote.Avatar.Height } alt="Testimonial 01"/>
<div>
<div class="font-inter-tight font-bold text-zinc-200">{ quote.FullName }</div>
<div>
<a class="text-sm font-medium text-zinc-500 hover:text-zinc-300 transition" href="#0">{ quote.Username }</a>
</div>
</div>
</div>
<div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">
{ quote.Quote }
</div>
</div>
}
@@ -0,0 +1,282 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778
package marketing
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import (
models "github.com/onsonr/sonr/internal/orm/marketing"
global "github.com/onsonr/sonr/pkg/nebula/global"
)
// ╭───────────────────────────────────────────────────────────╮
// │ Data Model │
// ╰───────────────────────────────────────────────────────────╯
var lowlights = &models.Lowlights{
Heading: "The Fragmentation Problem in the Existing Web is seeping into Crypto",
UpperQuotes: []*models.Testimonial{
{
FullName: "0xDesigner",
Username: "@0xDesigner",
Avatar: &models.Image{
Src: global.Avatar0xDesigner.Src(),
Width: "44",
Height: "44",
},
Quote: "what if the wallet ui appeared next to the click instead of in a new browser window?",
},
{
FullName: "Alex Recouso",
Username: "@alexrecouso",
Avatar: &models.Image{
Src: global.AvatarAlexRecouso.Src(),
Width: "44",
Height: "44",
},
Quote: "2024 resembles 1984, but it doesn't have to be that way for you",
},
{
FullName: "Chjango Unchained",
Username: "@chjango",
Avatar: &models.Image{
Src: global.AvatarChjango.Src(),
Width: "44",
Height: "44",
},
Quote: "IBC is the inter-blockchain highway of @cosmos. While not very cypherpunk, charging a 1.5 basis pt fee would go a long way if priced in $ATOM.",
},
{
FullName: "Gwart",
Username: "@GwartyGwart",
Avatar: &models.Image{
Src: global.AvatarGwart.Src(),
Width: "44",
Height: "44",
},
Quote: " Base is incredible. Most centralized l2. Least details about their plans to decentralize. Keeps OP cabal quiet by pretending to care about quadratic voting and giving 10% tithe. Pays Ethereum mainnet virtually nothing. Runs yuppie granola ad campaigns.",
},
},
LowerQuotes: []*models.Testimonial{
{
FullName: "winnie",
Username: "@winnielaux_",
Avatar: &models.Image{
Src: global.AvatarWinnieLaux.Src(),
Width: "44",
Height: "44",
},
Quote: "the ability to download apps directly from the web or from “crypto-only” app stores will be a massive unlock for web3",
},
{
FullName: "Jelena",
Username: "@jelena_noble",
Avatar: &models.Image{
Src: global.AvatarJelenaNoble.Src(),
Width: "44",
Height: "44",
},
Quote: "Excited for all the @cosmos nerds to be vindicated in the next bull run",
},
{
FullName: "accountless",
Username: "@alexanderchopan",
Avatar: &models.Image{
Src: global.AvatarAccountless.Src(),
Width: "44",
Height: "44",
},
Quote: "sounds like webThree. Single key pair Requires the same signer At risk of infinite approvals Public history of all transactions different account on each chain different addresses for each account",
},
{
FullName: "Unusual Whales",
Username: "@unusual_whales",
Avatar: &models.Image{
Src: global.AvatarUnusualWhales.Src(),
Width: "44",
Height: "44",
},
Quote: "BREAKING: Fidelity & Fidelity Investments has confirmed that over 77,000 customers had personal information compromised, including Social Security numbers and drivers licenses.",
},
},
}
// ╭───────────────────────────────────────────────────────────╮
// │ Render Section View │
// ╰───────────────────────────────────────────────────────────╯
// Lowlights is the (4th) home page lowlights section
func Lowlights() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<section class=\"bg-zinc-800\"><div class=\"py-12 md:py-20\"><div class=\"max-w-5xl mx-auto px-4 sm:px-6\"><div class=\"max-w-3xl mx-auto text-center pb-12 md:pb-20\"><h2 class=\"font-inter-tight text-3xl md:text-4xl font-bold text-zinc-200\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(lowlights.Heading)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_lowlights.templ`, Line: 111, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h2></div></div><div class=\"max-w-[94rem] mx-auto space-y-6\"><!-- Row #1 --><div x-data=\"{}\" x-init=\"$nextTick(() =&gt; {\n let ul = $refs.testimonials;\n ul.insertAdjacentHTML(&#39;afterend&#39;, ul.outerHTML);\n ul.nextSibling.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);\n })\" class=\"w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group\"><div x-ref=\"testimonials\" class=\"flex items-start justify-center md:justify-start [&amp;&gt;div]:mx-3 animate-infinite-scroll group-hover:[animation-play-state:paused]\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, quote := range lowlights.UpperQuotes {
templ_7745c5c3_Err = quoteItem(quote).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div><!-- Row #2 --><div x-data=\"{}\" x-init=\"$nextTick(() =&gt; {\n let ul = $refs.testimonials;\n ul.insertAdjacentHTML(&#39;afterend&#39;, ul.outerHTML);\n ul.nextSibling.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);\n })\" class=\"w-full inline-flex flex-nowrap overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_28%,_black_calc(100%-28%),transparent_100%)] group\"><div x-ref=\"testimonials\" class=\"flex items-start justify-center md:justify-start [&amp;&gt;div]:mx-3 animate-infinite-scroll-inverse group-hover:[animation-play-state:paused] [animation-delay:-7.5s]\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
for _, quote := range lowlights.LowerQuotes {
templ_7745c5c3_Err = quoteItem(quote).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>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func quoteItem(quote *models.Testimonial) 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=\"rounded h-full w-[22rem] border border-transparent [background:linear-gradient(#323237,#323237)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] p-5\"><div class=\"flex items-center mb-4\"><img class=\"shrink-0 rounded-full mr-3\" src=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Avatar.Src)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_lowlights.templ`, Line: 156, Col: 65}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" width=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Avatar.Width)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_lowlights.templ`, Line: 156, Col: 94}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" height=\"")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Avatar.Height)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_lowlights.templ`, Line: 156, Col: 125}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" alt=\"Testimonial 01\"><div><div class=\"font-inter-tight font-bold text-zinc-200\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(quote.FullName)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_lowlights.templ`, Line: 158, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div><a class=\"text-sm font-medium text-zinc-500 hover:text-zinc-300 transition\" href=\"#0\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Username)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_lowlights.templ`, Line: 160, Col: 107}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></div></div></div><div class=\"text-zinc-500 before:content-[&#39;\\0022&#39;] after:content-[&#39;\\0022&#39;]\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(quote.Quote)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_lowlights.templ`, Line: 165, Col: 16}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
@@ -1,4 +1,28 @@
package sections package marketing
import models "github.com/onsonr/sonr/internal/orm/marketing"
// mission is the (3rd) home page mission section
var mission = &models.Mission{
Eyebrow: "L1 Blockchain",
Heading: "The Protocol for Decentralized Identity & Authentication",
Subtitle: "We're creating the Global Standard for Decentralized Identity. Authenticate users with PassKeys, Issue Crypto Wallets, Build Payment flows, Send Encrypted Messages - all on a single platform.",
Experience: &models.Feature{
Title: "UX First Approach",
Desc: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.",
Icon: nil,
},
Compliance: &models.Feature{
Title: "Universal Interoperability",
Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.",
Icon: nil,
},
Interoperability: &models.Feature{
Title: "Made in the USA",
Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Icon: nil,
},
}
templ Mission() { templ Mission() {
<!-- Features #3 --> <!-- Features #3 -->
@@ -18,17 +42,15 @@ templ Mission() {
<div <div
class="inline-flex text-sm font-medium text-zinc-400 px-4 py-0.5 border border-transparent [background:linear-gradient(theme(colors.zinc.800),theme(colors.zinc.800))_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] rounded-full mb-4" class="inline-flex text-sm font-medium text-zinc-400 px-4 py-0.5 border border-transparent [background:linear-gradient(theme(colors.zinc.800),theme(colors.zinc.800))_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] rounded-full mb-4"
> >
L1 Blockchain { mission.Eyebrow }
</div> </div>
<h3 <h3
class="font-inter-tight text-3xl font-bold text-zinc-200 mb-4" class="font-inter-tight text-3xl font-bold text-zinc-200 mb-4"
> >
The Protocol for Decentralized Identity & Authentication { mission.Heading }
</h3> </h3>
<p class="text-lg text-zinc-500"> <p class="text-lg text-zinc-500">
We're creating the Global Standard for Decentralized Identity. { mission.Subtitle }
Authenticate users with PassKeys, Issue Crypto Wallets, Build
Payment flows, Send Encrypted Messages - all on a single platform.
</p> </p>
</div> </div>
<!-- Tabs buttons --> <!-- Tabs buttons -->
@@ -52,11 +74,10 @@ templ Mission() {
<div <div
class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1" class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1"
> >
Make designs feel real { mission.Experience.Title }
</div> </div>
<div class="text-zinc-500"> <div class="text-zinc-500">
Save time and keep things consistent with reusable { mission.Experience.Desc }
images, and 3D assets in shared libraries.
</div> </div>
</div> </div>
</button> </button>
@@ -79,11 +100,10 @@ templ Mission() {
<div <div
class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1" class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1"
> >
Bring creatives closer { mission.Compliance.Title }
</div> </div>
<div class="text-zinc-500"> <div class="text-zinc-500">
Save time and keep things consistent with reusable { mission.Compliance.Desc }
images, and 3D assets in shared libraries.
</div> </div>
</div> </div>
</button> </button>
@@ -106,11 +126,10 @@ templ Mission() {
<div <div
class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1" class="font-inter-tight text-lg font-semibold text-zinc-200 mb-1"
> >
Scale and align your design team { mission.Interoperability.Title }
</div> </div>
<div class="text-zinc-500"> <div class="text-zinc-500">
Save time and keep things consistent with reusable { mission.Interoperability.Desc }
images, and 3D assets in shared libraries.
</div> </div>
</div> </div>
</button> </button>
@@ -131,13 +150,14 @@ templ Mission() {
x-transition:leave-end="opacity-0 -translate-x-8" x-transition:leave-end="opacity-0 -translate-x-8"
> >
<div> <div>
<img <iframe
class="lg:max-w-none mx-auto rounded-lg shadow-2xl" class="lg:max-w-none mx-auto rounded-lg shadow-2xl"
src="./images/carousel-illustration-01.jpg" src="https://customer-rexp70scd8jht8wt.cloudflarestream.com/cc55547777cec7e044cedda239a89aaa/iframe?muted=true&preload=true&loop=true&autoplay=true&poster=https%3A%2F%2Fcustomer-rexp70scd8jht8wt.cloudflarestream.com%2Fcc55547777cec7e044cedda239a89aaa%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600&controls=false"
width="800" loading="lazy"
height="620" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;"
alt="Carousel 01" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
/> allowfullscreen="true"
></iframe>
</div> </div>
</div> </div>
<!-- Item 2 --> <!-- Item 2 -->
@@ -152,13 +172,14 @@ templ Mission() {
x-transition:leave-end="opacity-0 -translate-x-8" x-transition:leave-end="opacity-0 -translate-x-8"
> >
<div> <div>
<img <iframe
class="lg:max-w-none mx-auto rounded-lg shadow-2xl" class="lg:max-w-none mx-auto rounded-lg shadow-2xl"
src="./images/carousel-illustration-01.jpg" src="https://customer-rexp70scd8jht8wt.cloudflarestream.com/c1b8fc6a34e9cf0541c13751ab26c1fa/iframe?muted=true&preload=true&loop=true&autoplay=true&poster=https%3A%2F%2Fcustomer-rexp70scd8jht8wt.cloudflarestream.com%2Fc1b8fc6a34e9cf0541c13751ab26c1fa%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600&controls=false"
width="800" loading="lazy"
height="620" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;"
alt="Carousel 02" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
/> allowfullscreen="true"
></iframe>
</div> </div>
</div> </div>
<!-- Item 3 --> <!-- Item 3 -->
@@ -173,13 +194,14 @@ templ Mission() {
x-transition:leave-end="opacity-0 -translate-x-8" x-transition:leave-end="opacity-0 -translate-x-8"
> >
<div> <div>
<img <iframe
class="lg:max-w-none mx-auto rounded-lg shadow-2xl" class="lg:max-w-none mx-auto rounded-lg shadow-2xl"
src="./images/carousel-illustration-01.jpg" src="https://customer-rexp70scd8jht8wt.cloudflarestream.com/ff33ff3ee922f5826a0392bb3cda66ca/iframe?muted=true&preload=true&loop=true&autoplay=true&poster=https%3A%2F%2Fcustomer-rexp70scd8jht8wt.cloudflarestream.com%2Fff33ff3ee922f5826a0392bb3cda66ca%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600&controls=false"
width="800" loading="lazy"
height="620" style="border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;"
alt="Carousel 03" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;"
/> allowfullscreen="true"
></iframe>
</div> </div>
</div> </div>
</div> </div>
@@ -0,0 +1,218 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778
package marketing
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import models "github.com/onsonr/sonr/internal/orm/marketing"
// mission is the (3rd) home page mission section
var mission = &models.Mission{
Eyebrow: "L1 Blockchain",
Heading: "The Protocol for Decentralized Identity & Authentication",
Subtitle: "We're creating the Global Standard for Decentralized Identity. Authenticate users with PassKeys, Issue Crypto Wallets, Build Payment flows, Send Encrypted Messages - all on a single platform.",
Experience: &models.Feature{
Title: "UX First Approach",
Desc: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.",
Icon: nil,
},
Compliance: &models.Feature{
Title: "Universal Interoperability",
Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.",
Icon: nil,
},
Interoperability: &models.Feature{
Title: "Made in the USA",
Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.",
Icon: nil,
},
}
func Mission() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Features #3 --><section class=\"relative bg-zinc-800 after:absolute after:top-0 after:right-0 after:h-full after:w-96 after:pointer-events-none after:bg-gradient-to-l after:from-zinc-800 max-lg:after:hidden\"><div class=\"py-12 md:py-20\"><!-- Carousel --><div class=\"max-w-xl lg:max-w-6xl mx-auto px-8 sm:px-6\"><div class=\"lg:flex space-y-12 lg:space-y-0 lg:space-x-12 xl:space-x-24\" x-data=\"{ tab: &#39;1&#39; }\"><!-- Content --><div class=\"lg:max-w-none lg:min-w-[524px]\"><div class=\"mb-8\"><div class=\"inline-flex text-sm font-medium text-zinc-400 px-4 py-0.5 border border-transparent [background:linear-gradient(theme(colors.zinc.800),theme(colors.zinc.800))_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box] rounded-full mb-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Eyebrow)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 45, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><h3 class=\"font-inter-tight text-3xl font-bold text-zinc-200 mb-4\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Heading)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 50, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h3><p class=\"text-lg text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Subtitle)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 53, Col: 26}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p></div><!-- Tabs buttons --><div class=\"mb-8 md:mb-0 space-y-2\"><button :class=\"tab !== &#39;1&#39; ? &#39;&#39; : &#39;[background:linear-gradient(#2E2E32,#2E2E32)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box]&#39;\" class=\"text-left flex items-center px-6 py-4 rounded border border-transparent\" @click.prevent=\"tab = &#39;1&#39;\"><svg class=\"shrink-0 fill-zinc-400 mr-3\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\"><path d=\"m7.951 14.537 6.296-7.196 1.506 1.318-7.704 8.804-3.756-3.756 1.414-1.414 2.244 2.244Zm11.296-7.196 1.506 1.318-7.704 8.804-1.756-1.756 1.414-1.414.244.244 6.296-7.196Z\"></path></svg><div><div class=\"font-inter-tight text-lg font-semibold text-zinc-200 mb-1\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Experience.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 77, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Experience.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 80, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></button> <button :class=\"tab !== &#39;2&#39; ? &#39;&#39; : &#39;[background:linear-gradient(#2E2E32,#2E2E32)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box]&#39;\" class=\"text-left flex items-center px-6 py-4 rounded border border-transparent\" @click.prevent=\"tab = &#39;2&#39;\"><svg class=\"shrink-0 fill-zinc-400 mr-3\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\"><path d=\"m16.997 19.056-1.78-.912A13.91 13.91 0 0 0 16.75 11.8c0-2.206-.526-4.38-1.533-6.344l1.78-.912A15.91 15.91 0 0 1 18.75 11.8c0 2.524-.602 5.01-1.753 7.256Zm-3.616-1.701-1.77-.93A9.944 9.944 0 0 0 12.75 11.8c0-1.611-.39-3.199-1.14-4.625l1.771-.93c.9 1.714 1.37 3.62 1.369 5.555 0 1.935-.47 3.841-1.369 5.555Zm-3.626-1.693-1.75-.968c.49-.885.746-1.881.745-2.895a5.97 5.97 0 0 0-.745-2.893l1.75-.968a7.968 7.968 0 0 1 .995 3.861 7.97 7.97 0 0 1-.995 3.863Zm-3.673-1.65-1.664-1.11c.217-.325.333-.709.332-1.103 0-.392-.115-.776-.332-1.102L6.082 9.59c.437.655.67 1.425.668 2.21a3.981 3.981 0 0 1-.668 2.212Z\"></path></svg><div><div class=\"font-inter-tight text-lg font-semibold text-zinc-200 mb-1\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Compliance.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 103, Col: 36}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Compliance.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 106, Col: 35}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></button> <button :class=\"tab !== &#39;3&#39; ? &#39;&#39; : &#39;[background:linear-gradient(#2E2E32,#2E2E32)_padding-box,linear-gradient(120deg,theme(colors.zinc.700),theme(colors.zinc.700/0),theme(colors.zinc.700))_border-box]&#39;\" class=\"text-left flex items-center px-6 py-4 rounded border border-transparent\" @click.prevent=\"tab = &#39;3&#39;\"><svg class=\"shrink-0 fill-zinc-400 mr-3\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\"><path d=\"m11.293 5.293 1.414 1.414-8 8-1.414-1.414 8-8Zm7-1 1.414 1.414-8 8-1.414-1.414 8-8Zm0 6 1.414 1.414-8 8-1.414-1.414 8-8Z\"></path></svg><div><div class=\"font-inter-tight text-lg font-semibold text-zinc-200 mb-1\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var9 string
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Interoperability.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 129, Col: 42}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><div class=\"text-zinc-500\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(mission.Interoperability.Desc)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `marketing/section_mission.templ`, Line: 132, Col: 41}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div></button></div></div><!-- Tabs items --><div class=\"relative lg:max-w-none\"><div class=\"relative flex flex-col\"><!-- Item 1 --><div class=\"w-full\" x-show=\"tab === &#39;1&#39;\" x-transition:enter=\"transition ease-in-out duration-700 transform order-first\" x-transition:enter-start=\"opacity-0 translate-x-8\" x-transition:enter-end=\"opacity-100 translate-x-0\" x-transition:leave=\"transition ease-in-out duration-300 transform absolute\" x-transition:leave-start=\"opacity-100 translate-x-0\" x-transition:leave-end=\"opacity-0 -translate-x-8\"><div><iframe class=\"lg:max-w-none mx-auto rounded-lg shadow-2xl\" src=\"https://customer-rexp70scd8jht8wt.cloudflarestream.com/cc55547777cec7e044cedda239a89aaa/iframe?muted=true&amp;preload=true&amp;loop=true&amp;autoplay=true&amp;poster=https%3A%2F%2Fcustomer-rexp70scd8jht8wt.cloudflarestream.com%2Fcc55547777cec7e044cedda239a89aaa%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600&amp;controls=false\" loading=\"lazy\" style=\"border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;\" allow=\"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;\" allowfullscreen=\"true\"></iframe></div></div><!-- Item 2 --><div class=\"w-full\" x-show=\"tab === &#39;2&#39;\" x-transition:enter=\"transition ease-in-out duration-700 transform order-first\" x-transition:enter-start=\"opacity-0 translate-x-8\" x-transition:enter-end=\"opacity-100 translate-x-0\" x-transition:leave=\"transition ease-in-out duration-300 transform absolute\" x-transition:leave-start=\"opacity-100 translate-x-0\" x-transition:leave-end=\"opacity-0 -translate-x-8\"><div><iframe class=\"lg:max-w-none mx-auto rounded-lg shadow-2xl\" src=\"https://customer-rexp70scd8jht8wt.cloudflarestream.com/c1b8fc6a34e9cf0541c13751ab26c1fa/iframe?muted=true&amp;preload=true&amp;loop=true&amp;autoplay=true&amp;poster=https%3A%2F%2Fcustomer-rexp70scd8jht8wt.cloudflarestream.com%2Fc1b8fc6a34e9cf0541c13751ab26c1fa%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600&amp;controls=false\" loading=\"lazy\" style=\"border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;\" allow=\"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;\" allowfullscreen=\"true\"></iframe></div></div><!-- Item 3 --><div class=\"w-full\" x-show=\"tab === &#39;3&#39;\" x-transition:enter=\"transition ease-in-out duration-700 transform order-first\" x-transition:enter-start=\"opacity-0 translate-x-8\" x-transition:enter-end=\"opacity-100 translate-x-0\" x-transition:leave=\"transition ease-in-out duration-300 transform absolute\" x-transition:leave-start=\"opacity-100 translate-x-0\" x-transition:leave-end=\"opacity-0 -translate-x-8\"><div><iframe class=\"lg:max-w-none mx-auto rounded-lg shadow-2xl\" src=\"https://customer-rexp70scd8jht8wt.cloudflarestream.com/ff33ff3ee922f5826a0392bb3cda66ca/iframe?muted=true&amp;preload=true&amp;loop=true&amp;autoplay=true&amp;poster=https%3A%2F%2Fcustomer-rexp70scd8jht8wt.cloudflarestream.com%2Fff33ff3ee922f5826a0392bb3cda66ca%2Fthumbnails%2Fthumbnail.jpg%3Ftime%3D%26height%3D600&amp;controls=false\" loading=\"lazy\" style=\"border: none; position: absolute; top: 0; left: 0; height: 100%; width: 100%;\" allow=\"accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;\" allowfullscreen=\"true\"></iframe></div></div></div><!-- Gear illustration --><img class=\"absolute left-0 bottom-0 -translate-x-1/2 translate-y-1/3 mix-blend-exclusion max-lg:w-32\" src=\"https://cdn.sonr.id/img/secure-vault.svg\" alt=\"Features 02 illustration\" width=\"224\" height=\"224\" aria-hidden=\"true\"></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = featuresBlocks().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></section>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
func featuresBlocks() 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=\"max-w-6xl mx-auto px-4 sm:px-6 mt-24 lg:mt-32\"><div class=\"grid sm:grid-cols-2 lg:grid-cols-3 gap-8 lg:gap-16\"><!-- Block #1 --><div><div class=\"flex items-center mb-1\"><svg class=\"fill-zinc-400 mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path d=\"M15 9a1 1 0 0 1 0 2c-.441 0-1.243.92-1.89 1.716.319 1.005.529 1.284.89 1.284a1 1 0 0 1 0 2 2.524 2.524 0 0 1-2.339-1.545A3.841 3.841 0 0 1 9 16a1 1 0 0 1 0-2c.441 0 1.243-.92 1.89-1.716C10.57 11.279 10.361 11 10 11a1 1 0 0 1 0-2 2.524 2.524 0 0 1 2.339 1.545A3.841 3.841 0 0 1 15 9Zm-5-1H7.51l-.02.142C6.964 11.825 6.367 16 3 16a3 3 0 0 1-3-3 1 1 0 0 1 2 0 1 1 0 0 0 1 1c1.49 0 1.984-2.48 2.49-6H3a1 1 0 1 1 0-2h2.793c.52-3.1 1.4-6 4.207-6a3 3 0 0 1 3 3 1 1 0 0 1-2 0 1 1 0 0 0-1-1C8.808 2 8.257 3.579 7.825 6H10a1 1 0 0 1 0 2Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-200\">Multi-party Computation</h3></div><p class=\"text-sm text-zinc-500\">Eliminate the need for seed-phrases, and browser extensions for crypto wallets.</p></div><!-- Block #2 --><div><div class=\"flex items-center mb-1\"><svg class=\"fill-zinc-400 mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path d=\"M13 16c-.153 0-.306-.035-.447-.105l-3.851-1.926c-.231.02-.465.031-.702.031-4.411 0-8-3.14-8-7s3.589-7 8-7 8 3.14 8 7c0 1.723-.707 3.351-2 4.63V15a1.003 1.003 0 0 1-1 1Zm-4.108-4.054c.155 0 .308.036.447.105L12 13.382v-2.187c0-.288.125-.562.341-.752C13.411 9.506 14 8.284 14 7c0-2.757-2.691-5-6-5S2 4.243 2 7s2.691 5 6 5c.266 0 .526-.02.783-.048a1.01 1.01 0 0 1 .109-.006Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-200\">Matrix Protocol</h3></div><p class=\"text-sm text-zinc-500\">End-to-end encrypted messaging with <a class=\"text-zinc-500 hover:text-zinc-300 transition\" href=\"https://sonr.chat\">sonr.chat</a>.</p></div><!-- Block #3 --><div><div class=\"flex items-center mb-1\"><svg class=\"fill-zinc-400 mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"16\"><path d=\"M13 0H1C.4 0 0 .4 0 1v14c0 .6.4 1 1 1h8l5-5V1c0-.6-.4-1-1-1ZM2 2h10v8H8v4H2V2Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-200\">OpenID Connect</h3></div><p class=\"text-sm text-zinc-500\">Seamless integration with Web2 Applications with the OpenID Standard.</p></div><!-- Block #4 --><div><div class=\"flex items-center mb-1\"><svg class=\"fill-zinc-400 mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path d=\"M7 14c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7ZM7 2C4.243 2 2 4.243 2 7s2.243 5 5 5 5-2.243 5-5-2.243-5-5-5Zm8.707 12.293a.999.999 0 1 1-1.414 1.414L11.9 13.314a8.019 8.019 0 0 0 1.414-1.414l2.393 2.393Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-200\">Native ETH & BTC</h3></div><p class=\"text-sm text-zinc-500\">Keep workflows efficient with tools that give teams visibility throughout the process.</p></div><!-- Block #5 --><div><div class=\"flex items-center mb-1\"><svg class=\"fill-zinc-400 mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\"><path d=\"M14.6.085 8 2.885 1.4.085c-.5-.2-1.4-.1-1.4.9v11c0 .4.2.8.6.9l7 3c.3.1.5.1.8 0l7-3c.4-.2.6-.5.6-.9v-11c0-1-.9-1.1-1.4-.9ZM2 2.485l5 2.1v8.8l-5-2.1v-8.8Zm12 8.8-5 2.1v-8.7l5-2.1v8.7Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-200\">Developer Integrations</h3></div><p class=\"text-sm text-zinc-500\">Quickly integrate with Sonr by leveraging modern web APIs.</p></div><!-- Block #6 --><div><div class=\"flex items-center mb-1\"><svg class=\"fill-zinc-400 mr-2\" xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"16\"><path d=\"M13 14a1 1 0 0 1 0 2H1a1 1 0 0 1 0-2h12Zm-6.707-2.293-5-5a1 1 0 0 1 1.414-1.414L6 8.586V1a1 1 0 1 1 2 0v7.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-5 5a1 1 0 0 1-1.414 0Z\"></path></svg><h3 class=\"font-inter-tight font-semibold text-zinc-200\">Secure Backups</h3></div><p class=\"text-sm text-zinc-500\">Uniformly accessible user keyshare access on/off network.</p></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
@@ -1,25 +1,28 @@
package authentication package modals
import ( import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/nebula/components/authentication/sections" "github.com/onsonr/sonr/pkg/nebula/auth"
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
) )
// RegisterModal returns the Register Modal.
templ RegisterModal(c echo.Context) { templ RegisterModal(c echo.Context) {
@styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") {
@sections.RegisterStart() @auth.RegisterStart()
} }
} }
// LoginModal returns the Login Modal.
templ LoginModal(c echo.Context) { templ LoginModal(c echo.Context) {
@styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") {
@sections.LoginStart() @auth.LoginStart()
} }
} }
// AuthorizeModal returns the Authorize Modal.
templ AuthorizeModal(c echo.Context) { templ AuthorizeModal(c echo.Context) {
@styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") {
@sections.AuthorizeStart() @auth.AuthorizeStart()
} }
} }
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package authentication package modals
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -10,10 +10,11 @@ import templruntime "github.com/a-h/templ/runtime"
import ( import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/nebula/components/authentication/sections" "github.com/onsonr/sonr/pkg/nebula/auth"
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
) )
// RegisterModal returns the Register Modal.
func RegisterModal(c echo.Context) templ.Component { func RegisterModal(c echo.Context) 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
@@ -47,7 +48,7 @@ func RegisterModal(c echo.Context) templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = sections.RegisterStart().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = auth.RegisterStart().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -61,6 +62,7 @@ func RegisterModal(c echo.Context) templ.Component {
}) })
} }
// LoginModal returns the Login Modal.
func LoginModal(c echo.Context) templ.Component { func LoginModal(c echo.Context) 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
@@ -94,7 +96,7 @@ func LoginModal(c echo.Context) templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = sections.LoginStart().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = auth.LoginStart().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
@@ -108,6 +110,7 @@ func LoginModal(c echo.Context) templ.Component {
}) })
} }
// AuthorizeModal returns the Authorize Modal.
func AuthorizeModal(c echo.Context) templ.Component { func AuthorizeModal(c echo.Context) 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
@@ -141,7 +144,7 @@ func AuthorizeModal(c echo.Context) templ.Component {
}() }()
} }
ctx = templ.InitializeContext(ctx) ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = sections.AuthorizeStart().Render(ctx, templ_7745c5c3_Buffer) templ_7745c5c3_Err = auth.AuthorizeStart().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil { if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err return templ_7745c5c3_Err
} }
+283
View File
@@ -0,0 +1,283 @@
package modals
templ IntroVideo() {
<div
x-data="{
sources: {
mp4: 'https://cdn.devdojo.com/pines/videos/coast.mp4',
webm: 'https://cdn.devdojo.com/pines/videos/coast.webm',
ogg: 'https://cdn.devdojo.com/pines/videos/coast.ogg'
},
playing: false,
controls: true,
muted: false,
muteForced: false,
fullscreen: false,
ended: false,
mouseleave: false,
autoHideControlsDelay: 3000,
controlsHideTimeout: null,
poster: null,
videoDuration: 0,
timeDurationString: '00:00',
timeElapsedString: '00:00',
showTime: false,
volume: 1,
volumeBeforeMute: 1,
videoPlayerReady: false,
timelineSeek(e) {
time = this.formatTime(Math.round(e.target.value));
this.timeElapsedString = `${time.minutes}:${time.seconds}`;
},
metaDataLoaded(event) {
this.videoDuration = event.target.duration;
this.$refs.videoProgress.setAttribute('max', this.videoDuration);
time = this.formatTime(Math.round(this.videoDuration));
this.timeDurationString = `${time.minutes}:${time.seconds}`;
this.showTime = true;
this.videoPlayerReady = true;
},
togglePlay(e) {
if (this.$refs.player.paused || this.$refs.player.ended) {
this.playing = true;
this.$refs.player.play();
} else {
this.$refs.player.pause();
this.playing = false;
}
},
toggleMute(){
this.muted = !this.muted;
this.$refs.player.muted = this.muted;
if(this.muted){
this.volumeBeforeMute = this.volume;
this.volume = 0;
} else {
this.volume = this.volumeBeforeMute;
}
},
timeUpdatedInterval() {
if (!this.$refs.videoProgress.getAttribute('max'))
this.$refs.videoProgress.setAttribute('max', $refs.player.duration);
this.$refs.videoProgress.value = this.$refs.player.currentTime;
time = this.formatTime(Math.round(this.$refs.player.currentTime));
this.timeElapsedString = `${time.minutes}:${time.seconds}`;
},
updateVolume(e) {
this.volume = e.target.value;
this.$refs.player.volume = this.volume;
if(this.volume == 0){
this.muted = true;
}
if(this.muted && this.volume > 0){
this.muted = false;
}
},
timelineClicked(e) {
rect = this.$refs.videoProgress.getBoundingClientRect();
pos = (e.pageX - rect.left) / this.$refs.videoProgress.offsetWidth;
this.$refs.player.currentTime = pos * this.$refs.player.duration;
},
handleFullscreen() {
if (document.fullscreenElement !== null) {
// The document is in fullscreen mode
document.exitFullscreen();
} else {
// The document is not in fullscreen mode
this.$refs.videoContainer.requestFullscreen();
}
},
mousemoveVideo() {
if(this.playing){
this.resetControlsTimeout();
} else {
this.controls=true;
clearTimeout(this.controlsHideTimeout);
}
},
videoEnded() {
this.ended = true;
this.playing = false;
this.$refs.player.currentTime = 0;
},
resetControlsTimeout() {
this.controls = true;
clearTimeout(this.controlsHideTimeout);
let that = this;
this.controlsHideTimeout = setTimeout(function(){
that.controls=false
}, this.autoHideControlsDelay);
},
formatTime(timeInSeconds) {
result = new Date(timeInSeconds * 1000).toISOString().substring(11, 19);
return {
minutes: result.substring(3, 5),
seconds: result.substring(6, 8),
};
}
}"
x-data="introVideo"
x-ref="videoContainer"
@mouseleave="mouseleave=true"
@mousemove="mousemoveVideo"
class="relative h-[360px] min-w-[640px] overflow-hidden rounded-md aspect-video"
>
<video
x-ref="player"
@loadedmetadata="metaDataLoaded"
@timeupdate="timeUpdatedInterval"
@ended="videoEnded"
preload="metadata"
:poster="poster"
class="relative z-10 object-cover w-full h-full bg-black"
crossorigin="anonymous"
>
<source :src="sources.mp4" type="video/mp4"/>
<source :src="sources.webm" type="video/webm"/>
<source :src="sources.ogg" type="video/ogg"/>
</video>
<div x-show="videoPlayerReady" class="absolute inset-0 w-full h-full">
<div x-ref="videoBackground" @click="togglePlay()" class="absolute inset-0 z-30 flex items-center justify-center w-full h-full bg-black bg-opacity-0 cursor-pointer group">
<div
x-show="playing"
x-transition:enter="transition ease-out duration-1000"
x-transition:enter-start="scale-50 opacity-100"
x-transition:enter-end="scale-100 opacity-0"
class="absolute z-20 flex items-center justify-center w-24 h-24 bg-blue-600 rounded-full opacity-0 bg-opacity-20"
x-cloak
>
<svg class="w-10 h-10 translate-x-0.5 text-white" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.42737 3.41611C6.46665 2.24586 4.00008 3.67188 4.00007 5.9427L4 18.0572C3.99999 20.329 6.46837 21.7549 8.42907 20.5828L18.5698 14.5207C20.4775 13.3802 20.4766 10.6076 18.568 9.46853L8.42737 3.41611Z" fill="currentColor"></path></svg>
</div>
<div
x-show="!playing && !ended"
x-transition:enter="transition ease-out duration-1000"
x-transition:enter-start="scale-50 opacity-100"
x-transition:enter-end="scale-100 opacity-0"
class="absolute z-20 flex items-center justify-center w-24 h-24 bg-blue-600 rounded-full opacity-0 bg-opacity-20"
x-cloak
>
<svg class="w-10 h-10 text-white" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 3C8.55228 3 9 3.44772 9 4L9 20C9 20.5523 8.55228 21 8 21C7.44772 21 7 20.5523 7 20L7 4C7 3.44772 7.44772 3 8 3ZM16 3C16.5523 3 17 3.44772 17 4V20C17 20.5523 16.5523 21 16 21C15.4477 21 15 20.5523 15 20V4C15 3.44772 15.4477 3 16 3Z" fill="currentColor"></path></svg>
</div>
<div class="absolute z-10 duration-300 ease-out group-hover:scale-110">
<button
x-show="!playing"
x-transition:enter="transition ease-in delay-200 duration-300"
x-transition:enter-start="opacity-0 scale-75"
x-transition:enter-end="opacity-100 scale-100"
x-transition:leave="transition ease-out duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="flex items-center justify-center w-12 h-12 text-white duration-150 ease-out bg-blue-600 rounded-full cursor-pointer bg-opacity-80"
type="button"
>
<svg class="w-5 h-5 translate-x-px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.42737 3.41611C6.46665 2.24586 4.00008 3.67188 4.00007 5.9427L4 18.0572C3.99999 20.329 6.46837 21.7549 8.42907 20.5828L18.5698 14.5207C20.4775 13.3802 20.4766 10.6076 18.568 9.46853L8.42737 3.41611Z" fill="currentColor" x-cloak></path></svg>
</button>
</div>
</div>
<div
x-show="controls"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="-translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="-translate-y-full"
class="absolute top-0 left-0 z-20 w-full h-1/4 opacity-20 bg-gradient-to-b from-black to-transparent"
x-cloak
></div>
<div
x-show="controls"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="translate-y-full"
class="absolute bottom-0 left-0 z-20 w-full h-1/4 opacity-20 bg-gradient-to-b from-transparent to-black"
x-cloak
></div>
<div
x-show="controls"
@click="resetControlsTimeout"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="-translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="-translate-y-full"
class="absolute top-0 left-0 z-40 flex items-center w-full h-12 text-white"
x-cloak
>
<div class="absolute right-0 top-0 mr-0.5 mt-0.5 flex items-center">
<div class="flex items-center h-auto group">
<button @click="toggleMute()" type="button" class="flex items-center justify-center w-6 h-auto duration-150 ease-out opacity-80 hover:opacity-100">
<svg x-show="!muted" class="w-[18px] h-[18px]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" x-cloak><path d="M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM18.584 5.106a.75.75 0 011.06 0c3.808 3.807 3.808 9.98 0 13.788a.75.75 0 11-1.06-1.06 8.25 8.25 0 000-11.668.75.75 0 010-1.06z"></path><path d="M15.932 7.757a.75.75 0 011.061 0 6 6 0 010 8.486.75.75 0 01-1.06-1.061 4.5 4.5 0 000-6.364.75.75 0 010-1.06z"></path></svg>
<svg x-show="muted" class="w-[18px] h-[18px]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" x-cloak><path d="M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM17.78 9.22a.75.75 0 10-1.06 1.06L18.44 12l-1.72 1.72a.75.75 0 001.06 1.06l1.72-1.72 1.72 1.72a.75.75 0 101.06-1.06L20.56 12l1.72-1.72a.75.75 0 00-1.06-1.06l-1.72 1.72-1.72-1.72z"></path></svg>
</button>
<div class="relative h-1.5 mx-0 group-hover:mx-1 rounded-full group-hover:w-12 invisible group-hover:visible w-0 ease-out duration-300">
<input
x-ref="volume"
@input="updateVolume(event)"
type="range"
min="0"
max="1"
:value="volume"
step="0.01"
class="w-full h-full appearance-none flex items-center cursor-pointer bg-transparent z-30
[&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:w-2 [&::-webkit-slider-thumb]:h-2 [&::-webkit-slider-thumb]:appearance-none
[&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:w-2 [&::-moz-range-thumb]:h-2 [&::-moz-range-thumb]:appearance-none
[&::-ms-thumb]:bg-white [&::-ms-thumb]:rounded-full [&::-ms-thumb]:border-0 [&::-ms-thumb]:w-2 [&::-ms-thumb]:h-2 [&::-ms-thumb]:appearance-none
[&::-webkit-slider-runnable-track]:bg-white [&::-webkit-slider-runnable-track]:bg-opacity-30 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:overflow-hidden [&::-moz-range-track]:bg-neutral-200 [&::-moz-range-track]:rounded-full [&::-ms-track]:bg-neutral-200 [&::-ms-track]:rounded-full
[&::-moz-range-progress]:bg-white [&::-moz-range-progress]:bg-opacity-80 [&::-moz-range-progress]:rounded-full [&::-ms-fill-lower]:bg-white [&::-ms-fill-lower]:bg-opacity-80 [&::-ms-fill-lower]:rounded-full [&::-webkit-slider-thumb]:shadow-[-995px_0px_0px_990px_rgba(255,_255,_255,_0.8)]
"
/>
</div>
</div>
<button x-ref="fullscreenButton" @click="handleFullscreen" class="flex items-center justify-center w-10 h-10 duration-150 ease-out scale-90 opacity-80 hover:opacity-100 hover:scale-100" type="button">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.72685 5C5.77328 5 5 5.77318 5 6.72727V9C5 9.55228 4.55228 10 4 10C3.44772 10 3 9.55228 3 9V6.72727C3 4.6689 4.66842 3 6.72685 3H9C9.55228 3 10 3.44772 10 4C10 4.55228 9.55228 5 9 5H6.72685ZM14 4C14 3.44772 14.4477 3 15 3H17.2727C19.3312 3 21 4.66876 21 6.72727V9C21 9.55228 20.5523 10 20 10C19.4477 10 19 9.55228 19 9V6.72727C19 5.77333 18.2267 5 17.2727 5H15C14.4477 5 14 4.55228 14 4ZM4 14C4.55228 14 5 14.4477 5 15V17.2727C5 18.2268 5.77328 19 6.72685 19H9C9.55228 19 10 19.4477 10 20C10 20.5523 9.55228 21 9 21H6.72685C4.66842 21 3 19.3311 3 17.2727V15C3 14.4477 3.44772 14 4 14ZM20 14C20.5523 14 21 14.4477 21 15V17.2727C21 19.3312 19.3312 21 17.2727 21H15C14.4477 21 14 20.5523 14 20C14 19.4477 14.4477 19 15 19H17.2727C18.2267 19 19 18.2267 19 17.2727V15C19 14.4477 19.4477 14 20 14Z" fill="currentColor"></path></svg>
</button>
</div>
</div>
<div
x-show="controls"
@click="resetControlsTimeout"
x-transition:enter="transition ease-out duration-300"
x-transition:enter-start="translate-y-full"
x-transition:enter-end="translate-y-0"
x-transition:leave="transition ease-in duration-300"
x-transition:leave-start="translate-y-0"
x-transition:leave-end="translate-y-full"
class="absolute bottom-0 left-0 z-40 w-full h-12"
x-cloak
>
<div class="absolute bottom-0 z-30 w-full px-2.5 -translate-y-8">
<div class="relative w-full h-1 rounded-full">
<input
x-ref="videoProgress"
@click="timelineClicked"
@input="timelineSeek(event)"
type="range"
min="0"
max="100"
value="0"
step="any"
class="w-full h-full appearance-none flex items-center cursor-pointer bg-transparent z-30
[&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-0 [&::-webkit-slider-thumb]:w-1.5 [&::-webkit-slider-thumb]:h-1.5 [&::-webkit-slider-thumb]:appearance-none
[&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:w-1.5 [&::-moz-range-thumb]:h-1.5 [&::-moz-range-thumb]:appearance-none
[&::-ms-thumb]:bg-white [&::-ms-thumb]:rounded-full [&::-ms-thumb]:border-0 [&::-ms-thumb]:w-1.5 [&::-ms-thumb]:h-1.5 [&::-ms-thumb]:appearance-none
[&::-webkit-slider-runnable-track]:bg-white [&::-webkit-slider-runnable-track]:bg-opacity-30 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:overflow-hidden [&::-moz-range-track]:bg-neutral-200 [&::-moz-range-track]:rounded-full [&::-ms-track]:bg-neutral-200 [&::-ms-track]:rounded-full
[&::-moz-range-progress]:bg-blue-600 [&::-moz-range-progress]:rounded-full [&::-ms-fill-lower]:bg-blue-600 [&::-ms-fill-lower]:rounded-full [&::-webkit-slider-thumb]:shadow-[-995px_0px_0px_990px_#2463eb]
"
/>
</div>
</div>
<div class="absolute bottom-0 left-0 z-20 flex items-center w-full h-8 text-white">
<div x-show="showTime" class="flex items-center justify-between w-full mx-3 font-mono text-xs opacity-80 hover:opacity-100" x-cloak>
<time x-ref="timeElapsed" x-text="timeElapsedString">00:00</time>
<time x-ref="timeDuration" x-text="timeDurationString">00:00</time>
</div>
</div>
</div>
</div>
</div>
}
File diff suppressed because one or more lines are too long
@@ -1,37 +1,43 @@
package authentication package routes
import ( import (
"log" "log"
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/internal/ctx" "github.com/onsonr/sonr/internal/ctx"
"github.com/onsonr/sonr/pkg/nebula/modals"
"github.com/onsonr/sonr/pkg/nebula/views"
) )
// ╭───────────────────────────────────────────────────────────╮ // ╭───────────────────────────────────────────────────────────╮
// │ DWN Routes - Authentication │ // │ DWN Routes - Authentication │
// ╰───────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────╯
// CurrentViewRoute returns the current view route.
func CurrentViewRoute(c echo.Context) error { func CurrentViewRoute(c echo.Context) error {
s, err := ctx.GetDWNContext(c) s, err := ctx.GetDWNContext(c)
if err != nil { if err != nil {
return err return err
} }
log.Printf("Session ID: %s", s.ID()) log.Printf("Session ID: %s", s.ID())
return ctx.RenderTempl(c, CurrentView(c)) return ctx.RenderTempl(c, views.CurrentView(c))
} }
// ╭───────────────────────────────────────────────────────────╮ // ╭───────────────────────────────────────────────────────────╮
// │ Hway Routes - Authentication │ // │ Hway Routes - Authentication │
// ╰───────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────╯
// AuthorizeModalRoute returns the Authorize Modal route.
func AuthorizeModalRoute(c echo.Context) error { func AuthorizeModalRoute(c echo.Context) error {
return ctx.RenderTempl(c, AuthorizeModal(c)) return ctx.RenderTempl(c, modals.AuthorizeModal(c))
} }
// LoginModalRoute returns the Login Modal route.
func LoginModalRoute(c echo.Context) error { func LoginModalRoute(c echo.Context) error {
return ctx.RenderTempl(c, LoginModal(c)) return ctx.RenderTempl(c, modals.LoginModal(c))
} }
// RegisterModalRoute returns the Register Modal route.
func RegisterModalRoute(c echo.Context) error { func RegisterModalRoute(c echo.Context) error {
return ctx.RenderTempl(c, RegisterModal(c)) return ctx.RenderTempl(c, modals.RegisterModal(c))
} }
+22
View File
@@ -0,0 +1,22 @@
package routes
import (
"log"
"github.com/labstack/echo/v4"
"github.com/onsonr/sonr/internal/ctx"
"github.com/onsonr/sonr/pkg/nebula/marketing"
)
// ╭───────────────────────────────────────────────────────────╮
// │ Home Routes - Marketing │
// ╰───────────────────────────────────────────────────────────╯
func HomeRoute(c echo.Context) error {
s, err := ctx.GetHWAYContext(c)
if err != nil {
return err
}
log.Printf("Session ID: %s", s.ID())
return ctx.RenderTempl(c, marketing.View())
}
+1
View File
@@ -1,6 +1,7 @@
// tailwind.config.js // tailwind.config.js
module.exports = { module.exports = {
content: [ content: [
"./**/*.{templ,html}",
"./components/**/*.{templ,html}", "./components/**/*.{templ,html}",
"./global/**/*.{templ,html}", "./global/**/*.{templ,html}",
], ],
+23
View File
@@ -0,0 +1,23 @@
package views
import echo "github.com/labstack/echo/v4"
// CurrentView checks if the user is logged in.
templ CurrentView(c echo.Context) {
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3 class="card-title">Current Account</h3>
</div>
<div class="card-body">
<p class="card-text">
<a href="/logout">Logout</a>
</p>
</div>
</div>
</div>
</div>
</div>
}
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package authentication package views
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -10,6 +10,7 @@ import templruntime "github.com/a-h/templ/runtime"
import echo "github.com/labstack/echo/v4" import echo "github.com/labstack/echo/v4"
// CurrentView checks if the user is logged in.
func CurrentView(c echo.Context) templ.Component { func CurrentView(c echo.Context) 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
@@ -1,11 +1,11 @@
package vaultindex package views
import ( import (
"github.com/onsonr/sonr/pkg/nebula/global/state" "github.com/onsonr/sonr/pkg/nebula/global/state"
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
) )
templ IndexFile() { templ VaultIndexFile() {
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@@ -1,7 +1,7 @@
// Code generated by templ - DO NOT EDIT. // Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.778 // templ: version: v0.2.778
package vaultindex package views
//lint:file-ignore SA4006 This context is only used if a nested component is present. //lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -13,7 +13,7 @@ import (
"github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/styles"
) )
func IndexFile() templ.Component { func VaultIndexFile() 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 {
+1
View File
@@ -0,0 +1 @@
# Workers
+16 -2
View File
@@ -28,6 +28,20 @@ func NewLocal() (*SonrClient, error) {
} }
// NewRemote creates a new SonrClient for remote production. // NewRemote creates a new SonrClient for remote production.
func NewRemote() (*SonrClient, error) { func NewRemote(url string) (*SonrClient, error) {
return &SonrClient{}, nil // create http client
client := &SonrClient{
apiURL: url,
}
// Issue ping to check if server is up
resp, err := http.Get(client.apiURL + "/genesis")
if err != nil {
return nil, err
}
defer resp.Body.Close()
// Check if server is up
if resp.StatusCode != http.StatusOK {
return nil, err
}
return client, nil
} }
+10 -8
View File
@@ -7,14 +7,20 @@ import (
"github.com/onsonr/sonr/internal/orm" "github.com/onsonr/sonr/internal/orm"
) )
type authAPI struct{}
var Auth = new(authAPI)
// ╭───────────────────────────────────────────────────────────╮ // ╭───────────────────────────────────────────────────────────╮
// │ Login Handlers │ // │ Login Handlers │
// ╰───────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────╯
// LoginSubjectCheck handles the login subject check.
func (a *authAPI) LoginSubjectCheck(e echo.Context) error { func (a *authAPI) LoginSubjectCheck(e echo.Context) error {
return e.JSON(200, "HandleCredentialAssertion") return e.JSON(200, "HandleCredentialAssertion")
} }
// LoginSubjectStart handles the login subject start.
func (a *authAPI) LoginSubjectStart(e echo.Context) error { func (a *authAPI) LoginSubjectStart(e echo.Context) error {
opts := &protocol.PublicKeyCredentialRequestOptions{ opts := &protocol.PublicKeyCredentialRequestOptions{
UserVerification: "preferred", UserVerification: "preferred",
@@ -23,6 +29,7 @@ func (a *authAPI) LoginSubjectStart(e echo.Context) error {
return e.JSON(200, opts) return e.JSON(200, opts)
} }
// LoginSubjectFinish handles the login subject finish.
func (a *authAPI) LoginSubjectFinish(e echo.Context) error { func (a *authAPI) LoginSubjectFinish(e echo.Context) error {
var crr protocol.CredentialAssertionResponse var crr protocol.CredentialAssertionResponse
if err := e.Bind(&crr); err != nil { if err := e.Bind(&crr); err != nil {
@@ -35,11 +42,13 @@ func (a *authAPI) LoginSubjectFinish(e echo.Context) error {
// │ Register Handlers │ // │ Register Handlers │
// ╰───────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────╯
// RegisterSubjectCheck handles the register subject check.
func (a *authAPI) RegisterSubjectCheck(e echo.Context) error { func (a *authAPI) RegisterSubjectCheck(e echo.Context) error {
subject := e.FormValue("subject") subject := e.FormValue("subject")
return e.JSON(200, subject) return e.JSON(200, subject)
} }
// RegisterSubjectStart handles the register subject start.
func (a *authAPI) RegisterSubjectStart(e echo.Context) error { func (a *authAPI) RegisterSubjectStart(e echo.Context) error {
// Get subject and address // Get subject and address
subject := e.FormValue("subject") subject := e.FormValue("subject")
@@ -53,6 +62,7 @@ func (a *authAPI) RegisterSubjectStart(e echo.Context) error {
return e.JSON(201, orm.NewCredentialCreationOptions(subject, address, chal)) return e.JSON(201, orm.NewCredentialCreationOptions(subject, address, chal))
} }
// RegisterSubjectFinish handles the register subject finish.
func (a *authAPI) RegisterSubjectFinish(e echo.Context) error { func (a *authAPI) RegisterSubjectFinish(e echo.Context) error {
// Deserialize the JSON into a temporary struct // Deserialize the JSON into a temporary struct
var ccr protocol.CredentialCreationResponse var ccr protocol.CredentialCreationResponse
@@ -70,11 +80,3 @@ func (a *authAPI) RegisterSubjectFinish(e echo.Context) error {
// // credential := orm.NewCredential(parsedData, e.Request().Host, "") // // credential := orm.NewCredential(parsedData, e.Request().Host, "")
return e.JSON(201, ccr) return e.JSON(201, ccr)
} }
// ╭───────────────────────────────────────────────────────────╮
// │ Group Structures │
// ╰───────────────────────────────────────────────────────────╯
type authAPI struct{}
var Auth = new(authAPI)
+4 -5
View File
@@ -3,15 +3,14 @@ package routes
import ( import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/nebula/components/authentication" "github.com/onsonr/sonr/pkg/nebula/routes"
"github.com/onsonr/sonr/pkg/nebula/components/marketing"
) )
func RegisterGatewayAPI(e *echo.Echo) { func RegisterGatewayAPI(e *echo.Echo) {
} }
func RegisterGatewayViews(e *echo.Echo) { func RegisterGatewayViews(e *echo.Echo) {
e.GET("/", marketing.HomeRoute) e.GET("/", routes.HomeRoute)
e.GET("/login", authentication.LoginModalRoute) e.GET("/login", routes.LoginModalRoute)
e.GET("/register", authentication.RegisterModalRoute) e.GET("/register", routes.RegisterModalRoute)
} }
+4 -4
View File
@@ -3,7 +3,7 @@ package routes
import ( import (
"github.com/labstack/echo/v4" "github.com/labstack/echo/v4"
"github.com/onsonr/sonr/pkg/nebula/components/authentication" "github.com/onsonr/sonr/pkg/nebula/routes"
"github.com/onsonr/sonr/pkg/workers/handlers" "github.com/onsonr/sonr/pkg/workers/handlers"
) )
@@ -26,8 +26,8 @@ func RegisterWebNodeAPI(e *echo.Echo) {
// RegisterWebNodeViews registers the Decentralized Web Node HTMX views. // RegisterWebNodeViews registers the Decentralized Web Node HTMX views.
func RegisterWebNodeViews(e *echo.Echo) { func RegisterWebNodeViews(e *echo.Echo) {
e.File("/", "index.html") e.File("/", "index.html")
e.GET("/#", authentication.CurrentViewRoute) e.GET("/#", routes.CurrentViewRoute)
e.GET("/login", authentication.LoginModalRoute) e.GET("/login", routes.LoginModalRoute)
e.File("/config", "config.json") e.File("/config", "config.json")
e.GET("/register", authentication.RegisterModalRoute) e.GET("/register", routes.RegisterModalRoute)
} }
+25
View File
@@ -0,0 +1,25 @@
# Sonr Protobuf
## Overview
This directory contains the protobuf definitions for the Sonr blockchain.
## Directory Structure
### `did`
The `did` directory contains the protobuf definitions for the DID module.
### `macaroon`
The `macaroon` directory contains the protobuf definitions for the Macaroon module.
### `service`
The `service` directory contains the protobuf definitions for the Service module.
### `vault`
The `vault` directory contains the protobuf definitions for the Vault module.
### `buf.gen.gogo.yaml`
+32 -1
View File
@@ -104,10 +104,41 @@ message Controller {
int64 creation_block = 9; int64 creation_block = 9;
} }
// Grant is a Grant message type.
message Grant {
option (cosmos.orm.v1.table) = {
id : 4
primary_key : {fields : "id" auto_increment : true}
index : {id : 1 fields : "subject,origin" unique : true}
};
uint64 id = 1;
string controller = 2;
string subject = 3;
string origin = 4;
int64 expiry_height = 5;
}
// Macaroon is a Macaroon message type.
message Macaroon {
option (cosmos.orm.v1.table) = {
id : 5
primary_key : {fields : "id" auto_increment : true}
index : {id : 1 fields : "subject,origin" unique : true}
};
uint64 id = 1;
string controller = 2;
string subject = 3;
string origin = 4;
int64 expiry_height = 5;
string macaroon = 6;
}
// Verification represents a verification method // Verification represents a verification method
message Verification { message Verification {
option (cosmos.orm.v1.table) = { option (cosmos.orm.v1.table) = {
id : 4 id : 6
primary_key : {fields : "did"} primary_key : {fields : "did"}
index : {id : 1 fields : "issuer,subject" unique : true} index : {id : 1 fields : "issuer,subject" unique : true}
index : {id : 2 fields : "controller,did_method,issuer" unique : true} index : {id : 2 fields : "controller,did_method,issuer" unique : true}
-11
View File
@@ -1,11 +0,0 @@
syntax = "proto3";
package onsonr.sonr.macaroon.module.v1;
import "cosmos/app/v1alpha1/module.proto";
// Module is the app config object of the module.
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
message Module {
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr/x/macaroon"};
}
-71
View File
@@ -1,71 +0,0 @@
syntax = "proto3";
package macaroon.v1;
import "amino/amino.proto";
import "did/v1/tx.proto";
import "gogoproto/gogo.proto";
option go_package = "github.com/onsonr/sonr/x/macaroon/types";
// GenesisState defines the module genesis state
message GenesisState {
// Params defines all the parameters of the module.
Params params = 1 [(gogoproto.nullable) = false];
}
// Params defines the set of module parameters.
message Params {
option (amino.name) = "macaroon/params";
option (gogoproto.equal) = true;
option (gogoproto.goproto_stringer) = false;
// The list of methods
Methods methods = 1;
// The list of scopes
Scopes scopes = 2;
// The list of caveats
Caveats caveats = 3;
}
// Methods defines the available DID methods
message Methods {
option (amino.name) = "macaroon/methods";
option (gogoproto.equal) = true;
string default = 1;
repeated string supported = 2;
}
// Scopes defines the set of scopes
message Scopes {
option (amino.name) = "macaroon/scopes";
option (gogoproto.equal) = true;
string base = 1;
repeated string supported = 2;
}
// Caveats defines the available caveats
message Caveats {
option (amino.name) = "macaroon/caveats";
option (gogoproto.equal) = true;
repeated Caveat supported_first_party = 1;
repeated Caveat supported_third_party = 2;
}
// Transactions defines the allowlist,denylist for transactions which can be
// broadcasted to the network with the Sonr DWN Signed macaroon.
message Transactions {
option (amino.name) = "macaroon/transactions";
option (gogoproto.equal) = true;
repeated string allowlist = 1;
repeated string denylist = 2;
}
message Caveat {
repeated string scopes = 1;
string caveat = 2;
string description = 3;
}
-64
View File
@@ -1,64 +0,0 @@
syntax = "proto3";
package macaroon.v1;
import "google/api/annotations.proto";
import "macaroon/v1/genesis.proto";
option go_package = "github.com/onsonr/sonr/x/macaroon/types";
// Query provides defines the gRPC querier service.
service Query {
// Params queries all parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/macaroon/v1/params";
}
// RefreshToken refreshes a macaroon token as post authentication.
rpc RefreshToken(QueryRefreshTokenRequest)
returns (QueryRefreshTokenResponse) {
option (google.api.http).post = "/macaroon/v1/refresh";
}
// ValidateToken validates a macaroon token as pre authentication.
rpc ValidateToken(QueryValidateTokenRequest)
returns (QueryValidateTokenResponse) {
option (google.api.http).post = "/macaroon/v1/validate";
}
}
// QueryParamsRequest is the request type for the Query/Params RPC method.
message QueryParamsRequest {}
// QueryParamsResponse is the response type for the Query/Params RPC method.
message QueryParamsResponse {
// params defines the parameters of the module.
Params params = 1;
}
// QueryRefreshTokenRequest is the request type for the Query/RefreshToken RPC
// method.
message QueryRefreshTokenRequest {
// The macaroon token to refresh
string token = 1;
}
// QueryRefreshTokenResponse is the response type for the Query/RefreshToken
// RPC method.
message QueryRefreshTokenResponse {
// The macaroon token
string token = 1;
}
// QueryValidateTokenRequest is the request type for the Query/ValidateToken
// RPC method.
message QueryValidateTokenRequest {
// The macaroon token to validate
string token = 1;
}
// QueryValidateTokenResponse is the response type for the Query/ValidateToken
// RPC method.
message QueryValidateTokenResponse {
// The macaroon token
bool valid = 1;
}
-37
View File
@@ -1,37 +0,0 @@
syntax = "proto3";
package macaroon.v1;
import "cosmos/orm/v1/orm.proto";
option go_package = "github.com/onsonr/sonr/x/macaroon/types";
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
message Grant {
option (cosmos.orm.v1.table) = {
id : 1
primary_key : {fields : "id" auto_increment : true}
index : {id : 1 fields : "subject,origin" unique : true}
};
uint64 id = 1;
string controller = 2;
string subject = 3;
string origin = 4;
int64 expiry_height = 5;
}
message Macaroon {
option (cosmos.orm.v1.table) = {
id : 2
primary_key : {fields : "id" auto_increment : true}
index : {id : 1 fields : "subject,origin" unique : true}
};
uint64 id = 1;
string controller = 2;
string subject = 3;
string origin = 4;
int64 expiry_height = 5;
string macaroon = 6;
}
-68
View File
@@ -1,68 +0,0 @@
syntax = "proto3";
package macaroon.v1;
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "macaroon/v1/genesis.proto";
option go_package = "github.com/onsonr/sonr/x/macaroon/types";
// Msg defines the Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
// IssueMacaroon asserts the given controller is the owner of the given
// address.
rpc IssueMacaroon(MsgIssueMacaroon) returns (MsgIssueMacaroonResponse);
}
// MsgUpdateParams is the Msg/UpdateParams request type.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address of the governance account.
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// params defines the parameters to update.
//
// NOTE: All parameters must be supplied.
Params params = 2 [ (gogoproto.nullable) = false ];
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: cosmos-sdk 0.47
message MsgUpdateParamsResponse {}
// MsgIssueMacaroon is the message type for the IssueMacaroon RPC.
message MsgIssueMacaroon {
option (cosmos.msg.v1.signer) = "controller";
// Controller is the address of the controller to authenticate.
string controller = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// Origin is the origin of the request in wildcard form.
string origin = 2;
// Permissions is the scope of the service.
map<string, string> permissions = 3;
// token is the macron token to authenticate the operation.
string token = 4;
}
// MsgIssueMacaroonResponse is the response type for the IssueMacaroon
// RPC.
message MsgIssueMacaroonResponse {
bool success = 1;
string token = 2;
}
+1 -1
View File
@@ -32,7 +32,7 @@ service Query {
// 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(QuerySyncRequest) returns (QuerySyncResponse) { rpc Sync(QuerySyncRequest) returns (QuerySyncResponse) {
option (google.api.http).get = "/vault/v1/sync-initial"; option (google.api.http).get = "/vault/v1/sync";
} }
} }
+6 -3
View File
@@ -34,9 +34,12 @@ requests:
vault: !folder vault: !folder
name: Vault name: Vault
requests: requests:
vault_schema: !request
method: GET
url: "{{host}}/vault/v1/schema"
vault_allocate: !request vault_allocate: !request
method: GET method: GET
url: "{{host}}/vault/v1/allocate" url: "{{host}}/vault/v1/allocate"
vault_schema: !request
method: GET
url: "{{host}}/vault/v1/schema"
vault_sync: !request
method: GET
url: "{{host}}/vault/v1/sync"
+97 -27
View File
@@ -4,60 +4,118 @@ The Decentralized Identity module is responsible for managing native Sonr Accoun
## State ## State
Specify and describe structures expected to marshalled into the store, and their keys The DID module maintains several key state structures:
### Account State ### Controller State
The Account state includes the user's public key, associated wallets, and other identification details. It is stored using the user's DID as the key. The Controller state represents a Sonr DWN Vault. It includes:
- Unique identifier (number)
- DID
- Sonr address
- Ethereum address
- Bitcoin address
- Public key
- Keyshares pointer
- Claimed block
- Creation block
### Credential State ### Assertion State
The Credential state includes the claims about a subject and is stored using the credential ID as the key. The Assertion state includes:
- DID
- Controller
- Subject
- Public key
- Assertion type
- Accumulator (metadata)
- Creation block
### Authentication State
The Authentication state includes:
- DID
- Controller
- Subject
- Public key
- Credential ID
- Metadata
- Creation block
### Verification State
The Verification state includes:
- DID
- Controller
- DID method
- Issuer
- Subject
- Public key
- Verification type
- Metadata
- Creation block
## State Transitions ## State Transitions
Standard state transition operations triggered by hooks, messages, etc. State transitions are triggered by the following messages:
- LinkAssertion
- LinkAuthentication
- UnlinkAssertion
- UnlinkAuthentication
- ExecuteTx
- UpdateParams
## Messages ## Messages
Specify message structure(s) and expected state machine behaviour(s). The DID module defines the following messages:
## Begin Block 1. MsgLinkAuthentication
2. MsgLinkAssertion
3. MsgExecuteTx
4. MsgUnlinkAssertion
5. MsgUnlinkAuthentication
6. MsgUpdateParams
Specify any begin-block operations. Each message triggers specific state machine behaviors related to managing DIDs, authentications, assertions, and module parameters.
## End Block ## Query
Specify any end-block operations. The DID module provides the following query endpoints:
## Hooks 1. Params: Query all parameters of the module
2. Resolve: Query the DID document by its ID
Describe available hooks to be called by/from this module. 3. Sign: Sign a message with the DID document
4. Verify: Verify a message with the DID document
## Events
List and describe event tags used.
## Client
List and describe CLI commands and gRPC and REST endpoints.
## Params ## Params
List all module parameters, their types (in JSON) and identitys. The module parameters include:
- Allowed public keys (map of KeyInfo)
- Conveyance preference
- Attestation formats
## Client
The module provides gRPC and REST endpoints for all defined messages and queries.
## Future Improvements ## Future Improvements
Describe future improvements of this module. Potential future improvements could include:
1. Enhanced privacy features for DID operations
2. Integration with more blockchain networks
3. Support for additional key types and cryptographic algorithms
4. Improved revocation mechanisms for credentials and assertions
## Tests ## Tests
Acceptance tests. Acceptance tests should cover all major functionality, including:
- Creating and managing DIDs
- Linking and unlinking assertions and authentications
- Executing transactions with DIDs
- Querying and resolving DIDs
- Parameter updates
## Appendix ## Appendix
Supplementary details referenced elsewhere within the spec.
### Account ### Account
An Account represents a user's identity within the Sonr ecosystem. It includes information such as the user's public key, associated wallets, and other identification details. An Account represents a user's identity within the Sonr ecosystem. It includes information such as the user's public key, associated wallets, and other identification details.
@@ -69,3 +127,15 @@ A Decentralized Identifier (DID) is a unique identifier that is created, owned,
### Verifiable Credential (VC) ### Verifiable Credential (VC)
A Verifiable Credential (VC) is a digital statement that can be cryptographically verified. It contains claims about a subject (e.g., a user) and is issued by a trusted authority. A Verifiable Credential (VC) is a digital statement that can be cryptographically verified. It contains claims about a subject (e.g., a user) and is issued by a trusted authority.
### Key Types
The module supports various key types, including:
- Role
- Algorithm (e.g., ES256, EdDSA, ES256K)
- Encoding (e.g., hex, base64, multibase)
- Curve (e.g., P256, P384, P521, X25519, X448, Ed25519, Ed448, secp256k1)
### JSON Web Key (JWK)
The module supports JSON Web Keys (JWK) for representing cryptographic keys, including properties such as key type (kty), curve (crv), and coordinates (x, y) for EC and OKP keys, as well as modulus (n) and exponent (e) for RSA keys.
+3 -3
View File
@@ -7,9 +7,9 @@ import (
var _ sdk.Msg = &MsgUpdateParams{} var _ sdk.Msg = &MsgUpdateParams{}
// ╭────────────────────────────────────────────────────────╮ // ╭───────────────────────────────────────────────────────────
// │ MsgUpdateParams // │ MsgUpdateParams type definition
// ╰────────────────────────────────────────────────────────╯ // ╰───────────────────────────────────────────────────────────
// NewMsgUpdateParams creates new instance of MsgUpdateParams // NewMsgUpdateParams creates new instance of MsgUpdateParams
func NewMsgUpdateParams( func NewMsgUpdateParams(
+793 -49
View File
@@ -339,6 +339,168 @@ func (m *Controller) GetCreationBlock() int64 {
return 0 return 0
} }
// Grant is a Grant message type.
type Grant struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
ExpiryHeight int64 `protobuf:"varint,5,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"`
}
func (m *Grant) Reset() { *m = Grant{} }
func (m *Grant) String() string { return proto.CompactTextString(m) }
func (*Grant) ProtoMessage() {}
func (*Grant) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{3}
}
func (m *Grant) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Grant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Grant.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Grant) XXX_Merge(src proto.Message) {
xxx_messageInfo_Grant.Merge(m, src)
}
func (m *Grant) XXX_Size() int {
return m.Size()
}
func (m *Grant) XXX_DiscardUnknown() {
xxx_messageInfo_Grant.DiscardUnknown(m)
}
var xxx_messageInfo_Grant proto.InternalMessageInfo
func (m *Grant) GetId() uint64 {
if m != nil {
return m.Id
}
return 0
}
func (m *Grant) GetController() string {
if m != nil {
return m.Controller
}
return ""
}
func (m *Grant) GetSubject() string {
if m != nil {
return m.Subject
}
return ""
}
func (m *Grant) GetOrigin() string {
if m != nil {
return m.Origin
}
return ""
}
func (m *Grant) GetExpiryHeight() int64 {
if m != nil {
return m.ExpiryHeight
}
return 0
}
// Macaroon is a Macaroon message type.
type Macaroon struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"`
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
ExpiryHeight int64 `protobuf:"varint,5,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"`
Macaroon string `protobuf:"bytes,6,opt,name=macaroon,proto3" json:"macaroon,omitempty"`
}
func (m *Macaroon) Reset() { *m = Macaroon{} }
func (m *Macaroon) String() string { return proto.CompactTextString(m) }
func (*Macaroon) ProtoMessage() {}
func (*Macaroon) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{4}
}
func (m *Macaroon) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Macaroon) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Macaroon.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Macaroon) XXX_Merge(src proto.Message) {
xxx_messageInfo_Macaroon.Merge(m, src)
}
func (m *Macaroon) XXX_Size() int {
return m.Size()
}
func (m *Macaroon) XXX_DiscardUnknown() {
xxx_messageInfo_Macaroon.DiscardUnknown(m)
}
var xxx_messageInfo_Macaroon proto.InternalMessageInfo
func (m *Macaroon) GetId() uint64 {
if m != nil {
return m.Id
}
return 0
}
func (m *Macaroon) GetController() string {
if m != nil {
return m.Controller
}
return ""
}
func (m *Macaroon) GetSubject() string {
if m != nil {
return m.Subject
}
return ""
}
func (m *Macaroon) GetOrigin() string {
if m != nil {
return m.Origin
}
return ""
}
func (m *Macaroon) GetExpiryHeight() int64 {
if m != nil {
return m.ExpiryHeight
}
return 0
}
func (m *Macaroon) GetMacaroon() string {
if m != nil {
return m.Macaroon
}
return ""
}
// Verification represents a verification method // Verification represents a verification method
type Verification struct { type Verification struct {
// The unique identifier of the verification // The unique identifier of the verification
@@ -365,7 +527,7 @@ func (m *Verification) Reset() { *m = Verification{} }
func (m *Verification) String() string { return proto.CompactTextString(m) } func (m *Verification) String() string { return proto.CompactTextString(m) }
func (*Verification) ProtoMessage() {} func (*Verification) ProtoMessage() {}
func (*Verification) Descriptor() ([]byte, []int) { func (*Verification) Descriptor() ([]byte, []int) {
return fileDescriptor_f44bb702879c34b4, []int{3} return fileDescriptor_f44bb702879c34b4, []int{5}
} }
func (m *Verification) XXX_Unmarshal(b []byte) error { func (m *Verification) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@@ -463,6 +625,8 @@ func init() {
proto.RegisterType((*Authentication)(nil), "did.v1.Authentication") proto.RegisterType((*Authentication)(nil), "did.v1.Authentication")
proto.RegisterMapType((map[string]string)(nil), "did.v1.Authentication.MetadataEntry") proto.RegisterMapType((map[string]string)(nil), "did.v1.Authentication.MetadataEntry")
proto.RegisterType((*Controller)(nil), "did.v1.Controller") proto.RegisterType((*Controller)(nil), "did.v1.Controller")
proto.RegisterType((*Grant)(nil), "did.v1.Grant")
proto.RegisterType((*Macaroon)(nil), "did.v1.Macaroon")
proto.RegisterType((*Verification)(nil), "did.v1.Verification") proto.RegisterType((*Verification)(nil), "did.v1.Verification")
proto.RegisterMapType((map[string]string)(nil), "did.v1.Verification.MetadataEntry") proto.RegisterMapType((map[string]string)(nil), "did.v1.Verification.MetadataEntry")
} }
@@ -470,54 +634,61 @@ func init() {
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
var fileDescriptor_f44bb702879c34b4 = []byte{ var fileDescriptor_f44bb702879c34b4 = []byte{
// 745 bytes of a gzipped FileDescriptorProto // 849 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0xc1, 0x6e, 0xd3, 0x48, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0x61, 0x8b, 0xe3, 0x44,
0x18, 0xc7, 0x3b, 0x71, 0x92, 0xd6, 0x5f, 0xd2, 0xc8, 0x1d, 0x75, 0x77, 0x47, 0xd5, 0x6e, 0x36, 0x18, 0xc7, 0x77, 0x9a, 0x36, 0xd7, 0x3c, 0xed, 0x96, 0xdc, 0xb0, 0x9e, 0x61, 0xd1, 0x5a, 0x73,
0x9b, 0xee, 0xae, 0xb2, 0xda, 0x6e, 0xa2, 0x76, 0x2f, 0xa8, 0xa0, 0x8a, 0x14, 0x38, 0xa0, 0xaa, 0x7a, 0xac, 0xb8, 0xb6, 0xdc, 0xf9, 0x46, 0x56, 0x39, 0xdc, 0x53, 0x51, 0x39, 0x16, 0x24, 0xca,
0x12, 0x32, 0xa8, 0x12, 0x5c, 0xa2, 0xb1, 0x67, 0x68, 0x4c, 0x6c, 0x4f, 0xf0, 0x8c, 0x23, 0x72, 0x81, 0xbe, 0x29, 0x93, 0xcc, 0xd8, 0x8e, 0x4d, 0x32, 0x75, 0x32, 0x29, 0xd7, 0x97, 0x82, 0x82,
0x44, 0x02, 0x89, 0x13, 0xe2, 0x09, 0x78, 0x1e, 0x8e, 0x95, 0xb8, 0x70, 0x44, 0xed, 0x1b, 0xf0, 0xaf, 0xc4, 0x4f, 0xe0, 0xc7, 0xf0, 0x33, 0xf8, 0xf2, 0x40, 0x04, 0x5f, 0xca, 0xee, 0x37, 0xf0,
0x04, 0xc8, 0x63, 0x3b, 0x71, 0xa0, 0xa2, 0x50, 0x21, 0x71, 0x89, 0x32, 0x7f, 0xff, 0xfd, 0x79, 0x13, 0xc8, 0xcc, 0x24, 0x6d, 0xaa, 0x87, 0x7b, 0xae, 0x82, 0xf7, 0xa6, 0x74, 0xfe, 0x79, 0xf2,
0xbe, 0xff, 0xcf, 0xdf, 0x18, 0x30, 0xf3, 0x58, 0x6f, 0xb2, 0xdd, 0x93, 0x8a, 0x2a, 0xde, 0x1d, 0xe4, 0x79, 0x7e, 0xff, 0xcc, 0x33, 0x01, 0x4c, 0x39, 0x9d, 0xac, 0x6e, 0x4f, 0x0a, 0x45, 0x14,
0x47, 0x42, 0x09, 0x5c, 0x65, 0x1e, 0xeb, 0x4e, 0xb6, 0x37, 0x7e, 0x71, 0x85, 0x0c, 0x84, 0xec, 0x1b, 0x2f, 0xa5, 0x50, 0x02, 0xbb, 0x94, 0xd3, 0xf1, 0xea, 0xf6, 0xe1, 0xb3, 0x89, 0x28, 0x32,
0x89, 0x28, 0x48, 0x2c, 0x22, 0x0a, 0x52, 0xc3, 0xc6, 0x7a, 0x76, 0xd3, 0x31, 0x0f, 0xb9, 0xf4, 0x51, 0x4c, 0x84, 0xcc, 0x74, 0x88, 0x90, 0x99, 0x0d, 0x38, 0x3c, 0xa8, 0x6e, 0x9a, 0xb1, 0x9c,
0x64, 0xaa, 0xb6, 0x9f, 0x1b, 0x60, 0xf6, 0xa5, 0xe4, 0x91, 0xf2, 0x44, 0x88, 0x2d, 0x30, 0x98, 0x15, 0xbc, 0xb0, 0x6a, 0xf8, 0x8d, 0x03, 0xde, 0x69, 0x51, 0x30, 0xa9, 0xb8, 0xc8, 0xb1, 0x0f,
0xc7, 0x08, 0x6a, 0xa1, 0x8e, 0x69, 0x27, 0x7f, 0x71, 0x13, 0xc0, 0x15, 0xa1, 0x8a, 0x84, 0xef, 0x0e, 0xe5, 0x34, 0x40, 0x23, 0x74, 0xe4, 0x45, 0xfa, 0x2f, 0x1e, 0x02, 0x24, 0x22, 0x57, 0x52,
0xf3, 0x88, 0x94, 0xf4, 0x85, 0x82, 0x82, 0x09, 0x2c, 0xcb, 0xd8, 0x79, 0xc4, 0x5d, 0x45, 0x0c, 0xa4, 0x29, 0x93, 0x41, 0xcb, 0x5c, 0x68, 0x28, 0x38, 0x80, 0x6b, 0x45, 0x19, 0x7f, 0xc1, 0x12,
0x7d, 0x31, 0x5f, 0xe2, 0xff, 0x00, 0xc6, 0xb1, 0xe3, 0x7b, 0xee, 0x60, 0xc4, 0xa7, 0xa4, 0xdc, 0x15, 0x38, 0xe6, 0x62, 0xbd, 0xc4, 0xaf, 0x01, 0x2c, 0xcb, 0x38, 0xe5, 0xc9, 0x74, 0xc1, 0xd6,
0x42, 0x9d, 0xda, 0x4e, 0xa3, 0x9b, 0xee, 0xb2, 0x7b, 0x27, 0x76, 0x0e, 0xf8, 0xd4, 0x36, 0x53, 0x41, 0x7b, 0x84, 0x8e, 0x7a, 0x77, 0x06, 0x63, 0x5b, 0xe5, 0xf8, 0xa3, 0x32, 0xbe, 0xcf, 0xd6,
0xc7, 0x01, 0x9f, 0xe2, 0xbf, 0xa0, 0x41, 0xf3, 0x7d, 0x0c, 0xd4, 0x74, 0xcc, 0x49, 0x45, 0xd7, 0x91, 0x67, 0x23, 0xee, 0xb3, 0x35, 0x7e, 0x19, 0x06, 0xa4, 0xae, 0x63, 0xaa, 0xd6, 0x4b, 0x16,
0x5b, 0x9d, 0xa9, 0xf7, 0xa6, 0x63, 0x8e, 0x6f, 0x42, 0x8d, 0xba, 0x6e, 0x1c, 0xc4, 0x3e, 0x55, 0x74, 0x4c, 0xbe, 0xfd, 0x8d, 0xfa, 0xc9, 0x7a, 0xc9, 0xf0, 0xbb, 0xd0, 0x23, 0x49, 0x52, 0x66,
0x22, 0x22, 0xd5, 0x96, 0xd1, 0xa9, 0xed, 0xb4, 0xf3, 0xb2, 0xb3, 0x4e, 0xba, 0xfd, 0xb9, 0xe9, 0x65, 0x4a, 0x94, 0x90, 0x81, 0x3b, 0x72, 0x8e, 0x7a, 0x77, 0xc2, 0x3a, 0xed, 0xa6, 0x93, 0xf1,
0x56, 0xa8, 0xa2, 0xa9, 0x5d, 0xbc, 0x2d, 0x79, 0x98, 0x1b, 0x71, 0xaa, 0x9f, 0xe5, 0xf8, 0xc2, 0xe9, 0x36, 0xe8, 0xbd, 0x5c, 0xc9, 0x75, 0xd4, 0xbc, 0x4d, 0x3f, 0x2c, 0x91, 0x8c, 0x98, 0x67,
0x1d, 0x91, 0xe5, 0x16, 0xea, 0x18, 0xf6, 0x6a, 0xae, 0xee, 0x27, 0xe2, 0xc6, 0x1e, 0x58, 0x9f, 0xc5, 0xa9, 0x48, 0x16, 0xc1, 0xb5, 0x11, 0x3a, 0x72, 0xa2, 0xfd, 0x5a, 0xbd, 0xa7, 0xc5, 0xc3,
0xd6, 0x49, 0x22, 0x4a, 0xfa, 0xc9, 0x22, 0x1a, 0xf1, 0x29, 0x5e, 0x87, 0xca, 0x84, 0xfa, 0x31, 0xbb, 0xe0, 0xff, 0x39, 0x8f, 0x46, 0xa4, 0xfb, 0xa9, 0x10, 0x2d, 0xd8, 0x1a, 0x1f, 0x40, 0x67,
0xd7, 0xe9, 0xd4, 0xed, 0x74, 0xb1, 0x5b, 0xba, 0x82, 0x76, 0xff, 0xf9, 0xf0, 0xfa, 0xed, 0x4b, 0x45, 0xd2, 0x92, 0x19, 0x3a, 0xfd, 0xc8, 0x2e, 0x4e, 0x5a, 0x6f, 0xa0, 0x93, 0x57, 0x7e, 0xff,
0x63, 0x13, 0x2a, 0x3a, 0x56, 0x4c, 0x00, 0xcf, 0x93, 0xdb, 0xca, 0x72, 0xb2, 0x10, 0x41, 0x04, 0xe1, 0xe7, 0xef, 0x9c, 0x9b, 0xd0, 0x31, 0x58, 0x71, 0x00, 0x78, 0x4b, 0xee, 0xb8, 0xe2, 0xe4,
0xb5, 0x9f, 0x1a, 0xd0, 0xe8, 0xc7, 0x6a, 0xc8, 0x43, 0xe5, 0xb9, 0xf4, 0x47, 0xc3, 0xd8, 0x84, 0xa3, 0x00, 0x05, 0x28, 0xfc, 0xca, 0x81, 0xc1, 0x69, 0xa9, 0xe6, 0x2c, 0x57, 0x3c, 0x21, 0xff,
0x24, 0x09, 0x96, 0x6c, 0x86, 0xfa, 0x03, 0x8f, 0x69, 0x16, 0x75, 0xbb, 0x3e, 0x17, 0x6f, 0x33, 0xb7, 0x19, 0x37, 0x41, 0x93, 0xa0, 0xba, 0x18, 0x92, 0x4e, 0x39, 0x35, 0x5e, 0xf4, 0xa3, 0xfe,
0x7c, 0x1d, 0x56, 0x02, 0xae, 0x28, 0xa3, 0x8a, 0x66, 0x1c, 0xfe, 0x9c, 0x71, 0x58, 0xe8, 0xa4, 0x56, 0xfc, 0x90, 0xe2, 0xb7, 0xa1, 0x9b, 0x31, 0x45, 0x28, 0x51, 0xa4, 0xf2, 0xe1, 0xa5, 0x8d,
0x7b, 0x98, 0xd9, 0x52, 0x12, 0xb3, 0xbb, 0xbe, 0x16, 0xc3, 0x55, 0x58, 0x5d, 0xa8, 0x70, 0x11, 0x0f, 0x3b, 0x9d, 0x8c, 0xcf, 0xaa, 0x30, 0xeb, 0xc4, 0xe6, 0xae, 0x27, 0xb5, 0xe1, 0x4d, 0xd8,
0x03, 0xf3, 0x52, 0x0c, 0x4a, 0xed, 0x17, 0x06, 0xc0, 0x8d, 0x79, 0x9a, 0x3f, 0x43, 0x35, 0x8c, 0xdf, 0xc9, 0x70, 0x99, 0x07, 0xde, 0x95, 0x3c, 0x68, 0x85, 0xdf, 0x3a, 0x00, 0xef, 0x6c, 0x69,
0x03, 0x87, 0x47, 0xfa, 0x41, 0x65, 0x3b, 0x5b, 0xe5, 0x5c, 0x4a, 0x73, 0x2e, 0x7f, 0x40, 0x5d, 0xde, 0x00, 0x37, 0x2f, 0xb3, 0x98, 0x49, 0xf3, 0xa0, 0x76, 0x54, 0xad, 0x6a, 0x5f, 0x5a, 0x5b,
0x8a, 0x30, 0x1a, 0x50, 0xc6, 0x22, 0x2e, 0x65, 0x16, 0x7e, 0x2d, 0xd1, 0xfa, 0xa9, 0x84, 0x7f, 0x5f, 0x5e, 0x84, 0x7e, 0x21, 0x72, 0x39, 0x25, 0x94, 0x4a, 0x56, 0x14, 0x15, 0xfc, 0x9e, 0xd6,
0x87, 0x1a, 0x57, 0xc3, 0x99, 0xa3, 0x9c, 0xb2, 0xe3, 0x6a, 0x58, 0x30, 0x38, 0xca, 0x9d, 0x19, 0x4e, 0xad, 0x84, 0x5f, 0x80, 0x1e, 0x53, 0xf3, 0x4d, 0x44, 0xdb, 0x7a, 0xc7, 0xd4, 0xbc, 0x11,
0xd2, 0x97, 0x1f, 0x1c, 0xe5, 0xe6, 0x86, 0x45, 0x84, 0xd5, 0x8b, 0x10, 0xfe, 0x04, 0xd5, 0x91, 0x10, 0xab, 0x64, 0x13, 0x60, 0x5f, 0x7e, 0x88, 0x55, 0x52, 0x07, 0xec, 0x5a, 0xe8, 0x5e, 0x66,
0x1c, 0x4c, 0xa8, 0xaf, 0x33, 0x35, 0xed, 0xca, 0x48, 0x1e, 0x51, 0x5f, 0x93, 0xf5, 0xa9, 0x17, 0xe1, 0x33, 0xe0, 0x2e, 0x8a, 0xe9, 0x8a, 0xa4, 0x86, 0xa9, 0x17, 0x75, 0x16, 0xc5, 0x03, 0x92,
0x70, 0x96, 0x25, 0xbe, 0xa2, 0x13, 0xaf, 0x67, 0xa2, 0x0e, 0xfc, 0x1c, 0x2e, 0xe6, 0x39, 0x5c, 0x1a, 0x67, 0x53, 0xc2, 0x33, 0x46, 0x2b, 0xe2, 0x5d, 0x43, 0xbc, 0x5f, 0x89, 0x06, 0xf8, 0x63,
0x76, 0xef, 0xeb, 0x68, 0xef, 0x02, 0xe4, 0x41, 0x59, 0x08, 0xe3, 0xc5, 0x28, 0x92, 0x64, 0xf1, 0x7c, 0xf1, 0x1e, 0xe3, 0xcb, 0xc9, 0xa7, 0x06, 0xed, 0xc7, 0x00, 0x35, 0x28, 0x1f, 0x61, 0xbc,
0xda, 0x42, 0xef, 0x56, 0x29, 0x95, 0x0a, 0xdd, 0x5a, 0x06, 0x41, 0xd8, 0xd4, 0xb1, 0x5a, 0x65, 0x8b, 0x42, 0x93, 0xc5, 0xd7, 0x77, 0x7a, 0xf7, 0x5b, 0x56, 0x6a, 0x74, 0xeb, 0x3b, 0x01, 0xc2,
0x82, 0x88, 0xd1, 0x7e, 0x56, 0x86, 0xfa, 0x11, 0x8f, 0xbc, 0x87, 0x97, 0x1f, 0x86, 0xdf, 0x00, 0x9e, 0xc1, 0xea, 0xb7, 0x03, 0x14, 0x38, 0xe1, 0x8f, 0x08, 0x3a, 0xef, 0x4b, 0x92, 0x2b, 0x3c,
0x98, 0xc7, 0x06, 0x01, 0x57, 0x43, 0xc1, 0x32, 0x24, 0x26, 0xf3, 0xd8, 0xa1, 0x16, 0x12, 0xba, 0x80, 0x56, 0xb5, 0x09, 0xda, 0x51, 0xeb, 0x5f, 0xed, 0x81, 0x1b, 0xe0, 0x0a, 0xc9, 0x67, 0x3c,
0x9e, 0x94, 0x31, 0x8f, 0x32, 0x16, 0xd9, 0xaa, 0x38, 0x43, 0x95, 0x2f, 0xcd, 0xd0, 0x85, 0x00, 0xaf, 0xe8, 0x57, 0x2b, 0x8d, 0x84, 0x3d, 0x5c, 0x72, 0xb9, 0x9e, 0xce, 0x19, 0x9f, 0xcd, 0x95,
0xfe, 0x85, 0xb5, 0x49, 0xa1, 0x83, 0xf4, 0x4c, 0x4b, 0x59, 0x58, 0xc5, 0x0b, 0xfa, 0x58, 0xdb, 0x61, 0xef, 0x44, 0x7d, 0x2b, 0x7e, 0x60, 0xb4, 0x93, 0x5b, 0xa6, 0xd7, 0x11, 0xb8, 0xba, 0x1c,
0x2b, 0xcc, 0xd2, 0xca, 0xe2, 0x99, 0x56, 0x8c, 0xe1, 0x1b, 0x26, 0xc9, 0xfc, 0xee, 0x93, 0xf4, 0x1f, 0xe1, 0x03, 0x18, 0x54, 0x79, 0x8f, 0x6d, 0x1a, 0xf3, 0x0e, 0xb5, 0xc3, 0x5f, 0x10, 0x74,
0x58, 0xe3, 0x1e, 0xe5, 0x93, 0xb4, 0x0e, 0x8d, 0x34, 0xb2, 0xe2, 0x14, 0xe1, 0x36, 0xfc, 0x5a, 0xcf, 0x48, 0x42, 0xa4, 0x10, 0xf9, 0x53, 0x52, 0x3b, 0x3e, 0x84, 0x6e, 0x56, 0x95, 0x64, 0xde,
0x98, 0xaf, 0x39, 0x80, 0xad, 0xd4, 0xab, 0xe1, 0xff, 0x0d, 0xad, 0xcf, 0x92, 0xc9, 0x8b, 0xe4, 0x1b, 0x2f, 0xda, 0xac, 0x9f, 0xb0, 0xaf, 0x4e, 0xf8, 0x75, 0x1b, 0xfa, 0x0f, 0x98, 0xe4, 0x9f,
0x3e, 0x83, 0x20, 0x52, 0xde, 0xbf, 0xf6, 0xe6, 0xb4, 0x89, 0x4e, 0x4e, 0x9b, 0xe8, 0xfd, 0x69, 0x5f, 0x7d, 0x3a, 0x3d, 0x0f, 0x40, 0x39, 0x9d, 0x66, 0x4c, 0xcd, 0x05, 0xad, 0x1a, 0xf4, 0x28,
0x13, 0xbd, 0x3a, 0x6b, 0x2e, 0x9d, 0x9c, 0x35, 0x97, 0xde, 0x9d, 0x35, 0x97, 0x1e, 0xb4, 0x8f, 0xa7, 0x67, 0x46, 0xd0, 0x2d, 0xf2, 0xa2, 0x28, 0x99, 0xac, 0x5b, 0xb4, 0xab, 0x26, 0x94, 0xce,
0x3d, 0x35, 0x8c, 0x9d, 0xae, 0x2b, 0x82, 0x9e, 0x08, 0x93, 0x57, 0xae, 0xa7, 0x7f, 0x9e, 0xf4, 0xdf, 0x0d, 0xb5, 0x4b, 0x77, 0xc4, 0xab, 0x70, 0x7d, 0xd5, 0xe8, 0xc0, 0x1e, 0x32, 0x76, 0x73,
0x92, 0xcf, 0x5c, 0x52, 0x51, 0x3a, 0x55, 0xfd, 0x89, 0xfb, 0xff, 0x63, 0x00, 0x00, 0x00, 0xff, 0xf8, 0xcd, 0x0b, 0xe6, 0x9c, 0xb9, 0xdb, 0x18, 0x6e, 0xdd, 0xdd, 0x43, 0xa6, 0x89, 0xe1, 0x1f,
0xff, 0x4d, 0x8f, 0xef, 0xfc, 0x2f, 0x07, 0x00, 0x00, 0x8c, 0x36, 0xef, 0x3f, 0x1f, 0x6d, 0x5f, 0x1a, 0xef, 0x16, 0xf5, 0x68, 0x3b, 0x80, 0x81, 0x45,
0xd6, 0x1c, 0x6b, 0x38, 0x84, 0xe7, 0x1a, 0x03, 0x6f, 0x6b, 0xc0, 0xb1, 0x8d, 0x35, 0xbb, 0xf1,
0x16, 0x8c, 0xfe, 0x42, 0xa6, 0x4e, 0x52, 0xc7, 0x39, 0x01, 0x0a, 0xdc, 0x7b, 0x6f, 0xfd, 0x74,
0x3e, 0x44, 0x8f, 0xce, 0x87, 0xe8, 0xb7, 0xf3, 0x21, 0xfa, 0xfe, 0x62, 0xb8, 0xf7, 0xe8, 0x62,
0xb8, 0xf7, 0xeb, 0xc5, 0x70, 0xef, 0xb3, 0x70, 0xc6, 0xd5, 0xbc, 0x8c, 0xc7, 0x89, 0xc8, 0x26,
0x22, 0xd7, 0x33, 0x60, 0x62, 0x7e, 0x1e, 0x4e, 0xf4, 0x77, 0x87, 0xce, 0x58, 0xc4, 0xae, 0xf9,
0xe6, 0x78, 0xfd, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0xac, 0xdb, 0xa3, 0xc0, 0x08, 0x00,
0x00,
} }
func (m *Assertion) Marshal() (dAtA []byte, err error) { func (m *Assertion) Marshal() (dAtA []byte, err error) {
@@ -781,6 +952,121 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *Grant) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Grant) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.ExpiryHeight != 0 {
i = encodeVarintState(dAtA, i, uint64(m.ExpiryHeight))
i--
dAtA[i] = 0x28
}
if len(m.Origin) > 0 {
i -= len(m.Origin)
copy(dAtA[i:], m.Origin)
i = encodeVarintState(dAtA, i, uint64(len(m.Origin)))
i--
dAtA[i] = 0x22
}
if len(m.Subject) > 0 {
i -= len(m.Subject)
copy(dAtA[i:], m.Subject)
i = encodeVarintState(dAtA, i, uint64(len(m.Subject)))
i--
dAtA[i] = 0x1a
}
if len(m.Controller) > 0 {
i -= len(m.Controller)
copy(dAtA[i:], m.Controller)
i = encodeVarintState(dAtA, i, uint64(len(m.Controller)))
i--
dAtA[i] = 0x12
}
if m.Id != 0 {
i = encodeVarintState(dAtA, i, uint64(m.Id))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Macaroon) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Macaroon) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Macaroon) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Macaroon) > 0 {
i -= len(m.Macaroon)
copy(dAtA[i:], m.Macaroon)
i = encodeVarintState(dAtA, i, uint64(len(m.Macaroon)))
i--
dAtA[i] = 0x32
}
if m.ExpiryHeight != 0 {
i = encodeVarintState(dAtA, i, uint64(m.ExpiryHeight))
i--
dAtA[i] = 0x28
}
if len(m.Origin) > 0 {
i -= len(m.Origin)
copy(dAtA[i:], m.Origin)
i = encodeVarintState(dAtA, i, uint64(len(m.Origin)))
i--
dAtA[i] = 0x22
}
if len(m.Subject) > 0 {
i -= len(m.Subject)
copy(dAtA[i:], m.Subject)
i = encodeVarintState(dAtA, i, uint64(len(m.Subject)))
i--
dAtA[i] = 0x1a
}
if len(m.Controller) > 0 {
i -= len(m.Controller)
copy(dAtA[i:], m.Controller)
i = encodeVarintState(dAtA, i, uint64(len(m.Controller)))
i--
dAtA[i] = 0x12
}
if m.Id != 0 {
i = encodeVarintState(dAtA, i, uint64(m.Id))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Verification) Marshal() (dAtA []byte, err error) { func (m *Verification) Marshal() (dAtA []byte, err error) {
size := m.Size() size := m.Size()
dAtA = make([]byte, size) dAtA = make([]byte, size)
@@ -1019,6 +1305,64 @@ func (m *Controller) Size() (n int) {
return n return n
} }
func (m *Grant) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Id != 0 {
n += 1 + sovState(uint64(m.Id))
}
l = len(m.Controller)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
l = len(m.Subject)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
l = len(m.Origin)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
if m.ExpiryHeight != 0 {
n += 1 + sovState(uint64(m.ExpiryHeight))
}
return n
}
func (m *Macaroon) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Id != 0 {
n += 1 + sovState(uint64(m.Id))
}
l = len(m.Controller)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
l = len(m.Subject)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
l = len(m.Origin)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
if m.ExpiryHeight != 0 {
n += 1 + sovState(uint64(m.ExpiryHeight))
}
l = len(m.Macaroon)
if l > 0 {
n += 1 + l + sovState(uint64(l))
}
return n
}
func (m *Verification) Size() (n int) { func (m *Verification) Size() (n int) {
if m == nil { if m == nil {
return 0 return 0
@@ -2099,6 +2443,406 @@ func (m *Controller) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *Grant) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Grant: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Grant: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
m.Id = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Id |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Controller = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
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 ErrIntOverflowState
}
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
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 ErrIntOverflowState
}
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType)
}
m.ExpiryHeight = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ExpiryHeight |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipState(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Macaroon) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Macaroon: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Macaroon: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
}
m.Id = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Id |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Controller = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
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 ErrIntOverflowState
}
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Subject = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
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 ErrIntOverflowState
}
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Origin = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType)
}
m.ExpiryHeight = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ExpiryHeight |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Macaroon", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowState
}
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 ErrInvalidLengthState
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthState
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Macaroon = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipState(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthState
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Verification) Unmarshal(dAtA []byte) error { func (m *Verification) Unmarshal(dAtA []byte) error {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0
-62
View File
@@ -1,62 +0,0 @@
# `x/macaroon`
The Macaroon module is responsible for providing decentralized access control and service authorization for the Sonr ecosystem.
## Concepts
## State
Specify and describe structures expected to marshalled into the store, and their keys
### Account State
The Account state includes the user's public key, associated wallets, and other identification details. It is stored using the user's DID as the key.
### Credential State
The Credential state includes the claims about a subject and is stored using the credential ID as the key.
## State Transitions
Standard state transition operations triggered by hooks, messages, etc.
## Messages
Specify message structure(s) and expected state machine behaviour(s).
## Begin Block
Specify any begin-block operations.
## End Block
Specify any end-block operations.
## Hooks
Describe available hooks to be called by/from this module.
## Events
List and describe event tags used.
## Client
List and describe CLI commands and gRPC and REST endpoints.
## Params
List all module parameters, their types (in JSON) and identitys.
## Future Improvements
Describe future improvements of this module.
## Tests
Acceptance tests.
## Appendix
Supplementary details referenced elsewhere within the spec.
his is a module base generated with [`spawn`](https://github.com/rollchains/spawn).
-31
View File
@@ -1,31 +0,0 @@
package module
import (
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
modulev1 "github.com/onsonr/sonr/api/macaroon/v1"
)
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Query: &autocliv1.ServiceCommandDescriptor{
Service: modulev1.Query_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Params",
Use: "params",
Short: "Query the current consensus parameters",
},
},
},
Tx: &autocliv1.ServiceCommandDescriptor{
Service: modulev1.Msg_ServiceDesc.ServiceName,
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "UpdateParams",
Skip: false, // set to true if authority gated
},
},
},
}
}
-50
View File
@@ -1,50 +0,0 @@
package cli
import (
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/onsonr/sonr/x/macaroon/types"
)
// !NOTE: Must enable in module.go (disabled in favor of autocli.go)
func GetQueryCmd() *cobra.Command {
queryCmd := &cobra.Command{
Use: types.ModuleName,
Short: "Querying commands for " + types.ModuleName,
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
queryCmd.AddCommand(
GetCmdParams(),
)
return queryCmd
}
func GetCmdParams() *cobra.Command {
cmd := &cobra.Command{
Use: "params",
Short: "Show all module params",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)
res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{})
if err != nil {
return err
}
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
return cmd
}
-69
View File
@@ -1,69 +0,0 @@
package cli
import (
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/onsonr/sonr/x/macaroon/types"
)
// !NOTE: Must enable in module.go (disabled in favor of autocli.go)
// NewTxCmd returns a root CLI command handler for certain modules
// transaction commands.
func NewTxCmd() *cobra.Command {
txCmd := &cobra.Command{
Use: types.ModuleName,
Short: types.ModuleName + " subcommands.",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
txCmd.AddCommand(
MsgUpdateParams(),
)
return txCmd
}
// Returns a CLI command handler for registering a
// contract for the module.
func MsgUpdateParams() *cobra.Command {
cmd := &cobra.Command{
Use: "update-params [some-value]",
Short: "Update the params (must be submitted from the authority)",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
cliCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
senderAddress := cliCtx.GetFromAddress()
//
// someValue, err := strconv.ParseBool(args[0])
// if err != nil {
// return err
// }
msg := &types.MsgUpdateParams{
Authority: senderAddress.String(),
Params: types.Params{
// SomeValue: someValue,
},
}
if err := msg.Validate(); err != nil {
return err
}
return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg)
},
}
flags.AddTxFlagsToCmd(cmd)
return cmd
}

Some files were not shown because too many files have changed in this diff Show More