feature/1121 implement ucan validation (#1176)

- **refactor: remove unused auth components**
- **refactor: improve devbox configuration and deployment process**
- **refactor: improve devnet and testnet setup**
- **fix: update templ version to v0.2.778**
- **refactor: rename pkl/net.matrix to pkl/matrix.net**
- **refactor: migrate webapp components to nebula**
- **refactor: protobuf types**
- **chore: update dependencies for improved security and stability**
- **feat: implement landing page and vault gateway servers**
- **refactor: Migrate data models to new module structure and update
related files**
- **feature/1121-implement-ucan-validation**
- **refactor: Replace hardcoded constants with model types in attns.go**
- **feature/1121-implement-ucan-validation**
- **chore: add origin Host struct and update main function to handle
multiple hosts**
- **build: remove unused static files from dwn module**
- **build: remove unused static files from dwn module**
- **refactor: Move DWN models to common package**
- **refactor: move models to pkg/common**
- **refactor: move vault web app assets to embed module**
- **refactor: update session middleware import path**
- **chore: configure port labels and auto-forwarding behavior**
- **feat: enhance devcontainer configuration**
- **feat: Add UCAN middleware for Echo with flexible token validation**
- **feat: add JWT middleware for UCAN authentication**
- **refactor: update package URI and versioning in PklProject files**
- **fix: correct sonr.pkl import path**
- **refactor: move JWT related code to auth package**
- **feat: introduce vault configuration retrieval and management**
- **refactor: Move vault components to gateway module and update file
paths**
- **refactor: remove Dexie and SQLite database implementations**
- **feat: enhance frontend with PWA features and WASM integration**
- **feat: add Devbox features and streamline Dockerfile**
- **chore: update dependencies to include TigerBeetle**
- **chore(deps): update go version to 1.23**
- **feat: enhance devnet setup with PATH environment variable and
updated PWA manifest**
- **fix: upgrade tigerbeetle-go dependency and remove indirect
dependency**
- **feat: add PostgreSQL support to devnet and testnet deployments**
- **refactor: rename keyshare cookie to token cookie**
- **feat: upgrade Go version to 1.23.3 and update dependencies**
- **refactor: update devnet and testnet configurations**
- **feat: add IPFS configuration for devnet**
- **I'll help you update the ipfs.config.pkl to include all the peers
from the shell script. Here's the updated configuration:**
- **refactor: move mpc package to crypto directory**
- **feat: add BIP32 support for various cryptocurrencies**
- **feat: enhance ATN.pkl with additional capabilities**
- **refactor: simplify smart account and vault attenuation creation**
- **feat: add new capabilities to the Attenuation type**
- **refactor: Rename MPC files for clarity and consistency**
- **feat: add DIDKey support for cryptographic operations**
- **feat: add devnet and testnet deployment configurations**
- **fix: correct key derivation in bip32 package**
- **refactor: rename crypto/bip32 package to crypto/accaddr**
- **fix: remove duplicate indirect dependency**
- **refactor: move vault package to root directory**
- **refactor: update routes for gateway and vault**
- **refactor: remove obsolete web configuration file**
- **refactor: remove unused TigerBeetle imports and update host
configuration**
- **refactor: adjust styles directory path**
- **feat: add broadcastTx and simulateTx functions to gateway**
- **feat: add PinVault handler**
This commit is contained in:
Prad Nukala
2024-12-02 14:27:18 -05:00
committed by GitHub
parent 2a128af227
commit 31bcc21c35
535 changed files with 9357 additions and 10950 deletions
+281
View File
@@ -0,0 +1,281 @@
package pages
import "github.com/onsonr/sonr/pkg/webui/landing/models"
var header = &models.NavHeader{
Logo: &models.Image{
Src: "https://cdn.sonr.id/logo-ivory.svg",
Width: "20",
Height: "20",
},
Primary: &models.NavItem{
Text: "Get Access",
Href: "/register",
},
Items: []*models.NavItem{
{
Text: "Docs",
Href: "#",
},
{
Text: "Blog",
Href: "#",
},
{
Text: "Changelog",
Href: "#",
},
{
Text: "About",
Href: "#",
},
},
}
// hero is the (1st) home page hero section
var hero = &models.Hero{
TitleFirst: "Sonr puts",
TitleEmphasis: "digital identity",
TitleSecond: "back in your hands",
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.",
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: "+"},
},
}
// 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: "Crypto Wallet",
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,
Image: &models.Image{
Src: "",
Width: "44",
Height: "44",
},
},
{
Title: "PassKey Authenticator",
Desc: "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server.",
Icon: nil,
Image: &models.Image{
Src: "",
Width: "44",
Height: "44",
},
},
{
Title: "Anonymous Identity",
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,
Image: &models.Image{
Src: "",
Width: "44",
Height: "44",
},
},
{
Title: "Tokenized Authorization",
Desc: "Sonr anonymously associates your online identities with a Quantum-Resistant Vault which only you can access.",
Icon: nil,
Image: &models.Image{
Src: "",
Width: "44",
Height: "44",
},
},
},
}
// 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,
},
}
// 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: models.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: models.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: models.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: models.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: models.CrossChainBridge.Src(),
Width: "342",
Height: "280",
},
},
}
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: models.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: models.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: models.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: models.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: models.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: models.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: models.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: models.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.",
},
},
}
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",
},
}
+21
View File
@@ -0,0 +1,21 @@
package pages
import (
landing "github.com/onsonr/sonr/pkg/webui/landing/sections"
"github.com/onsonr/sonr/pkg/webui/styles/layout"
)
// View renders the home page
templ HomePage() {
@layout.NoBody("Sonr.ID", true) {
@landing.Header(header)
@landing.Hero(hero)
@landing.Highlights(highlights)
@landing.Mission(mission)
@landing.Architecture(arch)
@landing.Lowlights(lowlights)
@landing.CallToAction(cta)
@landing.Footer()
}
}
+121
View File
@@ -0,0 +1,121 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.793
package pages
//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 (
landing "github.com/onsonr/sonr/pkg/webui/landing/sections"
"github.com/onsonr/sonr/pkg/webui/styles/layout"
)
// View renders the home page
func HomePage() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Err = landing.Header(header).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = landing.Hero(hero).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = landing.Highlights(highlights).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = landing.Mission(mission).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = landing.Architecture(arch).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = landing.Lowlights(lowlights).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = landing.CallToAction(cta).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = landing.Footer().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
templ_7745c5c3_Err = layout.NoBody("Sonr.ID", true).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
+19
View File
@@ -0,0 +1,19 @@
package pages
import (
internal "github.com/onsonr/sonr/pkg/webui/landing/components"
"github.com/onsonr/sonr/pkg/webui/styles/layout"
"github.com/onsonr/sonr/pkg/webui/styles/view"
)
// RedirectModal returns the Modal with a QR code to scan.
templ RegisterPage() {
@view.FullScreenModal() {
<div class="relative text-center">
@internal.RegisterHeader()
@layout.Separator("Or Reserve Handle")
@internal.ReserveHandleForm()
</div>
@internal.RegisterFooter()
}
}
+85
View File
@@ -0,0 +1,85 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.793
package pages
//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 (
internal "github.com/onsonr/sonr/pkg/webui/landing/components"
"github.com/onsonr/sonr/pkg/webui/styles/layout"
"github.com/onsonr/sonr/pkg/webui/styles/view"
)
// RedirectModal returns the Modal with a QR code to scan.
func RegisterPage() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"relative text-center\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = internal.RegisterHeader().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = layout.Separator("Or Reserve Handle").Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = internal.ReserveHandleForm().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = internal.RegisterFooter().Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
templ_7745c5c3_Err = view.FullScreenModal().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate