diff --git a/.github/deploy/bootstrap.sh b/.github/deploy/bootstrap.sh
deleted file mode 100755
index 1fd7bdb..0000000
--- a/.github/deploy/bootstrap.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-
diff --git a/.github/deploy/devbox.json b/.github/deploy/devbox.json
deleted file mode 100644
index 4e34c27..0000000
--- a/.github/deploy/devbox.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.7/.schema/devbox.schema.json",
- "packages": ["go@latest", "cargo@latest", "uv@latest", "bun@latest"],
- "env": {
- "PATH": "$HOME/.cargo/bin:$HOME/go/bin:$HOME/.local/bin:$HOME/.bun/bin:$PATH",
- "GITHUB_TOKEN": "$GITHUB_TOKEN",
- "GOPATH": "$HOME/go",
- "GOBIN": "$GOPATH/bin",
- "GHQ_ROOT": "$CLONEDIR"
- },
- "shell": {
- "init_hook": [],
- "scripts": {
- "test": ["echo \"Error: no test specified\" && exit 1"]
- }
- }
-}
diff --git a/.github/deploy/process-compose.yaml b/.github/deploy/process-compose.yaml
deleted file mode 100644
index 4f72402..0000000
--- a/.github/deploy/process-compose.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-version: "0.5"
-
-processes:
- IPFS:
- namespace: testnet
- command: "ipfs daemon --mount"
- ready_log_line: "Daemon is ready"
-
- Sonr:
- namespace: testnet
- command: "task sonrd:start"
- depends_on:
- IPFS:
- condition: process_log_ready
-
- Hway:
- namespace: testnet
- command: "hway"
- depends_on:
- IPFS:
- condition: process_log_ready
- Sonr:
- condition: process_started
diff --git a/.gitignore b/.gitignore
index 378a742..4b99b82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,19 @@
.DS_Store
+.tmp*
+go.work
.aider*
.vscode
.idea
bin
tmp
dist
+node_modules
+deploy/conf
+configs/logs.json
+go.work
+go.work.sum
+!.taskfile.yml
+!.taskfile.dist.yml
# Aider related generated files
.aider-context
@@ -99,19 +108,18 @@ cmd/gateway/node_modules
pkg/nebula/node_modules
configs/logs.json
-mprocs.yaml
!devbox.lock
!buf.lock
.air.toml
-mprocs.yaml
mprocs.log
tools-stamp
deploy/conf
*.aiderscript
*.wasm
-
interchaintest-downloader
.haptic
+packages/vault/.parcel-cache
+packages/vault/.parcel-cache
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
deleted file mode 100644
index 0bd8375..0000000
--- a/.goreleaser.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
-version: 2
-project_name: motr
-builds:
- - id: motr
- binary: app
- goos:
- - js
- goarch:
- - wasm
-
-release:
- github:
- owner: sonr-io
- name: motr
- name_template: "{{ .Tag }} | {{ .Env.RELEASE_DATE }}"
- draft: false
- replace_existing_draft: true
- replace_existing_artifacts: true
- extra_files:
- - glob: ./README*
-
-announce:
- telegram:
- enabled: true
- chat_id: -1002222617755
diff --git a/README.md b/README.md
index 1ad96c2..b04bd6a 100644
--- a/README.md
+++ b/README.md
@@ -11,66 +11,95 @@ Motr is Sonr's decentralized vault and identity management system. It provides s
- **Progressive Web App**: Works online and offline with service worker integration
- **WASM Architecture**: Core functionality compiled to WebAssembly for cross-platform compatibility
- **Local-First Design**: Data stored locally with sync capabilities to the Sonr blockchain
+- **Containerized Deployment**: Docker-based deployment for all components
## Installation
+### Standard Installation
+
```bash
git clone https://github.com/sonr-io/motr.git
cd motr
go mod tidy
```
+### Docker Installation
+
+```bash
+git clone https://github.com/sonr-io/motr.git
+cd motr
+docker-compose up -d
+```
+
## Usage
+### Run Using Docker
+
+The simplest way to run the full Motr system is with Docker Compose:
+
+```bash
+# Start all services
+docker-compose up -d
+
+# View logs
+docker-compose logs -f
+
+# Stop services
+docker-compose down
+```
+
### Run as a Local Server
```go
package main
import (
- "database/sql"
- "log"
-
- "github.com/sonr-io/motr/app"
- "github.com/sonr-io/motr/pkg/models"
- "github.com/sonr-io/motr/pkg/types"
+ "database/sql"
+ "log"
+
+ "github.com/sonr-io/motr/app"
+ "github.com/sonr-io/motr/pkg/models"
+ "github.com/sonr-io/motr/pkg/types"
)
func main() {
- dbq, err := setupDatabase()
- if err != nil {
- log.Fatal(err)
- }
-
- config := &types.Config{
- MotrToken: "your-token",
- SonrChainID: "sonr-testnet-1",
- // Other configuration options
- }
-
- vault, err := app.New(config, dbq)
- if err != nil {
- log.Fatal(err)
- }
-
- // Start the server
- vault.Start(":8080")
+ dbq, err := setupDatabase()
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ config := &types.Config{
+ MotrToken: "your-token",
+ SonrChainID: "sonr-testnet-1",
+ // Other configuration options
+ }
+
+ vault, err := app.New(config, dbq)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // Start the server
+ vault.Start(":8080")
}
func setupDatabase() (*models.Queries, error) {
- // Initialize your database connection
- // ...
+ // Initialize your database connection
+ // ...
}
```
### Compile to WebAssembly
```sh
-# Build the vault application as WASM
-GOOS=js GOARCH=wasm go build -o public/app.wasm ./cmd/vault/main.go
+# Build the signer as WASM
+GOOS=js GOARCH=wasm go build -o build/signer.wasm ./cmd/signer/main.go
-# Build the proxy application for Cloudflare Workers
-GOOS=js GOARCH=wasm go build -o workers/proxy.wasm ./cmd/proxy/main.go
+# Build the controller application as WASM
+GOOS=js GOARCH=wasm go build -o build/controller.wasm ./controller/main.go
+
+# Build the resolver application for Cloudflare Workers
+GOOS=js GOARCH=wasm go build -o build/resolver.wasm ./resolver/main.go
```
### Progressive Web App Integration
@@ -86,18 +115,38 @@ Motr can be integrated into progressive web applications, providing:
Motr consists of several components:
-- **Echo Server**: REST API for authentication and account management
-- **WASM Runtime**: Core logic compiled to WebAssembly
+- **Controller**: Manages WebAuthn credential creation and verification
+- **Resolver**: Handles name resolution and identity lookups
+- **Signer**: WebAssembly-based cryptographic operations for secure signing
- **Service Worker**: Handles offline capabilities and request caching
- **IndexedDB Storage**: Local data persistence
- **Sonr Blockchain Integration**: Identity verification and data synchronization
+### Component Details
+
+1. **Controller**
+
+ - Manages user credentials and authentication
+ - Integrates with WebAuthn for credential storage
+ - Containerized for easy deployment
+
+2. **Resolver**
+
+ - Resolves Sonr names to addresses and profiles
+ - Serves as a gateway to the Sonr network
+ - Implemented as a Cloudflare Worker
+
+3. **Signer**
+ - Secure cryptographic operations
+ - WebAssembly-based for cross-platform compatibility
+ - Handles key management and signatures
+
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
-[MIT](LICENSE)
+[MIT](LICENSE)
Copyright (c) 2024, Sonr Labs, Inc.
diff --git a/Taskfile.yml b/Taskfile.yml
index 6c2b008..5b0e9ac 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -1,66 +1,120 @@
-# yaml-language-server: $schema=https://json.schemastore.org/taskfile
+#yaml-language-server: $schema=https://json.schemastore.org/taskfile
version: "3"
silent: true
-
-# vars:
-# VERSION:
-# sh: git describe --tags
-# COMMIT:
-# sh: git log -1 --format='%H'
-#
+vars:
+ ROOT_DIR:
+ sh: git rev-parse --show-toplevel
tasks:
- default:
+ clean:
+ desc: Remove build artifacts
cmds:
- - task: gen:templ
- - task: gen:sqlc
- - task: build
+ - task: tidy:vault
+ - task: tidy:front
+ - task: tidy:root
- gen:templ:
- desc: Generate code
- sources:
- - "**/*.templ"
- generates:
- - "**/*_templ.go"
+ deploy:
+ desc: Deploy all
cmds:
- - templ generate
-
- gen:sqlc:
- desc: Generate code
- sources:
- - x/**/model/*.sql
- generates:
- - x/**/model/*.go
- cmds:
- - sqlc generate -f "x/identity/model/sqlc.yaml"
- - sqlc generate -f "x/portfolio/model/sqlc.yaml"
- - sqlc generate -f "x/user/model/sqlc.yaml"
+ - task: deploy:vault
+ - task: deploy:front
build:
- desc: Build
- watch: true
+ desc: Build all
+ cmds:
+ - task: build:vault
+ - task: build:front
+
+ start:vault:
+ desc: Start the vault
+ dir: "{{.ROOT_DIR}}/cmd/vault"
+ cmd: bun run start
+
+ start:front:
+ desc: Start the frontend
+ dir: "{{.ROOT_DIR}}/cmd/front"
+ cmd: bun run start
+
+ build:vault:
+ desc: Build the vault
+ dir: "{{.ROOT_DIR}}/cmd/vault"
+ cmd: bun run build
sources:
- - "**/*.go"
+ - main.go
generates:
- - web/app.wasm
- deps:
- - task: gen:templ
+ - build/app.wasm
+
+ build:front:
+ desc: Build the frontend
+ dir: "{{.ROOT_DIR}}/cmd/front"
+ cmd: bun run build
+ sources:
+ - main.go
+ generates:
+ - build/app.wasm
+
+ deploy:vault:
+ desc: Deploy the vault
+ dir: "{{.ROOT_DIR}}/cmd/vault"
+ cmds:
+ - bun run deploy
+
+ deploy:front:
+ desc: Deploy the frontend
+ dir: "{{.ROOT_DIR}}/cmd/front"
+ cmd: bun run deploy
+
+ gen:templ:
+ desc: Generate templ
+ cmds:
+ - templ generate
+ - rm -rf .task
+
+ gen:sqlc:
+ desc: Generate sqlc
+ cmd: sqlc generate
+
+ db:migrate:
+ desc: Migrate the database
+ prompt:
+ - Are you sure you want to run this command? This will delete all data in the database.
+ cmds:
+ - task: migrate:d1
- task: gen:sqlc
- vars:
- TIME:
- sh: date
- cmds:
- - rm -rf web/vault.wasm
- - GOOS=js GOARCH=wasm go build -o web/vault.wasm .
- - gum log --time rfc822 --level info "[BUILD] WASM Complete"
- serve:
- desc: Serve
- dir: web
- cmds:
- - bunx live-server
+ migrate:d1:
+ internal: true
+ desc: Migrate the common database
+ dir: "{{.ROOT_DIR}}/cmd/vault"
+ cmd: npm run migrate
+ sources:
+ - schema.sql
+ generates:
+ - schema.sql
- test:
- desc: Test
+
+ tidy:vault:
+ desc: Go mod tidy the vault
+ internal: true
+ dir: "{{.ROOT_DIR}}/cmd/vault"
cmds:
- - go test -v ./...
+ - bun run clean
+ - rm -rf ./build
+ - rm -rf ./dist
+
+ tidy:front:
+ desc: Go mod tidy the frontend
+ internal: true
+ dir: "{{.ROOT_DIR}}/cmd/front"
+ cmds:
+ - bun run clean
+ - rm -rf ./build
+ - rm -rf ./dist
+
+ tidy:root:
+ desc: Go mod tidy the root
+ internal: true
+ dir: "{{.ROOT_DIR}}"
+ cmds:
+ - go mod tidy
+ - rm -rf .task
diff --git a/app/app.go b/app/app.go
deleted file mode 100644
index d0d0851..0000000
--- a/app/app.go
+++ /dev/null
@@ -1,50 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package app
-
-import (
- "encoding/json"
-
- "github.com/labstack/echo/v4"
-)
-
-// New returns a new App instance
-func New(opts ...Option) (*App, error) {
- o := baseOptions()
- for _, opt := range opts {
- opt(o)
- }
- e := o.applyDefaults()
- //
- // identity.RegisterRoutes(e, o.conn.Identity)
- // portfolio.RegisterRoutes(e, o.conn.Portfolio)
- // user.RegisterRoutes(e, o.conn.User)
-
- return &App{
- Config: o.cfg,
- Database: o.conn,
- Echo: e,
- }, nil
-}
-
-// handleIndex returns a simple JSON response
-func handleIndex(c echo.Context) error {
- params := make(map[string]string)
- if err := json.NewDecoder(c.Request().Body).Decode(¶ms); err != nil {
- return c.JSON(400, map[string]string{"message": err.Error()})
- }
-
- c.Response().Header().Set("Content-Type", "application/json")
- return c.JSON(200, map[string]string{"message": "Hello, World!"})
-}
-
-// handleError returns a simple JSON response
-func handleError() echo.HTTPErrorHandler {
- return func(err error, c echo.Context) {
- if he, ok := err.(*echo.HTTPError); ok {
- // Log the error if needed
- c.Logger().Errorf("Error: %v", he.Message)
- }
- }
-}
diff --git a/app/options.go b/app/options.go
deleted file mode 100644
index f4b674f..0000000
--- a/app/options.go
+++ /dev/null
@@ -1,65 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package app
-
-import (
- "github.com/labstack/echo/v4"
- echomiddleware "github.com/labstack/echo/v4/middleware"
- "github.com/onsonr/motr/pkg/config"
-)
-
-type App struct {
- Config *config.MotrConfig
- Database *config.DBConnection
- Echo *echo.Echo
-}
-
-type Options struct {
- conn *config.DBConnection
- cfg *config.MotrConfig
- mdws []echo.MiddlewareFunc
-}
-
-func (o *Options) applyDefaults() *echo.Echo {
- e := echo.New()
- e.IPExtractor = echo.ExtractIPDirect()
- e.HTTPErrorHandler = handleError()
- for _, mdw := range o.mdws {
- e.Use(mdw)
- }
- e.POST("/", handleIndex)
- return e
-}
-
-func baseOptions() *Options {
- return &Options{
- mdws: []echo.MiddlewareFunc{
- echomiddleware.Logger(),
- echomiddleware.Recover(),
- },
- }
-}
-
-type Option func(*Options)
-
-// WithConfig sets the configuration for the application
-func WithConfig(cfg *config.MotrConfig) func(*Options) {
- return func(o *Options) {
- o.cfg = cfg
- }
-}
-
-// WithDatabase sets the database connection for the application
-func WithDatabase(conn *config.DBConnection) func(*Options) {
- return func(o *Options) {
- o.conn = conn
- }
-}
-
-// WithMiddleware sets the middleware for the application
-func WithMiddleware(mdws ...echo.MiddlewareFunc) func(*Options) {
- return func(o *Options) {
- o.mdws = append(o.mdws, mdws...)
- }
-}
diff --git a/cmd/front/.gitignore b/cmd/front/.gitignore
new file mode 100644
index 0000000..63d5b35
--- /dev/null
+++ b/cmd/front/.gitignore
@@ -0,0 +1,5 @@
+build
+node_modules
+.wrangler
+
+.dev.vars*
diff --git a/cmd/front/main.go b/cmd/front/main.go
new file mode 100644
index 0000000..0b4ac70
--- /dev/null
+++ b/cmd/front/main.go
@@ -0,0 +1,27 @@
+//go:build js && wasm
+// +build js,wasm
+
+package main
+
+import (
+ "github.com/sonr-io/motr/handlers/auth"
+ "github.com/sonr-io/motr/handlers/landing"
+ "github.com/sonr-io/motr/internal/config"
+ "github.com/sonr-io/motr/internal/middleware"
+)
+
+func main() {
+ // Setup config
+ e, c := config.New()
+ e.Use(middleware.UseSession(c), middleware.UseCloudflareCache(c))
+
+ // Register controllers
+ if err := landing.Register(c, e); err != nil {
+ panic(err)
+ }
+ if err := auth.Register(c, e); err != nil {
+ panic(err)
+ }
+ // Start server
+ e.Serve()
+}
diff --git a/cmd/front/package-lock.json b/cmd/front/package-lock.json
new file mode 100644
index 0000000..57dc892
--- /dev/null
+++ b/cmd/front/package-lock.json
@@ -0,0 +1,1540 @@
+{
+ "name": "@sonr-io/motr-front",
+ "version": "0.0.1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "@sonr-io/motr-front",
+ "version": "0.0.1",
+ "devDependencies": {
+ "wrangler": "^4.10.0"
+ }
+ },
+ "node_modules/@cloudflare/kv-asset-handler": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.0.tgz",
+ "integrity": "sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "dependencies": {
+ "mime": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@cloudflare/unenv-preset": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.3.1.tgz",
+ "integrity": "sha512-Xq57Qd+ADpt6hibcVBO0uLG9zzRgyRhfCUgBT9s+g3+3Ivg5zDyVgLFy40ES1VdNcu8rPNSivm9A+kGP5IVaPg==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "peerDependencies": {
+ "unenv": "2.0.0-rc.15",
+ "workerd": "^1.20250320.0"
+ },
+ "peerDependenciesMeta": {
+ "workerd": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@cloudflare/workerd-darwin-64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250416.0.tgz",
+ "integrity": "sha512-aZgF8Swp9eVYxJPWOoZbAgAaYjWuYqGmEA+QJ2ecRGDBqm87rT4GEw7/mmLpxrpllny3VfEEhkk9iYCGv8nlFw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-darwin-arm64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250416.0.tgz",
+ "integrity": "sha512-FhswG1QYRfaTZ4FAlUkfVWaoM2lrlqumiBTrhbo9czMJdGR/oBXS4SGynuI6zyhApHeBf3/fZpA/SBAe4cXdgg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-linux-64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250416.0.tgz",
+ "integrity": "sha512-G+nXEAJ/9y+A857XShwxKeRdfxok6UcjiQe6G+wQeCn/Ofkp/EWydacKdyeVU6QIm1oHS78DwJ7AzbCYywf9aw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-linux-arm64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250416.0.tgz",
+ "integrity": "sha512-U6oVW0d9w1fpnDYNrjPJ9SFkDlGJWJWbXHlTBObXl6vccP16WewvuxyHkKqyUhUc8hyBaph7sxeKzKmuCFQ4SA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-windows-64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250416.0.tgz",
+ "integrity": "sha512-YAjjTzL1z9YYeN4sqYfj1dtQXd2Bblj+B+hl4Rz2aOhblpZEZAdhapZlOCRvLLkOJshKJUnRD3mDlytAdgwybQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz",
+ "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz",
+ "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz",
+ "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz",
+ "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz",
+ "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz",
+ "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz",
+ "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz",
+ "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz",
+ "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz",
+ "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz",
+ "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz",
+ "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz",
+ "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz",
+ "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz",
+ "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz",
+ "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz",
+ "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz",
+ "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz",
+ "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz",
+ "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz",
+ "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz",
+ "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz",
+ "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz",
+ "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz",
+ "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz",
+ "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@fastify/busboy": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
+ "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz",
+ "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz",
+ "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz",
+ "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz",
+ "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz",
+ "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz",
+ "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-s390x": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz",
+ "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-x64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz",
+ "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz",
+ "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz",
+ "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz",
+ "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm": "1.0.5"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz",
+ "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-s390x": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz",
+ "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-s390x": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz",
+ "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-x64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-arm64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz",
+ "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz",
+ "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-wasm32": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz",
+ "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/runtime": "^1.2.0"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-ia32": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz",
+ "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz",
+ "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.14.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
+ "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
+ "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/as-table": {
+ "version": "1.0.55",
+ "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz",
+ "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "printable-characters": "^1.0.42"
+ }
+ },
+ "node_modules/blake3-wasm": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz",
+ "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/color": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
+ "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "color-convert": "^2.0.1",
+ "color-string": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=12.5.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/color-string": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
+ "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "color-name": "^1.0.0",
+ "simple-swizzle": "^0.2.2"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/data-uri-to-buffer": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz",
+ "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/defu": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
+ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/detect-libc": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
+ "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz",
+ "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.25.2",
+ "@esbuild/android-arm": "0.25.2",
+ "@esbuild/android-arm64": "0.25.2",
+ "@esbuild/android-x64": "0.25.2",
+ "@esbuild/darwin-arm64": "0.25.2",
+ "@esbuild/darwin-x64": "0.25.2",
+ "@esbuild/freebsd-arm64": "0.25.2",
+ "@esbuild/freebsd-x64": "0.25.2",
+ "@esbuild/linux-arm": "0.25.2",
+ "@esbuild/linux-arm64": "0.25.2",
+ "@esbuild/linux-ia32": "0.25.2",
+ "@esbuild/linux-loong64": "0.25.2",
+ "@esbuild/linux-mips64el": "0.25.2",
+ "@esbuild/linux-ppc64": "0.25.2",
+ "@esbuild/linux-riscv64": "0.25.2",
+ "@esbuild/linux-s390x": "0.25.2",
+ "@esbuild/linux-x64": "0.25.2",
+ "@esbuild/netbsd-arm64": "0.25.2",
+ "@esbuild/netbsd-x64": "0.25.2",
+ "@esbuild/openbsd-arm64": "0.25.2",
+ "@esbuild/openbsd-x64": "0.25.2",
+ "@esbuild/sunos-x64": "0.25.2",
+ "@esbuild/win32-arm64": "0.25.2",
+ "@esbuild/win32-ia32": "0.25.2",
+ "@esbuild/win32-x64": "0.25.2"
+ }
+ },
+ "node_modules/exit-hook": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz",
+ "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/exsolve": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.5.tgz",
+ "integrity": "sha512-pz5dvkYYKQ1AHVrgOzBKWeP4u4FRb3a6DNK2ucr0OoNwYIU4QWsJ+NM36LLzORT+z845MzKHHhpXiUF5nvQoJg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/get-source": {
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz",
+ "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==",
+ "dev": true,
+ "license": "Unlicense",
+ "dependencies": {
+ "data-uri-to-buffer": "^2.0.0",
+ "source-map": "^0.6.1"
+ }
+ },
+ "node_modules/glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true,
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
+ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/mime": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
+ "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/miniflare": {
+ "version": "4.20250416.0",
+ "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20250416.0.tgz",
+ "integrity": "sha512-261PhPgD9zs5/BTdbWqwiaXtWxb+Av5zKCwTU+HXrA5E4tf3qnULwh3u6SVUOAEArEroFuKJzawsQ9COtNBurQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cspotcode/source-map-support": "0.8.1",
+ "acorn": "8.14.0",
+ "acorn-walk": "8.3.2",
+ "exit-hook": "2.2.1",
+ "glob-to-regexp": "0.4.1",
+ "stoppable": "1.1.0",
+ "undici": "^5.28.5",
+ "workerd": "1.20250416.0",
+ "ws": "8.18.0",
+ "youch": "3.3.4",
+ "zod": "3.22.3"
+ },
+ "bin": {
+ "miniflare": "bootstrap.js"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/mustache": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
+ "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "mustache": "bin/mustache"
+ }
+ },
+ "node_modules/ohash": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz",
+ "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/path-to-regexp": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
+ "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/pathe": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/printable-characters": {
+ "version": "1.0.42",
+ "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz",
+ "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==",
+ "dev": true,
+ "license": "Unlicense"
+ },
+ "node_modules/semver": {
+ "version": "7.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
+ "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
+ "dev": true,
+ "license": "ISC",
+ "optional": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sharp": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
+ "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "dependencies": {
+ "color": "^4.2.3",
+ "detect-libc": "^2.0.3",
+ "semver": "^7.6.3"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-darwin-arm64": "0.33.5",
+ "@img/sharp-darwin-x64": "0.33.5",
+ "@img/sharp-libvips-darwin-arm64": "1.0.4",
+ "@img/sharp-libvips-darwin-x64": "1.0.4",
+ "@img/sharp-libvips-linux-arm": "1.0.5",
+ "@img/sharp-libvips-linux-arm64": "1.0.4",
+ "@img/sharp-libvips-linux-s390x": "1.0.4",
+ "@img/sharp-libvips-linux-x64": "1.0.4",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.4",
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.4",
+ "@img/sharp-linux-arm": "0.33.5",
+ "@img/sharp-linux-arm64": "0.33.5",
+ "@img/sharp-linux-s390x": "0.33.5",
+ "@img/sharp-linux-x64": "0.33.5",
+ "@img/sharp-linuxmusl-arm64": "0.33.5",
+ "@img/sharp-linuxmusl-x64": "0.33.5",
+ "@img/sharp-wasm32": "0.33.5",
+ "@img/sharp-win32-ia32": "0.33.5",
+ "@img/sharp-win32-x64": "0.33.5"
+ }
+ },
+ "node_modules/simple-swizzle": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
+ "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "is-arrayish": "^0.3.1"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/stacktracey": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz",
+ "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==",
+ "dev": true,
+ "license": "Unlicense",
+ "dependencies": {
+ "as-table": "^1.0.36",
+ "get-source": "^2.0.12"
+ }
+ },
+ "node_modules/stoppable": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz",
+ "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "dev": true,
+ "license": "0BSD",
+ "optional": true
+ },
+ "node_modules/ufo": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
+ "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/undici": {
+ "version": "5.29.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
+ "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@fastify/busboy": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.0"
+ }
+ },
+ "node_modules/unenv": {
+ "version": "2.0.0-rc.15",
+ "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.15.tgz",
+ "integrity": "sha512-J/rEIZU8w6FOfLNz/hNKsnY+fFHWnu9MH4yRbSZF3xbbGHovcetXPs7sD+9p8L6CeNC//I9bhRYAOsBt2u7/OA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "defu": "^6.1.4",
+ "exsolve": "^1.0.4",
+ "ohash": "^2.0.11",
+ "pathe": "^2.0.3",
+ "ufo": "^1.5.4"
+ }
+ },
+ "node_modules/workerd": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20250416.0.tgz",
+ "integrity": "sha512-Yrx/bZAKbmSvomdTAzzIpOHwpYhs0ldr2wqed22UEhQ0mIplAHY4xmY+SjAJhP/TydZrciOVzBxwM1+4T40KNA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "workerd": "bin/workerd"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "optionalDependencies": {
+ "@cloudflare/workerd-darwin-64": "1.20250416.0",
+ "@cloudflare/workerd-darwin-arm64": "1.20250416.0",
+ "@cloudflare/workerd-linux-64": "1.20250416.0",
+ "@cloudflare/workerd-linux-arm64": "1.20250416.0",
+ "@cloudflare/workerd-windows-64": "1.20250416.0"
+ }
+ },
+ "node_modules/wrangler": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.12.0.tgz",
+ "integrity": "sha512-4rfAXOi5KqM3ECvOrZJ97k3zEqxVwtdt4bijd8jcRBZ6iJYvEtjgjVi4TsfkVa/eXGhpfHTUnKu2uk8UHa8M2w==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "dependencies": {
+ "@cloudflare/kv-asset-handler": "0.4.0",
+ "@cloudflare/unenv-preset": "2.3.1",
+ "blake3-wasm": "2.1.5",
+ "esbuild": "0.25.2",
+ "miniflare": "4.20250416.0",
+ "path-to-regexp": "6.3.0",
+ "unenv": "2.0.0-rc.15",
+ "workerd": "1.20250416.0"
+ },
+ "bin": {
+ "wrangler": "bin/wrangler.js",
+ "wrangler2": "bin/wrangler.js"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2",
+ "sharp": "^0.33.5"
+ },
+ "peerDependencies": {
+ "@cloudflare/workers-types": "^4.20250415.0"
+ },
+ "peerDependenciesMeta": {
+ "@cloudflare/workers-types": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
+ "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/youch": {
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.4.tgz",
+ "integrity": "sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cookie": "^0.7.1",
+ "mustache": "^4.2.0",
+ "stacktracey": "^2.1.8"
+ }
+ },
+ "node_modules/zod": {
+ "version": "3.22.3",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.3.tgz",
+ "integrity": "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/cmd/front/package.json b/cmd/front/package.json
new file mode 100644
index 0000000..3b78929
--- /dev/null
+++ b/cmd/front/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "@sonr-io/motr-front",
+ "version": "0.0.1",
+ "private": true,
+ "scripts": {
+ "build": "npm run clean && npm run assets && npm run wasm",
+ "assets": "go run github.com/syumai/workers/cmd/workers-assets-gen -mode=go",
+ "wasm": "GOOS=js GOARCH=wasm go build -o ./build/app.wasm .",
+ "deploy": "wrangler deploy",
+ "start": "wrangler dev",
+ "clean": "rm -rf ./build && rm -rf .wrangler && rm -rf ./dist && rm -rf ./node_modules && npm install"
+ },
+ "devDependencies": {
+ "wrangler": "^4.10.0"
+ }
+}
diff --git a/cmd/front/wrangler.toml b/cmd/front/wrangler.toml
new file mode 100644
index 0000000..7deffb6
--- /dev/null
+++ b/cmd/front/wrangler.toml
@@ -0,0 +1,47 @@
+# Top-level configuration
+name = "motr-front"
+main = "build/worker.mjs"
+compatibility_date = "2025-04-14"
+
+routes = [
+ { pattern = "sonr.id", custom_domain = true },
+]
+
+[build]
+command = "npm run build"
+
+[dev]
+port = 8787
+
+[vars]
+SONR_CHAIN_ID = 'sonr-testnet-1'
+IPFS_GATEWAY = 'https://ipfs.sonr.land'
+SONR_API_URL = 'https://api.sonr.land'
+SONR_RPC_URL = 'https://rpc.sonr.land'
+SONR_GRPC_URL = 'https://grpc.sonr.id'
+MATRIX_SERVER = 'https://bm.chat'
+MOTR_GATEWAY = 'https://sonr.id'
+MOTR_VAULT = 'https://did.run'
+MOTR_MODE = 'resolver'
+
+[observability]
+enabled = true
+logpush = true
+
+[[r2_buckets]]
+binding = 'PROFILES'
+bucket_name = 'profiles'
+
+[[d1_databases]]
+binding = "DB" # available in your Worker on env.DB
+database_name = "motr-db"
+database_id = "abc70ab3-32ce-4600-9b15-a452f92b7987"
+
+[[kv_namespaces]]
+binding = "SESSIONS" # available in your Worker on env.KV
+id = "ea5de66fcfc14b5eba170395e29432ee"
+
+[[kv_namespaces]]
+binding = "HANDLES" # available in your Worker on env.KV
+id = "271d47087a8842b2aac5ee79cf7bb203"
+
diff --git a/cmd/vault/.gitignore b/cmd/vault/.gitignore
new file mode 100644
index 0000000..63d5b35
--- /dev/null
+++ b/cmd/vault/.gitignore
@@ -0,0 +1,5 @@
+build
+node_modules
+.wrangler
+
+.dev.vars*
diff --git a/cmd/vault/main.go b/cmd/vault/main.go
new file mode 100644
index 0000000..59d6437
--- /dev/null
+++ b/cmd/vault/main.go
@@ -0,0 +1,24 @@
+//go:build js && wasm
+// +build js,wasm
+
+package main
+
+import (
+ "github.com/sonr-io/motr/handlers/auth"
+ "github.com/sonr-io/motr/internal/config"
+ "github.com/sonr-io/motr/internal/middleware"
+)
+
+func main() {
+ // Setup config
+ e, c := config.New()
+ e.Use(middleware.UseSession(c), middleware.UseCloudflareCache(c))
+
+ // Register controllers
+ if err := auth.Register(c, e); err != nil {
+ panic(err)
+ }
+
+ // Start server
+ e.Serve()
+}
diff --git a/cmd/vault/package-lock.json b/cmd/vault/package-lock.json
new file mode 100644
index 0000000..1d42d15
--- /dev/null
+++ b/cmd/vault/package-lock.json
@@ -0,0 +1,6433 @@
+{
+ "name": "@sonr-io/motr-vault",
+ "version": "0.0.1",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "@sonr-io/motr-vault",
+ "version": "0.0.1",
+ "dependencies": {
+ "@extism/extism": "^2.0.0-rc11",
+ "@helia/dag-cbor": "^1.0.1",
+ "@helia/dag-json": "^1.0.1",
+ "@helia/json": "^1.0.1",
+ "@helia/strings": "^1.0.1",
+ "@helia/unixfs": "^1.4.1",
+ "helia": "^2.1.0",
+ "sonr-cosmes": "^0.0.5"
+ },
+ "devDependencies": {
+ "wrangler": "^4.10.0"
+ }
+ },
+ "node_modules/@achingbrain/nat-port-mapper": {
+ "version": "1.0.18",
+ "resolved": "https://registry.npmjs.org/@achingbrain/nat-port-mapper/-/nat-port-mapper-1.0.18.tgz",
+ "integrity": "sha512-B3sD+1KmD6qtmnCSdTtoMIwsw5Lj8XNDWnPakXnChm92eaFO7JRfS76oCts6iMFttJzOHq7FT0sNY7sDcbvosA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@achingbrain/ssdp": "^4.0.1",
+ "@libp2p/logger": "^5.0.1",
+ "default-gateway": "^7.2.2",
+ "err-code": "^3.0.1",
+ "it-first": "^3.0.1",
+ "p-defer": "^4.0.0",
+ "p-timeout": "^6.1.1",
+ "xml2js": "^0.6.0"
+ }
+ },
+ "node_modules/@achingbrain/nat-port-mapper/node_modules/@libp2p/interface": {
+ "version": "2.9.0",
+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.9.0.tgz",
+ "integrity": "sha512-L/0Z5H0mjaECA0jkZG+OJmEhB/OIJ07gzZYljU7C19XjL3dSkBvhA9il+G3FpHyHgqAOVGuQU5qkbv2Edj8FIA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@multiformats/multiaddr": "^12.3.3",
+ "it-pushable": "^3.2.3",
+ "it-stream-types": "^2.0.2",
+ "multiformats": "^13.3.1",
+ "progress-events": "^1.0.1",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/@achingbrain/nat-port-mapper/node_modules/@libp2p/logger": {
+ "version": "5.1.15",
+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.1.15.tgz",
+ "integrity": "sha512-0+rOHEXXDNZvsb9p04jVAFQB0WcvMxFfqzSe271/tg4yVlPF5H99l5BwOqeb+EYhHV1lTk+zrJdPK9easHr1fQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^2.9.0",
+ "@multiformats/multiaddr": "^12.3.3",
+ "interface-datastore": "^8.3.1",
+ "multiformats": "^13.3.1",
+ "weald": "^1.0.4"
+ }
+ },
+ "node_modules/@achingbrain/nat-port-mapper/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@achingbrain/ssdp": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/@achingbrain/ssdp/-/ssdp-4.2.2.tgz",
+ "integrity": "sha512-Lp/IKQY4Gu+2yKmUtlSKYAEdjtP7Zz1MZ3ihDE3o2IdU5WgSBHDi+gOcbmCI74v8PWCqAGT/CYxwMOWqtDgbUg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "abort-error": "^1.0.0",
+ "freeport-promise": "^2.0.0",
+ "merge-options": "^3.0.4",
+ "xml2js": "^0.6.2"
+ }
+ },
+ "node_modules/@assemblyscript/loader": {
+ "version": "0.9.4",
+ "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",
+ "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@bufbuild/protobuf": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-1.2.0.tgz",
+ "integrity": "sha512-MBVuQMOBHxgGnZ9XCUIi8WOy5O/T4ma3TduCRhRvndv3UDbG9cHgd8h6nOYSGyBYPEvXf1z9nTwhp8mVIDbq2g==",
+ "license": "(Apache-2.0 AND BSD-3-Clause)",
+ "peer": true
+ },
+ "node_modules/@chainsafe/as-chacha20poly1305": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/@chainsafe/as-chacha20poly1305/-/as-chacha20poly1305-0.1.0.tgz",
+ "integrity": "sha512-BpNcL8/lji/GM3+vZ/bgRWqJ1q5kwvTFmGPk7pxm/QQZDbaMI98waOHjEymTjq2JmdD/INdNBFOVSyJofXg7ew==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@chainsafe/as-sha256": {
+ "version": "0.4.2",
+ "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.4.2.tgz",
+ "integrity": "sha512-HJ8GZBRjLeWtRsAXf3EbNsNzmTGpzTFjfpSf4yHkLYC+E52DhT6hwz+7qpj6I/EmFzSUm5tYYvT9K8GZokLQCQ==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/@chainsafe/is-ip": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@chainsafe/is-ip/-/is-ip-2.1.0.tgz",
+ "integrity": "sha512-KIjt+6IfysQ4GCv66xihEitBjvhU/bixbbbFxdJ1sqCp4uJ0wuZiYBPhksZoy4lfaF0k9cwNzY5upEW/VWdw3w==",
+ "license": "MIT"
+ },
+ "node_modules/@chainsafe/libp2p-gossipsub": {
+ "version": "10.1.1",
+ "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-gossipsub/-/libp2p-gossipsub-10.1.1.tgz",
+ "integrity": "sha512-nou65zlGaUIPwlUq7ceEVpszJX4tBWRRanppYaKsJk7rbDeIKRJQla2duATGOI3fwj1+pGSlDQuF2zG7P0VJQw==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@libp2p/crypto": "^2.0.0",
+ "@libp2p/interface": "^0.1.4",
+ "@libp2p/interface-internal": "^0.1.0",
+ "@libp2p/logger": "^3.0.0",
+ "@libp2p/peer-id": "^3.0.0",
+ "@libp2p/pubsub": "^8.0.0",
+ "@multiformats/multiaddr": "^12.1.3",
+ "abortable-iterator": "^5.0.1",
+ "denque": "^2.1.0",
+ "it-length-prefixed": "^9.0.1",
+ "it-pipe": "^3.0.1",
+ "it-pushable": "^3.2.0",
+ "multiformats": "^12.0.1",
+ "protobufjs": "^7.2.4",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.4"
+ },
+ "engines": {
+ "npm": ">=8.7.0"
+ }
+ },
+ "node_modules/@chainsafe/libp2p-noise": {
+ "version": "13.0.5",
+ "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-13.0.5.tgz",
+ "integrity": "sha512-xXqwrkH4nXlv3cYENHtqOgmIT2M4irPDwi548UvpmxzeC9hqa0kmiqbtAFYMV3v+gJ9pqVBVWFRk2hjs83GNrw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@chainsafe/as-chacha20poly1305": "^0.1.0",
+ "@chainsafe/as-sha256": "^0.4.1",
+ "@libp2p/crypto": "^2.0.0",
+ "@libp2p/interface": "^0.1.0",
+ "@libp2p/logger": "^3.0.0",
+ "@libp2p/peer-id": "^3.0.0",
+ "@noble/ciphers": "^0.4.0",
+ "@noble/curves": "^1.1.0",
+ "@noble/hashes": "^1.3.1",
+ "it-byte-stream": "^1.0.0",
+ "it-length-prefixed": "^9.0.1",
+ "it-length-prefixed-stream": "^1.0.0",
+ "it-pair": "^2.0.6",
+ "it-pipe": "^3.0.1",
+ "it-stream-types": "^2.0.1",
+ "protons-runtime": "^5.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.4",
+ "wherearewe": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@chainsafe/libp2p-yamux": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-yamux/-/libp2p-yamux-5.0.4.tgz",
+ "integrity": "sha512-3cfOjomFde7+6sscoM0gK7cgA5aEm20oYeVXSSonVzaas/UZzNsGP+FnF/bjLATjdyTB+YqhBHJs/KKk1PAy/Q==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.0",
+ "@libp2p/logger": "^3.0.0",
+ "get-iterator": "^2.0.1",
+ "it-foreach": "^2.0.3",
+ "it-pipe": "^3.0.1",
+ "it-pushable": "^3.2.0",
+ "uint8arraylist": "^2.4.3"
+ }
+ },
+ "node_modules/@chainsafe/netmask": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@chainsafe/netmask/-/netmask-2.0.0.tgz",
+ "integrity": "sha512-I3Z+6SWUoaljh3TBzCnCxjlUyN8tA+NAk5L6m9IxvCf1BENQTePzPMis97CoN/iMW1St3WN+AWCCRp+TTBRiDg==",
+ "license": "MIT",
+ "dependencies": {
+ "@chainsafe/is-ip": "^2.0.1"
+ }
+ },
+ "node_modules/@cloudflare/kv-asset-handler": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.0.tgz",
+ "integrity": "sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "dependencies": {
+ "mime": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/@cloudflare/unenv-preset": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.3.1.tgz",
+ "integrity": "sha512-Xq57Qd+ADpt6hibcVBO0uLG9zzRgyRhfCUgBT9s+g3+3Ivg5zDyVgLFy40ES1VdNcu8rPNSivm9A+kGP5IVaPg==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "peerDependencies": {
+ "unenv": "2.0.0-rc.15",
+ "workerd": "^1.20250320.0"
+ },
+ "peerDependenciesMeta": {
+ "workerd": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@cloudflare/workerd-darwin-64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250416.0.tgz",
+ "integrity": "sha512-aZgF8Swp9eVYxJPWOoZbAgAaYjWuYqGmEA+QJ2ecRGDBqm87rT4GEw7/mmLpxrpllny3VfEEhkk9iYCGv8nlFw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-darwin-arm64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250416.0.tgz",
+ "integrity": "sha512-FhswG1QYRfaTZ4FAlUkfVWaoM2lrlqumiBTrhbo9czMJdGR/oBXS4SGynuI6zyhApHeBf3/fZpA/SBAe4cXdgg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-linux-64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250416.0.tgz",
+ "integrity": "sha512-G+nXEAJ/9y+A857XShwxKeRdfxok6UcjiQe6G+wQeCn/Ofkp/EWydacKdyeVU6QIm1oHS78DwJ7AzbCYywf9aw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-linux-arm64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250416.0.tgz",
+ "integrity": "sha512-U6oVW0d9w1fpnDYNrjPJ9SFkDlGJWJWbXHlTBObXl6vccP16WewvuxyHkKqyUhUc8hyBaph7sxeKzKmuCFQ4SA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cloudflare/workerd-windows-64": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250416.0.tgz",
+ "integrity": "sha512-YAjjTzL1z9YYeN4sqYfj1dtQXd2Bblj+B+hl4Rz2aOhblpZEZAdhapZlOCRvLLkOJshKJUnRD3mDlytAdgwybQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/@cspotcode/source-map-support": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
+ "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/trace-mapping": "0.3.9"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.3.tgz",
+ "integrity": "sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz",
+ "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz",
+ "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz",
+ "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz",
+ "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz",
+ "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz",
+ "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz",
+ "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz",
+ "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz",
+ "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz",
+ "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz",
+ "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz",
+ "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz",
+ "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz",
+ "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz",
+ "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz",
+ "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz",
+ "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz",
+ "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz",
+ "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz",
+ "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz",
+ "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz",
+ "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz",
+ "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz",
+ "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz",
+ "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@extism/extism": {
+ "version": "2.0.0-rc11",
+ "resolved": "https://registry.npmjs.org/@extism/extism/-/extism-2.0.0-rc11.tgz",
+ "integrity": "sha512-+vjXOjQbCLpIAkMZjqkDIT4WUp2FA0mglj3a4nBpCp/gjDngiFqG6TmXP0esOubktY2EUklFiPCeaDr/sQXzKA==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@fastify/busboy": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
+ "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=14"
+ }
+ },
+ "node_modules/@helia/dag-cbor": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@helia/dag-cbor/-/dag-cbor-1.0.3.tgz",
+ "integrity": "sha512-ZQHdRj6YwLegv6AyzhzU1z5OB7rI+hsufYud0LiVNznc+Pgbkpjyqg6pwAYCsJLt6fIEPHbt5cOH2aqjVfA6LQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@helia/interface": "^2.0.0",
+ "@ipld/dag-cbor": "^9.0.0",
+ "@libp2p/interfaces": "^3.3.1",
+ "interface-blockstore": "^5.0.0",
+ "multiformats": "^12.0.1",
+ "progress-events": "^1.0.0"
+ }
+ },
+ "node_modules/@helia/dag-json": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@helia/dag-json/-/dag-json-1.0.3.tgz",
+ "integrity": "sha512-u/M3rOR3UfMXpRo82r8BWfIaR1fazwW6gtRRvpwXKaoDPWDa/HkfrROAduYZ6IvUVqhkxk36oGboYN1ld0bTlQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@helia/interface": "^2.0.0",
+ "@ipld/dag-json": "^10.0.1",
+ "@libp2p/interfaces": "^3.3.1",
+ "interface-blockstore": "^5.0.0",
+ "multiformats": "^12.0.1",
+ "progress-events": "^1.0.0"
+ }
+ },
+ "node_modules/@helia/delegated-routing-v1-http-api-client": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@helia/delegated-routing-v1-http-api-client/-/delegated-routing-v1-http-api-client-1.1.2.tgz",
+ "integrity": "sha512-u+sVdOxFieusZh/AxC8c0lU1micWfAosju7A80n62rdJ1fr1lclkhhrlfaKWIgVOq+pwonEzoOE7QgnTL22tYw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.2",
+ "@libp2p/logger": "^3.0.2",
+ "@libp2p/peer-id": "^3.0.3",
+ "@multiformats/multiaddr": "^12.1.3",
+ "any-signal": "^4.1.1",
+ "browser-readablestream-to-it": "^2.0.3",
+ "ipns": "^7.0.1",
+ "it-first": "^3.0.3",
+ "it-map": "^3.0.4",
+ "it-ndjson": "^1.0.4",
+ "multiformats": "^12.1.1",
+ "p-defer": "^4.0.0",
+ "p-queue": "^7.3.4",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@helia/delegated-routing-v1-http-api-client/node_modules/p-queue": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz",
+ "integrity": "sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventemitter3": "^5.0.1",
+ "p-timeout": "^5.0.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@helia/delegated-routing-v1-http-api-client/node_modules/p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@helia/interface": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@helia/interface/-/interface-2.1.0.tgz",
+ "integrity": "sha512-Z7PwuDIR0BODfSMzYcdzgdTYLsshCawAoPvGuuazvBddWSD9y82/QBmsWp6CTkyM/ziEaWbz5wERmRS+wejDLg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.1",
+ "interface-blockstore": "^5.0.0",
+ "interface-datastore": "^8.0.0",
+ "interface-store": "^5.0.1",
+ "ipfs-bitswap": "^19.0.0",
+ "multiformats": "^12.0.1",
+ "progress-events": "^1.0.0"
+ }
+ },
+ "node_modules/@helia/json": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@helia/json/-/json-1.0.3.tgz",
+ "integrity": "sha512-f3w17sYPwR4V9qxXgmC0kGj8vHF4313Ur+7zjK3yjXyWnf3Kjs5EY+uX82MjFk2Zndfj9jod2UvzkS9qn5v7tg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@helia/interface": "^2.0.0",
+ "@libp2p/interfaces": "^3.3.1",
+ "interface-blockstore": "^5.0.0",
+ "multiformats": "^12.0.1",
+ "progress-events": "^1.0.0"
+ }
+ },
+ "node_modules/@helia/strings": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@helia/strings/-/strings-1.0.1.tgz",
+ "integrity": "sha512-2Hfp9qVccegmQJ36t2DX3nusSzBeaoRmsqcTMz/4QT8a68VMUC9eaEZ4wABMpGiDChInIaKk+KSVXkJPHmnOvA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@helia/interface": "^2.0.0",
+ "@libp2p/interfaces": "^3.3.1",
+ "interface-blockstore": "^5.0.0",
+ "multiformats": "^12.1.2",
+ "progress-events": "^1.0.0",
+ "uint8arrays": "^4.0.3"
+ }
+ },
+ "node_modules/@helia/unixfs": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/@helia/unixfs/-/unixfs-1.4.3.tgz",
+ "integrity": "sha512-jS0En8fGhb01XH+nnxo3kQsmc1lwBEdlttAZFvTo7HCjBGPNFuaYdwTqF9S1wMVWV2fWqj7eS2zBZZa0MDsi1Q==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@helia/interface": "^2.0.0",
+ "@ipld/dag-pb": "^4.0.0",
+ "@libp2p/interface": "^0.1.2",
+ "@libp2p/logger": "^3.0.2",
+ "@multiformats/murmur3": "^2.1.2",
+ "hamt-sharding": "^3.0.2",
+ "interface-blockstore": "^5.0.0",
+ "ipfs-unixfs": "^11.0.0",
+ "ipfs-unixfs-exporter": "^13.1.0",
+ "ipfs-unixfs-importer": "^15.1.0",
+ "it-glob": "^2.0.4",
+ "it-last": "^3.0.1",
+ "it-pipe": "^3.0.1",
+ "merge-options": "^3.0.4",
+ "multiformats": "^12.1.1",
+ "progress-events": "^1.0.0",
+ "sparse-array": "^1.3.2"
+ }
+ },
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz",
+ "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz",
+ "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz",
+ "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz",
+ "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz",
+ "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz",
+ "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-s390x": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz",
+ "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-x64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz",
+ "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz",
+ "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz",
+ "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz",
+ "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm": "1.0.5"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz",
+ "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-s390x": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz",
+ "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-s390x": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linux-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz",
+ "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-x64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-arm64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz",
+ "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz",
+ "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.4"
+ }
+ },
+ "node_modules/@img/sharp-wasm32": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz",
+ "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==",
+ "cpu": [
+ "wasm32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
+ "optional": true,
+ "dependencies": {
+ "@emnapi/runtime": "^1.2.0"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-ia32": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz",
+ "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-x64": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz",
+ "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "Apache-2.0 AND LGPL-3.0-or-later",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@ipld/dag-cbor": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-9.2.2.tgz",
+ "integrity": "sha512-uIEOuruCqKTP50OBWwgz4Js2+LhiBQaxc57cnP71f45b1mHEAo1OCR1Zn/TbvSW/mV1x+JqhacIktkKyaYqhCw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "cborg": "^4.0.0",
+ "multiformats": "^13.1.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@ipld/dag-cbor/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@ipld/dag-json": {
+ "version": "10.2.3",
+ "resolved": "https://registry.npmjs.org/@ipld/dag-json/-/dag-json-10.2.3.tgz",
+ "integrity": "sha512-itacv1j1hvYgLox2B42Msn70QLzcr0MEo5yGIENuw2SM/lQzq9bmBiMky+kDsIrsqqblKTXcHBZnnmK7D4a6ZQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "cborg": "^4.0.0",
+ "multiformats": "^13.1.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@ipld/dag-json/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@ipld/dag-pb": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.1.3.tgz",
+ "integrity": "sha512-ueULCaaSCcD+dQga6nKiRr+RSeVgdiYiEPKVUu5iQMNYDN+9osd0KpR3UDd9uQQ+6RWuv9L34SchfEwj7YIbOA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.1.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@ipld/dag-pb/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
+ "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz",
+ "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.0.3",
+ "@jridgewell/sourcemap-codec": "^1.4.10"
+ }
+ },
+ "node_modules/@leichtgewicht/ip-codec": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz",
+ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==",
+ "license": "MIT"
+ },
+ "node_modules/@libp2p/bootstrap": {
+ "version": "9.0.12",
+ "resolved": "https://registry.npmjs.org/@libp2p/bootstrap/-/bootstrap-9.0.12.tgz",
+ "integrity": "sha512-w/Mzq8tNBy4DQJXlIN4mwged/6ZHltsAr/J2Wpv0mijrKrr3PLEF1XWfQtdvNUb/exOlXOMCNwVRcXfeAha1qg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-id": "^3.0.6",
+ "@multiformats/mafmt": "^12.1.2",
+ "@multiformats/multiaddr": "^12.1.5"
+ }
+ },
+ "node_modules/@libp2p/crypto": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-2.0.8.tgz",
+ "integrity": "sha512-8e5fh6bsJNpSjhrggtlm8QF+BERjelJswIjRS69aKgxp24R4z2kDM4pRYPkfQjXJDLNDtqWtKNmePgX23+QJsA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@noble/curves": "^1.1.0",
+ "@noble/hashes": "^1.3.1",
+ "multiformats": "^12.0.1",
+ "node-forge": "^1.1.0",
+ "protons-runtime": "^5.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/interface": {
+ "version": "0.1.6",
+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-0.1.6.tgz",
+ "integrity": "sha512-Lzc5cS/hXuoXhuAbVIxJIHLCYmfPcbU0vVgrpMoiP1Qb2Q3ETU4A46GB8s8mWXgSU6tr9RcqerUqzFYD6+OAag==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@multiformats/multiaddr": "^12.1.5",
+ "abortable-iterator": "^5.0.1",
+ "it-pushable": "^3.2.0",
+ "it-stream-types": "^2.0.1",
+ "multiformats": "^12.0.1",
+ "p-defer": "^4.0.0",
+ "race-signal": "^1.0.0",
+ "uint8arraylist": "^2.4.3"
+ }
+ },
+ "node_modules/@libp2p/interface-internal": {
+ "version": "0.1.12",
+ "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-0.1.12.tgz",
+ "integrity": "sha512-tUZ4hxU8fO4397p/GtXNvAANHiLA/Uxdil90TuNNCnlb+GZijDYEEJiqBfnk2zYAdwm7Q9iO0fVxZCpfoW8B7Q==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/peer-collections": "^4.0.8",
+ "@multiformats/multiaddr": "^12.1.5",
+ "uint8arraylist": "^2.4.3"
+ }
+ },
+ "node_modules/@libp2p/interfaces": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@libp2p/interfaces/-/interfaces-3.3.2.tgz",
+ "integrity": "sha512-p/M7plbrxLzuQchvNwww1Was7ZeGE2NaOFulMaZBYIihU8z3fhaV+a033OqnC/0NTX/yhfdNOG7znhYq3XoR/g==",
+ "license": "Apache-2.0 OR MIT",
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@libp2p/kad-dht": {
+ "version": "10.0.15",
+ "resolved": "https://registry.npmjs.org/@libp2p/kad-dht/-/kad-dht-10.0.15.tgz",
+ "integrity": "sha512-S4pQY8t4lXBlicBREThtOHnLn79e07sVgKZPa9SmJ4hC1+i0HFD8XLzrHm3cnKSO/4RhoaF5YdlnZMMjbb7q0w==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/crypto": "^2.0.8",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/interface-internal": "^0.1.9",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-collections": "^4.0.8",
+ "@libp2p/peer-id": "^3.0.6",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@types/sinon": "^17.0.0",
+ "abortable-iterator": "^5.0.1",
+ "any-signal": "^4.1.1",
+ "datastore-core": "^9.0.1",
+ "hashlru": "^2.3.0",
+ "interface-datastore": "^8.2.0",
+ "it-all": "^3.0.2",
+ "it-drain": "^3.0.2",
+ "it-first": "^3.0.1",
+ "it-length": "^3.0.1",
+ "it-length-prefixed": "^9.0.1",
+ "it-map": "^3.0.3",
+ "it-merge": "^3.0.0",
+ "it-parallel": "^3.0.0",
+ "it-pipe": "^3.0.1",
+ "it-pushable": "^3.2.1",
+ "it-stream-types": "^2.0.1",
+ "it-take": "^3.0.1",
+ "multiformats": "^12.0.1",
+ "p-defer": "^4.0.0",
+ "p-event": "^6.0.0",
+ "p-queue": "^7.3.4",
+ "private-ip": "^3.0.0",
+ "progress-events": "^1.0.0",
+ "protons-runtime": "^5.0.0",
+ "uint8-varint": "^2.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/kad-dht/node_modules/p-queue": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz",
+ "integrity": "sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventemitter3": "^5.0.1",
+ "p-timeout": "^5.0.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@libp2p/kad-dht/node_modules/p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@libp2p/keychain": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/@libp2p/keychain/-/keychain-3.0.8.tgz",
+ "integrity": "sha512-+WmW9bN9WE0uKqTG3DVk+zsd9Np63lLS+uYRhncwCGTvg0HKXq1t+i4Xd8KbZvUv7UVakE8aae1oMezW3nS+2g==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/crypto": "^2.0.8",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-id": "^3.0.6",
+ "interface-datastore": "^8.2.0",
+ "merge-options": "^3.0.4",
+ "sanitize-filename": "^1.6.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/logger": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-3.1.0.tgz",
+ "integrity": "sha512-qJbJBAhxHVsRBtQSOIkSLi0lskUSFjzE+zm0QvoyxzZKSz+mX41mZLbnofPIVOVauoDQ40dXpe7WDUOq8AbiQQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@multiformats/multiaddr": "^12.1.5",
+ "debug": "^4.3.4",
+ "interface-datastore": "^8.2.0",
+ "multiformats": "^12.0.1"
+ }
+ },
+ "node_modules/@libp2p/mdns": {
+ "version": "9.0.14",
+ "resolved": "https://registry.npmjs.org/@libp2p/mdns/-/mdns-9.0.14.tgz",
+ "integrity": "sha512-kS+hEGnA4X3AUknn6N/RiUu72AomiYyD0mwHtyPdcTmYYI6VNKWkniS95wQKXMSaHk+pEN7NAugTXJf478jkRg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-id": "^3.0.6",
+ "@libp2p/utils": "^4.0.7",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@types/multicast-dns": "^7.2.1",
+ "dns-packet": "^5.4.0",
+ "multicast-dns": "^7.2.5"
+ }
+ },
+ "node_modules/@libp2p/mplex": {
+ "version": "9.0.12",
+ "resolved": "https://registry.npmjs.org/@libp2p/mplex/-/mplex-9.0.12.tgz",
+ "integrity": "sha512-ll+fsz9zJ9OW3Z14hN4uh5JDQWIfudp2HTsSKoBiiFnKNY58tMH01iijNtHXGyGiVPmFCPeJf01oPlx0j9OgDQ==",
+ "deprecated": "Mplex has no flow control - please use @chainsafe/libp2p-yamux instead",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "abortable-iterator": "^5.0.1",
+ "benchmark": "^2.1.4",
+ "it-batched-bytes": "^2.0.2",
+ "it-pushable": "^3.2.0",
+ "it-stream-types": "^2.0.1",
+ "rate-limiter-flexible": "^3.0.0",
+ "uint8-varint": "^2.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/multistream-select": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-4.0.10.tgz",
+ "integrity": "sha512-f0BDv96L2yF9SZ0YXdg41JcGWwPBGZNAoeFGkna38SMFtj00NQWBOwAjqVdhrYVF58ymB0Ci6OfMzYv1XHVj/A==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "abortable-iterator": "^5.0.1",
+ "it-first": "^3.0.1",
+ "it-handshake": "^4.1.3",
+ "it-length-prefixed": "^9.0.1",
+ "it-merge": "^3.0.0",
+ "it-pipe": "^3.0.1",
+ "it-pushable": "^3.2.0",
+ "it-reader": "^6.0.1",
+ "it-stream-types": "^2.0.1",
+ "uint8-varint": "^2.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/peer-collections": {
+ "version": "4.0.11",
+ "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-4.0.11.tgz",
+ "integrity": "sha512-4bHtIm3VfYMm2laRuebkswQukgQmWTUbExnu1sD5vcbI186aCZ7P56QjWyOIMn3XflIoZ0cx9AXX/WuDQSolDA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/peer-id": "^3.0.6"
+ }
+ },
+ "node_modules/@libp2p/peer-id": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-3.0.6.tgz",
+ "integrity": "sha512-iN1Ia5gH2U1V/GOVRmLHmVY6fblxzrOPUoZrMYjHl/K4s+AiI7ym/527WDeQvhQpD7j3TfDwcAYforD2dLGpLw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "multiformats": "^12.0.1",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/peer-id-factory": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/@libp2p/peer-id-factory/-/peer-id-factory-3.0.11.tgz",
+ "integrity": "sha512-BmXKgeyAGezPyoY/uni95t439+AE0eqEKMxjfkfy2Hv/LcJ9gdR3zjRl7Hzci1O12b+yeVFtYVU8DZtBCcsZjQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/crypto": "^2.0.8",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/peer-id": "^3.0.6",
+ "multiformats": "^12.0.1",
+ "protons-runtime": "^5.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/peer-record": {
+ "version": "6.0.12",
+ "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-6.0.12.tgz",
+ "integrity": "sha512-8IItsbcPeIaFC5QMZD+gGl/dDbwLjE9nrmL7ZAOvMwcfZx+2AVZPN/6nubahO/wQrchpvBYiK3TxaWGnOH8sIA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/crypto": "^2.0.8",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/peer-id": "^3.0.6",
+ "@libp2p/utils": "^4.0.7",
+ "@multiformats/multiaddr": "^12.1.5",
+ "protons-runtime": "^5.0.0",
+ "uint8-varint": "^2.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/peer-store": {
+ "version": "9.0.12",
+ "resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-9.0.12.tgz",
+ "integrity": "sha512-rYpUUhvDI7GTfMFWNJ+HQoEOAVOxfp3t0bgJWLvUFKNtULojEk0znKHa6da7hX2KE06wM7ZEMfF23jZCmrwk1g==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-collections": "^4.0.8",
+ "@libp2p/peer-id": "^3.0.6",
+ "@libp2p/peer-id-factory": "^3.0.8",
+ "@libp2p/peer-record": "^6.0.9",
+ "@multiformats/multiaddr": "^12.1.5",
+ "interface-datastore": "^8.2.0",
+ "it-all": "^3.0.2",
+ "mortice": "^3.0.1",
+ "multiformats": "^12.0.1",
+ "protons-runtime": "^5.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/pubsub": {
+ "version": "8.0.14",
+ "resolved": "https://registry.npmjs.org/@libp2p/pubsub/-/pubsub-8.0.14.tgz",
+ "integrity": "sha512-hkNqUC6ef96WxqYFnmG0CKy9Vvb0mum5IrllUypwWiV0iK1zj8PcqO8oyTjLl/waLG56Kuy8CAjahnMov+U3dw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/crypto": "^2.0.8",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/interface-internal": "^0.1.9",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-collections": "^4.0.8",
+ "@libp2p/peer-id": "^3.0.6",
+ "abortable-iterator": "^5.0.1",
+ "it-length-prefixed": "^9.0.1",
+ "it-pipe": "^3.0.1",
+ "it-pushable": "^3.2.0",
+ "multiformats": "^12.0.1",
+ "p-queue": "^7.3.4",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/pubsub/node_modules/p-queue": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz",
+ "integrity": "sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventemitter3": "^5.0.1",
+ "p-timeout": "^5.0.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@libp2p/pubsub/node_modules/p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@libp2p/tcp": {
+ "version": "8.0.13",
+ "resolved": "https://registry.npmjs.org/@libp2p/tcp/-/tcp-8.0.13.tgz",
+ "integrity": "sha512-uN8p1gONoD7z8NteDE3a7F8yy9HblC3b9zX39L2/ztrqeAPiqRfGpBhXK+osXXj07jjnjhSNLBSVNHJNSmADRg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/utils": "^4.0.7",
+ "@multiformats/mafmt": "^12.1.2",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@types/sinon": "^17.0.0",
+ "stream-to-it": "^0.2.2"
+ }
+ },
+ "node_modules/@libp2p/utils": {
+ "version": "4.0.7",
+ "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-4.0.7.tgz",
+ "integrity": "sha512-xA6mS4II14870/DmmI3GFRWdNwHeOd2QV3ltatpdVmeEQpdn82jjtCzqn45AChjCugFOskOthXnQiWp+FvdKZg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@chainsafe/is-ip": "^2.0.2",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@multiformats/multiaddr-matcher": "^1.0.1",
+ "is-loopback-addr": "^2.0.1",
+ "it-stream-types": "^2.0.1",
+ "private-ip": "^3.0.0",
+ "uint8arraylist": "^2.4.3"
+ }
+ },
+ "node_modules/@libp2p/webrtc": {
+ "version": "3.2.11",
+ "resolved": "https://registry.npmjs.org/@libp2p/webrtc/-/webrtc-3.2.11.tgz",
+ "integrity": "sha512-djp1pgtmIT3zeRaTGMbr6Jl3N7qwcaYlgaNqU3hH5ys/+2SVRIDMwBcsSOuv3414fCM7n0SCRjk3QBYxk0WKNg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@chainsafe/libp2p-noise": "^13.0.0",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/interface-internal": "^0.1.9",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-id": "^3.0.6",
+ "@multiformats/mafmt": "^12.1.2",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@multiformats/multiaddr-matcher": "^1.0.1",
+ "abortable-iterator": "^5.0.1",
+ "any-signal": "^4.1.1",
+ "detect-browser": "^5.3.0",
+ "it-length-prefixed": "^9.0.1",
+ "it-pipe": "^3.0.1",
+ "it-protobuf-stream": "^1.0.0",
+ "it-pushable": "^3.2.0",
+ "it-stream-types": "^2.0.1",
+ "it-to-buffer": "^4.0.2",
+ "multiformats": "^12.0.1",
+ "multihashes": "^4.0.3",
+ "node-datachannel": "^0.5.0-dev",
+ "p-defer": "^4.0.0",
+ "p-event": "^6.0.0",
+ "p-timeout": "^6.1.2",
+ "protons-runtime": "^5.0.0",
+ "race-signal": "^1.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@libp2p/websockets": {
+ "version": "7.0.13",
+ "resolved": "https://registry.npmjs.org/@libp2p/websockets/-/websockets-7.0.13.tgz",
+ "integrity": "sha512-frRvTtk7++bJ/JLEX8iulpHAMMkEfroWDn2RhiY24SMPwkHWs3CZwm0P6nQ6p0YHft3OQfwPZaqBu0KItxnVHQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/utils": "^4.0.7",
+ "@multiformats/mafmt": "^12.1.2",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@multiformats/multiaddr-to-uri": "^9.0.2",
+ "@types/ws": "^8.5.4",
+ "abortable-iterator": "^5.0.1",
+ "it-ws": "^6.0.0",
+ "p-defer": "^4.0.0",
+ "wherearewe": "^2.0.1",
+ "ws": "^8.12.1"
+ }
+ },
+ "node_modules/@libp2p/webtransport": {
+ "version": "3.1.10",
+ "resolved": "https://registry.npmjs.org/@libp2p/webtransport/-/webtransport-3.1.10.tgz",
+ "integrity": "sha512-8bdnqs9Jz1D5Wy+VDMluW9HsD2A712PZMmYTbBXEG4BabDWHI6l2UdJDt4zkaP1rqn+o9YooipA0wZU34MuiSA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@chainsafe/libp2p-noise": "^13.0.0",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/peer-id": "^3.0.6",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@multiformats/multiaddr-matcher": "^1.0.1",
+ "it-stream-types": "^2.0.1",
+ "multiformats": "^12.0.1",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6"
+ }
+ },
+ "node_modules/@multiformats/base-x": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz",
+ "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==",
+ "license": "MIT"
+ },
+ "node_modules/@multiformats/dns": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/@multiformats/dns/-/dns-1.0.6.tgz",
+ "integrity": "sha512-nt/5UqjMPtyvkG9BQYdJ4GfLK3nMqGpFZOzf4hAmIa0sJh2LlS9YKXZ4FgwBDsaHvzZqR/rUFIywIc7pkHNNuw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@types/dns-packet": "^5.6.5",
+ "buffer": "^6.0.3",
+ "dns-packet": "^5.6.1",
+ "hashlru": "^2.3.0",
+ "p-queue": "^8.0.1",
+ "progress-events": "^1.0.0",
+ "uint8arrays": "^5.0.2"
+ }
+ },
+ "node_modules/@multiformats/dns/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@multiformats/dns/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/@multiformats/mafmt": {
+ "version": "12.1.6",
+ "resolved": "https://registry.npmjs.org/@multiformats/mafmt/-/mafmt-12.1.6.tgz",
+ "integrity": "sha512-tlJRfL21X+AKn9b5i5VnaTD6bNttpSpcqwKVmDmSHLwxoz97fAHaepqFOk/l1fIu94nImIXneNbhsJx/RQNIww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@multiformats/multiaddr": "^12.0.0"
+ }
+ },
+ "node_modules/@multiformats/multiaddr": {
+ "version": "12.4.0",
+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.4.0.tgz",
+ "integrity": "sha512-FL7yBTLijJ5JkO044BGb2msf+uJLrwpD6jD6TkXlbjA9N12+18HT40jvd4o5vL4LOJMc86dPX6tGtk/uI9kYKg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@chainsafe/is-ip": "^2.0.1",
+ "@chainsafe/netmask": "^2.0.0",
+ "@multiformats/dns": "^1.0.3",
+ "multiformats": "^13.0.0",
+ "uint8-varint": "^2.0.1",
+ "uint8arrays": "^5.0.0"
+ }
+ },
+ "node_modules/@multiformats/multiaddr-matcher": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-matcher/-/multiaddr-matcher-1.7.0.tgz",
+ "integrity": "sha512-WfobrJy7XLaYL7PQ3IcFoXdGN5jmdv5FsuKQkZIIreC1pSR4Q9PSOWu2ULxP/M2JT738Xny0PFoCke0ENbyfww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@chainsafe/is-ip": "^2.0.1",
+ "@multiformats/multiaddr": "^12.0.0",
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/@multiformats/multiaddr-matcher/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@multiformats/multiaddr-to-uri": {
+ "version": "9.0.8",
+ "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-9.0.8.tgz",
+ "integrity": "sha512-4eiN5iEiQfy2A98BxekUfW410L/ivg0sgjYSgSqmklnrBhK+QyMz4yqgfkub8xDTXOc7O5jp4+LVyM3ZqMeWNw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@multiformats/multiaddr": "^12.0.0"
+ }
+ },
+ "node_modules/@multiformats/multiaddr/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/@multiformats/murmur3": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/@multiformats/murmur3/-/murmur3-2.1.8.tgz",
+ "integrity": "sha512-6vId1C46ra3R1sbJUOFCZnsUIveR9oF20yhPmAFxPm0JfrX3/ZRCgP3YDrBzlGoEppOXnA9czHeYc0T9mB6hbA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0",
+ "murmurhash3js-revisited": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@multiformats/murmur3/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/@noble/ciphers": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.4.1.tgz",
+ "integrity": "sha512-QCOA9cgf3Rc33owG0AYBB9wszz+Ul2kramWN8tXG44Gyciud/tbkEqvxRF/IpqQaBpRBNi9f4jdNxqB2CQCIXg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@noble/curves": {
+ "version": "1.8.2",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.2.tgz",
+ "integrity": "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "1.7.2"
+ },
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@noble/hashes": {
+ "version": "1.7.2",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.2.tgz",
+ "integrity": "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ==",
+ "license": "MIT",
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@noble/secp256k1": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-2.2.3.tgz",
+ "integrity": "sha512-l7r5oEQym9Us7EAigzg30/PQAvynhMt2uoYtT3t26eGDVm9Yii5mZ5jWSWmZ/oSIR2Et0xfc6DXrG0bZ787V3w==",
+ "license": "MIT",
+ "peer": true,
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@protobufjs/aspromise": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
+ "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/base64": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
+ "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/codegen": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
+ "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/eventemitter": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
+ "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/fetch": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
+ "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@protobufjs/aspromise": "^1.1.1",
+ "@protobufjs/inquire": "^1.1.0"
+ }
+ },
+ "node_modules/@protobufjs/float": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
+ "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/inquire": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
+ "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/path": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
+ "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/pool": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
+ "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@protobufjs/utf8": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
+ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/@scure/base": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz",
+ "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==",
+ "license": "MIT",
+ "peer": true,
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@scure/bip32": {
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz",
+ "integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/curves": "~1.8.1",
+ "@noble/hashes": "~1.7.1",
+ "@scure/base": "~1.2.2"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@scure/bip39": {
+ "version": "1.5.4",
+ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz",
+ "integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/hashes": "~1.7.1",
+ "@scure/base": "~1.2.4"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@stablelib/aead": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/aead/-/aead-1.0.1.tgz",
+ "integrity": "sha512-q39ik6sxGHewqtO0nP4BuSe3db5G1fEJE8ukvngS2gLkBXyy6E7pLubhbYgnkDFv6V8cWaxcE4Xn0t6LWcJkyg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@stablelib/binary": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/binary/-/binary-1.0.1.tgz",
+ "integrity": "sha512-ClJWvmL6UBM/wjkvv/7m5VP3GMr9t0osr4yVgLZsLCOz4hGN9gIAFEqnJ0TsSMAN+n840nf2cHZnA5/KFqHC7Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/int": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/bytes": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/bytes/-/bytes-1.0.1.tgz",
+ "integrity": "sha512-Kre4Y4kdwuqL8BR2E9hV/R5sOrUj6NanZaZis0V6lX5yzqC3hBuVSDXUIBqQv/sCpmuWRiHLwqiT1pqqjuBXoQ==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@stablelib/chacha": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/chacha/-/chacha-1.0.1.tgz",
+ "integrity": "sha512-Pmlrswzr0pBzDofdFuVe1q7KdsHKhhU24e8gkEwnTGOmlC7PADzLVxGdn2PoNVBBabdg0l/IfLKg6sHAbTQugg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/binary": "^1.0.1",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/chacha20poly1305": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/chacha20poly1305/-/chacha20poly1305-1.0.1.tgz",
+ "integrity": "sha512-MmViqnqHd1ymwjOQfghRKw2R/jMIGT3wySN7cthjXCBdO+qErNPUBnRzqNpnvIwg7JBCg3LdeCZZO4de/yEhVA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/aead": "^1.0.1",
+ "@stablelib/binary": "^1.0.1",
+ "@stablelib/chacha": "^1.0.1",
+ "@stablelib/constant-time": "^1.0.1",
+ "@stablelib/poly1305": "^1.0.1",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/constant-time": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/constant-time/-/constant-time-1.0.1.tgz",
+ "integrity": "sha512-tNOs3uD0vSJcK6z1fvef4Y+buN7DXhzHDPqRLSXUel1UfqMB1PWNsnnAezrKfEwTLpN0cGH2p9NNjs6IqeD0eg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@stablelib/hash": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/hash/-/hash-1.0.1.tgz",
+ "integrity": "sha512-eTPJc/stDkdtOcrNMZ6mcMK1e6yBbqRBaNW55XA1jU8w/7QdnCF0CmMmOD1m7VSkBR44PWrMHU2l6r8YEQHMgg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@stablelib/hkdf": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/hkdf/-/hkdf-1.0.1.tgz",
+ "integrity": "sha512-SBEHYE16ZXlHuaW5RcGk533YlBj4grMeg5TooN80W3NpcHRtLZLLXvKyX0qcRFxf+BGDobJLnwkvgEwHIDBR6g==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/hash": "^1.0.1",
+ "@stablelib/hmac": "^1.0.1",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/hmac": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/hmac/-/hmac-1.0.1.tgz",
+ "integrity": "sha512-V2APD9NSnhVpV/QMYgCVMIYKiYG6LSqw1S65wxVoirhU/51ACio6D4yDVSwMzuTJXWZoVHbDdINioBwKy5kVmA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/constant-time": "^1.0.1",
+ "@stablelib/hash": "^1.0.1",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/int": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/int/-/int-1.0.1.tgz",
+ "integrity": "sha512-byr69X/sDtDiIjIV6m4roLVWnNNlRGzsvxw+agj8CIEazqWGOQp2dTYgQhtyVXV9wpO6WyXRQUzLV/JRNumT2w==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@stablelib/keyagreement": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/keyagreement/-/keyagreement-1.0.1.tgz",
+ "integrity": "sha512-VKL6xBwgJnI6l1jKrBAfn265cspaWBPAPEc62VBQrWHLqVgNRE09gQ/AnOEyKUWrrqfD+xSQ3u42gJjLDdMDQg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/bytes": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/poly1305": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/poly1305/-/poly1305-1.0.1.tgz",
+ "integrity": "sha512-1HlG3oTSuQDOhSnLwJRKeTRSAdFNVB/1djy2ZbS35rBSJ/PFqx9cf9qatinWghC2UbfOYD8AcrtbUQl8WoxabA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/constant-time": "^1.0.1",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/random": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@stablelib/random/-/random-1.0.2.tgz",
+ "integrity": "sha512-rIsE83Xpb7clHPVRlBj8qNe5L8ISQOzjghYQm/dZ7VaM2KHYwMW5adjQjrzTZCchFnNCNhkwtnOBa9HTMJCI8w==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/binary": "^1.0.1",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/sha256": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/sha256/-/sha256-1.0.1.tgz",
+ "integrity": "sha512-GIIH3e6KH+91FqGV42Kcj71Uefd/QEe7Dy42sBTeqppXV95ggCcxLTk39bEr+lZfJmp+ghsR07J++ORkRELsBQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/binary": "^1.0.1",
+ "@stablelib/hash": "^1.0.1",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@stablelib/wipe": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/wipe/-/wipe-1.0.1.tgz",
+ "integrity": "sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/@stablelib/x25519": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@stablelib/x25519/-/x25519-1.0.3.tgz",
+ "integrity": "sha512-KnTbKmUhPhHavzobclVJQG5kuivH+qDLpe84iRqX3CLrKp881cF160JvXJ+hjn1aMyCwYOKeIZefIH/P5cJoRw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/keyagreement": "^1.0.1",
+ "@stablelib/random": "^1.0.2",
+ "@stablelib/wipe": "^1.0.1"
+ }
+ },
+ "node_modules/@types/dns-packet": {
+ "version": "5.6.5",
+ "resolved": "https://registry.npmjs.org/@types/dns-packet/-/dns-packet-5.6.5.tgz",
+ "integrity": "sha512-qXOC7XLOEe43ehtWJCMnQXvgcIpv6rPmQ1jXT98Ad8A3TB1Ue50jsCbSSSyuazScEuZ/Q026vHbrOTVkmwA+7Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/multicast-dns": {
+ "version": "7.2.4",
+ "resolved": "https://registry.npmjs.org/@types/multicast-dns/-/multicast-dns-7.2.4.tgz",
+ "integrity": "sha512-ib5K4cIDR4Ro5SR3Sx/LROkMDa0BHz0OPaCBL/OSPDsAXEGZ3/KQeS6poBKYVN7BfjXDL9lWNwzyHVgt/wkyCw==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/dns-packet": "*",
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "22.14.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.14.1.tgz",
+ "integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==",
+ "license": "MIT",
+ "dependencies": {
+ "undici-types": "~6.21.0"
+ }
+ },
+ "node_modules/@types/retry": {
+ "version": "0.12.2",
+ "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz",
+ "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==",
+ "license": "MIT"
+ },
+ "node_modules/@types/sinon": {
+ "version": "17.0.4",
+ "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz",
+ "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/sinonjs__fake-timers": "*"
+ }
+ },
+ "node_modules/@types/sinonjs__fake-timers": {
+ "version": "8.1.5",
+ "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz",
+ "integrity": "sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==",
+ "license": "MIT"
+ },
+ "node_modules/@types/ws": {
+ "version": "8.18.1",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
+ "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@vascosantos/moving-average": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@vascosantos/moving-average/-/moving-average-1.1.0.tgz",
+ "integrity": "sha512-MVEJ4vWAPNbrGLjz7ITnHYg+YXZ6ijAqtH5/cHwSoCpbvuJ98aLXwFfPKAUfZpJMQR5uXB58UJajbY130IRF/w==",
+ "license": "MIT"
+ },
+ "node_modules/@walletconnect/core": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.8.6.tgz",
+ "integrity": "sha512-rnSqm1KJLcww/v6+UH8JeibQkJ3EKgyUDPfEK0stSEkrIUIcXaFlq3Et8S+vgV8bPhI0MVUhAhFL5OJZ3t2ryg==",
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/heartbeat": "1.2.1",
+ "@walletconnect/jsonrpc-provider": "1.0.13",
+ "@walletconnect/jsonrpc-types": "1.0.3",
+ "@walletconnect/jsonrpc-utils": "1.0.8",
+ "@walletconnect/jsonrpc-ws-connection": "^1.0.11",
+ "@walletconnect/keyvaluestorage": "^1.0.2",
+ "@walletconnect/logger": "^2.0.1",
+ "@walletconnect/relay-api": "^1.0.9",
+ "@walletconnect/relay-auth": "^1.0.4",
+ "@walletconnect/safe-json": "^1.0.2",
+ "@walletconnect/time": "^1.0.2",
+ "@walletconnect/types": "2.8.6",
+ "@walletconnect/utils": "2.8.6",
+ "events": "^3.3.0",
+ "lodash.isequal": "4.5.0",
+ "uint8arrays": "^3.1.0"
+ }
+ },
+ "node_modules/@walletconnect/core/node_modules/@walletconnect/jsonrpc-types": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz",
+ "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "keyvaluestorage-interface": "^1.0.0",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/core/node_modules/multiformats": {
+ "version": "9.9.0",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
+ "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==",
+ "license": "(Apache-2.0 AND MIT)",
+ "peer": true
+ },
+ "node_modules/@walletconnect/core/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/core/node_modules/uint8arrays": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
+ "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "multiformats": "^9.4.2"
+ }
+ },
+ "node_modules/@walletconnect/crypto": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@walletconnect/crypto/-/crypto-1.1.0.tgz",
+ "integrity": "sha512-yZO8BBTQt7BcaemjDgwN56OmSv0OO4QjIpvtfj5OxZfL6IQZQWHOhwC6pJg+BmZPbDlJlWFqFuCZRtiPwRmsoA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/ciphers": "1.2.0",
+ "@noble/hashes": "1.7.0",
+ "@walletconnect/encoding": "^1.0.2",
+ "@walletconnect/environment": "^1.0.1",
+ "@walletconnect/randombytes": "^1.0.3",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/crypto/node_modules/@noble/ciphers": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.2.0.tgz",
+ "integrity": "sha512-YGdEUzYEd+82jeaVbSKKVp1jFZb8LwaNMIIzHFkihGvYdd/KKAr7KaJHdEdSYGredE3ssSravXIa0Jxg28Sv5w==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@walletconnect/crypto/node_modules/@noble/hashes": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.0.tgz",
+ "integrity": "sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@walletconnect/crypto/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/encoding": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@walletconnect/encoding/-/encoding-1.0.2.tgz",
+ "integrity": "sha512-CrwSBrjqJ7rpGQcTL3kU+Ief+Bcuu9PH6JLOb+wM6NITX1GTxR/MfNwnQfhLKK6xpRAyj2/nM04OOH6wS8Imag==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "is-typedarray": "1.0.0",
+ "tslib": "1.14.1",
+ "typedarray-to-buffer": "3.1.5"
+ }
+ },
+ "node_modules/@walletconnect/encoding/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/environment": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz",
+ "integrity": "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/environment/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/events": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@walletconnect/events/-/events-1.0.1.tgz",
+ "integrity": "sha512-NPTqaoi0oPBVNuLv7qPaJazmGHs5JGyO8eEAk5VGKmJzDR7AHzD4k6ilox5kxk1iwiOnFopBOOMLs86Oa76HpQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "keyvaluestorage-interface": "^1.0.0",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/events/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/heartbeat": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.1.tgz",
+ "integrity": "sha512-yVzws616xsDLJxuG/28FqtZ5rzrTA4gUjdEMTbWB5Y8V1XHRmqq4efAxCw5ie7WjbXFSUyBHaWlMR+2/CpQC5Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/events": "^1.0.1",
+ "@walletconnect/time": "^1.0.2",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/heartbeat/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/jsonrpc-provider": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.13.tgz",
+ "integrity": "sha512-K73EpThqHnSR26gOyNEL+acEex3P7VWZe6KE12ZwKzAt2H4e5gldZHbjsu2QR9cLeJ8AXuO7kEMOIcRv1QEc7g==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/jsonrpc-utils": "^1.0.8",
+ "@walletconnect/safe-json": "^1.0.2",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/jsonrpc-provider/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/jsonrpc-types": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.4.tgz",
+ "integrity": "sha512-P6679fG/M+wuWg9TY8mh6xFSdYnFyFjwFelxyISxMDrlbXokorEVXYOxiqEbrU3x1BmBoCAJJ+vtEaEoMlpCBQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "events": "^3.3.0",
+ "keyvaluestorage-interface": "^1.0.0"
+ }
+ },
+ "node_modules/@walletconnect/jsonrpc-utils": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz",
+ "integrity": "sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/environment": "^1.0.1",
+ "@walletconnect/jsonrpc-types": "^1.0.3",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/jsonrpc-utils/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/jsonrpc-ws-connection": {
+ "version": "1.0.16",
+ "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.16.tgz",
+ "integrity": "sha512-G81JmsMqh5nJheE1mPst1W0WfVv0SG3N7JggwLLGnI7iuDZJq8cRJvQwLGKHn5H1WTW7DEPCo00zz5w62AbL3Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/jsonrpc-utils": "^1.0.6",
+ "@walletconnect/safe-json": "^1.0.2",
+ "events": "^3.3.0",
+ "ws": "^7.5.1"
+ }
+ },
+ "node_modules/@walletconnect/jsonrpc-ws-connection/node_modules/ws": {
+ "version": "7.5.10",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
+ "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8.3.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": "^5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@walletconnect/keyvaluestorage": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz",
+ "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/safe-json": "^1.0.1",
+ "idb-keyval": "^6.2.1",
+ "unstorage": "^1.9.0"
+ },
+ "peerDependencies": {
+ "@react-native-async-storage/async-storage": "1.x"
+ },
+ "peerDependenciesMeta": {
+ "@react-native-async-storage/async-storage": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@walletconnect/legacy-client": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@walletconnect/legacy-client/-/legacy-client-2.0.0.tgz",
+ "integrity": "sha512-v5L7rYk9loVnfvUf0mF+76bUPFaU5/Vh7mzL6/950CD/yoGdzYZ3Kj+L7mkC6HPMEGeQsBP1+sqBuiVGZ/aODA==",
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/crypto": "^1.0.3",
+ "@walletconnect/encoding": "^1.0.2",
+ "@walletconnect/jsonrpc-utils": "^1.0.4",
+ "@walletconnect/legacy-types": "^2.0.0",
+ "@walletconnect/legacy-utils": "^2.0.0",
+ "@walletconnect/safe-json": "^1.0.1",
+ "@walletconnect/window-getters": "^1.0.1",
+ "@walletconnect/window-metadata": "^1.0.1",
+ "detect-browser": "^5.3.0",
+ "query-string": "^6.13.5"
+ }
+ },
+ "node_modules/@walletconnect/legacy-types": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@walletconnect/legacy-types/-/legacy-types-2.0.0.tgz",
+ "integrity": "sha512-sOVrA7HUdbI1OwKyPOQU0/DdvTSVFlsXWpAk2K2WvP2erTkBWPMTJq6cv2BmKdoJ3p6gLApT7sd+jHi3OF71uw==",
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/jsonrpc-types": "^1.0.2"
+ }
+ },
+ "node_modules/@walletconnect/legacy-utils": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@walletconnect/legacy-utils/-/legacy-utils-2.0.0.tgz",
+ "integrity": "sha512-CPWxSVVXw0kgNCxvU126g4GiV3mzXmC8IPJ15twE46aJ1FX+RHEIfAzFMFz2F2+fEhBxL63A7dwNQKDXorRPcQ==",
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/encoding": "^1.0.2",
+ "@walletconnect/jsonrpc-utils": "^1.0.4",
+ "@walletconnect/legacy-types": "^2.0.0",
+ "@walletconnect/safe-json": "^1.0.1",
+ "@walletconnect/window-getters": "^1.0.1",
+ "@walletconnect/window-metadata": "^1.0.1",
+ "detect-browser": "^5.3.0",
+ "query-string": "^6.13.5"
+ }
+ },
+ "node_modules/@walletconnect/logger": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.1.2.tgz",
+ "integrity": "sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/safe-json": "^1.0.2",
+ "pino": "7.11.0"
+ }
+ },
+ "node_modules/@walletconnect/randombytes": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@walletconnect/randombytes/-/randombytes-1.1.0.tgz",
+ "integrity": "sha512-X+LO/9ClnXX2Q/1+u83qMnohVaxC4qsXByM/gMSwGMrUObxEiqEWS+b9Upg9oNl6mTr85dTCRF8W17KVcKKXQw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/hashes": "1.7.0",
+ "@walletconnect/encoding": "^1.0.2",
+ "@walletconnect/environment": "^1.0.1",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/randombytes/node_modules/@noble/hashes": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.0.tgz",
+ "integrity": "sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@walletconnect/randombytes/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/relay-api": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/@walletconnect/relay-api/-/relay-api-1.0.11.tgz",
+ "integrity": "sha512-tLPErkze/HmC9aCmdZOhtVmYZq1wKfWTJtygQHoWtgg722Jd4homo54Cs4ak2RUFUZIGO2RsOpIcWipaua5D5Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/jsonrpc-types": "^1.0.2"
+ }
+ },
+ "node_modules/@walletconnect/relay-auth": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@walletconnect/relay-auth/-/relay-auth-1.1.0.tgz",
+ "integrity": "sha512-qFw+a9uRz26jRCDgL7Q5TA9qYIgcNY8jpJzI1zAWNZ8i7mQjaijRnWFKsCHAU9CyGjvt6RKrRXyFtFOpWTVmCQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/curves": "1.8.0",
+ "@noble/hashes": "1.7.0",
+ "@walletconnect/safe-json": "^1.0.1",
+ "@walletconnect/time": "^1.0.2",
+ "uint8arrays": "^3.0.0"
+ }
+ },
+ "node_modules/@walletconnect/relay-auth/node_modules/@noble/curves": {
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.0.tgz",
+ "integrity": "sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/hashes": "1.7.0"
+ },
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@walletconnect/relay-auth/node_modules/@noble/hashes": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.0.tgz",
+ "integrity": "sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": "^14.21.3 || >=16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@walletconnect/relay-auth/node_modules/multiformats": {
+ "version": "9.9.0",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
+ "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==",
+ "license": "(Apache-2.0 AND MIT)",
+ "peer": true
+ },
+ "node_modules/@walletconnect/relay-auth/node_modules/uint8arrays": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
+ "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "multiformats": "^9.4.2"
+ }
+ },
+ "node_modules/@walletconnect/safe-json": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@walletconnect/safe-json/-/safe-json-1.0.2.tgz",
+ "integrity": "sha512-Ogb7I27kZ3LPC3ibn8ldyUr5544t3/STow9+lzz7Sfo808YD7SBWk7SAsdBFlYgP2zDRy2hS3sKRcuSRM0OTmA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/safe-json/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/sign-client": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.8.6.tgz",
+ "integrity": "sha512-rOFTKTHP7oJfXgYHX7+SdB8VbcsEE3ZFG/bMdmZboWaBim1mrY3vUyDdKrNr0VgI3AwBiEQezQDfKxBX0pMSQQ==",
+ "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases",
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/core": "2.8.6",
+ "@walletconnect/events": "^1.0.1",
+ "@walletconnect/heartbeat": "1.2.1",
+ "@walletconnect/jsonrpc-utils": "1.0.8",
+ "@walletconnect/logger": "^2.0.1",
+ "@walletconnect/time": "^1.0.2",
+ "@walletconnect/types": "2.8.6",
+ "@walletconnect/utils": "2.8.6",
+ "events": "^3.3.0"
+ }
+ },
+ "node_modules/@walletconnect/time": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/@walletconnect/time/-/time-1.0.2.tgz",
+ "integrity": "sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/time/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/types": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.8.6.tgz",
+ "integrity": "sha512-Z/PFa3W1XdxeTcCtdR6lUsFgZfU/69wWJBPyclPwn7cu1+eriuCr6XZXQpJjib3flU+HnwHiXeUuqZaheehPxw==",
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/events": "^1.0.1",
+ "@walletconnect/heartbeat": "1.2.1",
+ "@walletconnect/jsonrpc-types": "1.0.3",
+ "@walletconnect/keyvaluestorage": "^1.0.2",
+ "@walletconnect/logger": "^2.0.1",
+ "events": "^3.3.0"
+ }
+ },
+ "node_modules/@walletconnect/types/node_modules/@walletconnect/jsonrpc-types": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-types/-/jsonrpc-types-1.0.3.tgz",
+ "integrity": "sha512-iIQ8hboBl3o5ufmJ8cuduGad0CQm3ZlsHtujv9Eu16xq89q+BG7Nh5VLxxUgmtpnrePgFkTwXirCTkwJH1v+Yw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "keyvaluestorage-interface": "^1.0.0",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/types/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/utils": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.8.6.tgz",
+ "integrity": "sha512-wcy6e5+COYo7tfNnW8YqidnATdJDIW6vDiWWE7A1F78Sl/VflkaevB9cIgyn8eLdxC1SxXgGoeC2oLP90nnHJg==",
+ "license": "Apache-2.0",
+ "peer": true,
+ "dependencies": {
+ "@stablelib/chacha20poly1305": "1.0.1",
+ "@stablelib/hkdf": "1.0.1",
+ "@stablelib/random": "^1.0.2",
+ "@stablelib/sha256": "1.0.1",
+ "@stablelib/x25519": "^1.0.3",
+ "@walletconnect/relay-api": "^1.0.9",
+ "@walletconnect/safe-json": "^1.0.2",
+ "@walletconnect/time": "^1.0.2",
+ "@walletconnect/types": "2.8.6",
+ "@walletconnect/window-getters": "^1.0.1",
+ "@walletconnect/window-metadata": "^1.0.1",
+ "detect-browser": "5.3.0",
+ "query-string": "7.1.3",
+ "uint8arrays": "^3.1.0"
+ }
+ },
+ "node_modules/@walletconnect/utils/node_modules/multiformats": {
+ "version": "9.9.0",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
+ "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==",
+ "license": "(Apache-2.0 AND MIT)",
+ "peer": true
+ },
+ "node_modules/@walletconnect/utils/node_modules/query-string": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz",
+ "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "decode-uri-component": "^0.2.2",
+ "filter-obj": "^1.1.0",
+ "split-on-first": "^1.0.0",
+ "strict-uri-encode": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@walletconnect/utils/node_modules/uint8arrays": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
+ "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "multiformats": "^9.4.2"
+ }
+ },
+ "node_modules/@walletconnect/window-getters": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz",
+ "integrity": "sha512-vHp+HqzGxORPAN8gY03qnbTMnhqIwjeRJNOMOAzePRg4xVEEE2WvYsI9G2NMjOknA8hnuYbU3/hwLcKbjhc8+Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/window-getters/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/@walletconnect/window-metadata": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@walletconnect/window-metadata/-/window-metadata-1.0.1.tgz",
+ "integrity": "sha512-9koTqyGrM2cqFRW517BPY/iEtUDx2r1+Pwwu5m7sJ7ka79wi3EyqhqcICk/yDmv6jAS1rjKgTKXlEhanYjijcA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@walletconnect/window-getters": "^1.0.1",
+ "tslib": "1.14.1"
+ }
+ },
+ "node_modules/@walletconnect/window-metadata/node_modules/tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "license": "0BSD",
+ "peer": true
+ },
+ "node_modules/abort-error": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/abort-error/-/abort-error-1.0.1.tgz",
+ "integrity": "sha512-fxqCblJiIPdSXIUrxI0PL+eJG49QdP9SQ70qtB65MVAoMr2rASlOyAbJFOylfB467F/f+5BCLJJq58RYi7mGfg==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/abortable-iterator": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/abortable-iterator/-/abortable-iterator-5.1.0.tgz",
+ "integrity": "sha512-a3nRG0GOGw3IPFA2hdhrZU+QuD3mA6i+5f4YM/Obe+D5lYccxScI32rAIHAW5ttFV7+beiof09gHav4qUEZDwg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "get-iterator": "^2.0.0",
+ "it-stream-types": "^2.0.1"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.14.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
+ "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz",
+ "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/any-signal": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-4.1.1.tgz",
+ "integrity": "sha512-iADenERppdC+A2YKbOXXB2WUeABLaM6qnpZ70kZbPZ1cZMMJ7eF+3CaYm+/PhBizgkzlvssC7QuHS30oOiQYWA==",
+ "license": "Apache-2.0 OR MIT",
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "license": "ISC",
+ "peer": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/as-table": {
+ "version": "1.0.55",
+ "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz",
+ "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "printable-characters": "^1.0.42"
+ }
+ },
+ "node_modules/atomic-sleep": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz",
+ "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "license": "MIT"
+ },
+ "node_modules/base64-js": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/benchmark": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
+ "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==",
+ "license": "MIT",
+ "dependencies": {
+ "lodash": "^4.17.4",
+ "platform": "^1.3.3"
+ }
+ },
+ "node_modules/bl": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz",
+ "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^6.0.3",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/blake3-wasm": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz",
+ "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/blockstore-core": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/blockstore-core/-/blockstore-core-4.4.1.tgz",
+ "integrity": "sha512-peXfL9ZLx1cb84QALocMjhT8CsQ4JsreI/AitlN1inipSdC/G+jcYVJCqeCD5ecSTv/0LMpg8NlAPH/eBYZLjA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/logger": "^4.0.6",
+ "err-code": "^3.0.1",
+ "interface-blockstore": "^5.0.0",
+ "interface-store": "^5.0.0",
+ "it-drain": "^3.0.5",
+ "it-filter": "^3.0.4",
+ "it-merge": "^3.0.3",
+ "it-pushable": "^3.2.3",
+ "multiformats": "^13.0.1"
+ }
+ },
+ "node_modules/blockstore-core/node_modules/@libp2p/interface": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.7.0.tgz",
+ "integrity": "sha512-/zFyaIaIGW0aihhsH7/93vQdpWInUzFocxF11RO/029Y6h0SVjs24HHbils+DqaFDTqN+L7oNlBx2rM2MnmTjA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@multiformats/multiaddr": "^12.2.3",
+ "it-pushable": "^3.2.3",
+ "it-stream-types": "^2.0.1",
+ "multiformats": "^13.1.0",
+ "progress-events": "^1.0.0",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/blockstore-core/node_modules/@libp2p/logger": {
+ "version": "4.0.20",
+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.20.tgz",
+ "integrity": "sha512-TTh2dhHsOTAlMPxSa9ncFPHa/0jTt+0AQxwHdlxg/OGLAgc9VRhnrhHUbJZp07Crcw4T/MOfS4KhjlxgqYgJRw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^1.7.0",
+ "@multiformats/multiaddr": "^12.2.3",
+ "interface-datastore": "^8.2.11",
+ "multiformats": "^13.1.0",
+ "weald": "^1.0.2"
+ }
+ },
+ "node_modules/blockstore-core/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "license": "MIT",
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/browser-readablestream-to-it": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-2.0.8.tgz",
+ "integrity": "sha512-+aDq+8QoTxIklc9m21oVg96Bm18EpeVke4/8vWPNu+9Ktd+G4PYavitE4gv/pjIndw1q+vxE/Rcnv1zYHrEQbQ==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/cborg": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/cborg/-/cborg-4.2.10.tgz",
+ "integrity": "sha512-ZVA0xrVn8uBfDJYgfKKZzB/93z/Uiz7YtRdBPsZi/gyHNyqFdHMLHURVEk9dejOHepaX0zhcMyNva2/vF972SA==",
+ "license": "Apache-2.0",
+ "bin": {
+ "cborg": "lib/bin.js"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz",
+ "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "readdirp": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 14.16.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/chownr": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
+ "license": "ISC"
+ },
+ "node_modules/color": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
+ "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "color-convert": "^2.0.1",
+ "color-string": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=12.5.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/color-string": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
+ "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "color-name": "^1.0.0",
+ "simple-swizzle": "^0.2.2"
+ }
+ },
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-es": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.2.tgz",
+ "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/crossws": {
+ "version": "0.3.4",
+ "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.4.tgz",
+ "integrity": "sha512-uj0O1ETYX1Bh6uSgktfPvwDiPYGQ3aI4qVsaC/LWpkIzGj1nUYm5FK3K+t11oOlpN01lGbprFCH4wBlKdJjVgw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "uncrypto": "^0.1.3"
+ }
+ },
+ "node_modules/data-uri-to-buffer": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz",
+ "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/datastore-core": {
+ "version": "9.2.9",
+ "resolved": "https://registry.npmjs.org/datastore-core/-/datastore-core-9.2.9.tgz",
+ "integrity": "sha512-wraWTPsbtdE7FFaVo3pwPuTB/zXsgwGGAm8BgBYwYAuzZCTS0MfXmd/HH1vR9s0/NFFjOVmBkGiWCvKxZ+QjVw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/logger": "^4.0.6",
+ "err-code": "^3.0.1",
+ "interface-datastore": "^8.0.0",
+ "interface-store": "^5.0.0",
+ "it-drain": "^3.0.5",
+ "it-filter": "^3.0.4",
+ "it-map": "^3.0.5",
+ "it-merge": "^3.0.3",
+ "it-pipe": "^3.0.1",
+ "it-pushable": "^3.2.3",
+ "it-sort": "^3.0.4",
+ "it-take": "^3.0.4"
+ }
+ },
+ "node_modules/datastore-core/node_modules/@libp2p/interface": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.7.0.tgz",
+ "integrity": "sha512-/zFyaIaIGW0aihhsH7/93vQdpWInUzFocxF11RO/029Y6h0SVjs24HHbils+DqaFDTqN+L7oNlBx2rM2MnmTjA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@multiformats/multiaddr": "^12.2.3",
+ "it-pushable": "^3.2.3",
+ "it-stream-types": "^2.0.1",
+ "multiformats": "^13.1.0",
+ "progress-events": "^1.0.0",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/datastore-core/node_modules/@libp2p/logger": {
+ "version": "4.0.20",
+ "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.20.tgz",
+ "integrity": "sha512-TTh2dhHsOTAlMPxSa9ncFPHa/0jTt+0AQxwHdlxg/OGLAgc9VRhnrhHUbJZp07Crcw4T/MOfS4KhjlxgqYgJRw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^1.7.0",
+ "@multiformats/multiaddr": "^12.2.3",
+ "interface-datastore": "^8.2.11",
+ "multiformats": "^13.1.0",
+ "weald": "^1.0.2"
+ }
+ },
+ "node_modules/datastore-core/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/debug": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
+ "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "^2.1.3"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/decode-uri-component": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/decompress-response": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+ "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-response": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/deep-extend": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/default-gateway": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-7.2.2.tgz",
+ "integrity": "sha512-AD7TrdNNPXRZIGw63dw+lnGmT4v7ggZC5NHNJgAYWm5njrwoze1q5JSAW9YuLy2tjnoLUG/r8FEB93MCh9QJPg==",
+ "license": "BSD-2-Clause",
+ "dependencies": {
+ "execa": "^7.1.1"
+ },
+ "engines": {
+ "node": ">= 16"
+ }
+ },
+ "node_modules/defu": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz",
+ "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==",
+ "license": "MIT"
+ },
+ "node_modules/delay": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz",
+ "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/denque": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
+ "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/destr": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz",
+ "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/detect-browser": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz",
+ "integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w==",
+ "license": "MIT"
+ },
+ "node_modules/detect-libc": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
+ "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/dns-packet": {
+ "version": "5.6.1",
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz",
+ "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==",
+ "license": "MIT",
+ "dependencies": {
+ "@leichtgewicht/ip-codec": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/duplexify": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz",
+ "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "end-of-stream": "^1.4.1",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1",
+ "stream-shift": "^1.0.2"
+ }
+ },
+ "node_modules/end-of-stream": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+ "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+ "license": "MIT",
+ "dependencies": {
+ "once": "^1.4.0"
+ }
+ },
+ "node_modules/err-code": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz",
+ "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==",
+ "license": "MIT"
+ },
+ "node_modules/esbuild": {
+ "version": "0.25.2",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz",
+ "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.25.2",
+ "@esbuild/android-arm": "0.25.2",
+ "@esbuild/android-arm64": "0.25.2",
+ "@esbuild/android-x64": "0.25.2",
+ "@esbuild/darwin-arm64": "0.25.2",
+ "@esbuild/darwin-x64": "0.25.2",
+ "@esbuild/freebsd-arm64": "0.25.2",
+ "@esbuild/freebsd-x64": "0.25.2",
+ "@esbuild/linux-arm": "0.25.2",
+ "@esbuild/linux-arm64": "0.25.2",
+ "@esbuild/linux-ia32": "0.25.2",
+ "@esbuild/linux-loong64": "0.25.2",
+ "@esbuild/linux-mips64el": "0.25.2",
+ "@esbuild/linux-ppc64": "0.25.2",
+ "@esbuild/linux-riscv64": "0.25.2",
+ "@esbuild/linux-s390x": "0.25.2",
+ "@esbuild/linux-x64": "0.25.2",
+ "@esbuild/netbsd-arm64": "0.25.2",
+ "@esbuild/netbsd-x64": "0.25.2",
+ "@esbuild/openbsd-arm64": "0.25.2",
+ "@esbuild/openbsd-x64": "0.25.2",
+ "@esbuild/sunos-x64": "0.25.2",
+ "@esbuild/win32-arm64": "0.25.2",
+ "@esbuild/win32-ia32": "0.25.2",
+ "@esbuild/win32-x64": "0.25.2"
+ }
+ },
+ "node_modules/event-iterator": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz",
+ "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==",
+ "license": "MIT"
+ },
+ "node_modules/eventemitter3": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
+ "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
+ "license": "MIT"
+ },
+ "node_modules/events": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.8.x"
+ }
+ },
+ "node_modules/execa": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz",
+ "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==",
+ "license": "MIT",
+ "dependencies": {
+ "cross-spawn": "^7.0.3",
+ "get-stream": "^6.0.1",
+ "human-signals": "^4.3.0",
+ "is-stream": "^3.0.0",
+ "merge-stream": "^2.0.0",
+ "npm-run-path": "^5.1.0",
+ "onetime": "^6.0.0",
+ "signal-exit": "^3.0.7",
+ "strip-final-newline": "^3.0.0"
+ },
+ "engines": {
+ "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/execa?sponsor=1"
+ }
+ },
+ "node_modules/exit-hook": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz",
+ "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/expand-template": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
+ "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
+ "license": "(MIT OR WTFPL)",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/exsolve": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.5.tgz",
+ "integrity": "sha512-pz5dvkYYKQ1AHVrgOzBKWeP4u4FRb3a6DNK2ucr0OoNwYIU4QWsJ+NM36LLzORT+z845MzKHHhpXiUF5nvQoJg==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/fast-redact": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz",
+ "integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/filter-obj": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
+ "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/freeport-promise": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/freeport-promise/-/freeport-promise-2.0.0.tgz",
+ "integrity": "sha512-dwWpT1DdQcwrhmRwnDnPM/ZFny+FtzU+k50qF2eid3KxaQDsMiBrwo1i0G3qSugkN5db6Cb0zgfc68QeTOpEFg==",
+ "license": "Apache-2.0 OR MIT",
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/fs-constants": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+ "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
+ "license": "MIT"
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/get-iterator": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-2.0.1.tgz",
+ "integrity": "sha512-7HuY/hebu4gryTDT7O/XY/fvY9wRByEGdK6QOa4of8npTcv0+NS6frFKABcf6S9EBAsveTuKTsZQQBFMMNILIg==",
+ "license": "MIT"
+ },
+ "node_modules/get-source": {
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz",
+ "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==",
+ "dev": true,
+ "license": "Unlicense",
+ "dependencies": {
+ "data-uri-to-buffer": "^2.0.0",
+ "source-map": "^0.6.1"
+ }
+ },
+ "node_modules/get-stream": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/github-from-package": {
+ "version": "0.0.0",
+ "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
+ "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
+ "license": "MIT"
+ },
+ "node_modules/glob-to-regexp": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
+ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
+ "dev": true,
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/h3": {
+ "version": "1.15.1",
+ "resolved": "https://registry.npmjs.org/h3/-/h3-1.15.1.tgz",
+ "integrity": "sha512-+ORaOBttdUm1E2Uu/obAyCguiI7MbBvsLTndc3gyK3zU+SYLoZXlyCP9Xgy0gikkGufFLTZXCXD6+4BsufnmHA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "cookie-es": "^1.2.2",
+ "crossws": "^0.3.3",
+ "defu": "^6.1.4",
+ "destr": "^2.0.3",
+ "iron-webcrypto": "^1.2.1",
+ "node-mock-http": "^1.0.0",
+ "radix3": "^1.1.2",
+ "ufo": "^1.5.4",
+ "uncrypto": "^0.1.3"
+ }
+ },
+ "node_modules/hamt-sharding": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-3.0.6.tgz",
+ "integrity": "sha512-nZeamxfymIWLpVcAN0CRrb7uVq3hCOGj9IcL6NMA6VVCVWqj+h9Jo/SmaWuS92AEDf1thmHsM5D5c70hM3j2Tg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "sparse-array": "^1.3.1",
+ "uint8arrays": "^5.0.1"
+ }
+ },
+ "node_modules/hamt-sharding/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/hamt-sharding/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/hashlru": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/hashlru/-/hashlru-2.3.0.tgz",
+ "integrity": "sha512-0cMsjjIC8I+D3M44pOQdsy0OHXGLVz6Z0beRuufhKa0KfaD2wGwAev6jILzXsd3/vpnNQJmWyZtIILqM1N+n5A==",
+ "license": "MIT"
+ },
+ "node_modules/helia": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/helia/-/helia-2.1.0.tgz",
+ "integrity": "sha512-OJOm99WYZC7o3hGRhv2rbWK6nDw2cRWx2+g6uMDF5YL04yZ2vZcE/8xccM3ekhrZFSJhbUGPID4AKGULIaxHbg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@chainsafe/libp2p-gossipsub": "^10.0.0",
+ "@chainsafe/libp2p-noise": "^13.0.0",
+ "@chainsafe/libp2p-yamux": "^5.0.0",
+ "@helia/delegated-routing-v1-http-api-client": "^1.1.0",
+ "@helia/interface": "^2.1.0",
+ "@ipld/dag-cbor": "^9.0.0",
+ "@ipld/dag-json": "^10.0.1",
+ "@ipld/dag-pb": "^4.0.3",
+ "@libp2p/bootstrap": "^9.0.2",
+ "@libp2p/interface": "^0.1.1",
+ "@libp2p/kad-dht": "^10.0.2",
+ "@libp2p/logger": "^3.0.1",
+ "@libp2p/mdns": "^9.0.2",
+ "@libp2p/mplex": "^9.0.2",
+ "@libp2p/tcp": "^8.0.2",
+ "@libp2p/webrtc": "^3.1.3",
+ "@libp2p/websockets": "^7.0.2",
+ "@libp2p/webtransport": "^3.0.3",
+ "any-signal": "^4.1.1",
+ "blockstore-core": "^4.0.0",
+ "cborg": "^4.0.1",
+ "datastore-core": "^9.0.0",
+ "interface-blockstore": "^5.0.0",
+ "interface-datastore": "^8.0.0",
+ "interface-store": "^5.0.1",
+ "ipfs-bitswap": "^19.0.0",
+ "ipns": "^7.0.1",
+ "it-all": "^3.0.2",
+ "it-drain": "^3.0.1",
+ "it-filter": "^3.0.1",
+ "it-foreach": "^2.0.2",
+ "libp2p": "^0.46.6",
+ "mortice": "^3.0.1",
+ "multiformats": "^12.0.1",
+ "p-defer": "^4.0.0",
+ "p-queue": "^7.3.4",
+ "progress-events": "^1.0.0",
+ "uint8arrays": "^4.0.3"
+ }
+ },
+ "node_modules/helia/node_modules/p-queue": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz",
+ "integrity": "sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventemitter3": "^5.0.1",
+ "p-timeout": "^5.0.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/helia/node_modules/p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/human-signals": {
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
+ "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=14.18.0"
+ }
+ },
+ "node_modules/idb-keyval": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/idb-keyval/-/idb-keyval-6.2.1.tgz",
+ "integrity": "sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==",
+ "license": "Apache-2.0",
+ "peer": true
+ },
+ "node_modules/ieee754": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
+ "node_modules/ini": {
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+ "license": "ISC"
+ },
+ "node_modules/interface-blockstore": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.3.1.tgz",
+ "integrity": "sha512-nhgrQnz6yUQEqxTFLhlOBurQOy5lWlwCpgFmZ3GTObTVTQS9RZjK/JTozY6ty9uz2lZs7VFJSqwjWAltorJ4Vw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "interface-store": "^6.0.0",
+ "multiformats": "^13.2.3"
+ }
+ },
+ "node_modules/interface-blockstore/node_modules/interface-store": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.2.tgz",
+ "integrity": "sha512-KSFCXtBlNoG0hzwNa0RmhHtrdhzexp+S+UY2s0rWTBJyfdEIgn6i6Zl9otVqrcFYbYrneBT7hbmHQ8gE0C3umA==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/interface-blockstore/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/interface-datastore": {
+ "version": "8.3.1",
+ "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.3.1.tgz",
+ "integrity": "sha512-3r0ETmHIi6HmvM5sc09QQiCD3gUfwtEM/AAChOyAd/UAKT69uk8LXfTSUBufbUIO/dU65Vj8nb9O6QjwW8vDSQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "interface-store": "^6.0.0",
+ "uint8arrays": "^5.1.0"
+ }
+ },
+ "node_modules/interface-datastore/node_modules/interface-store": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.2.tgz",
+ "integrity": "sha512-KSFCXtBlNoG0hzwNa0RmhHtrdhzexp+S+UY2s0rWTBJyfdEIgn6i6Zl9otVqrcFYbYrneBT7hbmHQ8gE0C3umA==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/interface-datastore/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/interface-datastore/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/interface-store": {
+ "version": "5.1.8",
+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.8.tgz",
+ "integrity": "sha512-7na81Uxkl0vqk0CBPO5PvyTkdaJBaezwUJGsMOz7riPOq0rJt+7W31iaopaMICWea/iykUsvNlPx/Tc+MxC3/w==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/ip-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-5.0.0.tgz",
+ "integrity": "sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ipaddr.js": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz",
+ "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/ipfs-bitswap": {
+ "version": "19.0.2",
+ "resolved": "https://registry.npmjs.org/ipfs-bitswap/-/ipfs-bitswap-19.0.2.tgz",
+ "integrity": "sha512-pm0EcnTAwMMkCmdXHw/a7uPXzQ4I/pxVFiQZ6Ebg/R64XxAky/bCOJRzmqsgqH0+prH2bXAOgzS0mOZdL+zFSw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/interface": "^0.1.1",
+ "@libp2p/logger": "^3.0.1",
+ "@multiformats/multiaddr": "^12.1.0",
+ "@vascosantos/moving-average": "^1.1.0",
+ "any-signal": "^4.1.1",
+ "blockstore-core": "^4.0.0",
+ "events": "^3.3.0",
+ "interface-blockstore": "^5.0.0",
+ "interface-store": "^5.1.0",
+ "it-foreach": "^2.0.2",
+ "it-length-prefixed": "^9.0.0",
+ "it-map": "^3.0.2",
+ "it-pipe": "^3.0.1",
+ "it-take": "^3.0.1",
+ "just-debounce-it": "^3.0.1",
+ "multiformats": "^12.0.1",
+ "progress-events": "^1.0.0",
+ "protons-runtime": "^5.0.0",
+ "timeout-abort-controller": "^3.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.2",
+ "varint": "^6.0.0",
+ "varint-decoder": "^1.0.0"
+ }
+ },
+ "node_modules/ipfs-unixfs": {
+ "version": "11.2.1",
+ "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-11.2.1.tgz",
+ "integrity": "sha512-gUeeX63EFgiaMgcs0cUs2ZUPvlOeEZ38okjK8twdWGZX2jYd2rCk8k/TJ3DSRIDZ2t/aZMv6I23guxHaofZE3w==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "protons-runtime": "^5.5.0",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/ipfs-unixfs-exporter": {
+ "version": "13.6.2",
+ "resolved": "https://registry.npmjs.org/ipfs-unixfs-exporter/-/ipfs-unixfs-exporter-13.6.2.tgz",
+ "integrity": "sha512-U3NkQHvQn5XzxtjSo1/GfoFIoXYY4hPgOlZG5RUrV5ScBI222b3jAHbHksXZuMy7sqPkA9ieeWdOmnG1+0nxyw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@ipld/dag-cbor": "^9.2.1",
+ "@ipld/dag-json": "^10.2.2",
+ "@ipld/dag-pb": "^4.1.2",
+ "@multiformats/murmur3": "^2.1.8",
+ "hamt-sharding": "^3.0.6",
+ "interface-blockstore": "^5.3.0",
+ "ipfs-unixfs": "^11.0.0",
+ "it-filter": "^3.1.1",
+ "it-last": "^3.0.6",
+ "it-map": "^3.1.1",
+ "it-parallel": "^3.0.8",
+ "it-pipe": "^3.0.1",
+ "it-pushable": "^3.2.3",
+ "multiformats": "^13.2.3",
+ "p-queue": "^8.0.1",
+ "progress-events": "^1.0.1"
+ }
+ },
+ "node_modules/ipfs-unixfs-exporter/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/ipfs-unixfs-importer": {
+ "version": "15.3.2",
+ "resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-15.3.2.tgz",
+ "integrity": "sha512-12FqAAAE3YC6AHtYxZ944nDCabmvbNLdhNCVIN5RJIOri82ss62XdX4lsLpex9VvPzDIJyTAsrKJPcwM6hXGdQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@ipld/dag-pb": "^4.1.2",
+ "@multiformats/murmur3": "^2.1.8",
+ "hamt-sharding": "^3.0.6",
+ "interface-blockstore": "^5.3.0",
+ "interface-store": "^6.0.0",
+ "ipfs-unixfs": "^11.0.0",
+ "it-all": "^3.0.6",
+ "it-batch": "^3.0.6",
+ "it-first": "^3.0.6",
+ "it-parallel-batch": "^3.0.6",
+ "multiformats": "^13.2.3",
+ "progress-events": "^1.0.1",
+ "rabin-wasm": "^0.1.5",
+ "uint8arraylist": "^2.4.8",
+ "uint8arrays": "^5.1.0"
+ }
+ },
+ "node_modules/ipfs-unixfs-importer/node_modules/interface-store": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.2.tgz",
+ "integrity": "sha512-KSFCXtBlNoG0hzwNa0RmhHtrdhzexp+S+UY2s0rWTBJyfdEIgn6i6Zl9otVqrcFYbYrneBT7hbmHQ8gE0C3umA==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/ipfs-unixfs-importer/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/ipfs-unixfs-importer/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/ipns": {
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/ipns/-/ipns-7.0.2.tgz",
+ "integrity": "sha512-jsrIgsCmFZL/kATuO+4N5Oy3b4xhnO42N39nCLyhhC8NM+SZIxTmZmUSDU0GoI8Vn0X/Zy2Sj3Lxbhg3UlVMUA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@libp2p/crypto": "^2.0.3",
+ "@libp2p/interface": "^0.1.2",
+ "@libp2p/logger": "^3.0.2",
+ "@libp2p/peer-id": "^3.0.2",
+ "cborg": "^4.0.1",
+ "err-code": "^3.0.1",
+ "interface-datastore": "^8.1.0",
+ "multiformats": "^12.0.1",
+ "protons-runtime": "^5.0.0",
+ "timestamp-nano": "^1.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^5.0.1"
+ }
+ },
+ "node_modules/ipns/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/ipns/node_modules/uint8arrays/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/iron-webcrypto": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz",
+ "integrity": "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==",
+ "license": "MIT",
+ "peer": true,
+ "funding": {
+ "url": "https://github.com/sponsors/brc-dd"
+ }
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
+ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/is-electron": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",
+ "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==",
+ "license": "MIT"
+ },
+ "node_modules/is-loopback-addr": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/is-loopback-addr/-/is-loopback-addr-2.0.2.tgz",
+ "integrity": "sha512-26POf2KRCno/KTNL5Q0b/9TYnL00xEsSaLfiFRmjM7m7Lw7ZMmFybzzuX4CcsLAluZGd+niLUiMRxEooVE3aqg==",
+ "license": "MIT"
+ },
+ "node_modules/is-network-error": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz",
+ "integrity": "sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-plain-obj": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
+ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-stream": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+ "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+ "license": "MIT",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-typedarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "license": "ISC"
+ },
+ "node_modules/it-all": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.7.tgz",
+ "integrity": "sha512-PkuYtu6XhJzuPTKXImd6y0qE6H91MUPV/b9xotXMAI6GjmD2v3NoHj2g5L0lS2qZ0EzyGWZU1kp0UxW8POvNBQ==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-batch": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-3.0.7.tgz",
+ "integrity": "sha512-tcAW8+OAnhC3WqO5ggInfndL/jJsL3i++JLBADKs7LSSzfVVOXicufAuY5Sv4RbCkulRuk/ClSZhS0fu9B9SJA==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-batched-bytes": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/it-batched-bytes/-/it-batched-bytes-2.0.8.tgz",
+ "integrity": "sha512-xqIaXYhcj/O64W99hU446n1aBvHAQYEqdcMxFOdUH7X7C7Rf6J2NlsfU+mJ/d170qPvS3rWfm5ed5UcTi7j5pg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "p-defer": "^4.0.1",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/it-byte-stream": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/it-byte-stream/-/it-byte-stream-1.1.1.tgz",
+ "integrity": "sha512-OIOb8PvK9ZV7MHvyxIDNyN3jmrxrJdx99G0RIYYb3Tzo1OWv+O1C6mfg7nnlDuuTQz2POYFXe87AShKAEl+POw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-queueless-pushable": "^1.0.0",
+ "it-stream-types": "^2.0.2",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/it-drain": {
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.8.tgz",
+ "integrity": "sha512-eeOz+WwKc11ou1UuqZympcXPLCjpTn5ALcYFJiHeTEiYEZ2py/J1vq41XWYj88huCUiqp9iNHfObOKrbIk5Izw==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-filter": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.1.2.tgz",
+ "integrity": "sha512-2AozaGjIvBBiB7t7MpVNug9kwofqmKSpvgW7zhuyvCs6xxDd6FrfvqyfYtlQTKLNP+Io1WeXko1UQhdlK4M0gg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-peekable": "^3.0.0"
+ }
+ },
+ "node_modules/it-first": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.7.tgz",
+ "integrity": "sha512-e2dVSlOP+pAxPYPVJBF4fX7au8cvGfvLhIrGCMc5aWDnCvwgOo94xHbi3Da6eXQ2jPL5FGEM8sJMn5uE8Seu+g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-foreach": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.1.2.tgz",
+ "integrity": "sha512-PvXs3v1FaeWDhWzRxnwB4vSKJngxdLgi0PddkfurCvIFBmKTBfWONLeyDk5dxrvtCzdE4y96KzEQynk4/bbI5A==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-peekable": "^3.0.0"
+ }
+ },
+ "node_modules/it-glob": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-2.0.7.tgz",
+ "integrity": "sha512-FjL2rAsGu566sMVKexFG5ciDoKoi1lgwXlSE6DW0yVbGRyvrlzi0OQ3fbfrw89dpIAzJFHnLNQwZS4yRkt3d/Q==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "minimatch": "^9.0.4"
+ }
+ },
+ "node_modules/it-handshake": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/it-handshake/-/it-handshake-4.1.3.tgz",
+ "integrity": "sha512-V6Lt9A9usox9iduOX+edU1Vo94E6v9Lt9dOvg3ubFaw1qf5NCxXLi93Ao4fyCHWDYd8Y+DUhadwNtWVyn7qqLg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-pushable": "^3.1.0",
+ "it-reader": "^6.0.1",
+ "it-stream-types": "^2.0.1",
+ "p-defer": "^4.0.0",
+ "uint8arraylist": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/it-last": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-last/-/it-last-3.0.7.tgz",
+ "integrity": "sha512-qG4BTveE6Wzsz5voqaOtZAfZgXTJT+yiaj45vp5S0Vi8oOdgKlRqUeolfvWoMCJ9vwSc/z9pAaNYIza7gA851w==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-length": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-length/-/it-length-3.0.7.tgz",
+ "integrity": "sha512-URrszwrzPrUn6PtsSFcixG4NwHydaARmPubO0UUnFH+NSNylBaGtair1fnxX7Zf2qVJQltPBVs3PZvcmFPTLXA==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-length-prefixed": {
+ "version": "9.1.1",
+ "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-9.1.1.tgz",
+ "integrity": "sha512-O88nBweT6M9ozsmok68/auKH7ik/slNM4pYbM9lrfy2z5QnpokW5SlrepHZDKtN71llhG2sZvd6uY4SAl+lAQg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-reader": "^6.0.1",
+ "it-stream-types": "^2.0.1",
+ "uint8-varint": "^2.0.1",
+ "uint8arraylist": "^2.0.0",
+ "uint8arrays": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/it-length-prefixed-stream": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/it-length-prefixed-stream/-/it-length-prefixed-stream-1.2.1.tgz",
+ "integrity": "sha512-FYqlxc2toUoK+aPO5r3KDBIUG1mOvk2DzmjQcsfLUTHRWMJP4Va9855tVzg/22Bj+VUUaT7gxBg7HmbiCxTK4w==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-byte-stream": "^1.0.0",
+ "it-stream-types": "^2.0.2",
+ "uint8-varint": "^2.0.4",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/it-length-prefixed/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-length-prefixed/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/it-map": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/it-map/-/it-map-3.1.2.tgz",
+ "integrity": "sha512-G3dzFUjTYHKumJJ8wa9dSDS3yKm8L7qDUnAgzemOD0UMztwm54Qc2v97SuUCiAgbOz/aibkSLImfoFK09RlSFQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-peekable": "^3.0.0"
+ }
+ },
+ "node_modules/it-merge": {
+ "version": "3.0.9",
+ "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.9.tgz",
+ "integrity": "sha512-TjY4WTiwe4ONmaKScNvHDAJj6Tw0UeQFp4JrtC/3Mq7DTyhytes7mnv5OpZV4gItpZcs0AgRntpT2vAy2cnXUw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-queueless-pushable": "^2.0.0"
+ }
+ },
+ "node_modules/it-merge/node_modules/it-queueless-pushable": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/it-queueless-pushable/-/it-queueless-pushable-2.0.0.tgz",
+ "integrity": "sha512-MlNnefWT/ntv5fesrHpxwVIu6ZdtlkN0A4aaJiE5wnmPMBv9ttiwX3UEMf78dFwIj5ZNaU9usYXg4swMEpUNJQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "abort-error": "^1.0.1",
+ "p-defer": "^4.0.1",
+ "race-signal": "^1.1.3"
+ }
+ },
+ "node_modules/it-ndjson": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/it-ndjson/-/it-ndjson-1.1.2.tgz",
+ "integrity": "sha512-TPKpdYSNKjDdroCPnLamM5Up6XnPQ7F1KgNP3Ib5y5O4ayOVP+DHac/pzjUigcg9Kf9gkGVXDz8+FFKpWwoB3w==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/it-pair": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz",
+ "integrity": "sha512-5M0t5RAcYEQYNG5BV7d7cqbdwbCAp5yLdzvkxsZmkuZsLbTdZzah6MQySYfaAQjNDCq6PUnDt0hqBZ4NwMfW6g==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-stream-types": "^2.0.1",
+ "p-defer": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/it-parallel": {
+ "version": "3.0.9",
+ "resolved": "https://registry.npmjs.org/it-parallel/-/it-parallel-3.0.9.tgz",
+ "integrity": "sha512-FSg8T+pr7Z1VUuBxEzAAp/K1j8r1e9mOcyzpWMxN3mt33WFhroFjWXV1oYSSjNqcdYwxD/XgydMVMktJvKiDog==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "p-defer": "^4.0.1"
+ }
+ },
+ "node_modules/it-parallel-batch": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-3.0.7.tgz",
+ "integrity": "sha512-R/YKQMefUwLYfJ2UxMaxQUf+Zu9TM+X1KFDe4UaSQlcNog6AbMNMBt3w1suvLEjDDMrI9FNrlopVumfBIboeOg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-batch": "^3.0.0"
+ }
+ },
+ "node_modules/it-peekable": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.6.tgz",
+ "integrity": "sha512-odk9wn8AwFQipy8+tFaZNRCM62riraKZJRysfbmOett9wgJumCwgZFzWUBUwMoiQapEcEVGwjDpMChZIi+zLuQ==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-pipe": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz",
+ "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-merge": "^3.0.0",
+ "it-pushable": "^3.1.2",
+ "it-stream-types": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/it-protobuf-stream": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.6.tgz",
+ "integrity": "sha512-TxqgDHXTBt1XkYhrGKP8ubNsYD4zuTClSg6S1M0xTPsskGKA4nPFOGM60zrkh4NMB1Wt3EnsqM5U7kXkx60EXQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-length-prefixed-stream": "^1.0.0",
+ "it-stream-types": "^2.0.2",
+ "uint8arraylist": "^2.4.8"
+ }
+ },
+ "node_modules/it-pushable": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz",
+ "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "p-defer": "^4.0.0"
+ }
+ },
+ "node_modules/it-queueless-pushable": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/it-queueless-pushable/-/it-queueless-pushable-1.0.2.tgz",
+ "integrity": "sha512-BFIm48C4O8+i+oVEPQpZ70+CaAsVUircvZtZCrpG2Q64933aLp+tDmas1mTBwqVBfIUUlg09d+e6SWW1CBuykQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "p-defer": "^4.0.1",
+ "race-signal": "^1.1.3"
+ }
+ },
+ "node_modules/it-reader": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/it-reader/-/it-reader-6.0.4.tgz",
+ "integrity": "sha512-XCWifEcNFFjjBHtor4Sfaj8rcpt+FkY0L6WdhD578SCDhV4VUm7fCkF3dv5a+fTcfQqvN9BsxBTvWbYO6iCjTg==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-stream-types": "^2.0.1",
+ "uint8arraylist": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/it-sort": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-sort/-/it-sort-3.0.7.tgz",
+ "integrity": "sha512-PsaKSd2Z0uhq8Mq5htdfsE/UagmdLCLWdBXPwi3FZGR4BTG180pFamhK+O+luFtBCNGRoqKAdtbZGTyGwA9uzw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "it-all": "^3.0.0"
+ }
+ },
+ "node_modules/it-stream-types": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz",
+ "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-take": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/it-take/-/it-take-3.0.7.tgz",
+ "integrity": "sha512-0+EbsTvH1XCpwhhFkjWdqJTjzS5XP3KL69woBqwANNhMLKn0j39jk/WHIlvbg9XW2vEm7cZz4p8w5DkBZR8LoA==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-to-buffer": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/it-to-buffer/-/it-to-buffer-4.0.8.tgz",
+ "integrity": "sha512-niZbR/+GbyQ2F2Nj79EJprT0gji5Si4nM1eJpgtlvfbvhsi5ZgA/y+mzSrOoNajiTC3svqvoNy8HGlTW2Faz/A==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "uint8arrays": "^5.1.0"
+ }
+ },
+ "node_modules/it-to-buffer/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-to-buffer/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/it-ws": {
+ "version": "6.1.5",
+ "resolved": "https://registry.npmjs.org/it-ws/-/it-ws-6.1.5.tgz",
+ "integrity": "sha512-uWjMtpy5HqhSd/LlrlP3fhYrr7rUfJFFMABv0F5d6n13Q+0glhZthwUKpEAVhDrXY95Tb1RB5lLqqef+QbVNaw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@types/ws": "^8.2.2",
+ "event-iterator": "^2.0.0",
+ "it-stream-types": "^2.0.1",
+ "uint8arrays": "^5.0.0",
+ "ws": "^8.4.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/it-ws/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/it-ws/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/just-debounce-it": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/just-debounce-it/-/just-debounce-it-3.2.0.tgz",
+ "integrity": "sha512-WXzwLL0745uNuedrCsCs3rpmfD6DBaf7uuVwaq98/8dafURfgQaBsSpjiPp5+CW6Vjltwy9cOGI6qE71b3T8iQ==",
+ "license": "MIT"
+ },
+ "node_modules/keyvaluestorage-interface": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/keyvaluestorage-interface/-/keyvaluestorage-interface-1.0.0.tgz",
+ "integrity": "sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/libp2p": {
+ "version": "0.46.21",
+ "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.46.21.tgz",
+ "integrity": "sha512-p/3vCpw+ciizhlBofpzuez+4Fs8EeVFaVQZUQPwnQwycuOFcWLBhcqkOtv4KlqImFKOk+9TuyW1Xofjmr/wPnA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "@achingbrain/nat-port-mapper": "^1.0.9",
+ "@libp2p/crypto": "^2.0.8",
+ "@libp2p/interface": "^0.1.6",
+ "@libp2p/interface-internal": "^0.1.9",
+ "@libp2p/keychain": "^3.0.8",
+ "@libp2p/logger": "^3.1.0",
+ "@libp2p/multistream-select": "^4.0.6",
+ "@libp2p/peer-collections": "^4.0.8",
+ "@libp2p/peer-id": "^3.0.6",
+ "@libp2p/peer-id-factory": "^3.0.8",
+ "@libp2p/peer-record": "^6.0.9",
+ "@libp2p/peer-store": "^9.0.9",
+ "@libp2p/utils": "^4.0.7",
+ "@multiformats/mafmt": "^12.1.2",
+ "@multiformats/multiaddr": "^12.1.5",
+ "@multiformats/multiaddr-matcher": "^1.0.0",
+ "any-signal": "^4.1.1",
+ "datastore-core": "^9.0.1",
+ "delay": "^6.0.0",
+ "interface-datastore": "^8.2.0",
+ "it-all": "^3.0.2",
+ "it-drain": "^3.0.2",
+ "it-filter": "^3.0.1",
+ "it-first": "^3.0.1",
+ "it-handshake": "^4.1.3",
+ "it-length-prefixed": "^9.0.1",
+ "it-map": "^3.0.3",
+ "it-merge": "^3.0.0",
+ "it-pair": "^2.0.6",
+ "it-parallel": "^3.0.0",
+ "it-pipe": "^3.0.1",
+ "it-protobuf-stream": "^1.0.0",
+ "it-stream-types": "^2.0.1",
+ "merge-options": "^3.0.4",
+ "multiformats": "^12.0.1",
+ "p-defer": "^4.0.0",
+ "p-queue": "^7.3.4",
+ "p-retry": "^6.0.0",
+ "private-ip": "^3.0.0",
+ "protons-runtime": "^5.0.0",
+ "rate-limiter-flexible": "^3.0.0",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^4.0.6",
+ "wherearewe": "^2.0.1",
+ "xsalsa20": "^1.1.0"
+ }
+ },
+ "node_modules/libp2p/node_modules/p-queue": {
+ "version": "7.4.1",
+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz",
+ "integrity": "sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventemitter3": "^5.0.1",
+ "p-timeout": "^5.0.2"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/libp2p/node_modules/p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "license": "MIT"
+ },
+ "node_modules/lodash-es": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
+ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/lodash.isequal": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
+ "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==",
+ "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/long": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
+ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
+ "license": "Apache-2.0"
+ },
+ "node_modules/lru-cache": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",
+ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==",
+ "license": "ISC",
+ "peer": true
+ },
+ "node_modules/merge-options": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz",
+ "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-plain-obj": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/merge-stream": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+ "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+ "license": "MIT"
+ },
+ "node_modules/mime": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz",
+ "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "mime": "cli.js"
+ },
+ "engines": {
+ "node": ">=10.0.0"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/mimic-response": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+ "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/miniflare": {
+ "version": "4.20250416.0",
+ "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20250416.0.tgz",
+ "integrity": "sha512-261PhPgD9zs5/BTdbWqwiaXtWxb+Av5zKCwTU+HXrA5E4tf3qnULwh3u6SVUOAEArEroFuKJzawsQ9COtNBurQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@cspotcode/source-map-support": "0.8.1",
+ "acorn": "8.14.0",
+ "acorn-walk": "8.3.2",
+ "exit-hook": "2.2.1",
+ "glob-to-regexp": "0.4.1",
+ "stoppable": "1.1.0",
+ "undici": "^5.28.5",
+ "workerd": "1.20250416.0",
+ "ws": "8.18.0",
+ "youch": "3.3.4",
+ "zod": "3.22.3"
+ },
+ "bin": {
+ "miniflare": "bootstrap.js"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "9.0.5",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+ "license": "ISC",
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/mkdirp-classic": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+ "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
+ "license": "MIT"
+ },
+ "node_modules/mortice": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/mortice/-/mortice-3.0.6.tgz",
+ "integrity": "sha512-xUjsTQreX8rO3pHuGYDZ3PY/sEiONIzqzjLeog5akdY4bz9TlDDuvYlU8fm+6qnm4rnpa6AFxLhsfSBThLijdA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "observable-webworkers": "^2.0.1",
+ "p-queue": "^8.0.1",
+ "p-timeout": "^6.0.0"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "license": "MIT"
+ },
+ "node_modules/multibase": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz",
+ "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==",
+ "deprecated": "This module has been superseded by the multiformats module",
+ "license": "MIT",
+ "dependencies": {
+ "@multiformats/base-x": "^4.0.1"
+ },
+ "engines": {
+ "node": ">=12.0.0",
+ "npm": ">=6.0.0"
+ }
+ },
+ "node_modules/multicast-dns": {
+ "version": "7.2.5",
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz",
+ "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==",
+ "license": "MIT",
+ "dependencies": {
+ "dns-packet": "^5.2.2",
+ "thunky": "^1.0.2"
+ },
+ "bin": {
+ "multicast-dns": "cli.js"
+ }
+ },
+ "node_modules/multiformats": {
+ "version": "12.1.3",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+ "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+ "license": "Apache-2.0 OR MIT",
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/multihashes": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz",
+ "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==",
+ "license": "MIT",
+ "dependencies": {
+ "multibase": "^4.0.1",
+ "uint8arrays": "^3.0.0",
+ "varint": "^5.0.2"
+ },
+ "engines": {
+ "node": ">=12.0.0",
+ "npm": ">=6.0.0"
+ }
+ },
+ "node_modules/multihashes/node_modules/multiformats": {
+ "version": "9.9.0",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.9.0.tgz",
+ "integrity": "sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==",
+ "license": "(Apache-2.0 AND MIT)"
+ },
+ "node_modules/multihashes/node_modules/uint8arrays": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz",
+ "integrity": "sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==",
+ "license": "MIT",
+ "dependencies": {
+ "multiformats": "^9.4.2"
+ }
+ },
+ "node_modules/multihashes/node_modules/varint": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
+ "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==",
+ "license": "MIT"
+ },
+ "node_modules/murmurhash3js-revisited": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz",
+ "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/mustache": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
+ "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==",
+ "dev": true,
+ "license": "MIT",
+ "bin": {
+ "mustache": "bin/mustache"
+ }
+ },
+ "node_modules/napi-build-utils": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
+ "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
+ "license": "MIT"
+ },
+ "node_modules/netmask": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
+ "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4.0"
+ }
+ },
+ "node_modules/node-abi": {
+ "version": "3.74.0",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.74.0.tgz",
+ "integrity": "sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==",
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/node-datachannel": {
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/node-datachannel/-/node-datachannel-0.5.5.tgz",
+ "integrity": "sha512-B0MS/iK0qjCiNY5Go4055zuRCOuiFkOrhNOZuj2PAnaJN7YlnKxKidOLhLXf/lAcsJQXgj8BR31zsqJKKA16jA==",
+ "hasInstallScript": true,
+ "license": "MPL 2.0",
+ "dependencies": {
+ "node-domexception": "^2.0.1",
+ "prebuild-install": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/node-domexception": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-2.0.1.tgz",
+ "integrity": "sha512-M85rnSC7WQ7wnfQTARPT4LrK7nwCHLdDFOCcItZMhTQjyCebJH8GciKqYJNgaOFZs9nFmTmd/VMyi3OW5jA47w==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=16"
+ }
+ },
+ "node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/node-fetch-native": {
+ "version": "1.6.6",
+ "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.6.tgz",
+ "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/node-forge": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
+ "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
+ "license": "(BSD-3-Clause OR GPL-2.0)",
+ "engines": {
+ "node": ">= 6.13.0"
+ }
+ },
+ "node_modules/node-mock-http": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-mock-http/-/node-mock-http-1.0.0.tgz",
+ "integrity": "sha512-0uGYQ1WQL1M5kKvGRXWQ3uZCHtLTO8hln3oBjIusM75WoesZ909uQJs/Hb946i2SS+Gsrhkaa6iAO17jRIv6DQ==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/npm-run-path": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz",
+ "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/npm-run-path/node_modules/path-key": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+ "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/observable-webworkers": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/observable-webworkers/-/observable-webworkers-2.0.1.tgz",
+ "integrity": "sha512-JI1vB0u3pZjoQKOK1ROWzp0ygxSi7Yb0iR+7UNsw4/Zn4cQ0P3R7XL38zac/Dy2tEA7Lg88/wIJTjF8vYXZ0uw==",
+ "license": "Apache-2.0 OR MIT",
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/ofetch": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/ofetch/-/ofetch-1.4.1.tgz",
+ "integrity": "sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "destr": "^2.0.3",
+ "node-fetch-native": "^1.6.4",
+ "ufo": "^1.5.4"
+ }
+ },
+ "node_modules/ohash": {
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz",
+ "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/on-exit-leak-free": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz",
+ "integrity": "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "license": "ISC",
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/onetime": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+ "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+ "license": "MIT",
+ "dependencies": {
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-defer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.1.tgz",
+ "integrity": "sha512-Mr5KC5efvAK5VUptYEIopP1bakB85k2IWXaRC0rsh1uwn1L6M0LVml8OIQ4Gudg4oyZakf7FmeRLkMMtZW1i5A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-event": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/p-event/-/p-event-6.0.1.tgz",
+ "integrity": "sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==",
+ "license": "MIT",
+ "dependencies": {
+ "p-timeout": "^6.1.2"
+ },
+ "engines": {
+ "node": ">=16.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-queue": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.0.tgz",
+ "integrity": "sha512-mxLDbbGIBEXTJL0zEx8JIylaj3xQ7Z/7eEVjcF9fJX4DBiH9oqe+oahYnlKKxm0Ci9TlWTyhSHgygxMxjIB2jw==",
+ "license": "MIT",
+ "dependencies": {
+ "eventemitter3": "^5.0.1",
+ "p-timeout": "^6.1.2"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-retry": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz",
+ "integrity": "sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/retry": "0.12.2",
+ "is-network-error": "^1.0.0",
+ "retry": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=16.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-timeout": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.4.tgz",
+ "integrity": "sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/path-to-regexp": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz",
+ "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/pathe": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
+ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==",
+ "dev": true,
+ "license": "MIT"
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pino": {
+ "version": "7.11.0",
+ "resolved": "https://registry.npmjs.org/pino/-/pino-7.11.0.tgz",
+ "integrity": "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "atomic-sleep": "^1.0.0",
+ "fast-redact": "^3.0.0",
+ "on-exit-leak-free": "^0.2.0",
+ "pino-abstract-transport": "v0.5.0",
+ "pino-std-serializers": "^4.0.0",
+ "process-warning": "^1.0.0",
+ "quick-format-unescaped": "^4.0.3",
+ "real-require": "^0.1.0",
+ "safe-stable-stringify": "^2.1.0",
+ "sonic-boom": "^2.2.1",
+ "thread-stream": "^0.15.1"
+ },
+ "bin": {
+ "pino": "bin.js"
+ }
+ },
+ "node_modules/pino-abstract-transport": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz",
+ "integrity": "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "duplexify": "^4.1.2",
+ "split2": "^4.0.0"
+ }
+ },
+ "node_modules/pino-std-serializers": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz",
+ "integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/platform": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
+ "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
+ "license": "MIT"
+ },
+ "node_modules/prebuild-install": {
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
+ "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
+ "license": "MIT",
+ "dependencies": {
+ "detect-libc": "^2.0.0",
+ "expand-template": "^2.0.3",
+ "github-from-package": "0.0.0",
+ "minimist": "^1.2.3",
+ "mkdirp-classic": "^0.5.3",
+ "napi-build-utils": "^2.0.0",
+ "node-abi": "^3.3.0",
+ "pump": "^3.0.0",
+ "rc": "^1.2.7",
+ "simple-get": "^4.0.0",
+ "tar-fs": "^2.0.0",
+ "tunnel-agent": "^0.6.0"
+ },
+ "bin": {
+ "prebuild-install": "bin.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/printable-characters": {
+ "version": "1.0.42",
+ "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz",
+ "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==",
+ "dev": true,
+ "license": "Unlicense"
+ },
+ "node_modules/private-ip": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/private-ip/-/private-ip-3.0.2.tgz",
+ "integrity": "sha512-2pkOVPGYD/4QyAg95c6E/4bLYXPthT5Xw4ocXYzIIsMBhskOMn6IwkWXmg6ZiA6K58+O6VD/n02r1hDhk7vDPw==",
+ "license": "MIT",
+ "dependencies": {
+ "@chainsafe/is-ip": "^2.0.1",
+ "ip-regex": "^5.0.0",
+ "ipaddr.js": "^2.1.0",
+ "netmask": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=14.16"
+ }
+ },
+ "node_modules/process-warning": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz",
+ "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/progress-events": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/progress-events/-/progress-events-1.0.1.tgz",
+ "integrity": "sha512-MOzLIwhpt64KIVN64h1MwdKWiyKFNc/S6BoYKPIVUHFg0/eIEyBulhWCgn678v/4c0ri3FdGuzXymNCv02MUIw==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/protobufjs": {
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.0.tgz",
+ "integrity": "sha512-Z2E/kOY1QjoMlCytmexzYfDm/w5fKAiRwpSzGtdnXW1zC88Z2yXazHHrOtwCzn+7wSxyE8PYM4rvVcMphF9sOA==",
+ "hasInstallScript": true,
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "@protobufjs/aspromise": "^1.1.2",
+ "@protobufjs/base64": "^1.1.2",
+ "@protobufjs/codegen": "^2.0.4",
+ "@protobufjs/eventemitter": "^1.1.0",
+ "@protobufjs/fetch": "^1.1.0",
+ "@protobufjs/float": "^1.0.2",
+ "@protobufjs/inquire": "^1.1.0",
+ "@protobufjs/path": "^1.1.2",
+ "@protobufjs/pool": "^1.1.0",
+ "@protobufjs/utf8": "^1.1.0",
+ "@types/node": ">=13.7.0",
+ "long": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ }
+ },
+ "node_modules/protons-runtime": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.5.0.tgz",
+ "integrity": "sha512-EsALjF9QsrEk6gbCx3lmfHxVN0ah7nG3cY7GySD4xf4g8cr7g543zB88Foh897Sr1RQJ9yDCUsoT1i1H/cVUFA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "uint8-varint": "^2.0.2",
+ "uint8arraylist": "^2.4.3",
+ "uint8arrays": "^5.0.1"
+ }
+ },
+ "node_modules/protons-runtime/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/protons-runtime/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/pump": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz",
+ "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==",
+ "license": "MIT",
+ "dependencies": {
+ "end-of-stream": "^1.1.0",
+ "once": "^1.3.1"
+ }
+ },
+ "node_modules/query-string": {
+ "version": "6.14.1",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.14.1.tgz",
+ "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "decode-uri-component": "^0.2.0",
+ "filter-obj": "^1.1.0",
+ "split-on-first": "^1.0.0",
+ "strict-uri-encode": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/quick-format-unescaped": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz",
+ "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/rabin-wasm": {
+ "version": "0.1.5",
+ "resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz",
+ "integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==",
+ "license": "MIT",
+ "dependencies": {
+ "@assemblyscript/loader": "^0.9.4",
+ "bl": "^5.0.0",
+ "debug": "^4.3.1",
+ "minimist": "^1.2.5",
+ "node-fetch": "^2.6.1",
+ "readable-stream": "^3.6.0"
+ },
+ "bin": {
+ "rabin-wasm": "cli/bin.js"
+ }
+ },
+ "node_modules/race-signal": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz",
+ "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/radix3": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/radix3/-/radix3-1.1.2.tgz",
+ "integrity": "sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/rate-limiter-flexible": {
+ "version": "3.0.6",
+ "resolved": "https://registry.npmjs.org/rate-limiter-flexible/-/rate-limiter-flexible-3.0.6.tgz",
+ "integrity": "sha512-tlvbee6lyse/XTWmsuBDS4MT8N65FyM151bPmQlFyfhv9+RIHs7d3rSTXoz0j35H910dM01mH0yTIeWYo8+aAw==",
+ "license": "ISC"
+ },
+ "node_modules/rc": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
+ "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
+ "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
+ "dependencies": {
+ "deep-extend": "^0.6.0",
+ "ini": "~1.3.0",
+ "minimist": "^1.2.0",
+ "strip-json-comments": "~2.0.1"
+ },
+ "bin": {
+ "rc": "cli.js"
+ }
+ },
+ "node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",
+ "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">= 14.18.0"
+ },
+ "funding": {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/real-require": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz",
+ "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">= 12.13.0"
+ }
+ },
+ "node_modules/retimer": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/retimer/-/retimer-3.0.0.tgz",
+ "integrity": "sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA==",
+ "license": "MIT"
+ },
+ "node_modules/retry": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
+ "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/safe-stable-stringify": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz",
+ "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sanitize-filename": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz",
+ "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==",
+ "license": "WTFPL OR ISC",
+ "dependencies": {
+ "truncate-utf8-bytes": "^1.0.0"
+ }
+ },
+ "node_modules/sax": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz",
+ "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==",
+ "license": "ISC"
+ },
+ "node_modules/semver": {
+ "version": "7.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
+ "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
+ "license": "ISC",
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sharp": {
+ "version": "0.33.5",
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
+ "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "optional": true,
+ "dependencies": {
+ "color": "^4.2.3",
+ "detect-libc": "^2.0.3",
+ "semver": "^7.6.3"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-darwin-arm64": "0.33.5",
+ "@img/sharp-darwin-x64": "0.33.5",
+ "@img/sharp-libvips-darwin-arm64": "1.0.4",
+ "@img/sharp-libvips-darwin-x64": "1.0.4",
+ "@img/sharp-libvips-linux-arm": "1.0.5",
+ "@img/sharp-libvips-linux-arm64": "1.0.4",
+ "@img/sharp-libvips-linux-s390x": "1.0.4",
+ "@img/sharp-libvips-linux-x64": "1.0.4",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.4",
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.4",
+ "@img/sharp-linux-arm": "0.33.5",
+ "@img/sharp-linux-arm64": "0.33.5",
+ "@img/sharp-linux-s390x": "0.33.5",
+ "@img/sharp-linux-x64": "0.33.5",
+ "@img/sharp-linuxmusl-arm64": "0.33.5",
+ "@img/sharp-linuxmusl-x64": "0.33.5",
+ "@img/sharp-wasm32": "0.33.5",
+ "@img/sharp-win32-ia32": "0.33.5",
+ "@img/sharp-win32-x64": "0.33.5"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "license": "ISC"
+ },
+ "node_modules/simple-concat": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
+ "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/simple-get": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
+ "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "decompress-response": "^6.0.0",
+ "once": "^1.3.1",
+ "simple-concat": "^1.0.0"
+ }
+ },
+ "node_modules/simple-swizzle": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
+ "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "dependencies": {
+ "is-arrayish": "^0.3.1"
+ }
+ },
+ "node_modules/sonic-boom": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz",
+ "integrity": "sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "atomic-sleep": "^1.0.0"
+ }
+ },
+ "node_modules/sonr-cosmes": {
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/sonr-cosmes/-/sonr-cosmes-0.0.5.tgz",
+ "integrity": "sha512-P5hitnxWm7fjreEGZYV9omC9vtdqQUZfzckD8oxQ1LNbgoXBeVLvuGs2hy+GtuUzuw9ABYWW1rX7KBoa5BTeTA==",
+ "peerDependencies": {
+ "@bufbuild/protobuf": "1.2.0",
+ "@noble/hashes": "^1.3.2",
+ "@noble/secp256k1": "^2.0.0",
+ "@scure/base": "^1.1.3",
+ "@scure/bip32": "^1.3.2",
+ "@scure/bip39": "^1.2.1",
+ "@walletconnect/legacy-client": "^2.0.0",
+ "@walletconnect/sign-client": "2.8.6",
+ "lodash-es": "^4.17.21"
+ }
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "license": "BSD-3-Clause",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/sparse-array": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz",
+ "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==",
+ "license": "ISC"
+ },
+ "node_modules/split-on-first": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
+ "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/split2": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
+ "license": "ISC",
+ "peer": true,
+ "engines": {
+ "node": ">= 10.x"
+ }
+ },
+ "node_modules/stacktracey": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz",
+ "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==",
+ "dev": true,
+ "license": "Unlicense",
+ "dependencies": {
+ "as-table": "^1.0.36",
+ "get-source": "^2.0.12"
+ }
+ },
+ "node_modules/stoppable": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz",
+ "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=4",
+ "npm": ">=6"
+ }
+ },
+ "node_modules/stream-shift": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz",
+ "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/stream-to-it": {
+ "version": "0.2.4",
+ "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-0.2.4.tgz",
+ "integrity": "sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ==",
+ "license": "MIT",
+ "dependencies": {
+ "get-iterator": "^1.0.2"
+ }
+ },
+ "node_modules/stream-to-it/node_modules/get-iterator": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-1.0.2.tgz",
+ "integrity": "sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg==",
+ "license": "MIT"
+ },
+ "node_modules/strict-uri-encode": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
+ "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+ "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.2.0"
+ }
+ },
+ "node_modules/strip-final-newline": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+ "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/strip-json-comments": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "9.4.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz",
+ "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
+ }
+ },
+ "node_modules/tar-fs": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz",
+ "integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==",
+ "license": "MIT",
+ "dependencies": {
+ "chownr": "^1.1.1",
+ "mkdirp-classic": "^0.5.2",
+ "pump": "^3.0.0",
+ "tar-stream": "^2.1.4"
+ }
+ },
+ "node_modules/tar-stream": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
+ "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+ "license": "MIT",
+ "dependencies": {
+ "bl": "^4.0.3",
+ "end-of-stream": "^1.4.1",
+ "fs-constants": "^1.0.0",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/tar-stream/node_modules/bl": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+ "license": "MIT",
+ "dependencies": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ }
+ },
+ "node_modules/tar-stream/node_modules/buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "node_modules/thread-stream": {
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz",
+ "integrity": "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "real-require": "^0.1.0"
+ }
+ },
+ "node_modules/thunky": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
+ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==",
+ "license": "MIT"
+ },
+ "node_modules/timeout-abort-controller": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-3.0.0.tgz",
+ "integrity": "sha512-O3e+2B8BKrQxU2YRyEjC/2yFdb33slI22WRdUaDx6rvysfi9anloNZyR2q0l6LnePo5qH7gSM7uZtvvwZbc2yA==",
+ "license": "MIT",
+ "dependencies": {
+ "retimer": "^3.0.0"
+ }
+ },
+ "node_modules/timestamp-nano": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/timestamp-nano/-/timestamp-nano-1.0.1.tgz",
+ "integrity": "sha512-4oGOVZWTu5sl89PtCDnhQBSt7/vL1zVEwAfxH1p49JhTosxzVQWYBYFRFZ8nJmo0G6f824iyP/44BFAwIoKvIA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4.5.0"
+ }
+ },
+ "node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "license": "MIT"
+ },
+ "node_modules/truncate-utf8-bytes": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
+ "integrity": "sha512-95Pu1QXQvruGEhv62XCMO3Mm90GscOCClvrIUwCM0PYOXK3kaF3l3sIHxx71ThJfcbM2O5Au6SO3AWCSEfW4mQ==",
+ "license": "WTFPL",
+ "dependencies": {
+ "utf8-byte-length": "^1.0.1"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.8.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+ "dev": true,
+ "license": "0BSD",
+ "optional": true
+ },
+ "node_modules/tunnel-agent": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
+ "license": "Apache-2.0",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/typedarray-to-buffer": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+ "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "is-typedarray": "^1.0.0"
+ }
+ },
+ "node_modules/ufo": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz",
+ "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==",
+ "license": "MIT"
+ },
+ "node_modules/uint8-varint": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.4.tgz",
+ "integrity": "sha512-FwpTa7ZGA/f/EssWAb5/YV6pHgVF1fViKdW8cWaEarjB8t7NyofSWBdOTyFPaGuUG4gx3v1O3PQ8etsiOs3lcw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "uint8arraylist": "^2.0.0",
+ "uint8arrays": "^5.0.0"
+ }
+ },
+ "node_modules/uint8-varint/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/uint8-varint/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/uint8arraylist": {
+ "version": "2.4.8",
+ "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz",
+ "integrity": "sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "uint8arrays": "^5.0.1"
+ }
+ },
+ "node_modules/uint8arraylist/node_modules/multiformats": {
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.2.tgz",
+ "integrity": "sha512-qbB0CQDt3QKfiAzZ5ZYjLFOs+zW43vA4uyM8g27PeEuXZybUOFyjrVdP93HPBHMoglibwfkdVwbzfUq8qGcH6g==",
+ "license": "Apache-2.0 OR MIT"
+ },
+ "node_modules/uint8arraylist/node_modules/uint8arrays": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz",
+ "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^13.0.0"
+ }
+ },
+ "node_modules/uint8arrays": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+ "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "multiformats": "^12.0.1"
+ }
+ },
+ "node_modules/uncrypto": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz",
+ "integrity": "sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/undici": {
+ "version": "5.29.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz",
+ "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@fastify/busboy": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=14.0"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "6.21.0",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
+ "license": "MIT"
+ },
+ "node_modules/unenv": {
+ "version": "2.0.0-rc.15",
+ "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.15.tgz",
+ "integrity": "sha512-J/rEIZU8w6FOfLNz/hNKsnY+fFHWnu9MH4yRbSZF3xbbGHovcetXPs7sD+9p8L6CeNC//I9bhRYAOsBt2u7/OA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "defu": "^6.1.4",
+ "exsolve": "^1.0.4",
+ "ohash": "^2.0.11",
+ "pathe": "^2.0.3",
+ "ufo": "^1.5.4"
+ }
+ },
+ "node_modules/unstorage": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.15.0.tgz",
+ "integrity": "sha512-m40eHdGY/gA6xAPqo8eaxqXgBuzQTlAKfmB1iF7oCKXE1HfwHwzDJBywK+qQGn52dta+bPlZluPF7++yR3p/bg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "anymatch": "^3.1.3",
+ "chokidar": "^4.0.3",
+ "destr": "^2.0.3",
+ "h3": "^1.15.0",
+ "lru-cache": "^10.4.3",
+ "node-fetch-native": "^1.6.6",
+ "ofetch": "^1.4.1",
+ "ufo": "^1.5.4"
+ },
+ "peerDependencies": {
+ "@azure/app-configuration": "^1.8.0",
+ "@azure/cosmos": "^4.2.0",
+ "@azure/data-tables": "^13.3.0",
+ "@azure/identity": "^4.6.0",
+ "@azure/keyvault-secrets": "^4.9.0",
+ "@azure/storage-blob": "^12.26.0",
+ "@capacitor/preferences": "^6.0.3",
+ "@deno/kv": ">=0.9.0",
+ "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0",
+ "@planetscale/database": "^1.19.0",
+ "@upstash/redis": "^1.34.3",
+ "@vercel/blob": ">=0.27.1",
+ "@vercel/kv": "^1.0.1",
+ "aws4fetch": "^1.0.20",
+ "db0": ">=0.2.1",
+ "idb-keyval": "^6.2.1",
+ "ioredis": "^5.4.2",
+ "uploadthing": "^7.4.4"
+ },
+ "peerDependenciesMeta": {
+ "@azure/app-configuration": {
+ "optional": true
+ },
+ "@azure/cosmos": {
+ "optional": true
+ },
+ "@azure/data-tables": {
+ "optional": true
+ },
+ "@azure/identity": {
+ "optional": true
+ },
+ "@azure/keyvault-secrets": {
+ "optional": true
+ },
+ "@azure/storage-blob": {
+ "optional": true
+ },
+ "@capacitor/preferences": {
+ "optional": true
+ },
+ "@deno/kv": {
+ "optional": true
+ },
+ "@netlify/blobs": {
+ "optional": true
+ },
+ "@planetscale/database": {
+ "optional": true
+ },
+ "@upstash/redis": {
+ "optional": true
+ },
+ "@vercel/blob": {
+ "optional": true
+ },
+ "@vercel/kv": {
+ "optional": true
+ },
+ "aws4fetch": {
+ "optional": true
+ },
+ "db0": {
+ "optional": true
+ },
+ "idb-keyval": {
+ "optional": true
+ },
+ "ioredis": {
+ "optional": true
+ },
+ "uploadthing": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/utf8-byte-length": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz",
+ "integrity": "sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==",
+ "license": "(WTFPL OR MIT)"
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+ "license": "MIT"
+ },
+ "node_modules/varint": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz",
+ "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==",
+ "license": "MIT"
+ },
+ "node_modules/varint-decoder": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/varint-decoder/-/varint-decoder-1.0.0.tgz",
+ "integrity": "sha512-JkOvdztASWGUAsXshCFHrB9f6AgR2Q8W08CEyJ+43b1qtFocmI8Sp1R/M0E/hDOY2FzVIqk63tOYLgDYWuJ7IQ==",
+ "license": "MIT",
+ "dependencies": {
+ "varint": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=4.0.0",
+ "npm": ">=3.0.0"
+ }
+ },
+ "node_modules/varint-decoder/node_modules/varint": {
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
+ "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==",
+ "license": "MIT"
+ },
+ "node_modules/weald": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/weald/-/weald-1.0.4.tgz",
+ "integrity": "sha512-+kYTuHonJBwmFhP1Z4YQK/dGi3jAnJGCYhyODFpHK73rbxnp9lnZQj7a2m+WVgn8fXr5bJaxUpF6l8qZpPeNWQ==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "ms": "^3.0.0-canary.1",
+ "supports-color": "^9.4.0"
+ }
+ },
+ "node_modules/weald/node_modules/ms": {
+ "version": "3.0.0-canary.1",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-3.0.0-canary.1.tgz",
+ "integrity": "sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.13"
+ }
+ },
+ "node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
+ "node_modules/wherearewe": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/wherearewe/-/wherearewe-2.0.1.tgz",
+ "integrity": "sha512-XUguZbDxCA2wBn2LoFtcEhXL6AXo+hVjGonwhSTTTU9SzbWG8Xu3onNIpzf9j/mYUcJQ0f+m37SzG77G851uFw==",
+ "license": "Apache-2.0 OR MIT",
+ "dependencies": {
+ "is-electron": "^2.2.0"
+ },
+ "engines": {
+ "node": ">=16.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/workerd": {
+ "version": "1.20250416.0",
+ "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20250416.0.tgz",
+ "integrity": "sha512-Yrx/bZAKbmSvomdTAzzIpOHwpYhs0ldr2wqed22UEhQ0mIplAHY4xmY+SjAJhP/TydZrciOVzBxwM1+4T40KNA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "workerd": "bin/workerd"
+ },
+ "engines": {
+ "node": ">=16"
+ },
+ "optionalDependencies": {
+ "@cloudflare/workerd-darwin-64": "1.20250416.0",
+ "@cloudflare/workerd-darwin-arm64": "1.20250416.0",
+ "@cloudflare/workerd-linux-64": "1.20250416.0",
+ "@cloudflare/workerd-linux-arm64": "1.20250416.0",
+ "@cloudflare/workerd-windows-64": "1.20250416.0"
+ }
+ },
+ "node_modules/wrangler": {
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.12.0.tgz",
+ "integrity": "sha512-4rfAXOi5KqM3ECvOrZJ97k3zEqxVwtdt4bijd8jcRBZ6iJYvEtjgjVi4TsfkVa/eXGhpfHTUnKu2uk8UHa8M2w==",
+ "dev": true,
+ "license": "MIT OR Apache-2.0",
+ "dependencies": {
+ "@cloudflare/kv-asset-handler": "0.4.0",
+ "@cloudflare/unenv-preset": "2.3.1",
+ "blake3-wasm": "2.1.5",
+ "esbuild": "0.25.2",
+ "miniflare": "4.20250416.0",
+ "path-to-regexp": "6.3.0",
+ "unenv": "2.0.0-rc.15",
+ "workerd": "1.20250416.0"
+ },
+ "bin": {
+ "wrangler": "bin/wrangler.js",
+ "wrangler2": "bin/wrangler.js"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2",
+ "sharp": "^0.33.5"
+ },
+ "peerDependencies": {
+ "@cloudflare/workers-types": "^4.20250415.0"
+ },
+ "peerDependenciesMeta": {
+ "@cloudflare/workers-types": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "license": "ISC"
+ },
+ "node_modules/ws": {
+ "version": "8.18.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
+ "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/xml2js": {
+ "version": "0.6.2",
+ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz",
+ "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==",
+ "license": "MIT",
+ "dependencies": {
+ "sax": ">=0.6.0",
+ "xmlbuilder": "~11.0.0"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/xmlbuilder": {
+ "version": "11.0.1",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
+ "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/xsalsa20": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.2.0.tgz",
+ "integrity": "sha512-FIr/DEeoHfj7ftfylnoFt3rAIRoWXpx2AoDfrT2qD2wtp7Dp+COajvs/Icb7uHqRW9m60f5iXZwdsJJO3kvb7w==",
+ "license": "MIT"
+ },
+ "node_modules/youch": {
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.4.tgz",
+ "integrity": "sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "cookie": "^0.7.1",
+ "mustache": "^4.2.0",
+ "stacktracey": "^2.1.8"
+ }
+ },
+ "node_modules/zod": {
+ "version": "3.22.3",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.3.tgz",
+ "integrity": "sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug==",
+ "dev": true,
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/colinhacks"
+ }
+ }
+ }
+}
diff --git a/cmd/vault/package.json b/cmd/vault/package.json
new file mode 100644
index 0000000..83bf416
--- /dev/null
+++ b/cmd/vault/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "@sonr-io/motr-vault",
+ "version": "0.0.1",
+ "private": true,
+ "scripts": {
+ "build": "npm run clean && npm run assets && npm run wasm",
+ "assets": "go run github.com/syumai/workers/cmd/workers-assets-gen -mode=go",
+ "wasm": "GOOS=js GOARCH=wasm go build -o ./build/app.wasm .",
+ "migrate": "npx wrangler d1 execute motr-db --remote --file=./schema.sql",
+ "deploy": "npx wrangler deploy",
+ "start": "npx wrangler dev",
+ "clean": "rm -rf ./build && rm -rf .wrangler && rm -rf ./dist && rm -rf ./node_modules && npm install"
+ },
+ "dependencies": {
+ "@extism/extism": "^2.0.0-rc11",
+ "@helia/dag-cbor": "^1.0.1",
+ "@helia/dag-json": "^1.0.1",
+ "@helia/json": "^1.0.1",
+ "@helia/strings": "^1.0.1",
+ "@helia/unixfs": "^1.4.1",
+ "helia": "^2.1.0",
+ "sonr-cosmes": "^0.0.5"
+ },
+ "devDependencies": {
+ "wrangler": "^4.10.0"
+ }
+}
diff --git a/cmd/vault/query.sql b/cmd/vault/query.sql
new file mode 100644
index 0000000..61446b4
--- /dev/null
+++ b/cmd/vault/query.sql
@@ -0,0 +1,1026 @@
+-- PROFILE QUERIES
+-- name: InsertProfile :one
+INSERT INTO profiles (
+ address,
+ handle,
+ origin,
+ name
+) VALUES (?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetProfileByID :one
+SELECT * FROM profiles
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetProfileByAddress :one
+SELECT * FROM profiles
+WHERE address = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetProfileByHandle :one
+SELECT * FROM profiles
+WHERE handle = ?
+AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: CheckHandleExists :one
+SELECT COUNT(*) > 0 as handle_exists FROM profiles
+WHERE handle = ?
+AND deleted_at IS NULL;
+
+-- name: UpdateProfile :one
+UPDATE profiles
+SET
+ name = ?,
+ handle = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE address = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteProfile :exec
+UPDATE profiles
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE address = ?;
+
+-- name: ListProfiles :many
+SELECT * FROM profiles
+WHERE deleted_at IS NULL
+ORDER BY created_at DESC
+LIMIT ? OFFSET ?;
+
+-- VAULT QUERIES
+-- name: InsertVault :one
+INSERT INTO vaults (
+ handle,
+ origin,
+ address,
+ cid,
+ config,
+ session_id,
+ redirect_uri
+) VALUES (?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetVaultByID :one
+SELECT * FROM vaults
+WHERE id = ?
+AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetVaultsByHandle :many
+SELECT * FROM vaults
+WHERE handle = ?
+AND deleted_at IS NULL
+ORDER BY created_at DESC;
+
+-- name: GetVaultConfigByCID :one
+SELECT * FROM vaults
+WHERE cid = ?
+AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetVaultRedirectURIBySessionID :one
+SELECT redirect_uri FROM vaults
+WHERE session_id = ?
+AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: UpdateVault :one
+UPDATE vaults
+SET
+ config = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteVault :exec
+UPDATE vaults
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- ACCOUNT QUERIES
+-- name: InsertAccount :one
+INSERT INTO accounts (
+ number,
+ sequence,
+ address,
+ public_key,
+ chain_id,
+ block_created,
+ controller,
+ label,
+ is_subsidiary,
+ is_validator,
+ is_delegator,
+ is_accountable
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetAccountByID :one
+SELECT * FROM accounts
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAccountByAddress :one
+SELECT * FROM accounts
+WHERE address = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAccountsByHandle :many
+SELECT * FROM accounts
+WHERE handle = ? AND deleted_at IS NULL
+ORDER BY created_at DESC;
+
+-- name: GetAccountByController :one
+SELECT * FROM accounts
+WHERE controller = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAccountByPublicKey :one
+SELECT * FROM accounts
+WHERE public_key = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAccountByNumber :one
+SELECT * FROM accounts
+WHERE number = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAccountBySequence :one
+SELECT * FROM accounts
+WHERE sequence = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAccountsByChainID :many
+SELECT * FROM accounts
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY sequence DESC;
+
+-- name: GetAccountsByController :many
+SELECT * FROM accounts
+WHERE controller = ? AND deleted_at IS NULL
+ORDER BY created_at DESC;
+
+-- name: GetAccountsByLabel :many
+SELECT * FROM accounts
+WHERE label = ? AND deleted_at IS NULL
+ORDER BY created_at DESC;
+
+-- name: UpdateAccountSequence :one
+UPDATE accounts
+SET
+ sequence = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE address = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: UpdateAccountLabel :one
+UPDATE accounts
+SET
+ label = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteAccount :exec
+UPDATE accounts
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- name: ListValidatorAccounts :many
+SELECT * FROM accounts
+WHERE is_validator = 1
+AND deleted_at IS NULL
+ORDER BY created_at DESC;
+
+-- name: ListDelegatorAccounts :many
+SELECT * FROM accounts
+WHERE is_delegator = 1
+AND deleted_at IS NULL
+ORDER BY created_at DESC;
+
+-- CREDENTIAL QUERIES
+-- name: InsertCredential :one
+INSERT INTO credentials (
+ handle,
+ credential_id,
+ authenticator_attachment,
+ origin,
+ type,
+ transports
+) VALUES (?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetCredentialsByHandle :many
+SELECT * FROM credentials
+WHERE handle = ?
+AND deleted_at IS NULL;
+
+-- name: GetCredentialByID :one
+SELECT * FROM credentials
+WHERE credential_id = ?
+AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: SoftDeleteCredential :exec
+UPDATE credentials
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE credential_id = ?;
+
+-- ASSET QUERIES
+-- name: InsertAsset :one
+INSERT INTO assets (
+ name,
+ symbol,
+ decimals,
+ chain_id,
+ channel,
+ asset_type,
+ coingecko_id
+) VALUES (?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetAssetByID :one
+SELECT * FROM assets
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAssetBySymbol :one
+SELECT * FROM assets
+WHERE symbol = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetAssetByChainAndSymbol :one
+SELECT * FROM assets
+WHERE chain_id = ? AND symbol = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListAssetsByChain :many
+SELECT * FROM assets
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY symbol ASC;
+
+-- name: UpdateAsset :one
+UPDATE assets
+SET
+ name = ?,
+ decimals = ?,
+ channel = ?,
+ asset_type = ?,
+ coingecko_id = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteAsset :exec
+UPDATE assets
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- PRICE QUERIES (UPDATED)
+-- name: InsertPrice :one
+INSERT INTO prices (
+ asset_id,
+ price_usd,
+ price_btc,
+ volume_24h_usd,
+ market_cap_usd,
+ available_supply,
+ total_supply,
+ max_supply,
+ percent_change_1h,
+ percent_change_24h,
+ percent_change_7d,
+ rank,
+ last_updated
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetPriceByAssetID :one
+SELECT * FROM prices
+WHERE asset_id = ? AND deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT 1;
+
+-- name: GetPriceByID :one
+SELECT * FROM prices
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListPriceHistoryByAssetID :many
+SELECT * FROM prices
+WHERE asset_id = ? AND deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT ? OFFSET ?;
+
+-- name: GetAssetWithLatestPrice :one
+SELECT a.*, p.price_usd, p.price_btc, p.volume_24h_usd, p.market_cap_usd,
+ p.available_supply, p.total_supply, p.max_supply,
+ p.percent_change_1h, p.percent_change_24h, p.percent_change_7d,
+ p.rank, p.last_updated
+FROM assets a
+LEFT JOIN (
+ SELECT p1.*
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE a.id = ? AND a.deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListAssetsWithLatestPrices :many
+SELECT a.*, p.price_usd, p.price_btc, p.volume_24h_usd, p.market_cap_usd,
+ p.available_supply, p.total_supply, p.max_supply,
+ p.percent_change_1h, p.percent_change_24h, p.percent_change_7d,
+ p.rank, p.last_updated
+FROM assets a
+LEFT JOIN (
+ SELECT p1.*
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE a.deleted_at IS NULL
+ORDER BY p.rank ASC, a.symbol ASC
+LIMIT ? OFFSET ?;
+
+-- name: UpdatePrice :one
+UPDATE prices
+SET
+ price_usd = ?,
+ price_btc = ?,
+ volume_24h_usd = ?,
+ market_cap_usd = ?,
+ available_supply = ?,
+ total_supply = ?,
+ max_supply = ?,
+ percent_change_1h = ?,
+ percent_change_24h = ?,
+ percent_change_7d = ?,
+ rank = ?,
+ last_updated = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- PRICE CONVERSION QUERIES (NEW)
+-- name: InsertPriceConversion :one
+INSERT INTO price_conversions (
+ price_id,
+ currency_code,
+ price,
+ volume_24h,
+ market_cap,
+ last_updated
+) VALUES (?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetPriceConversionByID :one
+SELECT * FROM price_conversions
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetPriceConversionsByPriceID :many
+SELECT * FROM price_conversions
+WHERE price_id = ? AND deleted_at IS NULL
+ORDER BY currency_code ASC;
+
+-- name: GetPriceConversionByCurrency :one
+SELECT * FROM price_conversions
+WHERE price_id = ? AND currency_code = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: UpdatePriceConversion :one
+UPDATE price_conversions
+SET
+ price = ?,
+ volume_24h = ?,
+ market_cap = ?,
+ last_updated = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeletePriceConversion :exec
+UPDATE price_conversions
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- GLOBAL MARKET QUERIES (NEW)
+-- name: InsertGlobalMarket :one
+INSERT INTO global_market (
+ total_market_cap_usd,
+ total_24h_volume_usd,
+ bitcoin_percentage_of_market_cap,
+ active_currencies,
+ active_assets,
+ active_markets,
+ last_updated
+) VALUES (?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetGlobalMarketByID :one
+SELECT * FROM global_market
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetLatestGlobalMarket :one
+SELECT * FROM global_market
+WHERE deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT 1;
+
+-- name: ListGlobalMarketHistory :many
+SELECT * FROM global_market
+WHERE deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT ? OFFSET ?;
+
+-- name: UpdateGlobalMarket :one
+UPDATE global_market
+SET
+ total_market_cap_usd = ?,
+ total_24h_volume_usd = ?,
+ bitcoin_percentage_of_market_cap = ?,
+ active_currencies = ?,
+ active_assets = ?,
+ active_markets = ?,
+ last_updated = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteGlobalMarket :exec
+UPDATE global_market
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- FEAR AND GREED INDEX QUERIES (NEW)
+-- name: InsertFearGreedIndex :one
+INSERT INTO fear_greed_index (
+ value,
+ value_classification,
+ timestamp,
+ time_until_update
+) VALUES (?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetFearGreedIndexByID :one
+SELECT * FROM fear_greed_index
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetLatestFearGreedIndex :one
+SELECT * FROM fear_greed_index
+WHERE deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT 1;
+
+-- name: ListFearGreedIndexHistory :many
+SELECT * FROM fear_greed_index
+WHERE deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?;
+
+-- name: UpdateFearGreedIndex :one
+UPDATE fear_greed_index
+SET
+ value = ?,
+ value_classification = ?,
+ timestamp = ?,
+ time_until_update = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteFearGreedIndex :exec
+UPDATE fear_greed_index
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- CRYPTO LISTINGS QUERIES (NEW)
+-- name: InsertCryptoListing :one
+INSERT INTO crypto_listings (
+ api_id,
+ name,
+ symbol,
+ website_slug
+) VALUES (?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetCryptoListingByID :one
+SELECT * FROM crypto_listings
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetCryptoListingByApiID :one
+SELECT * FROM crypto_listings
+WHERE api_id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetCryptoListingBySymbol :one
+SELECT * FROM crypto_listings
+WHERE symbol = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetCryptoListingByWebsiteSlug :one
+SELECT * FROM crypto_listings
+WHERE website_slug = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListCryptoListings :many
+SELECT * FROM crypto_listings
+WHERE deleted_at IS NULL
+ORDER BY name ASC
+LIMIT ? OFFSET ?;
+
+-- name: UpdateCryptoListing :one
+UPDATE crypto_listings
+SET
+ name = ?,
+ symbol = ?,
+ website_slug = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteCryptoListing :exec
+UPDATE crypto_listings
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- SERVICE QUERIES
+-- name: InsertService :one
+INSERT INTO services (
+ name,
+ description,
+ chain_id,
+ address,
+ owner_address,
+ metadata,
+ status,
+ block_height
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetServiceByID :one
+SELECT * FROM services
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetServiceByAddress :one
+SELECT * FROM services
+WHERE address = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetServiceByChainAndAddress :one
+SELECT * FROM services
+WHERE chain_id = ? AND address = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListServicesByChain :many
+SELECT * FROM services
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY name ASC
+LIMIT ? OFFSET ?;
+
+-- name: ListServicesByOwner :many
+SELECT * FROM services
+WHERE owner_address = ? AND deleted_at IS NULL
+ORDER BY created_at DESC
+LIMIT ? OFFSET ?;
+
+-- name: UpdateService :one
+UPDATE services
+SET
+ name = ?,
+ description = ?,
+ owner_address = ?,
+ metadata = ?,
+ status = ?,
+ block_height = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteService :exec
+UPDATE services
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- ACTIVITY QUERIES
+-- name: InsertActivity :one
+INSERT INTO activities (
+ account_id,
+ tx_hash,
+ tx_type,
+ status,
+ amount,
+ fee,
+ gas_used,
+ gas_wanted,
+ memo,
+ block_height,
+ timestamp,
+ raw_log,
+ error
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetActivityByID :one
+SELECT * FROM activities
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetActivityByTxHash :one
+SELECT * FROM activities
+WHERE tx_hash = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListActivitiesByAccount :many
+SELECT * FROM activities
+WHERE account_id = ? AND deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?;
+
+-- name: ListActivitiesByType :many
+SELECT * FROM activities
+WHERE tx_type = ? AND deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?;
+
+-- name: ListActivitiesByStatus :many
+SELECT * FROM activities
+WHERE status = ? AND deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?;
+
+-- name: UpdateActivityStatus :one
+UPDATE activities
+SET
+ status = ?,
+ tx_hash = ?,
+ block_height = ?,
+ gas_used = ?,
+ raw_log = ?,
+ error = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteActivity :exec
+UPDATE activities
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- HEALTH QUERIES
+-- name: InsertHealth :one
+INSERT INTO health (
+ endpoint_url,
+ endpoint_type,
+ chain_id,
+ status,
+ response_time_ms,
+ last_checked,
+ next_check,
+ failure_count,
+ success_count,
+ response_data,
+ error_message
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING *;
+
+-- name: GetHealthByID :one
+SELECT * FROM health
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetHealthByEndpoint :one
+SELECT * FROM health
+WHERE endpoint_url = ? AND deleted_at IS NULL
+ORDER BY last_checked DESC
+LIMIT 1;
+
+-- name: ListHealthByChain :many
+SELECT * FROM health
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY last_checked DESC
+LIMIT ? OFFSET ?;
+
+-- name: ListHealthByStatus :many
+SELECT * FROM health
+WHERE status = ? AND deleted_at IS NULL
+ORDER BY last_checked DESC
+LIMIT ? OFFSET ?;
+
+-- name: ListHealthChecksNeedingUpdate :many
+SELECT * FROM health
+WHERE next_check <= CURRENT_TIMESTAMP AND deleted_at IS NULL
+ORDER BY next_check ASC
+LIMIT ?;
+
+-- name: UpdateHealthCheck :one
+UPDATE health
+SET
+ status = ?,
+ response_time_ms = ?,
+ last_checked = CURRENT_TIMESTAMP,
+ next_check = ?,
+ failure_count = CASE WHEN status = 'failed' THEN failure_count + 1 ELSE failure_count END,
+ success_count = CASE WHEN status = 'success' THEN success_count + 1 ELSE success_count END,
+ response_data = ?,
+ error_message = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteHealth :exec
+UPDATE health
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- BLOCKCHAIN QUERIES
+-- name: InsertBlockchain :one
+INSERT INTO blockchains (
+ id,
+ chain_name,
+ chain_id_cosmos,
+ chain_id_evm,
+ api_name,
+ bech_account_prefix,
+ bech_validator_prefix,
+ main_asset_symbol,
+ main_asset_denom,
+ staking_asset_symbol,
+ staking_asset_denom,
+ is_stake_enabled,
+ chain_image,
+ main_asset_image,
+ staking_asset_image,
+ chain_type,
+ is_support_mobile_wallet,
+ is_support_extension_wallet,
+ is_support_erc20,
+ description_en,
+ description_ko,
+ description_ja,
+ origin_genesis_time,
+ account_type,
+ btc_staking,
+ cosmos_fee_info,
+ evm_fee_info,
+ lcd_endpoint,
+ grpc_endpoint,
+ evm_rpc_endpoint,
+ explorer,
+ about,
+ forum
+) VALUES (
+ ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
+)
+RETURNING *;
+
+-- name: GetBlockchainByID :one
+SELECT * FROM blockchains
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetBlockchainByChainName :one
+SELECT * FROM blockchains
+WHERE chain_name = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetBlockchainByCosmosChainID :one
+SELECT * FROM blockchains
+WHERE chain_id_cosmos = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetBlockchainByEvmChainID :one
+SELECT * FROM blockchains
+WHERE chain_id_evm = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListAllBlockchains :many
+SELECT * FROM blockchains
+WHERE deleted_at IS NULL
+ORDER BY chain_name ASC;
+
+-- name: ListBlockchainsByChainType :many
+SELECT * FROM blockchains
+WHERE chain_type LIKE '%' || ? || '%' AND deleted_at IS NULL
+ORDER BY chain_name ASC;
+
+-- name: ListBlockchainsWithStaking :many
+SELECT * FROM blockchains
+WHERE is_stake_enabled = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC;
+
+-- name: ListBlockchainsWithMobileSupport :many
+SELECT * FROM blockchains
+WHERE is_support_mobile_wallet = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC;
+
+-- name: ListBlockchainsWithExtensionSupport :many
+SELECT * FROM blockchains
+WHERE is_support_extension_wallet = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC;
+
+-- name: ListBlockchainsWithERC20Support :many
+SELECT * FROM blockchains
+WHERE is_support_erc20 = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC;
+
+-- name: UpdateBlockchain :one
+UPDATE blockchains
+SET
+ chain_name = ?,
+ chain_id_cosmos = ?,
+ chain_id_evm = ?,
+ api_name = ?,
+ bech_account_prefix = ?,
+ bech_validator_prefix = ?,
+ main_asset_symbol = ?,
+ main_asset_denom = ?,
+ staking_asset_symbol = ?,
+ staking_asset_denom = ?,
+ is_stake_enabled = ?,
+ chain_image = ?,
+ main_asset_image = ?,
+ staking_asset_image = ?,
+ chain_type = ?,
+ is_support_mobile_wallet = ?,
+ is_support_extension_wallet = ?,
+ is_support_erc20 = ?,
+ description_en = ?,
+ description_ko = ?,
+ description_ja = ?,
+ origin_genesis_time = ?,
+ account_type = ?,
+ btc_staking = ?,
+ cosmos_fee_info = ?,
+ evm_fee_info = ?,
+ lcd_endpoint = ?,
+ grpc_endpoint = ?,
+ evm_rpc_endpoint = ?,
+ explorer = ?,
+ about = ?,
+ forum = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: UpdateBlockchainEndpoints :one
+UPDATE blockchains
+SET
+ lcd_endpoint = ?,
+ grpc_endpoint = ?,
+ evm_rpc_endpoint = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: UpdateBlockchainExplorer :one
+UPDATE blockchains
+SET
+ explorer = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: UpdateBlockchainFeeInfo :one
+UPDATE blockchains
+SET
+ cosmos_fee_info = ?,
+ evm_fee_info = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: UpdateBlockchainImages :one
+UPDATE blockchains
+SET
+ chain_image = ?,
+ main_asset_image = ?,
+ staking_asset_image = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: UpdateBlockchainDescriptions :one
+UPDATE blockchains
+SET
+ description_en = ?,
+ description_ko = ?,
+ description_ja = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: UpdateBlockchainSocialLinks :one
+UPDATE blockchains
+SET
+ about = ?,
+ forum = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING *;
+
+-- name: SoftDeleteBlockchain :exec
+UPDATE blockchains
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?;
+
+-- name: GetBlockchainWithAssetInfo :one
+SELECT b.*, a.id as asset_id, a.symbol, a.decimals, p.price_usd, p.price_btc
+FROM blockchains b
+LEFT JOIN assets a ON b.main_asset_symbol = a.symbol
+LEFT JOIN (
+ SELECT p1.*
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE b.id = ? AND b.deleted_at IS NULL
+LIMIT 1;
+
+-- name: ListBlockchainsWithAssetInfo :many
+SELECT b.*, a.id as asset_id, a.symbol, a.decimals, p.price_usd, p.price_btc
+FROM blockchains b
+LEFT JOIN assets a ON b.main_asset_symbol = a.symbol
+LEFT JOIN (
+ SELECT p1.*
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE b.deleted_at IS NULL
+ORDER BY b.chain_name ASC
+LIMIT ? OFFSET ?;
+
+-- name: SearchBlockchains :many
+SELECT * FROM blockchains
+WHERE (
+ chain_name LIKE '%' || ? || '%' OR
+ main_asset_symbol LIKE '%' || ? || '%' OR
+ staking_asset_symbol LIKE '%' || ? || '%' OR
+ description_en LIKE '%' || ? || '%'
+) AND deleted_at IS NULL
+ORDER BY chain_name ASC
+LIMIT ? OFFSET ?;
+
+-- name: CountBlockchainsByChainType :one
+SELECT COUNT(*) as count FROM blockchains
+WHERE chain_type LIKE '%' || ? || '%' AND deleted_at IS NULL;
+
+-- name: GetBlockchainEndpoints :one
+SELECT id, chain_name, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint
+FROM blockchains
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
+
+-- name: GetBlockchainExplorer :one
+SELECT id, chain_name, explorer
+FROM blockchains
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1;
diff --git a/cmd/vault/schema.sql b/cmd/vault/schema.sql
new file mode 100644
index 0000000..faf2333
--- /dev/null
+++ b/cmd/vault/schema.sql
@@ -0,0 +1,356 @@
+-- Assets represent tokens and coins
+CREATE TABLE assets (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ name TEXT NOT NULL,
+ symbol TEXT NOT NULL,
+ decimals INTEGER NOT NULL CHECK(decimals >= 0),
+ chain_id TEXT NOT NULL,
+ channel TEXT NOT NULL,
+ asset_type TEXT NOT NULL,
+ coingecko_id TEXT,
+ UNIQUE(chain_id, symbol)
+);
+
+-- Credentials store WebAuthn credentials
+CREATE TABLE credentials (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ handle TEXT NOT NULL,
+ credential_id TEXT NOT NULL UNIQUE,
+ authenticator_attachment TEXT NOT NULL,
+ origin TEXT NOT NULL,
+ type TEXT NOT NULL,
+ transports TEXT NOT NULL
+);
+
+-- Accounts represent blockchain accounts
+CREATE TABLE accounts (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ number INTEGER NOT NULL,
+ sequence INTEGER NOT NULL DEFAULT 0,
+ address TEXT NOT NULL UNIQUE,
+ public_key TEXT NOT NULL CHECK(json_valid(public_key)),
+ chain_id TEXT NOT NULL,
+ block_created INTEGER NOT NULL,
+ controller TEXT NOT NULL,
+ label TEXT NOT NULL,
+ handle TEXT NOT NULL,
+ is_subsidiary BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_subsidiary IN (0,1)),
+ is_validator BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_validator IN (0,1)),
+ is_delegator BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_delegator IN (0,1)),
+ is_accountable BOOLEAN NOT NULL DEFAULT TRUE CHECK(is_accountable IN (0,1))
+);
+
+-- Profiles represent user identities
+CREATE TABLE profiles (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ address TEXT NOT NULL,
+ handle TEXT NOT NULL UNIQUE,
+ origin TEXT NOT NULL,
+ name TEXT NOT NULL,
+ UNIQUE(address, origin)
+);
+
+-- Vaults store encrypted data
+CREATE TABLE vaults (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ handle TEXT NOT NULL,
+ origin TEXT NOT NULL,
+ address TEXT NOT NULL,
+ cid TEXT NOT NULL UNIQUE,
+ config TEXT NOT NULL CHECK(json_valid(config)),
+ session_id TEXT NOT NULL,
+ redirect_uri TEXT NOT NULL
+);
+
+-- Prices entity based on the Alternative.me API for crypto prices
+CREATE TABLE prices (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ asset_id TEXT NOT NULL,
+ price_usd REAL,
+ price_btc REAL,
+ volume_24h_usd REAL,
+ market_cap_usd REAL,
+ available_supply REAL,
+ total_supply REAL,
+ max_supply REAL,
+ percent_change_1h REAL,
+ percent_change_24h REAL,
+ percent_change_7d REAL,
+ rank INTEGER,
+ last_updated TIMESTAMP NOT NULL,
+ FOREIGN KEY (asset_id) REFERENCES assets(id)
+);
+
+-- Currency conversion rates for crypto prices
+CREATE TABLE price_conversions (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ price_id TEXT NOT NULL,
+ currency_code TEXT NOT NULL,
+ price REAL,
+ volume_24h REAL,
+ market_cap REAL,
+ last_updated TIMESTAMP NOT NULL,
+ FOREIGN KEY (price_id) REFERENCES prices(id),
+ UNIQUE(price_id, currency_code)
+);
+
+-- Global market data from Alternative.me API
+CREATE TABLE global_market (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ total_market_cap_usd REAL,
+ total_24h_volume_usd REAL,
+ bitcoin_percentage_of_market_cap REAL,
+ active_currencies INTEGER,
+ active_assets INTEGER,
+ active_markets INTEGER,
+ last_updated TIMESTAMP NOT NULL
+);
+
+-- Fear and Greed Index data from Alternative.me
+CREATE TABLE fear_greed_index (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ value INTEGER NOT NULL,
+ value_classification TEXT NOT NULL,
+ timestamp TIMESTAMP NOT NULL,
+ time_until_update TEXT
+);
+
+-- Listings data from Alternative.me API
+CREATE TABLE crypto_listings (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ api_id TEXT NOT NULL,
+ name TEXT NOT NULL,
+ symbol TEXT NOT NULL,
+ website_slug TEXT NOT NULL,
+ UNIQUE(api_id)
+);
+
+-- Service for Service Records sourced on chain
+CREATE TABLE services (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ name TEXT NOT NULL,
+ description TEXT,
+ chain_id TEXT NOT NULL,
+ address TEXT NOT NULL,
+ owner_address TEXT NOT NULL,
+ metadata TEXT CHECK(json_valid(metadata)),
+ status TEXT NOT NULL,
+ block_height INTEGER NOT NULL,
+ FOREIGN KEY (chain_id) REFERENCES assets(chain_id),
+ UNIQUE(chain_id, address)
+);
+
+-- Activity table for basic transaction broadcast activity
+CREATE TABLE activities (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ account_id TEXT NOT NULL,
+ tx_hash TEXT,
+ tx_type TEXT NOT NULL,
+ status TEXT NOT NULL,
+ amount TEXT,
+ fee TEXT,
+ gas_used INTEGER,
+ gas_wanted INTEGER,
+ memo TEXT,
+ block_height INTEGER,
+ timestamp TIMESTAMP NOT NULL,
+ raw_log TEXT,
+ error TEXT,
+ FOREIGN KEY (account_id) REFERENCES accounts(id)
+);
+
+-- Health table for scheduled checks for API endpoints
+CREATE TABLE health (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+ endpoint_url TEXT NOT NULL,
+ endpoint_type TEXT NOT NULL,
+ chain_id TEXT,
+ status TEXT NOT NULL,
+ response_time_ms INTEGER,
+ last_checked TIMESTAMP NOT NULL,
+ next_check TIMESTAMP,
+ failure_count INTEGER NOT NULL DEFAULT 0,
+ success_count INTEGER NOT NULL DEFAULT 0,
+ response_data TEXT,
+ error_message TEXT,
+ FOREIGN KEY (chain_id) REFERENCES assets(chain_id)
+);
+
+-- Blockchains table to store chain configuration parameters
+CREATE TABLE blockchains (
+ id TEXT PRIMARY KEY,
+ created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ deleted_at TIMESTAMP,
+
+ -- Basic chain information
+ chain_name TEXT NOT NULL,
+ chain_id_cosmos TEXT,
+ chain_id_evm TEXT,
+ api_name TEXT,
+ bech_account_prefix TEXT,
+ bech_validator_prefix TEXT,
+
+ -- Chain assets
+ main_asset_symbol TEXT,
+ main_asset_denom TEXT,
+ staking_asset_symbol TEXT,
+ staking_asset_denom TEXT,
+ is_stake_enabled BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_stake_enabled IN (0,1)),
+
+ -- Chain images
+ chain_image TEXT,
+ main_asset_image TEXT,
+ staking_asset_image TEXT,
+
+ -- Chain types and features
+ chain_type TEXT NOT NULL CHECK(json_valid(chain_type)),
+ is_support_mobile_wallet BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_support_mobile_wallet IN (0,1)),
+ is_support_extension_wallet BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_support_extension_wallet IN (0,1)),
+ is_support_erc20 BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_support_erc20 IN (0,1)),
+
+ -- Descriptions in multiple languages
+ description_en TEXT,
+ description_ko TEXT,
+ description_ja TEXT,
+
+ -- Genesis information
+ origin_genesis_time TIMESTAMP,
+
+ -- Account types configuration
+ account_type TEXT NOT NULL CHECK(json_valid(account_type)),
+
+ -- BTC staking specific
+ btc_staking TEXT CHECK(json_valid(btc_staking)),
+
+ -- Cosmos fee information
+ cosmos_fee_info TEXT CHECK(json_valid(cosmos_fee_info)),
+
+ -- EVM fee information
+ evm_fee_info TEXT CHECK(json_valid(evm_fee_info)),
+
+ -- Endpoints
+ lcd_endpoint TEXT CHECK(json_valid(lcd_endpoint)),
+ grpc_endpoint TEXT CHECK(json_valid(grpc_endpoint)),
+ evm_rpc_endpoint TEXT CHECK(json_valid(evm_rpc_endpoint)),
+
+ -- Explorer information
+ explorer TEXT CHECK(json_valid(explorer)),
+
+ -- Social and documentation links
+ about TEXT CHECK(json_valid(about)),
+ forum TEXT CHECK(json_valid(forum))
+);
+
+-- Add all necessary indexes
+CREATE INDEX idx_assets_symbol ON assets(symbol);
+CREATE INDEX idx_assets_chain_id ON assets(chain_id);
+CREATE INDEX idx_assets_deleted_at ON assets(deleted_at);
+
+CREATE INDEX idx_credentials_handle ON credentials(handle);
+CREATE INDEX idx_credentials_origin ON credentials(origin);
+CREATE INDEX idx_credentials_deleted_at ON credentials(deleted_at);
+
+CREATE INDEX idx_accounts_address ON accounts(address);
+CREATE INDEX idx_accounts_chain_id ON accounts(chain_id);
+CREATE INDEX idx_accounts_block_created ON accounts(block_created);
+CREATE INDEX idx_accounts_label ON accounts(label);
+CREATE INDEX idx_accounts_controller ON accounts(controller);
+CREATE INDEX idx_accounts_deleted_at ON accounts(deleted_at);
+
+CREATE INDEX idx_profiles_handle ON profiles(handle);
+CREATE INDEX idx_profiles_address ON profiles(address);
+CREATE INDEX idx_profiles_deleted_at ON profiles(deleted_at);
+
+CREATE INDEX idx_vaults_handle ON vaults(handle);
+CREATE INDEX idx_vaults_session_id ON vaults(session_id);
+CREATE INDEX idx_vaults_deleted_at ON vaults(deleted_at);
+
+CREATE INDEX idx_prices_asset_id ON prices(asset_id);
+CREATE INDEX idx_prices_rank ON prices(rank);
+CREATE INDEX idx_prices_last_updated ON prices(last_updated);
+CREATE INDEX idx_prices_deleted_at ON prices(deleted_at);
+
+CREATE INDEX idx_price_conversions_price_id ON price_conversions(price_id);
+CREATE INDEX idx_price_conversions_currency_code ON price_conversions(currency_code);
+CREATE INDEX idx_price_conversions_deleted_at ON price_conversions(deleted_at);
+
+CREATE INDEX idx_global_market_last_updated ON global_market(last_updated);
+CREATE INDEX idx_global_market_deleted_at ON global_market(deleted_at);
+
+CREATE INDEX idx_fear_greed_index_timestamp ON fear_greed_index(timestamp);
+CREATE INDEX idx_fear_greed_index_value ON fear_greed_index(value);
+CREATE INDEX idx_fear_greed_index_deleted_at ON fear_greed_index(deleted_at);
+
+CREATE INDEX idx_crypto_listings_api_id ON crypto_listings(api_id);
+CREATE INDEX idx_crypto_listings_symbol ON crypto_listings(symbol);
+CREATE INDEX idx_crypto_listings_website_slug ON crypto_listings(website_slug);
+CREATE INDEX idx_crypto_listings_deleted_at ON crypto_listings(deleted_at);
+
+CREATE INDEX idx_services_name ON services(name);
+CREATE INDEX idx_services_chain_id ON services(chain_id);
+CREATE INDEX idx_services_address ON services(address);
+CREATE INDEX idx_services_owner_address ON services(owner_address);
+CREATE INDEX idx_services_status ON services(status);
+CREATE INDEX idx_services_deleted_at ON services(deleted_at);
+
+CREATE INDEX idx_activities_account_id ON activities(account_id);
+CREATE INDEX idx_activities_tx_hash ON activities(tx_hash);
+CREATE INDEX idx_activities_tx_type ON activities(tx_type);
+CREATE INDEX idx_activities_status ON activities(status);
+CREATE INDEX idx_activities_timestamp ON activities(timestamp);
+CREATE INDEX idx_activities_block_height ON activities(block_height);
+CREATE INDEX idx_activities_deleted_at ON activities(deleted_at);
+
+CREATE INDEX idx_health_endpoint_url ON health(endpoint_url);
+CREATE INDEX idx_health_endpoint_type ON health(endpoint_type);
+CREATE INDEX idx_health_chain_id ON health(chain_id);
+CREATE INDEX idx_health_status ON health(status);
+CREATE INDEX idx_health_last_checked ON health(last_checked);
+CREATE INDEX idx_health_next_check ON health(next_check);
+CREATE INDEX idx_health_deleted_at ON health(deleted_at);
+
+CREATE INDEX idx_blockchains_chain_name ON blockchains(chain_name);
+CREATE INDEX idx_blockchains_chain_id_cosmos ON blockchains(chain_id_cosmos);
+CREATE INDEX idx_blockchains_chain_id_evm ON blockchains(chain_id_evm);
+CREATE INDEX idx_blockchains_main_asset_symbol ON blockchains(main_asset_symbol);
+CREATE INDEX idx_blockchains_deleted_at ON blockchains(deleted_at);
diff --git a/cmd/vault/worker.mjs b/cmd/vault/worker.mjs
new file mode 100644
index 0000000..877dc56
--- /dev/null
+++ b/cmd/vault/worker.mjs
@@ -0,0 +1,686 @@
+export { default } from "./build/worker.mjs";
+import { DurableObject } from "cloudflare:workers";
+import createPlugin from "@extism/extism";
+import { createHelia } from "helia";
+import { strings } from "@helia/strings";
+import { json } from "@helia/json";
+import { dagJson } from "@helia/dag-json";
+import { dagCbor } from "@helia/dag-cbor";
+import { unixfs } from "@helia/unixfs";
+import { serialiseSignDoc } from "sonr-cosmes/codec";
+import { broadcastTx, RpcClient } from "sonr-cosmes/client";
+import {
+ DidV1MsgRegisterController,
+ DwnV1QuerySpawnRequest,
+} from "sonr-cosmes/protobufs";
+
+export class Vault extends DurableObject {
+ constructor(ctx, env) {
+ super(ctx, env);
+ this.state = ctx;
+ this.env = env;
+
+ // Initialize node state
+ this.nodeState = {
+ status: "offline",
+ nodeId: null,
+ discoveredPeers: new Map(),
+ connectedPeers: new Map(),
+ logs: [],
+ };
+
+ // Initialize Helia node and related components when the DO is created
+ this.initializeHelia();
+ this.initializePlugins();
+ }
+
+ // Helper method to add a log entry
+ addLog(message) {
+ const timestamp = new Date().toISOString();
+ const logEntry = { timestamp, message };
+ this.nodeState.logs.push(logEntry);
+
+ // Keep only the last 100 log entries
+ if (this.nodeState.logs.length > 100) {
+ this.nodeState.logs.shift();
+ }
+
+ return logEntry;
+ }
+
+ async initializeHelia() {
+ try {
+ this.addLog("Initializing Helia node...");
+
+ // Create a Helia node with memory blockstore and datastore
+ this.helia = await createHelia({
+ blockstore: { type: "memory" },
+ datastore: { type: "memory" },
+ // Configure libp2p for Cloudflare Workers environment
+ libp2p: {
+ start: true,
+ addresses: { listen: [] },
+ connectionManager: {
+ minConnections: 0,
+ },
+ },
+ });
+
+ // Initialize various data handlers
+ this.stringHandler = strings(this.helia);
+ this.jsonHandler = json(this.helia);
+ this.dagJsonHandler = dagJson(this.helia);
+ this.dagCborHandler = dagCbor(this.helia);
+ this.fsHandler = unixfs(this.helia);
+
+ // Update node state
+ this.nodeState.status = this.helia.libp2p.status;
+ this.nodeState.nodeId = this.helia.libp2p.peerId.toString();
+
+ // Set up event listeners
+ this.helia.libp2p.addEventListener("peer:discovery", (evt) => {
+ const peerId = evt.detail.id.toString();
+ this.nodeState.discoveredPeers.set(peerId, {
+ id: peerId,
+ multiaddrs: evt.detail.multiaddrs
+ ? evt.detail.multiaddrs.map((ma) => ma.toString())
+ : [],
+ discoveredAt: new Date().toISOString(),
+ });
+ this.addLog(`Discovered peer ${peerId}`);
+ });
+
+ this.helia.libp2p.addEventListener("peer:connect", (evt) => {
+ const peerId = evt.detail.toString();
+ this.nodeState.connectedPeers.set(peerId, {
+ id: peerId,
+ connectedAt: new Date().toISOString(),
+ });
+ this.addLog(`Connected to ${peerId}`);
+ });
+
+ this.helia.libp2p.addEventListener("peer:disconnect", (evt) => {
+ const peerId = evt.detail.toString();
+ this.nodeState.connectedPeers.delete(peerId);
+ this.addLog(`Disconnected from ${peerId}`);
+ });
+
+ this.addLog("Helia node initialized successfully");
+ return true;
+ } catch (error) {
+ this.addLog(`Failed to initialize Helia node: ${error.message}`);
+ console.error("Failed to initialize Helia node:", error);
+ return false;
+ }
+ }
+
+ // initializePlugins initializes the signer plugin
+ async initializePlugins() {
+ try {
+ // 1. Initialize the enclave plugin
+ this.addLog("Initializing enclave plugin...");
+ this.enclavePlugin = await createPlugin(
+ "https://cdn.sonr.io/bin/enclave.wasm",
+ {
+ useWasi: true,
+ },
+ );
+ this.addLog("Enclave plugin initialized successfully");
+
+ // 2. Initialize the signer plugin
+ this.addLog("Initializing signer plugin...");
+ this.signerPlugin = await createPlugin(
+ "https://cdn.sonr.io/bin/signer.wasm",
+ {
+ useWasi: true,
+ },
+ );
+ this.addLog("Signer plugin initialized successfully");
+
+ // 3. Initialize the verifier plugin
+ this.addLog("Initializing verifier plugin...");
+ this.verifierPlugin = await createPlugin(
+ "https://cdn.sonr.io/bin/verifier.wasm",
+ {
+ useWasi: true,
+ },
+ );
+ this.addLog("Verifier plugin initialized successfully");
+ return true;
+ } catch (error) {
+ this.addLog(`Failed to initialize plugin: ${error.message}`);
+ console.error("Failed to initialize plugin:", error);
+ return false;
+ }
+ }
+
+ // RPC method to get node status
+ async getNodeStatus() {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ return {
+ status: this.nodeState.status,
+ nodeId: this.nodeState.nodeId,
+ discoveredPeersCount: this.nodeState.discoveredPeers.size,
+ connectedPeersCount: this.nodeState.connectedPeers.size,
+ };
+ }
+
+ // RPC method to get node ID
+ async getNodeId() {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ return {
+ nodeId: this.nodeState.nodeId,
+ };
+ }
+
+ // RPC method to get discovered peers
+ async getDiscoveredPeers() {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ return {
+ count: this.nodeState.discoveredPeers.size,
+ peers: Array.from(this.nodeState.discoveredPeers.values()),
+ };
+ }
+
+ // RPC method to get connected peers
+ async getConnectedPeers() {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ return {
+ count: this.nodeState.connectedPeers.size,
+ peers: Array.from(this.nodeState.connectedPeers.values()),
+ };
+ }
+
+ // RPC method to get logs
+ async getLogs(limit = 50) {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ const logs = [...this.nodeState.logs];
+ return {
+ count: logs.length,
+ logs: logs.slice(-limit), // Return the most recent logs up to the limit
+ };
+ }
+
+ // RPC method to sign data
+ async sign(data) {
+ if (!this.plugin) {
+ await this.initializePlugin();
+ }
+ try {
+ let out = await this.plugin.call("sign", JSON.stringify(data));
+ return JSON.parse(out.text());
+ } catch (error) {
+ throw new Error(`Signing failed: ${error.message}`);
+ }
+ }
+
+ // Creates and signs a transaction
+ async createAndSignTx(msg, signer, options = {}) {
+ this.addLog(`Creating transaction with message type: ${msg.typeUrl}`);
+
+ try {
+ // Default options
+ const defaultOptions = {
+ memo: "",
+ fee: {
+ amount: [{ denom: "usnr", amount: "1000" }],
+ gas_limit: "200000",
+ },
+ chainId: this.env.SONR_CHAIN_ID || "sonr-testnet-1",
+ };
+
+ const txOptions = { ...defaultOptions, ...options };
+
+ // Create the sign doc
+ const signDoc = {
+ chainId: txOptions.chainId,
+ accountNumber: options.accountNumber || "0",
+ sequence: options.sequence || "0",
+ fee: txOptions.fee,
+ msgs: [msg],
+ memo: txOptions.memo,
+ };
+
+ // Serialize the sign doc
+ const signBytes = serialiseSignDoc(signDoc);
+
+ // Sign the transaction
+ this.addLog(`Signing transaction for ${signer}`);
+ const signature = await this.sign({
+ bytes: Buffer.from(signBytes).toString("base64"),
+ publicKey: options.publicKey,
+ });
+
+ // Create the signed transaction
+ const signedTx = {
+ signDoc,
+ signature: {
+ signature: signature.signature,
+ pub_key: {
+ type: "tendermint/PubKeySecp256k1",
+ value: signature.publicKey,
+ },
+ },
+ };
+
+ this.addLog("Transaction created and signed successfully");
+ return signedTx;
+ } catch (error) {
+ this.addLog(`Failed to create and sign transaction: ${error.message}`);
+ throw new Error(`Transaction creation failed: ${error.message}`);
+ }
+ }
+
+ // Broadcasts a signed transaction to the network
+ async broadcastTransaction(signedTx, broadcastMode = "BROADCAST_MODE_SYNC") {
+ this.addLog("Broadcasting transaction to network");
+
+ try {
+ const rpcUrl = this.env.SONR_RPC_URL || "https://rpc.sonr.io";
+ this.addLog(`Using RPC URL: ${rpcUrl}`);
+
+ const response = await broadcastTx(rpcUrl, signedTx, broadcastMode);
+
+ if (response.tx_response && response.tx_response.code === 0) {
+ this.addLog(
+ `Transaction broadcast successful. Hash: ${response.tx_response.txhash}`,
+ );
+ } else {
+ this.addLog(
+ `Transaction broadcast failed: ${JSON.stringify(response.tx_response)}`,
+ );
+ }
+
+ return response;
+ } catch (error) {
+ this.addLog(`Failed to broadcast transaction: ${error.message}`);
+ throw new Error(`Transaction broadcast failed: ${error.message}`);
+ }
+ }
+
+ // RPC method to add string content to IPFS
+ async addString(content) {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ if (!this.helia) {
+ throw new Error("Helia node not available");
+ }
+
+ try {
+ const cid = await this.stringHandler.add(content);
+ this.addLog(`Added string content with CID: ${cid.toString()}`);
+ return { cid: cid.toString() };
+ } catch (error) {
+ this.addLog(`Failed to add string: ${error.message}`);
+ throw new Error(`Failed to add string: ${error.message}`);
+ }
+ }
+
+ // RPC method to add JSON content to IPFS
+ async addJson(content) {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ if (!this.helia) {
+ throw new Error("Helia node not available");
+ }
+
+ try {
+ const cid = await this.jsonHandler.add(content);
+ this.addLog(`Added JSON content with CID: ${cid.toString()}`);
+ return { cid: cid.toString() };
+ } catch (error) {
+ this.addLog(`Failed to add JSON: ${error.message}`);
+ throw new Error(`Failed to add JSON: ${error.message}`);
+ }
+ }
+
+ // RPC method to get content from IPFS by CID
+ async getContent(cid) {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ if (!this.helia) {
+ throw new Error("Helia node not available");
+ }
+
+ try {
+ this.addLog(`Retrieving content for CID: ${cid}`);
+ // Try to get as JSON first
+ try {
+ const jsonData = await this.jsonHandler.get(cid);
+ return { type: "json", content: jsonData };
+ } catch (e) {
+ // Fall back to string if JSON fails
+ try {
+ const stringData = await this.stringHandler.get(cid);
+ return { type: "string", content: stringData };
+ } catch (e2) {
+ this.addLog(`Failed to retrieve content for CID: ${cid}`);
+ throw new Error("Failed to retrieve content");
+ }
+ }
+ } catch (error) {
+ this.addLog(`Error getting content: ${error.message}`);
+ throw new Error(`Failed to get content: ${error.message}`);
+ }
+ }
+
+ // RPC method to add DAG-JSON content to IPFS
+ async addDagJson(content) {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ if (!this.helia) {
+ throw new Error("Helia node not available");
+ }
+
+ try {
+ const cid = await this.dagJsonHandler.add(content);
+ this.addLog(`Added DAG-JSON content with CID: ${cid.toString()}`);
+ return { cid: cid.toString() };
+ } catch (error) {
+ this.addLog(`Failed to add DAG-JSON: ${error.message}`);
+ throw new Error(`Failed to add DAG-JSON: ${error.message}`);
+ }
+ }
+
+ // RPC method to add DAG-CBOR content to IPFS
+ async addDagCbor(content) {
+ if (!this.helia) {
+ await this.initializeHelia();
+ }
+
+ if (!this.helia) {
+ throw new Error("Helia node not available");
+ }
+
+ try {
+ const cid = await this.dagCborHandler.add(content);
+ this.addLog(`Added DAG-CBOR content with CID: ${cid.toString()}`);
+ return { cid: cid.toString() };
+ } catch (error) {
+ this.addLog(`Failed to add DAG-CBOR: ${error.message}`);
+ throw new Error(`Failed to add DAG-CBOR: ${error.message}`);
+ }
+ }
+
+ async registerDidController(did, controller, signer, options = {}) {
+ this.addLog(`Registering DID controller: ${controller} for DID: ${did}`);
+
+ try {
+ // Create the message
+ const msg = DidV1MsgRegisterController.create({
+ did: did,
+ controller: controller,
+ });
+
+ // Create and sign transaction
+ const signedTx = await this.createAndSignTx(msg, signer, options);
+
+ // Broadcast transaction
+ const response = await this.broadcastTransaction(signedTx);
+
+ this.addLog(
+ `DID controller registration response: ${JSON.stringify(response)}`,
+ );
+ return response;
+ } catch (error) {
+ this.addLog(`Failed to register DID controller: ${error.message}`);
+ throw new Error(`DID controller registration failed: ${error.message}`);
+ }
+ }
+
+ async spawnDwnVault(address, redirect, options = {}) {
+ this.addLog(
+ `Spawning DWN vault for address: ${address}, redirect: ${redirect}`,
+ );
+
+ try {
+ // Use RPC client to make the query
+ const rpcUrl =
+ options.rpcUrl || this.env.SONR_RPC_URL || "https://rpc.sonr.io";
+ this.addLog(`Using RPC URL: ${rpcUrl}`);
+
+ return new Promise((resolve, reject) => {
+ RpcClient.newBatchQuery(rpcUrl)
+ .add(
+ DwnV1QuerySpawnRequest,
+ {
+ cid: address,
+ redirect: redirect,
+ },
+ (err, res) => {
+ if (err) {
+ this.addLog(`Spawn DWN vault failed: ${err.message}`);
+ reject(err);
+ } else {
+ this.addLog(`Spawn DWN vault response: ${JSON.stringify(res)}`);
+ resolve(res);
+ }
+ },
+ )
+ .send();
+ });
+ } catch (error) {
+ this.addLog(`Failed to spawn DWN vault: ${error.message}`);
+ throw new Error(`DWN vault spawn failed: ${error.message}`);
+ }
+ }
+
+ // Retrieves account information needed for transaction signing
+ async getAccountInfo(address) {
+ this.addLog(`Getting account info for address: ${address}`);
+
+ try {
+ const rpcUrl = this.env.SONR_RPC_URL || "https://rpc.sonr.io";
+
+ const client = new RpcClient(rpcUrl);
+ const accountInfo = await client.getAccount(address);
+
+ this.addLog(`Account info retrieved successfully`);
+ return {
+ accountNumber: accountInfo.account_number,
+ sequence: accountInfo.sequence,
+ };
+ } catch (error) {
+ this.addLog(`Failed to get account info: ${error.message}`);
+ throw new Error(`Account info retrieval failed: ${error.message}`);
+ }
+ }
+
+ // Fetch handler for backward compatibility and Go WASM server interaction
+ async fetch(request) {
+ const url = new URL(request.url);
+ const path = url.pathname;
+ const method = request.method;
+
+ try {
+ // Handle different API endpoints based on the path
+
+ // Helia node status endpoints
+ if (path === "/helia/status") {
+ return new Response(JSON.stringify(await this.getNodeStatus()), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ if (path === "/helia/node-id") {
+ return new Response(JSON.stringify(await this.getNodeId()), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ if (path === "/helia/discovered-peers") {
+ return new Response(JSON.stringify(await this.getDiscoveredPeers()), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ if (path === "/helia/connected-peers") {
+ return new Response(JSON.stringify(await this.getConnectedPeers()), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ if (path === "/helia/logs") {
+ const limitParam = url.searchParams.get("limit");
+ const limit = limitParam ? parseInt(limitParam, 10) : 50;
+ return new Response(JSON.stringify(await this.getLogs(limit)), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ // IPFS content endpoints
+ if (path === "/ipfs/add/string" && method === "POST") {
+ const content = await request.text();
+ return new Response(JSON.stringify(await this.addString(content)), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ if (path === "/ipfs/add/json" && method === "POST") {
+ const content = await request.json();
+ return new Response(JSON.stringify(await this.addJson(content)), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ if (path.startsWith("/ipfs/get/") && method === "GET") {
+ const cid = path.replace("/ipfs/get/", "");
+ const result = await this.getContent(cid);
+
+ if (result.type === "json") {
+ return new Response(JSON.stringify(result.content), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ } else {
+ return new Response(result.content, {
+ status: 200,
+ headers: { "Content-Type": "text/plain" },
+ });
+ }
+ }
+
+ if (path === "/ipfs/dag/json" && method === "POST") {
+ const content = await request.json();
+ return new Response(JSON.stringify(await this.addDagJson(content)), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ if (path === "/ipfs/dag/cbor" && method === "POST") {
+ const content = await request.json();
+ return new Response(JSON.stringify(await this.addDagCbor(content)), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ // Signing endpoint
+ if (path === "/vault/sign" && method === "POST") {
+ const data = await request.json();
+ return new Response(JSON.stringify(await this.sign(data)), {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+
+ // DID controller registration endpoint
+ if (path === "/did/register-controller" && method === "POST") {
+ const data = await request.json();
+ const { did, controller, signer, options } = data;
+
+ return new Response(
+ JSON.stringify(
+ await this.registerDidController(did, controller, signer, options),
+ ),
+ {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ },
+ );
+ }
+
+ // DWN vault spawning endpoint
+ if (path === "/dwn/spawn" && method === "POST") {
+ const data = await request.json();
+ const { address, redirect, options } = data;
+
+ return new Response(
+ JSON.stringify(await this.spawnDwnVault(address, redirect, options)),
+ {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ },
+ );
+ }
+
+ // Account info endpoint
+ if (path === "/account/info" && method === "GET") {
+ const address = url.searchParams.get("address");
+ if (!address) {
+ return new Response(
+ JSON.stringify({ error: "Address parameter is required" }),
+ {
+ status: 400,
+ headers: { "Content-Type": "application/json" },
+ },
+ );
+ }
+
+ return new Response(
+ JSON.stringify(await this.getAccountInfo(address)),
+ {
+ status: 200,
+ headers: { "Content-Type": "application/json" },
+ },
+ );
+ }
+
+ // Default response for unhandled paths
+ return new Response(JSON.stringify({ error: "Not found" }), {
+ status: 404,
+ headers: { "Content-Type": "application/json" },
+ });
+ } catch (error) {
+ // Log the error
+ this.addLog(`Error handling request to ${path}: ${error.message}`);
+
+ // Return error response
+ return new Response(JSON.stringify({ error: error.message }), {
+ status: 500,
+ headers: { "Content-Type": "application/json" },
+ });
+ }
+ }
+}
diff --git a/cmd/vault/wrangler.toml b/cmd/vault/wrangler.toml
new file mode 100644
index 0000000..c33796c
--- /dev/null
+++ b/cmd/vault/wrangler.toml
@@ -0,0 +1,53 @@
+# Top-level configuration
+name = "motr-vault"
+main = "./worker.mjs"
+compatibility_date = "2025-04-14"
+
+routes = [
+ { pattern = "did.run", custom_domain = true },
+]
+
+[build]
+command = "npm run build"
+
+[dev]
+port = 6969
+
+[observability]
+enabled = true
+logpush = true
+
+[[d1_databases]]
+binding = "DB" # available in your Worker on env.DB
+database_name = "motr-controller-db"
+database_id = "872a4b08-7e07-4978-b227-5b60940238ed"
+
+[[kv_namespaces]]
+binding = "SESSIONS" # available in your Worker on env.KV
+id = "ea5de66fcfc14b5eba170395e29432ee"
+
+[[kv_namespaces]]
+binding = "HANDLES" # available in your Worker on env.KV
+id = "271d47087a8842b2aac5ee79cf7bb203"
+
+[[r2_buckets]]
+binding = 'PROFILES'
+bucket_name = 'profiles'
+
+[vars]
+SONR_CHAIN_ID = 'sonr-testnet-1'
+IPFS_GATEWAY = 'https://ipfs.sonr.land'
+SONR_API_URL = 'https://api.sonr.land'
+SONR_RPC_URL = 'https://rpc.sonr.land'
+SONR_GRPC_URL = 'https://grpc.sonr.land'
+MATRIX_SERVER = 'https://bm.chat'
+MOTR_GATEWAY = 'https://sonr.id'
+MOTR_VAULT = 'https://did.run'
+MOTR_MODE = 'controller'
+
+[durable_objects]
+bindings = [{name = "VAULT", class_name = "Vault"}]
+
+[[migrations]]
+tag = "v1" # Should be unique for each entry
+new_classes = ["Vault"] # List the classes that should be created
diff --git a/components/charts/area_chart.templ b/components/charts/area_chart.templ
new file mode 100644
index 0000000..e981d57
--- /dev/null
+++ b/components/charts/area_chart.templ
@@ -0,0 +1,20 @@
+package charts
+
+import "fmt"
+
+type DateValue struct {
+ Date string
+ Value int
+}
+
+templ AreaChart(data []DateValue) {
+ for _, d := range data {
+
+
+ ${ d.Date }
+ ${ fmt.Sprintf("%d", d.Value) }
+
+
+
+ }
+}
diff --git a/components/charts/area_chart_templ.go b/components/charts/area_chart_templ.go
new file mode 100644
index 0000000..43a18d4
--- /dev/null
+++ b/components/charts/area_chart_templ.go
@@ -0,0 +1,75 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package charts
+
+//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 "fmt"
+
+type DateValue struct {
+ Date string
+ Value int
+}
+
+func AreaChart(data []DateValue) 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)
+ for _, d := range data {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "$")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(d.Date)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/area_chart.templ`, Line: 14, Col: 61}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " $")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", d.Value))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/area_chart.templ`, Line: 15, Col: 81}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/charts/bar_chart.templ b/components/charts/bar_chart.templ
new file mode 100644
index 0000000..f38d582
--- /dev/null
+++ b/components/charts/bar_chart.templ
@@ -0,0 +1,21 @@
+package charts
+
+import "fmt"
+
+type KeyValue struct {
+ Key string
+ Value int
+ Color string
+}
+
+templ BarChart(data []KeyValue) {
+ for _, d := range data {
+
+
+ ${ d.Key }
+ ${ fmt.Sprintf("%d", d.Value) }
+
+
+
+ }
+}
diff --git a/components/charts/bar_chart_templ.go b/components/charts/bar_chart_templ.go
new file mode 100644
index 0000000..e458bfe
--- /dev/null
+++ b/components/charts/bar_chart_templ.go
@@ -0,0 +1,76 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package charts
+
+//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 "fmt"
+
+type KeyValue struct {
+ Key string
+ Value int
+ Color string
+}
+
+func BarChart(data []KeyValue) 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)
+ for _, d := range data {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "$")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(d.Key)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/bar_chart.templ`, Line: 15, Col: 60}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " $")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", d.Value))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/bar_chart.templ`, Line: 16, Col: 81}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/charts/candle_chart.templ b/components/charts/candle_chart.templ
new file mode 100644
index 0000000..aab20af
--- /dev/null
+++ b/components/charts/candle_chart.templ
@@ -0,0 +1,106 @@
+package charts
+
+import (
+ "encoding/json"
+ "time"
+)
+
+type CandleData struct {
+ Open float64
+ Close float64
+ High float64
+ Low float64
+ Date time.Time
+}
+
+// D3 script handle for deduplication
+var d3Handle = templ.NewOnceHandle()
+
+// D3 component for loading D3.js
+templ D3() {
+ @d3Handle.Once() {
+
+ }
+}
+
+// CandleChart component
+templ CandleChart(data []CandleData) {
+ @D3()
+
+
+}
+
+// formatDataForJS converts the Go data structure to a JavaScript-compatible JSON string
+func formatDataForJS(data []CandleData) string {
+ type jsData struct {
+ Date string `json:"date"`
+ Open float64 `json:"open"`
+ Close float64 `json:"close"`
+ High float64 `json:"high"`
+ Low float64 `json:"low"`
+ }
+
+ jsDataArray := make([]jsData, len(data))
+ for i, d := range data {
+ jsDataArray[i] = jsData{
+ Date: d.Date.Format(time.RFC3339),
+ Open: d.Open,
+ Close: d.Close,
+ High: d.High,
+ Low: d.Low,
+ }
+ }
+
+ jsonBytes, err := json.Marshal(jsDataArray)
+ if err != nil {
+ return "[]"
+ }
+ return string(jsonBytes)
+}
diff --git a/components/charts/candle_chart_templ.go b/components/charts/candle_chart_templ.go
new file mode 100644
index 0000000..24a029c
--- /dev/null
+++ b/components/charts/candle_chart_templ.go
@@ -0,0 +1,137 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package charts
+
+//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 (
+ "encoding/json"
+ "time"
+)
+
+type CandleData struct {
+ Open float64
+ Close float64
+ High float64
+ Low float64
+ Date time.Time
+}
+
+// D3 script handle for deduplication
+var d3Handle = templ.NewOnceHandle()
+
+// D3 component for loading D3.js
+func D3() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = d3Handle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// CandleChart component
+func CandleChart(data []CandleData) 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 = D3().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// formatDataForJS converts the Go data structure to a JavaScript-compatible JSON string
+func formatDataForJS(data []CandleData) string {
+ type jsData struct {
+ Date string `json:"date"`
+ Open float64 `json:"open"`
+ Close float64 `json:"close"`
+ High float64 `json:"high"`
+ Low float64 `json:"low"`
+ }
+
+ jsDataArray := make([]jsData, len(data))
+ for i, d := range data {
+ jsDataArray[i] = jsData{
+ Date: d.Date.Format(time.RFC3339),
+ Open: d.Open,
+ Close: d.Close,
+ High: d.High,
+ Low: d.Low,
+ }
+ }
+
+ jsonBytes, err := json.Marshal(jsDataArray)
+ if err != nil {
+ return "[]"
+ }
+ return string(jsonBytes)
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/charts/line_chart.templ b/components/charts/line_chart.templ
new file mode 100644
index 0000000..d877cdd
--- /dev/null
+++ b/components/charts/line_chart.templ
@@ -0,0 +1,15 @@
+package charts
+
+import "fmt"
+
+templ LineChart(data []DateValue) {
+ for _, d := range data {
+
+
+ ${ d.Date }
+ ${ fmt.Sprintf("%d", d.Value) }
+
+
+
+ }
+}
diff --git a/components/charts/line_chart_templ.go b/components/charts/line_chart_templ.go
new file mode 100644
index 0000000..ef0474d
--- /dev/null
+++ b/components/charts/line_chart_templ.go
@@ -0,0 +1,70 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package charts
+
+//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 "fmt"
+
+func LineChart(data []DateValue) 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)
+ for _, d := range data {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "$")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(d.Date)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/line_chart.templ`, Line: 9, Col: 61}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " $")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", d.Value))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/line_chart.templ`, Line: 10, Col: 81}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/charts/pie_chart.templ b/components/charts/pie_chart.templ
new file mode 100644
index 0000000..b3484f3
--- /dev/null
+++ b/components/charts/pie_chart.templ
@@ -0,0 +1,22 @@
+package charts
+
+import "fmt"
+
+type CategoryValue struct {
+ Category string
+ Value int
+ ColorFrom string
+ ColorTo string
+}
+
+templ PieChart(data []CategoryValue) {
+ for _, d := range data {
+
+
+ ${ d.Category }
+ ${ fmt.Sprintf("%d", d.Value) }
+
+
+
+ }
+}
diff --git a/components/charts/pie_chart_templ.go b/components/charts/pie_chart_templ.go
new file mode 100644
index 0000000..1d76407
--- /dev/null
+++ b/components/charts/pie_chart_templ.go
@@ -0,0 +1,77 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package charts
+
+//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 "fmt"
+
+type CategoryValue struct {
+ Category string
+ Value int
+ ColorFrom string
+ ColorTo string
+}
+
+func PieChart(data []CategoryValue) 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)
+ for _, d := range data {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "$")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(d.Category)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/pie_chart.templ`, Line: 16, Col: 65}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " $")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", d.Value))
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/charts/pie_chart.templ`, Line: 17, Col: 81}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/dashboard/helia_console.templ b/components/dashboard/helia_console.templ
new file mode 100644
index 0000000..8ef3e6e
--- /dev/null
+++ b/components/dashboard/helia_console.templ
@@ -0,0 +1,83 @@
+package dashboard
+
+// StatusCard component for displaying Helia node status
+templ HeliaStatusCard() {
+
+
+
+ Offline
+
+
+

+
+
+
+ Status
+
+
+}
+
+// NodeIDCard component for displaying Helia node ID
+templ HeliaNodeIDCard() {
+
+}
+
+// DiscoveredPeersCard component for displaying discovered peers count
+templ HeliaDiscoveredPeersCard() {
+
+
+
+ 0
+
+
+
+
+ Discovered Peers
+
+
+
+}
+
+// ConnectedPeersCard component for displaying connected peers count
+templ HeliaConnectedPeersCard() {
+
+
+
+ Connected Peers
+
+
+}
+
+// Optional: Create a component for a connected peers list if needed
+templ HeliaConnectedPeersList() {
+
+
Connected Peers List
+
+
+}
+
+// Optional: Create a component for the running log
+templ HeliaRunningLog() {
+
+}
diff --git a/components/dashboard/helia_console_templ.go b/components/dashboard/helia_console_templ.go
new file mode 100644
index 0000000..c644ede
--- /dev/null
+++ b/components/dashboard/helia_console_templ.go
@@ -0,0 +1,191 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package dashboard
+
+//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"
+
+// StatusCard component for displaying Helia node status
+func HeliaStatusCard() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// NodeIDCard component for displaying Helia node ID
+func HeliaNodeIDCard() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// DiscoveredPeersCard component for displaying discovered peers count
+func HeliaDiscoveredPeersCard() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// ConnectedPeersCard component for displaying connected peers count
+func HeliaConnectedPeersCard() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var4 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var4 == nil {
+ templ_7745c5c3_Var4 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// Optional: Create a component for a connected peers list if needed
+func HeliaConnectedPeersList() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var5 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var5 == nil {
+ templ_7745c5c3_Var5 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// Optional: Create a component for the running log
+func HeliaRunningLog() 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_Var6 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var6 == nil {
+ templ_7745c5c3_Var6 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/inputs/input_avatar.templ b/components/inputs/input_avatar.templ
new file mode 100644
index 0000000..3f5b958
--- /dev/null
+++ b/components/inputs/input_avatar.templ
@@ -0,0 +1,8 @@
+package inputs
+
+templ InputAvatar(value string, helpText string) {
+
+
+
+
+}
diff --git a/x/portfolio/view/allocation_templ.go b/components/inputs/input_avatar_templ.go
similarity index 80%
rename from x/portfolio/view/allocation_templ.go
rename to components/inputs/input_avatar_templ.go
index 6e77b85..2155204 100644
--- a/x/portfolio/view/allocation_templ.go
+++ b/components/inputs/input_avatar_templ.go
@@ -1,14 +1,14 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
-package view
+package inputs
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
-func allocationView(data any) templ.Component {
+func InputAvatar(value string, helpText 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 {
@@ -29,7 +29,7 @@ func allocationView(data any) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Allocation
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/components/inputs/input_bio.templ b/components/inputs/input_bio.templ
new file mode 100644
index 0000000..7d9ef62
--- /dev/null
+++ b/components/inputs/input_bio.templ
@@ -0,0 +1,9 @@
+package inputs
+
+templ InputBio(value string, helpText string) {
+
+
+
+
+
+}
diff --git a/components/inputs/input_bio_templ.go b/components/inputs/input_bio_templ.go
new file mode 100644
index 0000000..863bf17
--- /dev/null
+++ b/components/inputs/input_bio_templ.go
@@ -0,0 +1,66 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package inputs
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func InputBio(value string, helpText 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_Var1 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/inputs/input_handle.templ b/components/inputs/input_handle.templ
new file mode 100644
index 0000000..a826406
--- /dev/null
+++ b/components/inputs/input_handle.templ
@@ -0,0 +1,33 @@
+package inputs
+
+templ HandleInitial() {
+
+
+}
+
+templ HandleError(value string, helpText string) {
+
+
+
+
+
+
+
+
+
+}
+
+templ HandleSuccess(value string) {
+
+
+
+
+
+
+}
diff --git a/components/inputs/input_handle_templ.go b/components/inputs/input_handle_templ.go
new file mode 100644
index 0000000..f2b1cb6
--- /dev/null
+++ b/components/inputs/input_handle_templ.go
@@ -0,0 +1,137 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package inputs
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func HandleInitial() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func HandleError(value string, helpText 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_Var2 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var2 == nil {
+ templ_7745c5c3_Var2 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func HandleSuccess(value 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_Var5 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var5 == nil {
+ templ_7745c5c3_Var5 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/inputs/input_passkey.templ b/components/inputs/input_passkey.templ
new file mode 100644
index 0000000..fc9dedd
--- /dev/null
+++ b/components/inputs/input_passkey.templ
@@ -0,0 +1,111 @@
+package inputs
+
+templ PasskeyInitial(clickHandler templ.ComponentScript) {
+
+
+ Register Passkey
+
+}
+
+templ PasskeyError(clickHandler templ.ComponentScript) {
+
+
+ Register Passkey
+
+}
+
+templ PasskeySuccess(clickHandler templ.ComponentScript) {
+
+
+ Register Passkey
+
+}
+
+script NavigatorCredentialsCreate(userId string, userHandle string, challenge string) {
+ const publicKey = {
+ challenge: Uint8Array.from(challenge, (c) => c.charCodeAt(0)),
+ rp: {
+ name: "Sonr.ID",
+ },
+ user: {
+ // Assuming that userId is ASCII-only
+ id: Uint8Array.from(userId, (c) => c.charCodeAt(0)),
+ name: userId,
+ displayName: userHandle,
+ },
+ pubKeyCredParams: [
+ {
+ type: "public-key",
+ alg: -7, // "ES256"
+ },
+ {
+ type: "public-key",
+ alg: -257, // "RS256"
+ },
+ ],
+ authenticatorSelection: {
+ userVerification: "required",
+ residentKey: "required",
+ authenticatorAttachment: "platform",
+ },
+ timeout: 60000, // 1 minute
+ extensions: {
+ payment: {
+ isPayment: true,
+ },
+ largeBlob: {
+ supported: "preferred",
+ },
+ },
+ };
+
+ // Helper function to convert ArrayBuffer to Base64URL string
+ function arrayBufferToBase64URL(buffer) {
+ const bytes = new Uint8Array(buffer);
+ let str = '';
+ bytes.forEach(byte => { str += String.fromCharCode(byte) });
+ return btoa(str)
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_')
+ .replace(/=/g, '');
+ }
+
+navigator.credentials
+ .create({ publicKey })
+ .then((newCredentialInfo) => {
+ if (!(newCredentialInfo instanceof PublicKeyCredential)) {
+ throw new Error('Received credential is not a PublicKeyCredential');
+ }
+
+ const response = newCredentialInfo.response;
+ if (!(response instanceof AuthenticatorAttestationResponse)) {
+ throw new Error('Response is not an AuthenticatorAttestationResponse');
+ }
+
+ // Convert the credential data to a cross-platform compatible format
+ const credentialJSON = {
+ id: newCredentialInfo.id,
+ rawId: arrayBufferToBase64URL(newCredentialInfo.rawId),
+ type: newCredentialInfo.type,
+ authenticatorAttachment: newCredentialInfo.authenticatorAttachment || null,
+ transports: Array.isArray(response.getTransports) ? response.getTransports() : [],
+ clientExtensionResults: newCredentialInfo.getClientExtensionResults(),
+ response: {
+ attestationObject: arrayBufferToBase64URL(response.attestationObject),
+ clientDataJSON: arrayBufferToBase64URL(response.clientDataJSON)
+ }
+ };
+
+ // Set the form value with the stringified credential data
+ const credential = document.getElementById('credential-data');
+ credential.value = JSON.stringify(credentialJSON);
+
+ // Submit the form
+ const form = document.getElementById('passkey-form');
+ form.submit();
+ })
+ .catch((err) => {
+ console.error('Passkey creation failed:', err);
+ alert(`Failed to create passkey: ${err.message || 'Unknown error'}`);
+ });
+}
diff --git a/components/inputs/input_passkey_templ.go b/components/inputs/input_passkey_templ.go
new file mode 100644
index 0000000..26a84e4
--- /dev/null
+++ b/components/inputs/input_passkey_templ.go
@@ -0,0 +1,232 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package inputs
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func PasskeyInitial(clickHandler templ.ComponentScript) 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.RenderScriptItems(ctx, templ_7745c5c3_Buffer, clickHandler)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " Register Passkey")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func PasskeyError(clickHandler templ.ComponentScript) 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.RenderScriptItems(ctx, templ_7745c5c3_Buffer, clickHandler)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, " Register Passkey")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func PasskeySuccess(clickHandler templ.ComponentScript) templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var5 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var5 == nil {
+ templ_7745c5c3_Var5 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, clickHandler)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, " Register Passkey")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func NavigatorCredentialsCreate(userId string, userHandle string, challenge string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_NavigatorCredentialsCreate_8f96`,
+ Function: `function __templ_NavigatorCredentialsCreate_8f96(userId, userHandle, challenge){const publicKey = {
+ challenge: Uint8Array.from(challenge, (c) => c.charCodeAt(0)),
+ rp: {
+ name: "Sonr.ID",
+ },
+ user: {
+ // Assuming that userId is ASCII-only
+ id: Uint8Array.from(userId, (c) => c.charCodeAt(0)),
+ name: userId,
+ displayName: userHandle,
+ },
+ pubKeyCredParams: [
+ {
+ type: "public-key",
+ alg: -7, // "ES256"
+ },
+ {
+ type: "public-key",
+ alg: -257, // "RS256"
+ },
+ ],
+ authenticatorSelection: {
+ userVerification: "required",
+ residentKey: "required",
+ authenticatorAttachment: "platform",
+ },
+ timeout: 60000, // 1 minute
+ extensions: {
+ payment: {
+ isPayment: true,
+ },
+ largeBlob: {
+ supported: "preferred",
+ },
+ },
+ };
+
+ // Helper function to convert ArrayBuffer to Base64URL string
+ function arrayBufferToBase64URL(buffer) {
+ const bytes = new Uint8Array(buffer);
+ let str = '';
+ bytes.forEach(byte => { str += String.fromCharCode(byte) });
+ return btoa(str)
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_')
+ .replace(/=/g, '');
+ }
+
+navigator.credentials
+ .create({ publicKey })
+ .then((newCredentialInfo) => {
+ if (!(newCredentialInfo instanceof PublicKeyCredential)) {
+ throw new Error('Received credential is not a PublicKeyCredential');
+ }
+
+ const response = newCredentialInfo.response;
+ if (!(response instanceof AuthenticatorAttestationResponse)) {
+ throw new Error('Response is not an AuthenticatorAttestationResponse');
+ }
+
+ // Convert the credential data to a cross-platform compatible format
+ const credentialJSON = {
+ id: newCredentialInfo.id,
+ rawId: arrayBufferToBase64URL(newCredentialInfo.rawId),
+ type: newCredentialInfo.type,
+ authenticatorAttachment: newCredentialInfo.authenticatorAttachment || null,
+ transports: Array.isArray(response.getTransports) ? response.getTransports() : [],
+ clientExtensionResults: newCredentialInfo.getClientExtensionResults(),
+ response: {
+ attestationObject: arrayBufferToBase64URL(response.attestationObject),
+ clientDataJSON: arrayBufferToBase64URL(response.clientDataJSON)
+ }
+ };
+
+ // Set the form value with the stringified credential data
+ const credential = document.getElementById('credential-data');
+ credential.value = JSON.stringify(credentialJSON);
+
+ // Submit the form
+ const form = document.getElementById('passkey-form');
+ form.submit();
+ })
+ .catch((err) => {
+ console.error('Passkey creation failed:', err);
+ alert(` + "`" + `Failed to create passkey: ${err.message || 'Unknown error'}` + "`" + `);
+ });
+}`,
+ Call: templ.SafeScript(`__templ_NavigatorCredentialsCreate_8f96`, userId, userHandle, challenge),
+ CallInline: templ.SafeScriptInline(`__templ_NavigatorCredentialsCreate_8f96`, userId, userHandle, challenge),
+ }
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/menus/assets_dropdown.templ b/components/menus/assets_dropdown.templ
new file mode 100644
index 0000000..7337ccf
--- /dev/null
+++ b/components/menus/assets_dropdown.templ
@@ -0,0 +1,37 @@
+package wallet
+
+templ AssetsDropdown() {
+
+
+
+ Sonr
+
+
+
+ Bitcoin
+
+
+
+ Ethereum
+
+
+
+ Solana
+
+
+
+ Litecoin
+
+
+
+ Dogecoin
+
+
+}
diff --git a/components/menus/assets_dropdown_templ.go b/components/menus/assets_dropdown_templ.go
new file mode 100644
index 0000000..7b4721a
--- /dev/null
+++ b/components/menus/assets_dropdown_templ.go
@@ -0,0 +1,40 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package wallet
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func AssetsDropdown() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " Sonr Bitcoin Ethereum Solana Litecoin Dogecoin")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/menus/coins_dropdown.templ b/components/menus/coins_dropdown.templ
new file mode 100644
index 0000000..6b522d5
--- /dev/null
+++ b/components/menus/coins_dropdown.templ
@@ -0,0 +1,67 @@
+package wallet
+
+type CoinInfo struct {
+ Ticker string
+ Name string
+ IsDefault bool
+}
+
+var defaultCoins = []CoinInfo{
+ {Ticker: "SNR", Name: "Sonr", IsDefault: true},
+ {Ticker: "BTC", Name: "Bitcoin", IsDefault: true},
+ {Ticker: "ETH", Name: "Ethereum", IsDefault: true},
+ {Ticker: "SOL", Name: "Solana", IsDefault: false},
+ {Ticker: "LTC", Name: "Litecoin", IsDefault: false},
+ {Ticker: "DOGE", Name: "Dogecoin", IsDefault: false},
+ {Ticker: "XRP", Name: "Ripple", IsDefault: false},
+ {Ticker: "OSMO", Name: "Osmosis", IsDefault: false},
+ {Ticker: "ATOM", Name: "Cosmos", IsDefault: false},
+ {Ticker: "STARZ", Name: "Stargaze", IsDefault: false},
+ {Ticker: "AKT", Name: "Akash", IsDefault: false},
+ {Ticker: "EVMOS", Name: "Evmos", IsDefault: false},
+ {Ticker: "FIL", Name: "Filecoin", IsDefault: false},
+ {Ticker: "AXL", Name: "Axelar", IsDefault: false},
+}
+
+templ CoinsDropdown() {
+
+ for _, a := range defaultCoins {
+ @CoinOption(a)
+ }
+
+
+}
+
+templ CoinOption(a CoinInfo) {
+ if a.IsDefault {
+
+
+ { a.Name }
+
+
+ } else {
+
+
+ { a.Name }
+
+
+ }
+}
diff --git a/components/menus/coins_dropdown_templ.go b/components/menus/coins_dropdown_templ.go
new file mode 100644
index 0000000..fcd08d6
--- /dev/null
+++ b/components/menus/coins_dropdown_templ.go
@@ -0,0 +1,187 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package wallet
+
+//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"
+
+type CoinInfo struct {
+ Ticker string
+ Name string
+ IsDefault bool
+}
+
+var defaultCoins = []CoinInfo{
+ {Ticker: "SNR", Name: "Sonr", IsDefault: true},
+ {Ticker: "BTC", Name: "Bitcoin", IsDefault: true},
+ {Ticker: "ETH", Name: "Ethereum", IsDefault: true},
+ {Ticker: "SOL", Name: "Solana", IsDefault: false},
+ {Ticker: "LTC", Name: "Litecoin", IsDefault: false},
+ {Ticker: "DOGE", Name: "Dogecoin", IsDefault: false},
+ {Ticker: "XRP", Name: "Ripple", IsDefault: false},
+ {Ticker: "OSMO", Name: "Osmosis", IsDefault: false},
+ {Ticker: "ATOM", Name: "Cosmos", IsDefault: false},
+ {Ticker: "STARZ", Name: "Stargaze", IsDefault: false},
+ {Ticker: "AKT", Name: "Akash", IsDefault: false},
+ {Ticker: "EVMOS", Name: "Evmos", IsDefault: false},
+ {Ticker: "FIL", Name: "Filecoin", IsDefault: false},
+ {Ticker: "AXL", Name: "Axelar", IsDefault: false},
+}
+
+func CoinsDropdown() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ for _, a := range defaultCoins {
+ templ_7745c5c3_Err = CoinOption(a).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func CoinOption(a CoinInfo) 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)
+ if a.IsDefault {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var5 string
+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/menus/coins_dropdown.templ`, Line: 57, Col: 11}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ } else {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var8 string
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(a.Name)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `components/menus/coins_dropdown.templ`, Line: 63, Col: 11}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/views/console.templ b/components/views/console.templ
new file mode 100644
index 0000000..ff36b35
--- /dev/null
+++ b/components/views/console.templ
@@ -0,0 +1,91 @@
+package views
+
+import (
+ "github.com/sonr-io/motr/internal/ui"
+ "github.com/sonr-io/motr/components/dashboard"
+ "time"
+)
+
+var heliaCardScriptHandle = templ.NewOnceHandle()
+
+func DemoView(d time.Time) templ.Component {
+ return demoComponent(d)
+}
+
+templ demoComponent(d time.Time) {
+ @ui.HTML() {
+ @ui.Head() {
+ }
+
+ @ui.Nav() {
+ @ui.NavLeft() {
+ @ui.NavLogo("Motr")
+ }
+ @ui.NavRight() {
+ Time
+ }
+ }
+ @ui.Body() {
+
+ @ui.Container() {
+
+
+ @dashboard.HeliaStatusCard()
+ @dashboard.HeliaNodeIDCard()
+ @dashboard.HeliaDiscoveredPeersCard()
+ @dashboard.HeliaConnectedPeersCard()
+
+
+ @dashboard.HeliaConnectedPeersList()
+ @dashboard.HeliaRunningLog()
+
+ @heliaCardScriptHandle.Once() {
+
+ }
+
+ }
+
+ }
+
+ }
+}
diff --git a/components/views/console_templ.go b/components/views/console_templ.go
new file mode 100644
index 0000000..d2290f4
--- /dev/null
+++ b/components/views/console_templ.go
@@ -0,0 +1,264 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package views
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import (
+ "github.com/sonr-io/motr/components/dashboard"
+ "github.com/sonr-io/motr/internal/ui"
+ "time"
+)
+
+var heliaCardScriptHandle = templ.NewOnceHandle()
+
+func DemoView(d time.Time) templ.Component {
+ return demoComponent(d)
+}
+
+func demoComponent(d time.Time) 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_Var3 := 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)
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Head().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var5 := 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 = ui.NavLogo("Motr").Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavLeft().Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var6 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "Time")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavRight().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Nav().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var7 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_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 = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var8 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = dashboard.HeliaStatusCard().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = dashboard.HeliaNodeIDCard().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = dashboard.HeliaDiscoveredPeersCard().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = dashboard.HeliaConnectedPeersCard().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = dashboard.HeliaConnectedPeersList().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = dashboard.HeliaRunningLog().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var9 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = heliaCardScriptHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var9), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Body().Render(templ.WithChildren(ctx, templ_7745c5c3_Var7), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.HTML().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/views/home.templ b/components/views/home.templ
new file mode 100644
index 0000000..6047811
--- /dev/null
+++ b/components/views/home.templ
@@ -0,0 +1,48 @@
+package views
+
+import (
+ "github.com/sonr-io/motr/internal/sink"
+ "github.com/sonr-io/motr/internal/ui"
+)
+
+var meta = sink.DefaultMetadata()
+
+func HomeView() templ.Component {
+ return homeComponent()
+}
+
+templ homeComponent() {
+ @ui.HTML() {
+ @ui.Head() {
+ @ui.MetaComponent(meta)
+ }
+
+ @ui.Nav() {
+ @ui.NavLeft() {
+ @ui.NavLogo("Motr")
+ }
+ @ui.NavRight() {
+ }
+ }
+ @ui.Body() {
+ @ui.Container() {
+
+
+
Welcome to Motr
+
+
+
This is a demo of the Motr web app.
+
You can use this app to manage your Motr account.
+
+
+
+ }
+ }
+
+ }
+}
diff --git a/components/views/home_templ.go b/components/views/home_templ.go
new file mode 100644
index 0000000..d27719e
--- /dev/null
+++ b/components/views/home_templ.go
@@ -0,0 +1,197 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package views
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import (
+ "github.com/sonr-io/motr/internal/sink"
+ "github.com/sonr-io/motr/internal/ui"
+)
+
+var meta = sink.DefaultMetadata()
+
+func HomeView() templ.Component {
+ return homeComponent()
+}
+
+func homeComponent() 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_Var3 := 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 = ui.MetaComponent(meta).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Head().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var5 := 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 = ui.NavLogo("Motr").Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavLeft().Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var6 := 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)
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavRight().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Nav().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var7 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_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_Var8 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "Welcome to Motr
This is a demo of the Motr web app.
You can use this app to manage your Motr account.
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Body().Render(templ.WithChildren(ctx, templ_7745c5c3_Var7), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.HTML().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/views/login.templ b/components/views/login.templ
new file mode 100644
index 0000000..287c43e
--- /dev/null
+++ b/components/views/login.templ
@@ -0,0 +1,25 @@
+package views
+
+import (
+ "github.com/sonr-io/motr/internal/ui"
+)
+
+templ LoginView() {
+ @ui.HTML() {
+ @ui.Head() {
+ @ui.MetaComponent(meta)
+ }
+
+ @ui.Nav() {
+ @ui.NavLeft() {
+ @ui.NavLogo("Motr")
+ }
+ @ui.NavRight() {
+ }
+ }
+ @ui.Body() {
+ }
+
+ }
+}
+
diff --git a/components/views/login_templ.go b/components/views/login_templ.go
new file mode 100644
index 0000000..1783253
--- /dev/null
+++ b/components/views/login_templ.go
@@ -0,0 +1,168 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package views
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import (
+ "github.com/sonr-io/motr/internal/ui"
+)
+
+func LoginView() 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_Var3 := 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 = ui.MetaComponent(meta).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Head().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var5 := 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 = ui.NavLogo("Motr").Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavLeft().Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var6 := 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)
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavRight().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Nav().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var7 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_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)
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Body().Render(templ.WithChildren(ctx, templ_7745c5c3_Var7), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.HTML().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/components/views/register.templ b/components/views/register.templ
new file mode 100644
index 0000000..fde1425
--- /dev/null
+++ b/components/views/register.templ
@@ -0,0 +1,28 @@
+package views
+
+import (
+ "github.com/sonr-io/motr/internal/ui"
+ "github.com/sonr-io/motr/components/inputs"
+)
+
+templ RegisterView() {
+ @ui.HTML() {
+ @ui.Head() {
+ @ui.MetaComponent(meta)
+ }
+
+ @ui.Nav() {
+ @ui.NavLeft() {
+ @ui.NavLogo("Motr")
+ }
+ @ui.NavRight() {
+ }
+ }
+ @ui.Body() {
+ @ui.Container() {
+ @inputs.HandleInitial()
+ }
+ }
+
+ }
+}
diff --git a/components/views/register_templ.go b/components/views/register_templ.go
new file mode 100644
index 0000000..fb7acf3
--- /dev/null
+++ b/components/views/register_templ.go
@@ -0,0 +1,191 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package views
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import (
+ "github.com/sonr-io/motr/components/inputs"
+ "github.com/sonr-io/motr/internal/ui"
+)
+
+func RegisterView() 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_Var3 := 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 = ui.MetaComponent(meta).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Head().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var5 := 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 = ui.NavLogo("Motr").Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavLeft().Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var6 := 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)
+ return nil
+ })
+ templ_7745c5c3_Err = ui.NavRight().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Nav().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Var7 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_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_Var8 := 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 = inputs.HandleInitial().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Container().Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.Body().Render(templ.WithChildren(ctx, templ_7745c5c3_Var7), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = ui.HTML().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/controllers/account/card.templ b/controllers/account/card.templ
new file mode 100644
index 0000000..08abcaa
--- /dev/null
+++ b/controllers/account/card.templ
@@ -0,0 +1,48 @@
+package account
+
+import "github.com/sonr-io/motr/internal/sink/models"
+
+templ cardComponent(handle, addr, block, name string) {
+
+
+
+
+
sonr-testnet-1
+
{ handle }
+
+
+
+
+
+
+ { addr }
+
+
+
+
Block Created
+
#{ block }
+
+
+
+
+
+}
+
+// option is a single option in the dropdown
+templ optionComponent(account models.Account) {
+
+ { account.Address }
+
+
+}
+
+// row is a single row in the list with a basic card
+templ rowComponent(account models.Account) {
+
+ { account.Address }
+
+
+}
diff --git a/controllers/account/card_templ.go b/controllers/account/card_templ.go
new file mode 100644
index 0000000..d1db7b5
--- /dev/null
+++ b/controllers/account/card_templ.go
@@ -0,0 +1,180 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package account
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import "github.com/sonr-io/motr/internal/sink/models"
+
+func cardComponent(handle, addr, block, name 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_Var1 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "sonr-testnet-1
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(handle)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/account/card.templ`, Line: 11, Col: 43}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(addr)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/account/card.templ`, Line: 18, Col: 42}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
Block Created
#")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var4 string
+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(block)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/account/card.templ`, Line: 23, Col: 47}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
Issued to
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var5 string
+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(name)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/account/card.templ`, Line: 27, Col: 32}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// option is a single option in the dropdown
+func optionComponent(account models.Account) 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_Var6 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var6 == nil {
+ templ_7745c5c3_Var6 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var7 string
+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(account.Address)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/account/card.templ`, Line: 37, Col: 19}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// row is a single row in the list with a basic card
+func rowComponent(account models.Account) 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_Var8 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var8 == nil {
+ templ_7745c5c3_Var8 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var9 string
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(account.Address)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/account/card.templ`, Line: 45, Col: 19}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/controllers/account/entity.go b/controllers/account/entity.go
new file mode 100644
index 0000000..185c7af
--- /dev/null
+++ b/controllers/account/entity.go
@@ -0,0 +1,63 @@
+package account
+
+import (
+ "strconv"
+
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type AccountEntity interface {
+ GetModel() models.Account
+ GetCard() templ.Component
+ shortAddr() string
+}
+
+type AccountsEntity interface {
+ GetModels() []models.Account
+ GetList() templ.Component
+ GetDropdown() templ.Component
+}
+
+func NewAccountEntity(account models.Account) AccountEntity {
+ return &accountEntity{Account: account}
+}
+
+func NewAccountsEntity(accounts []models.Account) AccountsEntity {
+ return &accountsEntity{Accounts: accounts}
+}
+
+type accountEntity struct {
+ models.Account
+}
+
+func (a *accountEntity) shortAddr() string {
+ if len(a.Address) <= 20 {
+ return a.Address
+ }
+ return a.Address[:16] + "..." + a.Address[len(a.Address)-4:]
+}
+
+func (a *accountEntity) GetModel() models.Account {
+ return a.Account
+}
+
+func (a *accountEntity) GetCard() templ.Component {
+ return cardComponent(a.Handle, a.shortAddr(), strconv.FormatInt(a.BlockCreated, 10), a.Label)
+}
+
+type accountsEntity struct {
+ Accounts []models.Account
+}
+
+func (a *accountsEntity) GetModels() []models.Account {
+ return a.Accounts
+}
+
+func (a *accountsEntity) GetList() templ.Component {
+ return nil
+}
+
+func (a *accountsEntity) GetDropdown() templ.Component {
+ return nil
+}
diff --git a/controllers/account/list.templ b/controllers/account/list.templ
new file mode 100644
index 0000000..7025477
--- /dev/null
+++ b/controllers/account/list.templ
@@ -0,0 +1,11 @@
+package account
+
+templ listComponent(accounts AccountsEntity) {
+
+ for _,account := range accounts.GetModels() {
+
+ @rowComponent(account)
+
+ }
+
+}
diff --git a/controllers/account/list_templ.go b/controllers/account/list_templ.go
new file mode 100644
index 0000000..2144732
--- /dev/null
+++ b/controllers/account/list_templ.go
@@ -0,0 +1,58 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package account
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func listComponent(accounts AccountsEntity) 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ for _, account := range accounts.GetModels() {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = rowComponent(account).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/controllers/account/queries.go b/controllers/account/queries.go
new file mode 100644
index 0000000..491e50e
--- /dev/null
+++ b/controllers/account/queries.go
@@ -0,0 +1,32 @@
+package account
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetAccountByID(ctx context.Context, id string) (models.Account, error)
+ GetAccountByAddress(ctx context.Context, address string) (models.Account, error)
+ GetAccountByController(ctx context.Context, controller string) (models.Account, error)
+ GetAccountByPublicKey(ctx context.Context, publicKey string) (models.Account, error)
+ GetAccountByNumber(ctx context.Context, number int64) (models.Account, error)
+ GetAccountBySequence(ctx context.Context, sequence int64) (models.Account, error)
+ GetAccountsByChainID(ctx context.Context, chainID string) ([]models.Account, error)
+ GetAccountsByHandle(ctx context.Context, handle string) ([]models.Account, error)
+ GetAccountsByLabel(ctx context.Context, name string) ([]models.Account, error)
+ UpdateAccountLabel(ctx context.Context, arg models.UpdateAccountLabelParams) (models.Account, error)
+ UpdateAccountSequence(ctx context.Context, arg models.UpdateAccountSequenceParams) (models.Account, error)
+ SoftDeleteAccount(ctx context.Context, id string) error
+ ListValidatorAccounts(ctx context.Context) ([]models.Account, error)
+ ListDelegatorAccounts(ctx context.Context) ([]models.Account, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/account/select.templ b/controllers/account/select.templ
new file mode 100644
index 0000000..1b5da87
--- /dev/null
+++ b/controllers/account/select.templ
@@ -0,0 +1,11 @@
+package account
+
+templ selectComponent(accounts AccountsEntity) {
+
+ for _,account := range accounts.GetModels() {
+
+ @optionComponent(account)
+
+ }
+
+}
diff --git a/controllers/account/select_templ.go b/controllers/account/select_templ.go
new file mode 100644
index 0000000..b38dabb
--- /dev/null
+++ b/controllers/account/select_templ.go
@@ -0,0 +1,58 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package account
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func selectComponent(accounts AccountsEntity) 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ for _, account := range accounts.GetModels() {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = optionComponent(account).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/controllers/activity/card.templ b/controllers/activity/card.templ
new file mode 100644
index 0000000..686394a
--- /dev/null
+++ b/controllers/activity/card.templ
@@ -0,0 +1,48 @@
+package activity
+
+import "github.com/sonr-io/motr/internal/sink/models"
+
+templ cardComponent(handle, addr, block, name string) {
+
+
+
+
+
sonr-testnet-1
+
{ handle }
+
+
+
+
+
+
+ { addr }
+
+
+
+
Block Created
+
#{ block }
+
+
+
+
+
+}
+
+// option is a single option in the dropdown
+templ optionComponent(account models.Activity) {
+
+ { account.Status }
+
+
+}
+
+// row is a single row in the list with a basic card
+templ rowComponent(account models.Activity) {
+
+ { account.Status }
+
+
+}
diff --git a/controllers/activity/card_templ.go b/controllers/activity/card_templ.go
new file mode 100644
index 0000000..745c10a
--- /dev/null
+++ b/controllers/activity/card_templ.go
@@ -0,0 +1,180 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package activity
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import "github.com/sonr-io/motr/internal/sink/models"
+
+func cardComponent(handle, addr, block, name 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_Var1 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "sonr-testnet-1
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(handle)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/activity/card.templ`, Line: 11, Col: 43}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var3 string
+ templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(addr)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/activity/card.templ`, Line: 18, Col: 42}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
Block Created
#")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var4 string
+ templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(block)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/activity/card.templ`, Line: 23, Col: 47}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
Issued to
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var5 string
+ templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(name)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/activity/card.templ`, Line: 27, Col: 32}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// option is a single option in the dropdown
+func optionComponent(account models.Activity) 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_Var6 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var6 == nil {
+ templ_7745c5c3_Var6 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var7 string
+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(account.Status)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/activity/card.templ`, Line: 37, Col: 18}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// row is a single row in the list with a basic card
+func rowComponent(account models.Activity) 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_Var8 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var8 == nil {
+ templ_7745c5c3_Var8 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var9 string
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(account.Status)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `controllers/activity/card.templ`, Line: 45, Col: 18}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/controllers/activity/entity.go b/controllers/activity/entity.go
new file mode 100644
index 0000000..180810f
--- /dev/null
+++ b/controllers/activity/entity.go
@@ -0,0 +1,16 @@
+package activity
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type ActivityEntity interface {
+ GetModel() models.Activity
+ GetCard() templ.Component
+}
+
+type ActivitiesEntity interface {
+ GetModels() []models.Activity
+ GetList() templ.Component
+}
diff --git a/controllers/activity/list.templ b/controllers/activity/list.templ
new file mode 100644
index 0000000..2eb905e
--- /dev/null
+++ b/controllers/activity/list.templ
@@ -0,0 +1,11 @@
+package activity
+
+templ listComponent(accounts ActivitiesEntity) {
+
+ for _,account := range accounts.GetModels() {
+
+ @rowComponent(account)
+
+ }
+
+}
diff --git a/controllers/activity/list_templ.go b/controllers/activity/list_templ.go
new file mode 100644
index 0000000..98902ab
--- /dev/null
+++ b/controllers/activity/list_templ.go
@@ -0,0 +1,58 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package activity
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func listComponent(accounts ActivitiesEntity) 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ for _, account := range accounts.GetModels() {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = rowComponent(account).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/controllers/activity/queries.go b/controllers/activity/queries.go
new file mode 100644
index 0000000..c530cd5
--- /dev/null
+++ b/controllers/activity/queries.go
@@ -0,0 +1,27 @@
+package activity
+
+import (
+ "context"
+ "database/sql"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetActivityByID(ctx context.Context, id string) (models.Activity, error)
+ GetActivityByTxHash(ctx context.Context, txHash sql.NullString) (models.Activity, error)
+ InsertActivity(ctx context.Context, arg models.InsertActivityParams) (models.Activity, error)
+ ListActivitiesByAccount(ctx context.Context, arg models.ListActivitiesByAccountParams) ([]models.Activity, error)
+ ListActivitiesByStatus(ctx context.Context, arg models.ListActivitiesByStatusParams) ([]models.Activity, error)
+ ListActivitiesByType(ctx context.Context, arg models.ListActivitiesByTypeParams) ([]models.Activity, error)
+ SoftDeleteActivity(ctx context.Context, id string) error
+ UpdateActivityStatus(ctx context.Context, arg models.UpdateActivityStatusParams) (models.Activity, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/asset/entity.go b/controllers/asset/entity.go
new file mode 100644
index 0000000..ddb1c65
--- /dev/null
+++ b/controllers/asset/entity.go
@@ -0,0 +1,17 @@
+package asset
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type AssetEntity interface {
+ GetModel() models.Asset
+ GetCard(ticker, price string) templ.Component
+}
+
+type AssetsEntity interface {
+ GetModels() []models.Asset
+ GetList() templ.Component
+ GetDropdown() templ.Component
+}
diff --git a/controllers/asset/queries.go b/controllers/asset/queries.go
new file mode 100644
index 0000000..0c7ebbd
--- /dev/null
+++ b/controllers/asset/queries.go
@@ -0,0 +1,27 @@
+package asset
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetAssetByChainAndSymbol(ctx context.Context, arg models.GetAssetByChainAndSymbolParams) (models.Asset, error)
+ GetAssetByID(ctx context.Context, id string) (models.Asset, error)
+ GetAssetBySymbol(ctx context.Context, symbol string) (models.Asset, error)
+ GetAssetWithLatestPrice(ctx context.Context, id string) (models.GetAssetWithLatestPriceRow, error)
+ InsertAsset(ctx context.Context, arg models.InsertAssetParams) (models.Asset, error)
+ ListAssetsByChain(ctx context.Context, chainID string) ([]models.Asset, error)
+ ListAssetsWithLatestPrices(ctx context.Context, arg models.ListAssetsWithLatestPricesParams) ([]models.ListAssetsWithLatestPricesRow, error)
+ SoftDeleteAsset(ctx context.Context, id string) error
+ UpdateAsset(ctx context.Context, arg models.UpdateAssetParams) (models.Asset, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/asset/select.templ b/controllers/asset/select.templ
new file mode 100644
index 0000000..54c86a2
--- /dev/null
+++ b/controllers/asset/select.templ
@@ -0,0 +1,7 @@
+package asset
+
+templ selectComponent() {
+
+}
diff --git a/x/identity/view/register_templ.go b/controllers/asset/select_templ.go
similarity index 88%
rename from x/identity/view/register_templ.go
rename to controllers/asset/select_templ.go
index beed736..eb13904 100644
--- a/x/identity/view/register_templ.go
+++ b/controllers/asset/select_templ.go
@@ -1,14 +1,14 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
-package view
+package asset
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
-func registerView(data any) templ.Component {
+func selectComponent() 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 {
@@ -29,7 +29,7 @@ func registerView(data any) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Register
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/controllers/blockchain/entity.go b/controllers/blockchain/entity.go
new file mode 100644
index 0000000..44b4eac
--- /dev/null
+++ b/controllers/blockchain/entity.go
@@ -0,0 +1,17 @@
+package blockchain
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type BlockchainEntity interface {
+ GetModel() models.Blockchain
+ GetCard(ticker, price string) templ.Component
+}
+
+type BlockchainsEntity interface {
+ GetModels() []models.Blockchain
+ GetList() templ.Component
+ GetDropdown() templ.Component
+}
diff --git a/controllers/blockchain/queries.go b/controllers/blockchain/queries.go
new file mode 100644
index 0000000..28b1568
--- /dev/null
+++ b/controllers/blockchain/queries.go
@@ -0,0 +1,41 @@
+package blockchain
+
+import (
+ "context"
+ "database/sql"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetBlockchainByChainName(ctx context.Context, chainName string) (models.Blockchain, error)
+ GetBlockchainByCosmosChainID(ctx context.Context, chainIDCosmos sql.NullString) (models.Blockchain, error)
+ GetBlockchainByEvmChainID(ctx context.Context, chainIDEvm sql.NullString) (models.Blockchain, error)
+ GetBlockchainByID(ctx context.Context, id string) (models.Blockchain, error)
+ GetBlockchainEndpoints(ctx context.Context, id string) (models.GetBlockchainEndpointsRow, error)
+ GetBlockchainExplorer(ctx context.Context, id string) (models.GetBlockchainExplorerRow, error)
+ GetBlockchainWithAssetInfo(ctx context.Context, id string) (models.GetBlockchainWithAssetInfoRow, error)
+ InsertBlockchain(ctx context.Context, arg models.InsertBlockchainParams) (models.Blockchain, error)
+ ListBlockchainsWithAssetInfo(ctx context.Context, arg models.ListBlockchainsWithAssetInfoParams) ([]models.ListBlockchainsWithAssetInfoRow, error)
+ ListBlockchainsWithERC20Support(ctx context.Context) ([]models.Blockchain, error)
+ ListBlockchainsWithExtensionSupport(ctx context.Context) ([]models.Blockchain, error)
+ ListBlockchainsWithMobileSupport(ctx context.Context) ([]models.Blockchain, error)
+ ListBlockchainsWithStaking(ctx context.Context) ([]models.Blockchain, error)
+ SearchBlockchains(ctx context.Context, arg models.SearchBlockchainsParams) ([]models.Blockchain, error)
+ SoftDeleteBlockchain(ctx context.Context, id string) error
+ UpdateBlockchain(ctx context.Context, arg models.UpdateBlockchainParams) (models.Blockchain, error)
+ UpdateBlockchainDescriptions(ctx context.Context, arg models.UpdateBlockchainDescriptionsParams) (models.Blockchain, error)
+ UpdateBlockchainEndpoints(ctx context.Context, arg models.UpdateBlockchainEndpointsParams) (models.Blockchain, error)
+ UpdateBlockchainExplorer(ctx context.Context, arg models.UpdateBlockchainExplorerParams) (models.Blockchain, error)
+ UpdateBlockchainFeeInfo(ctx context.Context, arg models.UpdateBlockchainFeeInfoParams) (models.Blockchain, error)
+ UpdateBlockchainImages(ctx context.Context, arg models.UpdateBlockchainImagesParams) (models.Blockchain, error)
+ UpdateBlockchainSocialLinks(ctx context.Context, arg models.UpdateBlockchainSocialLinksParams) (models.Blockchain, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/credential/descriptor.go b/controllers/credential/descriptor.go
new file mode 100644
index 0000000..5043894
--- /dev/null
+++ b/controllers/credential/descriptor.go
@@ -0,0 +1,43 @@
+package credential
+
+import "github.com/sonr-io/motr/internal/sink/models"
+
+// Define the credential structure matching our frontend data
+type CredentialDescriptor struct {
+ ID string `json:"id"`
+ RawID string `json:"rawId"`
+ Type string `json:"type"`
+ AuthenticatorAttachment string `json:"authenticatorAttachment"`
+ Transports string `json:"transports"`
+ ClientExtensionResults map[string]string `json:"clientExtensionResults"`
+ Response struct {
+ AttestationObject string `json:"attestationObject"`
+ ClientDataJSON string `json:"clientDataJSON"`
+ } `json:"response"`
+}
+
+func (c *CredentialDescriptor) ToModel(handle, origin string) *models.Credential {
+ return &models.Credential{
+ Handle: handle,
+ Origin: origin,
+ CredentialID: c.ID,
+ Type: c.Type,
+ Transports: c.Transports,
+ AuthenticatorAttachment: c.AuthenticatorAttachment,
+ }
+}
+
+func CredentialArrayToDescriptors(credentials []models.Credential) []*CredentialDescriptor {
+ var descriptors []*CredentialDescriptor
+ for _, cred := range credentials {
+ cd := &CredentialDescriptor{
+ ID: cred.CredentialID,
+ RawID: cred.CredentialID,
+ Type: cred.Type,
+ AuthenticatorAttachment: cred.AuthenticatorAttachment,
+ Transports: cred.Transports,
+ }
+ descriptors = append(descriptors, cd)
+ }
+ return descriptors
+}
diff --git a/controllers/credential/entity.go b/controllers/credential/entity.go
new file mode 100644
index 0000000..7e63164
--- /dev/null
+++ b/controllers/credential/entity.go
@@ -0,0 +1,18 @@
+package credential
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type CredentialEntity interface {
+ GetModel() models.Credential
+ GetDescriptor() *CredentialDescriptor
+ GetInfoModal() templ.Component
+}
+
+type CredentialsEntity interface {
+ GetModels() []models.Credential
+ GetDescriptors() []*CredentialDescriptor
+ GetList() templ.Component
+}
diff --git a/controllers/credential/inputs.templ b/controllers/credential/inputs.templ
new file mode 100644
index 0000000..bf670ea
--- /dev/null
+++ b/controllers/credential/inputs.templ
@@ -0,0 +1,111 @@
+package credential
+
+templ PasskeyInitial(clickHandler templ.ComponentScript) {
+
+
+ Register Passkey
+
+}
+
+templ PasskeyError(clickHandler templ.ComponentScript) {
+
+
+ Register Passkey
+
+}
+
+templ PasskeySuccess(clickHandler templ.ComponentScript) {
+
+
+ Register Passkey
+
+}
+
+script NavigatorCredentialsCreate(userId string, userHandle string, challenge string) {
+ const publicKey = {
+ challenge: Uint8Array.from(challenge, (c) => c.charCodeAt(0)),
+ rp: {
+ name: "Sonr.ID",
+ },
+ user: {
+ // Assuming that userId is ASCII-only
+ id: Uint8Array.from(userId, (c) => c.charCodeAt(0)),
+ name: userId,
+ displayName: userHandle,
+ },
+ pubKeyCredParams: [
+ {
+ type: "public-key",
+ alg: -7, // "ES256"
+ },
+ {
+ type: "public-key",
+ alg: -257, // "RS256"
+ },
+ ],
+ authenticatorSelection: {
+ userVerification: "required",
+ residentKey: "required",
+ authenticatorAttachment: "platform",
+ },
+ timeout: 60000, // 1 minute
+ extensions: {
+ payment: {
+ isPayment: true,
+ },
+ largeBlob: {
+ supported: "preferred",
+ },
+ },
+ };
+
+ // Helper function to convert ArrayBuffer to Base64URL string
+ function arrayBufferToBase64URL(buffer) {
+ const bytes = new Uint8Array(buffer);
+ let str = '';
+ bytes.forEach(byte => { str += String.fromCharCode(byte) });
+ return btoa(str)
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_')
+ .replace(/=/g, '');
+ }
+
+navigator.credentials
+ .create({ publicKey })
+ .then((newCredentialInfo) => {
+ if (!(newCredentialInfo instanceof PublicKeyCredential)) {
+ throw new Error('Received credential is not a PublicKeyCredential');
+ }
+
+ const response = newCredentialInfo.response;
+ if (!(response instanceof AuthenticatorAttestationResponse)) {
+ throw new Error('Response is not an AuthenticatorAttestationResponse');
+ }
+
+ // Convert the credential data to a cross-platform compatible format
+ const credentialJSON = {
+ id: newCredentialInfo.id,
+ rawId: arrayBufferToBase64URL(newCredentialInfo.rawId),
+ type: newCredentialInfo.type,
+ authenticatorAttachment: newCredentialInfo.authenticatorAttachment || null,
+ transports: Array.isArray(response.getTransports) ? response.getTransports() : [],
+ clientExtensionResults: newCredentialInfo.getClientExtensionResults(),
+ response: {
+ attestationObject: arrayBufferToBase64URL(response.attestationObject),
+ clientDataJSON: arrayBufferToBase64URL(response.clientDataJSON)
+ }
+ };
+
+ // Set the form value with the stringified credential data
+ const credential = document.getElementById('credential-data');
+ credential.value = JSON.stringify(credentialJSON);
+
+ // Submit the form
+ const form = document.getElementById('passkey-form');
+ form.submit();
+ })
+ .catch((err) => {
+ console.error('Passkey creation failed:', err);
+ alert(`Failed to create passkey: ${err.message || 'Unknown error'}`);
+ });
+}
diff --git a/controllers/credential/inputs_templ.go b/controllers/credential/inputs_templ.go
new file mode 100644
index 0000000..66d4bce
--- /dev/null
+++ b/controllers/credential/inputs_templ.go
@@ -0,0 +1,232 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package credential
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func PasskeyInitial(clickHandler templ.ComponentScript) 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.RenderScriptItems(ctx, templ_7745c5c3_Buffer, clickHandler)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " Register Passkey")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func PasskeyError(clickHandler templ.ComponentScript) 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.RenderScriptItems(ctx, templ_7745c5c3_Buffer, clickHandler)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, " Register Passkey")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func PasskeySuccess(clickHandler templ.ComponentScript) templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var5 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var5 == nil {
+ templ_7745c5c3_Var5 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templ.RenderScriptItems(ctx, templ_7745c5c3_Buffer, clickHandler)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, " Register Passkey")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func NavigatorCredentialsCreate(userId string, userHandle string, challenge string) templ.ComponentScript {
+ return templ.ComponentScript{
+ Name: `__templ_NavigatorCredentialsCreate_8f96`,
+ Function: `function __templ_NavigatorCredentialsCreate_8f96(userId, userHandle, challenge){const publicKey = {
+ challenge: Uint8Array.from(challenge, (c) => c.charCodeAt(0)),
+ rp: {
+ name: "Sonr.ID",
+ },
+ user: {
+ // Assuming that userId is ASCII-only
+ id: Uint8Array.from(userId, (c) => c.charCodeAt(0)),
+ name: userId,
+ displayName: userHandle,
+ },
+ pubKeyCredParams: [
+ {
+ type: "public-key",
+ alg: -7, // "ES256"
+ },
+ {
+ type: "public-key",
+ alg: -257, // "RS256"
+ },
+ ],
+ authenticatorSelection: {
+ userVerification: "required",
+ residentKey: "required",
+ authenticatorAttachment: "platform",
+ },
+ timeout: 60000, // 1 minute
+ extensions: {
+ payment: {
+ isPayment: true,
+ },
+ largeBlob: {
+ supported: "preferred",
+ },
+ },
+ };
+
+ // Helper function to convert ArrayBuffer to Base64URL string
+ function arrayBufferToBase64URL(buffer) {
+ const bytes = new Uint8Array(buffer);
+ let str = '';
+ bytes.forEach(byte => { str += String.fromCharCode(byte) });
+ return btoa(str)
+ .replace(/\+/g, '-')
+ .replace(/\//g, '_')
+ .replace(/=/g, '');
+ }
+
+navigator.credentials
+ .create({ publicKey })
+ .then((newCredentialInfo) => {
+ if (!(newCredentialInfo instanceof PublicKeyCredential)) {
+ throw new Error('Received credential is not a PublicKeyCredential');
+ }
+
+ const response = newCredentialInfo.response;
+ if (!(response instanceof AuthenticatorAttestationResponse)) {
+ throw new Error('Response is not an AuthenticatorAttestationResponse');
+ }
+
+ // Convert the credential data to a cross-platform compatible format
+ const credentialJSON = {
+ id: newCredentialInfo.id,
+ rawId: arrayBufferToBase64URL(newCredentialInfo.rawId),
+ type: newCredentialInfo.type,
+ authenticatorAttachment: newCredentialInfo.authenticatorAttachment || null,
+ transports: Array.isArray(response.getTransports) ? response.getTransports() : [],
+ clientExtensionResults: newCredentialInfo.getClientExtensionResults(),
+ response: {
+ attestationObject: arrayBufferToBase64URL(response.attestationObject),
+ clientDataJSON: arrayBufferToBase64URL(response.clientDataJSON)
+ }
+ };
+
+ // Set the form value with the stringified credential data
+ const credential = document.getElementById('credential-data');
+ credential.value = JSON.stringify(credentialJSON);
+
+ // Submit the form
+ const form = document.getElementById('passkey-form');
+ form.submit();
+ })
+ .catch((err) => {
+ console.error('Passkey creation failed:', err);
+ alert(` + "`" + `Failed to create passkey: ${err.message || 'Unknown error'}` + "`" + `);
+ });
+}`,
+ Call: templ.SafeScript(`__templ_NavigatorCredentialsCreate_8f96`, userId, userHandle, challenge),
+ CallInline: templ.SafeScriptInline(`__templ_NavigatorCredentialsCreate_8f96`, userId, userHandle, challenge),
+ }
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/controllers/credential/queries.go b/controllers/credential/queries.go
new file mode 100644
index 0000000..bcefdc8
--- /dev/null
+++ b/controllers/credential/queries.go
@@ -0,0 +1,22 @@
+package credential
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetCredentialByID(ctx context.Context, credentialID string) (models.Credential, error)
+ GetCredentialsByHandle(ctx context.Context, handle string) ([]models.Credential, error)
+ InsertCredential(ctx context.Context, arg models.InsertCredentialParams) (models.Credential, error)
+ SoftDeleteCredential(ctx context.Context, credentialID string) error
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/health/entity.go b/controllers/health/entity.go
new file mode 100644
index 0000000..844de99
--- /dev/null
+++ b/controllers/health/entity.go
@@ -0,0 +1,16 @@
+package health
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type HealthEntity interface {
+ GetModel() models.Health
+ GetCard() templ.Component
+}
+
+type HealthsEntity interface {
+ GetModels() []models.Health
+ GetList() templ.Component
+}
diff --git a/controllers/health/queries.go b/controllers/health/queries.go
new file mode 100644
index 0000000..57c3916
--- /dev/null
+++ b/controllers/health/queries.go
@@ -0,0 +1,26 @@
+package health
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetHealthByEndpoint(ctx context.Context, endpointUrl string) (models.Health, error)
+ GetHealthByID(ctx context.Context, id string) (models.Health, error)
+ InsertHealth(ctx context.Context, arg models.InsertHealthParams) (models.Health, error)
+ ListHealthByChain(ctx context.Context, arg models.ListHealthByChainParams) ([]models.Health, error)
+ ListHealthByStatus(ctx context.Context, arg models.ListHealthByStatusParams) ([]models.Health, error)
+ ListHealthChecksNeedingUpdate(ctx context.Context, limit int64) ([]models.Health, error)
+ SoftDeleteHealth(ctx context.Context, id string) error
+ UpdateHealthCheck(ctx context.Context, arg models.UpdateHealthCheckParams) (models.Health, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/prices/entity.go b/controllers/prices/entity.go
new file mode 100644
index 0000000..759d073
--- /dev/null
+++ b/controllers/prices/entity.go
@@ -0,0 +1,16 @@
+package prices
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type PriceEntity interface {
+ GetModel() models.Price
+ GetCard() templ.Component
+}
+
+type PricesEntity interface {
+ GetModels() []models.Price
+ GetList() templ.Component
+}
diff --git a/controllers/prices/queries.go b/controllers/prices/queries.go
new file mode 100644
index 0000000..b5881b6
--- /dev/null
+++ b/controllers/prices/queries.go
@@ -0,0 +1,23 @@
+package prices
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetPriceByAssetID(ctx context.Context, assetID string) (models.Price, error)
+ GetPriceByID(ctx context.Context, id string) (models.Price, error)
+ InsertPrice(ctx context.Context, arg models.InsertPriceParams) (models.Price, error)
+ ListPriceHistoryByAssetID(ctx context.Context, arg models.ListPriceHistoryByAssetIDParams) ([]models.Price, error)
+ UpdatePrice(ctx context.Context, arg models.UpdatePriceParams) (models.Price, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/profile/entity.go b/controllers/profile/entity.go
new file mode 100644
index 0000000..8480886
--- /dev/null
+++ b/controllers/profile/entity.go
@@ -0,0 +1,16 @@
+package profile
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type ProfileEntity interface {
+ GetModel() models.Profile
+}
+
+type ProfilesEntity interface {
+ GetModels() []models.Profile
+ GetList() templ.Component
+ GetDropdown() templ.Component
+}
diff --git a/controllers/profile/inputs.templ b/controllers/profile/inputs.templ
new file mode 100644
index 0000000..c167eea
--- /dev/null
+++ b/controllers/profile/inputs.templ
@@ -0,0 +1,8 @@
+package profile
+
+templ InputAvatar(value string, helpText string) {
+
+
+
+
+}
diff --git a/x/identity/view/login_templ.go b/controllers/profile/inputs_templ.go
similarity index 80%
rename from x/identity/view/login_templ.go
rename to controllers/profile/inputs_templ.go
index 2ab0516..e0b45d0 100644
--- a/x/identity/view/login_templ.go
+++ b/controllers/profile/inputs_templ.go
@@ -1,14 +1,14 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
-package view
+package profile
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
-func loginView(data any) templ.Component {
+func InputAvatar(value string, helpText 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 {
@@ -29,7 +29,7 @@ func loginView(data any) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Login
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, " ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/controllers/profile/queries.go b/controllers/profile/queries.go
new file mode 100644
index 0000000..751f031
--- /dev/null
+++ b/controllers/profile/queries.go
@@ -0,0 +1,26 @@
+package profile
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ CheckHandleExists(ctx context.Context, handle string) (bool, error)
+ GetAccountsByHandle(ctx context.Context, handle string) ([]models.Account, error)
+ GetCredentialsByHandle(ctx context.Context, handle string) ([]models.Credential, error)
+ GetVaultsByHandle(ctx context.Context, handle string) ([]models.Vault, error)
+ InsertProfile(ctx context.Context, arg models.InsertProfileParams) (models.Profile, error)
+ ListProfiles(ctx context.Context, arg models.ListProfilesParams) ([]models.Profile, error)
+ SoftDeleteProfile(ctx context.Context, address string) error
+ UpdateProfile(ctx context.Context, arg models.UpdateProfileParams) (models.Profile, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/service/entity.go b/controllers/service/entity.go
new file mode 100644
index 0000000..c1d0637
--- /dev/null
+++ b/controllers/service/entity.go
@@ -0,0 +1,16 @@
+package service
+
+import (
+ "github.com/a-h/templ"
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type ServiceEntity interface {
+ GetModel() models.Service
+ GetCard() templ.Component
+}
+
+type ServicesEntity interface {
+ GetModels() []models.Service
+ GetList() templ.Component
+}
diff --git a/controllers/service/queries.go b/controllers/service/queries.go
new file mode 100644
index 0000000..691ad33
--- /dev/null
+++ b/controllers/service/queries.go
@@ -0,0 +1,26 @@
+package service
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetServiceByAddress(ctx context.Context, address string) (models.Service, error)
+ GetServiceByChainAndAddress(ctx context.Context, arg models.GetServiceByChainAndAddressParams) (models.Service, error)
+ GetServiceByID(ctx context.Context, id string) (models.Service, error)
+ InsertService(ctx context.Context, arg models.InsertServiceParams) (models.Service, error)
+ ListServicesByChain(ctx context.Context, arg models.ListServicesByChainParams) ([]models.Service, error)
+ ListServicesByOwner(ctx context.Context, arg models.ListServicesByOwnerParams) ([]models.Service, error)
+ SoftDeleteService(ctx context.Context, id string) error
+ UpdateService(ctx context.Context, arg models.UpdateServiceParams) (models.Service, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/controllers/vault/entity.go b/controllers/vault/entity.go
new file mode 100644
index 0000000..3707dc9
--- /dev/null
+++ b/controllers/vault/entity.go
@@ -0,0 +1,9 @@
+package vault
+
+import (
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type VaultEntity interface {
+ GetModel() models.Vault
+}
diff --git a/controllers/vault/forms.templ b/controllers/vault/forms.templ
new file mode 100644
index 0000000..462429f
--- /dev/null
+++ b/controllers/vault/forms.templ
@@ -0,0 +1,7 @@
+package vault
+
+templ LoginForm(opts LoginOptions) {
+
+}
diff --git a/x/identity/view/authorize_templ.go b/controllers/vault/forms_templ.go
similarity index 86%
rename from x/identity/view/authorize_templ.go
rename to controllers/vault/forms_templ.go
index e32de8a..2c4b37b 100644
--- a/x/identity/view/authorize_templ.go
+++ b/controllers/vault/forms_templ.go
@@ -1,15 +1,14 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
-
-package view
+package vault
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
-func authorizeView(data any) templ.Component {
+func LoginForm(opts LoginOptions) 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 {
@@ -30,7 +29,7 @@ func authorizeView(data any) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Authorize
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/controllers/vault/options.go b/controllers/vault/options.go
new file mode 100644
index 0000000..7e68ac7
--- /dev/null
+++ b/controllers/vault/options.go
@@ -0,0 +1,18 @@
+package vault
+
+import "github.com/sonr-io/motr/controllers/credential"
+
+type LoginOptions struct {
+ Account string
+ Handle string
+ HelpText string
+ Label string
+ Challenge string
+ AllowedCredentials []*credential.CredentialDescriptor
+}
+
+type RegisterOptions struct {
+ Address string
+ Handle string
+ Challenge string
+}
diff --git a/controllers/vault/queries.go b/controllers/vault/queries.go
new file mode 100644
index 0000000..6503410
--- /dev/null
+++ b/controllers/vault/queries.go
@@ -0,0 +1,25 @@
+package vault
+
+import (
+ "context"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+)
+
+type Queries interface {
+ GetVaultByID(ctx context.Context, id string) (models.Vault, error)
+ GetVaultConfigByCID(ctx context.Context, cid string) (models.Vault, error)
+ GetVaultRedirectURIBySessionID(ctx context.Context, sessionID string) (string, error)
+ GetVaultsByHandle(ctx context.Context, handle string) ([]models.Vault, error)
+ InsertVault(ctx context.Context, arg models.InsertVaultParams) (models.Vault, error)
+ SoftDeleteVault(ctx context.Context, id string) error
+ UpdateVault(ctx context.Context, arg models.UpdateVaultParams) (models.Vault, error)
+}
+
+func NewQueries(q models.Querier) Queries {
+ return &queries{Querier: q}
+}
+
+type queries struct {
+ models.Querier
+}
diff --git a/go.mod b/go.mod
index 26fa189..4ef33a3 100644
--- a/go.mod
+++ b/go.mod
@@ -1,33 +1,33 @@
-module github.com/onsonr/motr
+module github.com/sonr-io/motr
-go 1.23.1
+go 1.24.2
require (
github.com/a-h/templ v0.3.857
+ github.com/go-webauthn/webauthn v0.12.3
github.com/labstack/echo/v4 v4.13.3
- github.com/ncruces/go-sqlite3 v0.21.3
- github.com/nlepage/go-wasm-http-server/v2 v2.2.1
+ github.com/segmentio/ksuid v1.0.4
+ github.com/syumai/workers v0.30.2
)
require (
- github.com/hack-pad/safejs v0.1.1 // indirect
- github.com/nlepage/go-js-promise v1.0.0 // indirect
+ github.com/fxamacker/cbor/v2 v2.8.0 // indirect
+ github.com/go-webauthn/x v0.1.20 // indirect
+ github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
+ github.com/google/go-tpm v0.9.3 // indirect
+ github.com/google/uuid v1.6.0 // indirect
+ github.com/mitchellh/mapstructure v1.5.0 // indirect
+ github.com/x448/float16 v0.8.4 // indirect
)
require (
- // github.com/a-h/templ v0.3.857 // indirect
- github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
- github.com/ncruces/julianday v1.0.0 // indirect
- github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
- github.com/tetratelabs/wazero v1.8.2 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/net v0.37.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
- golang.org/x/time v0.8.0 // indirect
)
diff --git a/go.sum b/go.sum
index a0e3d1a..5558d45 100644
--- a/go.sum
+++ b/go.sum
@@ -1,11 +1,21 @@
github.com/a-h/templ v0.3.857 h1:6EqcJuGZW4OL+2iZ3MD+NnIcG7nGkaQeF2Zq5kf9ZGg=
github.com/a-h/templ v0.3.857/go.mod h1:qhrhAkRFubE7khxLZHsBFHfX+gWwVNKbzKeF9GlPV4M=
-github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
-github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
+github.com/fxamacker/cbor/v2 v2.8.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
+github.com/go-webauthn/webauthn v0.12.3 h1:hHQl1xkUuabUU9uS+ISNCMLs9z50p9mDUZI/FmkayNE=
+github.com/go-webauthn/webauthn v0.12.3/go.mod h1:4JRe8Z3W7HIw8NGEWn2fnUwecoDzkkeach/NnvhkqGY=
+github.com/go-webauthn/x v0.1.20 h1:brEBDqfiPtNNCdS/peu8gARtq8fIPsHz0VzpPjGvgiw=
+github.com/go-webauthn/x v0.1.20/go.mod h1:n/gAc8ssZJGATM0qThE+W+vfgXiMedsWi3wf/C4lld0=
+github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
+github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
-github.com/hack-pad/safejs v0.1.1 h1:d5qPO0iQ7h2oVtpzGnLExE+Wn9AtytxIfltcS2b9KD8=
-github.com/hack-pad/safejs v0.1.1/go.mod h1:HdS+bKF1NrE72VoXZeWzxFOVQVUSqZJAG0xNCnb+Tio=
+github.com/google/go-tpm v0.9.3 h1:+yx0/anQuGzi+ssRqeD6WpXjW2L/V0dItUayO0i9sRc=
+github.com/google/go-tpm v0.9.3/go.mod h1:h9jEsEECg7gtLis0upRBQU+GhYVH6jMjrFxI8u6bVUY=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/labstack/echo/v4 v4.13.3 h1:pwhpCPrTl5qry5HRdM5FwdXnhXSLSY+WE+YQSeCaafY=
github.com/labstack/echo/v4 v4.13.3/go.mod h1:o90YNEeQWjDozo584l7AwhJMHN0bOC4tAfg+Xox9q5g=
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
@@ -15,24 +25,22 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
-github.com/ncruces/go-sqlite3 v0.21.3 h1:hHkfNQLcbnxPJZhC/RGw9SwP3bfkv/Y0xUHWsr1CdMQ=
-github.com/ncruces/go-sqlite3 v0.21.3/go.mod h1:zxMOaSG5kFYVFK4xQa0pdwIszqxqJ0W0BxBgwdrNjuA=
-github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M=
-github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g=
-github.com/nlepage/go-js-promise v1.0.0 h1:K7OmJ3+0BgWJ2LfXchg2sI6RDr7AW/KWR8182epFwGQ=
-github.com/nlepage/go-js-promise v1.0.0/go.mod h1:bdOP0wObXu34euibyK39K1hoBCtlgTKXGc56AGflaRo=
-github.com/nlepage/go-wasm-http-server/v2 v2.2.1 h1:4tzhSb3HKQ3Ykt2TPfqEnmcPfw8n1E8agv4OzAyckr8=
-github.com/nlepage/go-wasm-http-server/v2 v2.2.1/go.mod h1:r8j7cEOeUqNp+c+C52sNuWaFTvvT/cNqIwBuEtA36HA=
-github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
-github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
+github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
+github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-github.com/tetratelabs/wazero v1.8.2 h1:yIgLR/b2bN31bjxwXHD8a3d+BogigR952csSDdLYEv4=
-github.com/tetratelabs/wazero v1.8.2/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs=
+github.com/syumai/workers v0.30.2 h1:ZefPdAoXBsw87Bxy1LTAR6Pm9Gbxw/iM7DNraPSput0=
+github.com/syumai/workers v0.30.2/go.mod h1:ZnqmdiHNBrbxOLrZ/HJ5jzHy6af9cmiNZk10R9NrIEA=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
+github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
+github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
@@ -43,7 +51,5 @@ golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
-golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg=
-golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/handlers/auth/controller.go b/handlers/auth/controller.go
new file mode 100644
index 0000000..5d3cda1
--- /dev/null
+++ b/handlers/auth/controller.go
@@ -0,0 +1,171 @@
+//go:build js && wasm
+// +build js,wasm
+
+package auth
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/go-webauthn/webauthn/webauthn"
+ "github.com/labstack/echo/v4"
+ "github.com/sonr-io/motr/components/views"
+ "github.com/sonr-io/motr/internal/config"
+ "github.com/sonr-io/motr/internal/middleware"
+ "github.com/sonr-io/motr/internal/sink/models"
+ "github.com/syumai/workers/cloudflare/kv"
+)
+
+// â•───────────────────────────────────────────────────────────╮
+// │ Auth Handler │
+// ╰───────────────────────────────────────────────────────────╯
+
+func Register(cfg config.Config, s *config.Server) error {
+ q, err := cfg.DB.GetQuerier()
+ if err != nil {
+ return err
+ }
+ hkv, err := cfg.KV.GetHandles()
+ if err != nil {
+ return err
+ }
+ skv, err := cfg.KV.GetSessions()
+ if err != nil {
+ return err
+ }
+
+ h := NewAuthHandler(q, hkv, skv)
+ h.SetupRoutes(s)
+ return nil
+}
+
+// â•───────────────────────────────────────────────────────────╮
+// │ Auth Handler │
+// ╰───────────────────────────────────────────────────────────╯
+
+// AuthHandler is the auth handler.
+type AuthHandler struct {
+ DB models.Querier
+ Handles *kv.Namespace
+ Sessions *kv.Namespace
+}
+
+func NewAuthHandler(q models.Querier, hkv *kv.Namespace, skv *kv.Namespace) *AuthHandler {
+ return &AuthHandler{DB: q, Handles: hkv, Sessions: skv}
+}
+
+// SetupRoutes sets up the routes for the auth handler.
+func (h *AuthHandler) SetupRoutes(s *config.Server) {
+ s.GET("/login", h.HandleLoginInitial)
+ s.GET("/login/:handle", h.HandleLoginStart)
+ s.POST("/login/:handle/check", h.HandleLoginUsernameCheck)
+ s.POST("/login/:handle/finish", h.HandleLoginFinish)
+
+ s.GET("/register", h.HandleRegisterInitial)
+ s.GET("/register/:handle", h.HandleRegisterStart)
+ s.POST("/register/:handle/check", h.HandleRegisterUsernameCheck)
+ s.POST("/register/:handle/finish", h.HandleRegisterFinish)
+}
+
+func (c *AuthHandler) VerifyHandle(handle string, target bool) bool {
+ _, err := c.Handles.GetString(handle, nil)
+ if err != nil {
+ return !target
+ }
+ res, err := c.DB.CheckHandleExists(context.Background(), handle)
+ if err != nil {
+ return false
+ }
+ return res == target
+}
+
+// â•───────────────────────────────────────────────────────────╮
+// │ Login Handlers (/login) │
+// ╰───────────────────────────────────────────────────────────╯
+
+// HandleLoginFinish handles the finish login request.
+func (h *AuthHandler) HandleLoginFinish(c echo.Context) error {
+ return middleware.Render(c, views.LoginView())
+}
+
+// HandleLoginStart handles the start login request.
+func (h *AuthHandler) HandleLoginStart(c echo.Context) error {
+ return middleware.Render(c, views.LoginView())
+}
+
+func (h *AuthHandler) HandleLoginInitial(c echo.Context) error {
+ return middleware.Render(c, views.LoginView())
+}
+
+// HandleSubmitCredentialLogin handles the submit credential login request.
+func (h *AuthHandler) HandleSubmitCredentialLogin(c echo.Context) error {
+ return middleware.Render(c, views.RegisterView())
+}
+
+// â•───────────────────────────────────────────────────────────╮
+// │ Profile Handlers (/login) │
+// ╰───────────────────────────────────────────────────────────╯
+
+// HandleRegisterUsernameCheck handles the username check request.
+func (h *AuthHandler) HandleRegisterUsernameCheck(c echo.Context) error {
+ handle := c.FormValue("handle")
+ ok := h.VerifyHandle(handle, false)
+ if ok {
+ return middleware.Render(c, views.RegisterView())
+ }
+ return middleware.Render(c, views.RegisterView())
+}
+
+// HandleLoginUsernameCheck handles the username check request.
+func (h *AuthHandler) HandleLoginUsernameCheck(c echo.Context) error {
+ handle := c.FormValue("handle")
+ ok := h.VerifyHandle(handle, true)
+ if ok {
+ return middleware.Render(c, views.RegisterView())
+ }
+ return middleware.Render(c, views.RegisterView())
+}
+
+func (h *AuthHandler) HandleSubmitUsernameClaim(c echo.Context) error {
+ return middleware.Render(c, views.RegisterView())
+}
+
+func (h *AuthHandler) HandleSubmitProfile(c echo.Context) error {
+ return middleware.Render(c, views.RegisterView())
+}
+
+// â•────────────────────────────────────────────────────────╮
+// │ Register Init (/register) │
+// ╰────────────────────────────────────────────────────────╯
+
+// HandleRegisterInitial handles the initial register request.
+func (h *AuthHandler) HandleRegisterInitial(c echo.Context) error {
+ return middleware.Render(c, views.RegisterView())
+}
+
+// HandleRegisterStart handles the start register request.
+func (h *AuthHandler) HandleRegisterStart(c echo.Context) error {
+ return middleware.Render(c, views.RegisterView())
+}
+
+// HandleRegisterFinish handles the finish register request.
+func (h *AuthHandler) HandleRegisterFinish(c echo.Context) error {
+ return middleware.Render(c, views.RegisterView())
+}
+
+// HandleSubmitCredentialRegister handles the submit credential register request.
+func (h *AuthHandler) HandleSubmitCredentialRegister(c echo.Context) error {
+ credJSON := c.FormValue("credentialJSON")
+ if credJSON == "" {
+ return middleware.Render(c, views.RegisterView())
+ }
+ cred := webauthn.Credential{}
+ err := json.Unmarshal([]byte(credJSON), &cred)
+ if err != nil {
+ return middleware.Render(c, views.RegisterView())
+ }
+ fmt.Println(cred)
+
+ return middleware.Render(c, views.RegisterView())
+}
diff --git a/handlers/landing/controller.go b/handlers/landing/controller.go
new file mode 100644
index 0000000..dbb90e2
--- /dev/null
+++ b/handlers/landing/controller.go
@@ -0,0 +1,52 @@
+//go:build js && wasm
+// +build js,wasm
+
+package landing
+
+import (
+ "github.com/labstack/echo/v4"
+ "github.com/sonr-io/motr/components/views"
+ "github.com/sonr-io/motr/internal/config"
+ "github.com/sonr-io/motr/internal/middleware"
+ "github.com/sonr-io/motr/internal/sink/models"
+ "github.com/syumai/workers/cloudflare/kv"
+)
+
+func Register(cfg config.Config, s *config.Server) error {
+ q, err := cfg.DB.GetQuerier()
+ if err != nil {
+ return err
+ }
+ hkv, err := cfg.KV.GetHandles()
+ if err != nil {
+ return err
+ }
+ skv, err := cfg.KV.GetSessions()
+ if err != nil {
+ return err
+ }
+ h := New(q, hkv, skv)
+ h.SetupRoutes(s)
+ return nil
+}
+
+type LandingHandler struct {
+ DB models.Querier
+ Handles *kv.Namespace
+ Sessions *kv.Namespace
+}
+
+func New(q models.Querier, hkv *kv.Namespace, skv *kv.Namespace) *LandingHandler {
+ return &LandingHandler{DB: q, Handles: hkv, Sessions: skv}
+}
+
+func (h *LandingHandler) SetupRoutes(s *config.Server) {
+ s.GET("/", h.HandleIndex)
+}
+
+func (h *LandingHandler) HandleIndex(c echo.Context) error {
+ if err := middleware.GetSession(c).SaveStatus(h.Sessions); err != nil {
+ return err
+ }
+ return middleware.Render(c, views.HomeView())
+}
diff --git a/internal/config/config.go b/internal/config/config.go
new file mode 100644
index 0000000..6b39944
--- /dev/null
+++ b/internal/config/config.go
@@ -0,0 +1,183 @@
+//go:build js && wasm
+// +build js,wasm
+
+package config
+
+import (
+ "database/sql"
+ "strconv"
+ "time"
+
+ "github.com/sonr-io/motr/internal/sink/models"
+ "github.com/syumai/workers/cloudflare"
+ _ "github.com/syumai/workers/cloudflare/d1"
+ "github.com/syumai/workers/cloudflare/kv"
+)
+
+type MotrMode string
+
+const (
+ ControllerMode MotrMode = "controller"
+ ResolverMode MotrMode = "resolver"
+)
+
+func (m MotrMode) String() string {
+ return string(m)
+}
+
+type Config struct {
+ Sonr SonrConfig `json:"sonr"`
+ IPFS IPFSConfig `json:"ipfs"`
+ Mode MotrMode `json:"mode"`
+ DB DBConfig `json:"db"`
+ Cache CacheConfig `json:"cache"` // Added Cache configuration
+ KV KVConfig `json:"kv"` // Added KV configuration
+}
+
+func Get() Config {
+ c := Config{
+ Sonr: getSonrConfig(),
+ IPFS: getIPFSConfig(),
+ Mode: getMotrMode(),
+ DB: getDBConfig(),
+ Cache: getCacheConfig(), // Added Cache configuration
+ KV: getKVConfig(), // Added KV configuration
+ }
+ return c
+}
+
+type SonrConfig struct {
+ ChainID string `json:"chain_id"`
+ APIURL string `json:"api_url"`
+ RPCURL string `json:"rpc_url"`
+}
+
+func getSonrConfig() SonrConfig {
+ return SonrConfig{
+ ChainID: cloudflare.Getenv("SONR_CHAIN_ID"),
+ APIURL: cloudflare.Getenv("SONR_API_URL"),
+ RPCURL: cloudflare.Getenv("SONR_RPC_URL"),
+ }
+}
+
+type IPFSConfig struct {
+ GatewayURL string `json:"gateway_url"`
+}
+
+func getIPFSConfig() IPFSConfig {
+ return IPFSConfig{
+ GatewayURL: cloudflare.Getenv("IPFS_GATEWAY"),
+ }
+}
+
+func getMotrMode() MotrMode {
+ mode := cloudflare.Getenv("MOTR_MODE")
+ if mode == "" {
+ return ControllerMode
+ }
+ return MotrMode(mode)
+}
+
+type DBConfig struct {
+ DBName string `json:"common_db_name"`
+}
+
+func getDBConfig() DBConfig {
+ return DBConfig{
+ DBName: "DB",
+ }
+}
+
+func (c DBConfig) GetCommon() (*sql.DB, error) {
+ return sql.Open("d1", c.DBName)
+}
+
+func (c DBConfig) GetQuerier() (models.Querier, error) {
+ db, err := c.GetCommon()
+ if err != nil {
+ return nil, err
+ }
+ return models.New(db), nil
+}
+
+// CacheConfig defines the configuration for Cloudflare cache
+type CacheConfig struct {
+ Enabled bool `json:"enabled"`
+ DefaultMaxAge int `json:"default_max_age"`
+ BypassHeader string `json:"bypass_header"`
+ BypassValue string `json:"bypass_value"`
+ CacheableStatusCodes []int `json:"cacheable_status_codes"`
+ CacheableContentTypes []string `json:"cacheable_content_types"`
+}
+
+func getCacheConfig() CacheConfig {
+ // Default values
+ config := CacheConfig{
+ Enabled: true,
+ DefaultMaxAge: 60, // 1 minute by default
+ BypassHeader: "X-Cache-Bypass",
+ BypassValue: "true",
+ CacheableStatusCodes: []int{
+ 200, 301, 302,
+ },
+ CacheableContentTypes: []string{
+ "text/html",
+ "text/css",
+ "text/javascript",
+ "application/javascript",
+ "application/json",
+ "image/jpeg",
+ "image/png",
+ "image/gif",
+ "image/webp",
+ },
+ }
+
+ // Override with environment variables if provided
+ if enabled := cloudflare.Getenv("CACHE_ENABLED"); enabled != "" {
+ config.Enabled = enabled == "true"
+ }
+
+ if maxAge := cloudflare.Getenv("CACHE_DEFAULT_MAX_AGE"); maxAge != "" {
+ // Parse the string to int, defaulting to 60 if parsing fails
+ if parsed, err := strconv.Atoi(maxAge); err == nil {
+ config.DefaultMaxAge = parsed
+ }
+ }
+
+ if bypassHeader := cloudflare.Getenv("CACHE_BYPASS_HEADER"); bypassHeader != "" {
+ config.BypassHeader = bypassHeader
+ }
+
+ if bypassValue := cloudflare.Getenv("CACHE_BYPASS_VALUE"); bypassValue != "" {
+ config.BypassValue = bypassValue
+ }
+
+ return config
+}
+
+type KVConfig struct {
+ Sessions string `json:"sessions"`
+ Handles string `json:"handles"`
+ DefaultExpiry time.Duration `json:"expiry"`
+}
+
+func getKVConfig() KVConfig {
+ return KVConfig{
+ Sessions: "SESSIONS",
+ Handles: "HANDLES",
+ DefaultExpiry: time.Hour * 1, // 1 hour by default
+ }
+}
+
+func (c KVConfig) GetSessionExpiry(t time.Time) int64 {
+ return c.DefaultExpiry.Nanoseconds() + t.UnixNano()
+}
+
+func (c KVConfig) GetSessions() (*kv.Namespace, error) {
+ return kv.NewNamespace(c.Sessions)
+}
+
+func (c KVConfig) GetHandles() (*kv.Namespace, error) {
+ return kv.NewNamespace(c.Handles)
+}
diff --git a/internal/config/errors.go b/internal/config/errors.go
new file mode 100644
index 0000000..56de277
--- /dev/null
+++ b/internal/config/errors.go
@@ -0,0 +1,12 @@
+package config
+
+import "errors"
+
+func newError(msg string) error {
+ return errors.New(msg)
+}
+
+var (
+ ErrInvalidMode = newError("invalid mode")
+ ErrDBNotFound = newError("db not found")
+)
diff --git a/internal/config/server.go b/internal/config/server.go
new file mode 100644
index 0000000..2d6160c
--- /dev/null
+++ b/internal/config/server.go
@@ -0,0 +1,85 @@
+//go:build js && wasm
+// +build js,wasm
+
+package config
+
+import (
+ "github.com/labstack/echo/v4"
+ "github.com/syumai/workers"
+)
+
+// Server is a wrapper around the Echo server
+type Server struct {
+ echo *echo.Echo
+ Config Config
+}
+
+// New creates a new server
+func New() (*Server, Config) {
+ c := Get()
+ s := &Server{
+ echo: echo.New(),
+ Config: c,
+ }
+ return s, c
+}
+
+// Use registers a middleware
+func (s *Server) Use(middleware ...echo.MiddlewareFunc) {
+ s.echo.Use(middleware...)
+}
+
+// GET registers a route that matches GET requests
+func (s *Server) GET(path string, handler echo.HandlerFunc) {
+ s.echo.GET(path, handler)
+}
+
+// POST registers a route that matches POST requests
+func (s *Server) POST(path string, handler echo.HandlerFunc) {
+ s.echo.POST(path, handler)
+}
+
+// PUT registers a route that matches PUT requests
+func (s *Server) PUT(path string, handler echo.HandlerFunc) {
+ s.echo.PUT(path, handler)
+}
+
+// DELETE registers a route that matches DELETE requests
+func (s *Server) DELETE(path string, handler echo.HandlerFunc) {
+ s.echo.DELETE(path, handler)
+}
+
+// PATCH registers a route that matches PATCH requests
+func (s *Server) PATCH(path string, handler echo.HandlerFunc) {
+ s.echo.PATCH(path, handler)
+}
+
+// HEAD registers a route that matches HEAD requests
+func (s *Server) HEAD(path string, handler echo.HandlerFunc) {
+ s.echo.HEAD(path, handler)
+}
+
+// OPTIONS registers a route that matches OPTIONS requests
+func (s *Server) OPTIONS(path string, handler echo.HandlerFunc) {
+ s.echo.OPTIONS(path, handler)
+}
+
+// Any registers a route that matches all the HTTP methods
+func (s *Server) Any(path string, handler echo.HandlerFunc) {
+ s.echo.Any(path, handler)
+}
+
+// File serves files from the given file system root
+func (s *Server) File(path string, file string) {
+ s.echo.File(path, file)
+}
+
+// Static serves static files from the given root directory
+func (s *Server) Static(path string, root string) {
+ s.echo.Static(path, root)
+}
+
+// Serve starts the server
+func (s *Server) Serve() {
+ workers.Serve(s.echo)
+}
diff --git a/internal/context/context.go b/internal/context/context.go
deleted file mode 100644
index d469220..0000000
--- a/internal/context/context.go
+++ /dev/null
@@ -1,34 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package context
-
-import (
- "encoding/base64"
- "encoding/json"
-
- "github.com/labstack/echo/v4"
-)
-
-func WASMMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
- return func(c echo.Context) error {
- // Extract WASM context from headers
- if wasmCtx := c.Request().Header.Get("X-Wasm-Context"); wasmCtx != "" {
- if ctx, err := decodeWasmContext(wasmCtx); err == nil {
- c.Set("wasm_context", ctx)
- }
- }
- return next(c)
- }
-}
-
-// decodeWasmContext decodes the WASM context from a base64 encoded string
-func decodeWasmContext(ctx string) (map[string]any, error) {
- decoded, err := base64.StdEncoding.DecodeString(ctx)
- if err != nil {
- return nil, err
- }
- var ctxData map[string]any
- err = json.Unmarshal(decoded, &ctxData)
- return ctxData, err
-}
diff --git a/internal/database/database.go b/internal/database/database.go
deleted file mode 100644
index bd7bb2b..0000000
--- a/internal/database/database.go
+++ /dev/null
@@ -1,43 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package database
-
-import (
- "database/sql"
-
- _ "github.com/ncruces/go-sqlite3/driver"
- _ "github.com/ncruces/go-sqlite3/embed"
- "github.com/onsonr/motr/pkg/config"
- "github.com/onsonr/motr/x/identity"
- "github.com/onsonr/motr/x/portfolio"
- "github.com/onsonr/motr/x/user"
-)
-
-// New returns a new SQLite database instance
-func New() (*config.DBConnection, error) {
- db, err := sql.Open("sqlite3", ":memory:")
- if err != nil {
- return nil, err
- }
-
- // create tables
- idTable, err := identity.InitTables(db)
- if err != nil {
- return nil, err
- }
- portTable, err := portfolio.InitTables(db)
- if err != nil {
- return nil, err
- }
- userTable, err := user.InitTables(db)
- if err != nil {
- return nil, err
- }
- return &config.DBConnection{
- DB: db,
- Identity: idTable,
- Portfolio: portTable,
- User: userTable,
- }, nil
-}
diff --git a/internal/middleware/cache.go b/internal/middleware/cache.go
new file mode 100644
index 0000000..dcb2efd
--- /dev/null
+++ b/internal/middleware/cache.go
@@ -0,0 +1,203 @@
+//go:build js && wasm
+// +build js,wasm
+
+package middleware
+
+import (
+ "bytes"
+ "io"
+ "net/http"
+ "strconv"
+
+ "github.com/labstack/echo/v4"
+ "github.com/sonr-io/motr/internal/config"
+ "github.com/syumai/workers/cloudflare"
+ "github.com/syumai/workers/cloudflare/cache"
+)
+
+// CloudflareCache represents the middleware for Cloudflare cache
+type CloudflareCache struct {
+ // Config holds the cache configuration
+ Config config.CacheConfig
+ // CacheableStatusCodes are HTTP status codes that should be cached (map for faster lookups)
+ CacheableStatusCodes map[int]bool
+ // CacheableContentTypes are content types that should be cached (map for faster lookups)
+ CacheableContentTypes map[string]bool
+}
+
+// UseCloudflareCache creates a new CloudflareCache middleware
+func UseCloudflareCache(cfg config.Config) echo.MiddlewareFunc {
+ // If cache is disabled, return a pass-through middleware
+ if !cfg.Cache.Enabled {
+ return func(next echo.HandlerFunc) echo.HandlerFunc {
+ return func(c echo.Context) error {
+ return next(c)
+ }
+ }
+ }
+
+ // Convert slice to map for faster lookups
+ cacheableStatusCodes := make(map[int]bool)
+ for _, code := range cfg.Cache.CacheableStatusCodes {
+ cacheableStatusCodes[code] = true
+ }
+
+ cacheableContentTypes := make(map[string]bool)
+ for _, contentType := range cfg.Cache.CacheableContentTypes {
+ cacheableContentTypes[contentType] = true
+ }
+
+ cacheMiddleware := &CloudflareCache{
+ Config: cfg.Cache,
+ CacheableStatusCodes: cacheableStatusCodes,
+ CacheableContentTypes: cacheableContentTypes,
+ }
+
+ return cacheMiddleware.Process
+}
+
+// responseWriter is a custom response writer that captures the response
+type responseWriter struct {
+ echo.Response
+ body *bytes.Buffer
+ statusCode int
+ headers http.Header
+}
+
+// newResponseWriter creates a new responseWriter
+func newResponseWriter(c echo.Context) *responseWriter {
+ return &responseWriter{
+ Response: *c.Response(),
+ body: bytes.NewBuffer(nil),
+ statusCode: http.StatusOK,
+ headers: make(http.Header),
+ }
+}
+
+// Write captures the response body
+func (rw *responseWriter) Write(b []byte) (int, error) {
+ rw.body.Write(b)
+ return rw.Response.Write(b)
+}
+
+// WriteHeader captures the status code
+func (rw *responseWriter) WriteHeader(code int) {
+ rw.statusCode = code
+ rw.Response.WriteHeader(code)
+}
+
+// Header returns the response headers
+func (rw *responseWriter) Header() http.Header {
+ return rw.Response.Header()
+}
+
+// ToHTTPResponse converts the response writer to an HTTP response
+func (rw *responseWriter) ToHTTPResponse() *http.Response {
+ return &http.Response{
+ StatusCode: rw.statusCode,
+ Header: rw.Header(),
+ Body: io.NopCloser(bytes.NewReader(rw.body.Bytes())),
+ }
+}
+
+// shouldBypassCache determines if the cache should be bypassed
+func (cc *CloudflareCache) shouldBypassCache(c echo.Context) bool {
+ // Check if bypass header is present
+ if c.Request().Header.Get(cc.Config.BypassHeader) == cc.Config.BypassValue {
+ return true
+ }
+
+ // Only cache GET and HEAD requests
+ if c.Request().Method != http.MethodGet && c.Request().Method != http.MethodHead {
+ return true
+ }
+
+ return false
+}
+
+// isCacheable determines if the response is cacheable
+func (cc *CloudflareCache) isCacheable(rw *responseWriter) bool {
+ // Check if status code is cacheable
+ if !cc.CacheableStatusCodes[rw.statusCode] {
+ return false
+ }
+
+ // Check if content type is cacheable
+ contentType := rw.Header().Get(echo.HeaderContentType)
+ for cacheableType := range cc.CacheableContentTypes {
+ if contentType == cacheableType || (len(contentType) >= len(cacheableType) && contentType[:len(cacheableType)] == cacheableType) {
+ return true
+ }
+ }
+
+ return false
+}
+
+// Process is the middleware function
+func (cc *CloudflareCache) Process(next echo.HandlerFunc) echo.HandlerFunc {
+ return func(c echo.Context) error {
+ // Skip cache if needed
+ if cc.shouldBypassCache(c) {
+ return next(c)
+ }
+
+ // Create a new cache instance
+ cacheInstance := cache.New()
+
+ // Try to get from cache
+ cachedResponse, err := cacheInstance.Match(c.Request(), nil)
+ if err == nil && cachedResponse != nil {
+ // Set the response status code
+ c.Response().WriteHeader(cachedResponse.StatusCode)
+
+ // Set the response headers
+ for key, values := range cachedResponse.Header {
+ for _, value := range values {
+ c.Response().Header().Add(key, value)
+ }
+ }
+
+ // Add a header to indicate cache hit
+ c.Response().Header().Add("X-Cache", "HIT")
+
+ // Copy the response body
+ io.Copy(c.Response().Writer, cachedResponse.Body)
+
+ return nil
+ }
+
+ // Create a custom response writer to capture the response
+ rw := newResponseWriter(c)
+ c.Response().Writer = rw
+
+ // Process the request
+ err = next(c)
+ if err != nil {
+ return err
+ }
+
+ // Check if response should be cached
+ if !cc.isCacheable(rw) {
+ return nil
+ }
+
+ // Ensure Cache-Control header is set if not already
+ if rw.Header().Get(echo.HeaderCacheControl) == "" {
+ rw.Header().Set(echo.HeaderCacheControl, "max-age="+strconv.Itoa(cc.Config.DefaultMaxAge))
+ }
+
+ // Add a header to indicate cache miss
+ rw.Header().Add("X-Cache", "MISS")
+
+ // Store in cache asynchronously using WaitUntil for Cloudflare Workers
+ cloudflare.WaitUntil(func() {
+ err := cacheInstance.Put(c.Request(), rw.ToHTTPResponse())
+ if err != nil {
+ // Log error if needed
+ c.Logger().Errorf("Failed to store response in cache: %v", err)
+ }
+ })
+
+ return nil
+ }
+}
diff --git a/internal/middleware/context.go b/internal/middleware/context.go
new file mode 100644
index 0000000..99bbfb5
--- /dev/null
+++ b/internal/middleware/context.go
@@ -0,0 +1,61 @@
+//go:build js && wasm
+// +build js,wasm
+
+package middleware
+
+import (
+ "time"
+
+ "github.com/labstack/echo/v4"
+ "github.com/segmentio/ksuid"
+ "github.com/sonr-io/motr/internal/config"
+ "github.com/sonr-io/motr/internal/sink"
+)
+
+type SessionContext struct {
+ echo.Context
+ ID string
+ Config config.Config
+ Status *sink.Status
+}
+
+func NewSession(c echo.Context, cfg config.Config) *SessionContext {
+ id := getOrCreateSessionID(c)
+ return &SessionContext{
+ Context: c,
+ ID: id,
+ Config: cfg,
+ Status: &sink.Status{
+ SessionID: id,
+ Expires: cfg.KV.GetSessionExpiry(time.Now()),
+ Status: "default",
+ Handle: "",
+ },
+ }
+}
+
+func GetSession(c echo.Context) *SessionContext {
+ cc := c.(*SessionContext)
+ if cc == nil {
+ panic("Session Context not found")
+ }
+ return cc
+}
+
+// getOrCreateSessionID returns the session ID from the cookie or creates a new one if it doesn't exist
+func getOrCreateSessionID(c echo.Context) string {
+ if ok := CookieExists(c, SessionID); !ok {
+ sessionID := ksuid.New().String()
+ WriteCookie(c, SessionID, sessionID)
+ c.Echo().Logger.Debug("Wrote session ID to cookie")
+ return sessionID
+ }
+ c.Echo().Logger.Debug("Has session ID in cookie")
+ sessionID, err := ReadCookie(c, SessionID)
+ if err != nil {
+ sessionID = ksuid.New().String()
+ WriteCookie(c, SessionID, sessionID)
+ c.Echo().Logger.Debug("Failed to read session ID from cookie, wrote new one")
+ }
+ return sessionID
+}
diff --git a/internal/middleware/cookies.go b/internal/middleware/cookies.go
new file mode 100644
index 0000000..e5a55cc
--- /dev/null
+++ b/internal/middleware/cookies.go
@@ -0,0 +1,127 @@
+//go:build js && wasm
+// +build js,wasm
+
+package middleware
+
+import (
+ "encoding/base64"
+ "net/http"
+ "time"
+
+ "github.com/labstack/echo/v4"
+)
+
+// CookieKey is a type alias for string.
+type CookieKey string
+
+const (
+ // SessionID is the key for the session ID cookie.
+ SessionID CookieKey = "session.id"
+
+ // SessionChallenge is the key for the session challenge cookie.
+ SessionChallenge CookieKey = "session.challenge"
+
+ // SessionRole is the key for the session role cookie.
+ SessionRole CookieKey = "session.role"
+
+ // SonrAddress is the key for the Sonr address cookie.
+ SonrAddress CookieKey = "sonr.address"
+
+ // SonrDID is the key for the Sonr DID cookie.
+ SonrDID CookieKey = "sonr.did"
+
+ // UserAvatar is the key for the User Avatar cookie.
+ UserAvatar CookieKey = "user.avatar"
+
+ // UserHandle is the key for the User Handle cookie.
+ UserHandle CookieKey = "user.handle"
+
+ // UserName is the key for the User Name cookie.
+ UserName CookieKey = "user.full_name"
+
+ // VaultAddress is the key for the Vault address cookie.
+ VaultAddress CookieKey = "vault.address"
+
+ // VaultCID is the key for the Vault CID cookie.
+ VaultCID CookieKey = "vault.cid"
+
+ // VaultSchema is the key for the Vault schema cookie.
+ VaultSchema CookieKey = "vault.schema"
+)
+
+// String returns the string representation of the CookieKey.
+func (c CookieKey) String() string {
+ return string(c)
+}
+
+// â•───────────────────────────────────────────────────────────╮
+// │ Utility Methods │
+// ╰───────────────────────────────────────────────────────────╯
+
+func CookieExists(c echo.Context, key CookieKey) bool {
+ ck, err := c.Cookie(key.String())
+ if err != nil {
+ return false
+ }
+ return ck != nil
+}
+
+func ReadCookie(c echo.Context, key CookieKey) (string, error) {
+ cookie, err := c.Cookie(key.String())
+ if err != nil {
+ // Cookie not found or other error
+ return "", err
+ }
+ if cookie == nil || cookie.Value == "" {
+ // Cookie is empty
+ return "", http.ErrNoCookie
+ }
+ return cookie.Value, nil
+}
+
+func ReadCookieBytes(c echo.Context, key CookieKey) ([]byte, error) {
+ cookie, err := c.Cookie(key.String())
+ if err != nil {
+ // Cookie not found or other error
+ return nil, err
+ }
+ if cookie == nil || cookie.Value == "" {
+ // Cookie is empty
+ return nil, http.ErrNoCookie
+ }
+ return base64.RawURLEncoding.DecodeString(cookie.Value)
+}
+
+func ReadCookieUnsafe(c echo.Context, key CookieKey) string {
+ ck, err := c.Cookie(key.String())
+ if err != nil {
+ return ""
+ }
+ return ck.Value
+}
+
+func WriteCookie(c echo.Context, key CookieKey, value string) error {
+ cookie := &http.Cookie{
+ Name: key.String(),
+ Value: value,
+ Expires: time.Now().Add(24 * time.Hour),
+ HttpOnly: true,
+ Path: "/",
+ // Add Secure and SameSite attributes as needed
+ }
+ c.SetCookie(cookie)
+ return nil
+}
+
+func WriteCookieBytes(c echo.Context, key CookieKey, value []byte) error {
+ cookie := &http.Cookie{
+ Name: key.String(),
+ Value: base64.RawURLEncoding.EncodeToString(value),
+ Expires: time.Now().Add(24 * time.Hour),
+ HttpOnly: true,
+ Path: "/",
+ // Add Secure and SameSite attributes as needed
+ }
+ c.SetCookie(cookie)
+ return nil
+}
diff --git a/internal/middleware/headers.go b/internal/middleware/headers.go
new file mode 100644
index 0000000..471fe29
--- /dev/null
+++ b/internal/middleware/headers.go
@@ -0,0 +1,55 @@
+//go:build js && wasm
+// +build js,wasm
+
+package middleware
+
+import "github.com/labstack/echo/v4"
+
+type HeaderKey string
+
+const (
+ Authorization HeaderKey = "Authorization"
+
+ // User Agent
+ Architecture HeaderKey = "Sec-CH-UA-Arch"
+ Bitness HeaderKey = "Sec-CH-UA-Bitness"
+ FullVersionList HeaderKey = "Sec-CH-UA-Full-Version-List"
+ Mobile HeaderKey = "Sec-CH-UA-Mobile"
+ Model HeaderKey = "Sec-CH-UA-Model"
+ Platform HeaderKey = "Sec-CH-UA-Platform"
+ PlatformVersion HeaderKey = "Sec-CH-UA-Platform-Version"
+ UserAgent HeaderKey = "Sec-CH-UA"
+
+ // Sonr Injected
+ SonrAPIURL HeaderKey = "X-Sonr-API"
+ SonrgRPCURL HeaderKey = "X-Sonr-GRPC"
+ SonrRPCURL HeaderKey = "X-Sonr-RPC"
+ SonrWSURL HeaderKey = "X-Sonr-WS"
+)
+
+func (h HeaderKey) String() string {
+ return string(h)
+}
+
+// â•───────────────────────────────────────────────────────────╮
+// │ Utility Methods │
+// ╰───────────────────────────────────────────────────────────╯
+
+func HeaderEquals(c echo.Context, key HeaderKey, value string) bool {
+ return c.Response().Header().Get(key.String()) == value
+}
+
+// HeaderExists returns true if the request has the header Key.
+func HeaderExists(c echo.Context, key HeaderKey) bool {
+ return c.Response().Header().Get(key.String()) != ""
+}
+
+// HeaderRead returns the header value for the Key.
+func HeaderRead(c echo.Context, key HeaderKey) string {
+ return c.Response().Header().Get(key.String())
+}
+
+// HeaderWrite sets the header value for the Key.
+func HeaderWrite(c echo.Context, key HeaderKey, value string) {
+ c.Response().Header().Set(key.String(), value)
+}
diff --git a/internal/middleware/middleware.go b/internal/middleware/middleware.go
new file mode 100644
index 0000000..a6c1e27
--- /dev/null
+++ b/internal/middleware/middleware.go
@@ -0,0 +1,19 @@
+//go:build js && wasm
+// +build js,wasm
+
+package middleware
+
+import (
+ "github.com/labstack/echo/v4"
+ "github.com/sonr-io/motr/internal/config"
+)
+
+// UseSession is a middleware that adds a new key to the context
+func UseSession(cnfg config.Config) echo.MiddlewareFunc {
+ return func(next echo.HandlerFunc) echo.HandlerFunc {
+ return func(c echo.Context) error {
+ ctx := NewSession(c, cnfg)
+ return next(ctx)
+ }
+ }
+}
diff --git a/pkg/htmx/render.go b/internal/middleware/render.go
similarity index 91%
rename from pkg/htmx/render.go
rename to internal/middleware/render.go
index c8c0ab5..5ce09cd 100644
--- a/pkg/htmx/render.go
+++ b/internal/middleware/render.go
@@ -1,7 +1,4 @@
-//go:build js && wasm
-// +build js,wasm
-
-package htmx
+package middleware
import (
"bytes"
diff --git a/internal/middleware/state.go b/internal/middleware/state.go
new file mode 100644
index 0000000..9069d7c
--- /dev/null
+++ b/internal/middleware/state.go
@@ -0,0 +1,36 @@
+//go:build js && wasm
+// +build js,wasm
+
+package middleware
+
+import (
+ "github.com/sonr-io/motr/internal/sink"
+ "github.com/syumai/workers/cloudflare/kv"
+)
+
+// SaveStatus saves the state of the current session into the KV store
+func (sc *SessionContext) SaveStatus(kv *kv.Namespace) error {
+ stbz, err := sc.Status.Marshal()
+ if err != nil {
+ return err
+ }
+ if err := kv.PutString(sc.ID, string(stbz), nil); err != nil {
+ return err
+ }
+ return nil
+}
+
+// LoadStatus loads the state of the current session from the KV store
+func (sc *SessionContext) LoadStatus(kv *kv.Namespace) (*sink.Status, error) {
+ ststr, err := kv.GetString(sc.ID, nil)
+ if err != nil {
+ return nil, err
+ }
+ st := &sink.Status{}
+ err = st.Unmarshal([]byte(ststr))
+ if err != nil {
+ return nil, err
+ }
+ sc.Status = st
+ return st, nil
+}
diff --git a/internal/sink/metadata.go b/internal/sink/metadata.go
new file mode 100644
index 0000000..b9ec10e
--- /dev/null
+++ b/internal/sink/metadata.go
@@ -0,0 +1,44 @@
+package sink
+
+type Icon struct {
+ Name string
+ Library string
+}
+
+type Metadata struct {
+ Title string
+ Author string
+ Favicon string
+ Robots string
+ Googlebot string
+ Google string
+ Description string
+ Keywords string
+ CanonicalURL string
+ OGImage string
+ OGURL string
+ OGSiteName string
+ TwitterSite string
+ TwitterCreator string
+ TwitterImage string
+}
+
+func DefaultMetadata() Metadata {
+ return Metadata{
+ Title: "Motr",
+ Author: "Sonr",
+ Favicon: "https://cdn.sonr.id/favicon.png",
+ Robots: "index, follow",
+ Googlebot: "index, follow",
+ Google: "nositelinkssearchbox",
+ Description: "Sonr is a decentralized social network that allows you to create your own personalized digital identity.",
+ Keywords: "Sonr, social network, decentralized, identity, decentralized social network, decentralized identity, self-sovereign identity, self-sovereign, self-sovereign social network, self-sovereign identity network, sso, sso network, sso identity, sso social network, digital identity, digital social network",
+ CanonicalURL: "https://sonr.io",
+ OGImage: "https://cdn.sonr.id/og.png",
+ OGURL: "https://sonr.io",
+ OGSiteName: "Sonr",
+ TwitterSite: "@sonr_io",
+ TwitterCreator: "@sonr_io",
+ TwitterImage: "https://cdn.sonr.id/og.png",
+ }
+}
diff --git a/x/portfolio/model/db.go b/internal/sink/models/db.go
similarity index 97%
rename from x/portfolio/model/db.go
rename to internal/sink/models/db.go
index d044a9e..d4f3d12 100644
--- a/x/portfolio/model/db.go
+++ b/internal/sink/models/db.go
@@ -2,7 +2,7 @@
// versions:
// sqlc v1.28.0
-package model
+package models
import (
"context"
diff --git a/internal/sink/models/models.go b/internal/sink/models/models.go
new file mode 100644
index 0000000..1ec296f
--- /dev/null
+++ b/internal/sink/models/models.go
@@ -0,0 +1,243 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+// sqlc v1.28.0
+
+package models
+
+import (
+ "database/sql"
+ "time"
+)
+
+type Account struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Number int64 `json:"number"`
+ Sequence int64 `json:"sequence"`
+ Address string `json:"address"`
+ PublicKey string `json:"public_key"`
+ ChainID string `json:"chain_id"`
+ BlockCreated int64 `json:"block_created"`
+ Controller string `json:"controller"`
+ Label string `json:"label"`
+ Handle string `json:"handle"`
+ IsSubsidiary bool `json:"is_subsidiary"`
+ IsValidator bool `json:"is_validator"`
+ IsDelegator bool `json:"is_delegator"`
+ IsAccountable bool `json:"is_accountable"`
+}
+
+type Activity struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ AccountID string `json:"account_id"`
+ TxHash sql.NullString `json:"tx_hash"`
+ TxType string `json:"tx_type"`
+ Status string `json:"status"`
+ Amount sql.NullString `json:"amount"`
+ Fee sql.NullString `json:"fee"`
+ GasUsed sql.NullInt64 `json:"gas_used"`
+ GasWanted sql.NullInt64 `json:"gas_wanted"`
+ Memo sql.NullString `json:"memo"`
+ BlockHeight sql.NullInt64 `json:"block_height"`
+ Timestamp time.Time `json:"timestamp"`
+ RawLog sql.NullString `json:"raw_log"`
+ Error sql.NullString `json:"error"`
+}
+
+type Asset struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Name string `json:"name"`
+ Symbol string `json:"symbol"`
+ Decimals int64 `json:"decimals"`
+ ChainID string `json:"chain_id"`
+ Channel string `json:"channel"`
+ AssetType string `json:"asset_type"`
+ CoingeckoID sql.NullString `json:"coingecko_id"`
+}
+
+type Blockchain struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ ChainName string `json:"chain_name"`
+ ChainIDCosmos sql.NullString `json:"chain_id_cosmos"`
+ ChainIDEvm sql.NullString `json:"chain_id_evm"`
+ ApiName sql.NullString `json:"api_name"`
+ BechAccountPrefix sql.NullString `json:"bech_account_prefix"`
+ BechValidatorPrefix sql.NullString `json:"bech_validator_prefix"`
+ MainAssetSymbol sql.NullString `json:"main_asset_symbol"`
+ MainAssetDenom sql.NullString `json:"main_asset_denom"`
+ StakingAssetSymbol sql.NullString `json:"staking_asset_symbol"`
+ StakingAssetDenom sql.NullString `json:"staking_asset_denom"`
+ IsStakeEnabled bool `json:"is_stake_enabled"`
+ ChainImage sql.NullString `json:"chain_image"`
+ MainAssetImage sql.NullString `json:"main_asset_image"`
+ StakingAssetImage sql.NullString `json:"staking_asset_image"`
+ ChainType string `json:"chain_type"`
+ IsSupportMobileWallet bool `json:"is_support_mobile_wallet"`
+ IsSupportExtensionWallet bool `json:"is_support_extension_wallet"`
+ IsSupportErc20 bool `json:"is_support_erc20"`
+ DescriptionEn sql.NullString `json:"description_en"`
+ DescriptionKo sql.NullString `json:"description_ko"`
+ DescriptionJa sql.NullString `json:"description_ja"`
+ OriginGenesisTime sql.NullTime `json:"origin_genesis_time"`
+ AccountType string `json:"account_type"`
+ BtcStaking sql.NullString `json:"btc_staking"`
+ CosmosFeeInfo sql.NullString `json:"cosmos_fee_info"`
+ EvmFeeInfo sql.NullString `json:"evm_fee_info"`
+ LcdEndpoint sql.NullString `json:"lcd_endpoint"`
+ GrpcEndpoint sql.NullString `json:"grpc_endpoint"`
+ EvmRpcEndpoint sql.NullString `json:"evm_rpc_endpoint"`
+ Explorer sql.NullString `json:"explorer"`
+ About sql.NullString `json:"about"`
+ Forum sql.NullString `json:"forum"`
+}
+
+type Credential struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Handle string `json:"handle"`
+ CredentialID string `json:"credential_id"`
+ AuthenticatorAttachment string `json:"authenticator_attachment"`
+ Origin string `json:"origin"`
+ Type string `json:"type"`
+ Transports string `json:"transports"`
+}
+
+type CryptoListing struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ ApiID string `json:"api_id"`
+ Name string `json:"name"`
+ Symbol string `json:"symbol"`
+ WebsiteSlug string `json:"website_slug"`
+}
+
+type FearGreedIndex struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Value int64 `json:"value"`
+ ValueClassification string `json:"value_classification"`
+ Timestamp time.Time `json:"timestamp"`
+ TimeUntilUpdate sql.NullString `json:"time_until_update"`
+}
+
+type GlobalMarket struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ TotalMarketCapUsd sql.NullFloat64 `json:"total_market_cap_usd"`
+ Total24hVolumeUsd sql.NullFloat64 `json:"total_24h_volume_usd"`
+ BitcoinPercentageOfMarketCap sql.NullFloat64 `json:"bitcoin_percentage_of_market_cap"`
+ ActiveCurrencies sql.NullInt64 `json:"active_currencies"`
+ ActiveAssets sql.NullInt64 `json:"active_assets"`
+ ActiveMarkets sql.NullInt64 `json:"active_markets"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+type Health struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ EndpointUrl string `json:"endpoint_url"`
+ EndpointType string `json:"endpoint_type"`
+ ChainID sql.NullString `json:"chain_id"`
+ Status string `json:"status"`
+ ResponseTimeMs sql.NullInt64 `json:"response_time_ms"`
+ LastChecked time.Time `json:"last_checked"`
+ NextCheck sql.NullTime `json:"next_check"`
+ FailureCount int64 `json:"failure_count"`
+ SuccessCount int64 `json:"success_count"`
+ ResponseData sql.NullString `json:"response_data"`
+ ErrorMessage sql.NullString `json:"error_message"`
+}
+
+type Price struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ AssetID string `json:"asset_id"`
+ PriceUsd sql.NullFloat64 `json:"price_usd"`
+ PriceBtc sql.NullFloat64 `json:"price_btc"`
+ Volume24hUsd sql.NullFloat64 `json:"volume_24h_usd"`
+ MarketCapUsd sql.NullFloat64 `json:"market_cap_usd"`
+ AvailableSupply sql.NullFloat64 `json:"available_supply"`
+ TotalSupply sql.NullFloat64 `json:"total_supply"`
+ MaxSupply sql.NullFloat64 `json:"max_supply"`
+ PercentChange1h sql.NullFloat64 `json:"percent_change_1h"`
+ PercentChange24h sql.NullFloat64 `json:"percent_change_24h"`
+ PercentChange7d sql.NullFloat64 `json:"percent_change_7d"`
+ Rank sql.NullInt64 `json:"rank"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+type PriceConversion struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ PriceID string `json:"price_id"`
+ CurrencyCode string `json:"currency_code"`
+ Price sql.NullFloat64 `json:"price"`
+ Volume24h sql.NullFloat64 `json:"volume_24h"`
+ MarketCap sql.NullFloat64 `json:"market_cap"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+type Profile struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Address string `json:"address"`
+ Handle string `json:"handle"`
+ Origin string `json:"origin"`
+ Name string `json:"name"`
+}
+
+type Service struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Name string `json:"name"`
+ Description sql.NullString `json:"description"`
+ ChainID string `json:"chain_id"`
+ Address string `json:"address"`
+ OwnerAddress string `json:"owner_address"`
+ Metadata sql.NullString `json:"metadata"`
+ Status string `json:"status"`
+ BlockHeight int64 `json:"block_height"`
+}
+
+type Vault struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Handle string `json:"handle"`
+ Origin string `json:"origin"`
+ Address string `json:"address"`
+ Cid string `json:"cid"`
+ Config string `json:"config"`
+ SessionID string `json:"session_id"`
+ RedirectUri string `json:"redirect_uri"`
+}
diff --git a/internal/sink/models/querier.go b/internal/sink/models/querier.go
new file mode 100644
index 0000000..634e5d6
--- /dev/null
+++ b/internal/sink/models/querier.go
@@ -0,0 +1,153 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+// sqlc v1.28.0
+
+package models
+
+import (
+ "context"
+ "database/sql"
+)
+
+type Querier interface {
+ CheckHandleExists(ctx context.Context, handle string) (bool, error)
+ CountBlockchainsByChainType(ctx context.Context, dollar_1 sql.NullString) (int64, error)
+ GetAccountByAddress(ctx context.Context, address string) (Account, error)
+ GetAccountByController(ctx context.Context, controller string) (Account, error)
+ GetAccountByID(ctx context.Context, id string) (Account, error)
+ GetAccountByNumber(ctx context.Context, number int64) (Account, error)
+ GetAccountByPublicKey(ctx context.Context, publicKey string) (Account, error)
+ GetAccountBySequence(ctx context.Context, sequence int64) (Account, error)
+ GetAccountsByChainID(ctx context.Context, chainID string) ([]Account, error)
+ GetAccountsByController(ctx context.Context, controller string) ([]Account, error)
+ GetAccountsByHandle(ctx context.Context, handle string) ([]Account, error)
+ GetAccountsByLabel(ctx context.Context, label string) ([]Account, error)
+ GetActivityByID(ctx context.Context, id string) (Activity, error)
+ GetActivityByTxHash(ctx context.Context, txHash sql.NullString) (Activity, error)
+ GetAssetByChainAndSymbol(ctx context.Context, arg GetAssetByChainAndSymbolParams) (Asset, error)
+ GetAssetByID(ctx context.Context, id string) (Asset, error)
+ GetAssetBySymbol(ctx context.Context, symbol string) (Asset, error)
+ GetAssetWithLatestPrice(ctx context.Context, id string) (GetAssetWithLatestPriceRow, error)
+ GetBlockchainByChainName(ctx context.Context, chainName string) (Blockchain, error)
+ GetBlockchainByCosmosChainID(ctx context.Context, chainIDCosmos sql.NullString) (Blockchain, error)
+ GetBlockchainByEvmChainID(ctx context.Context, chainIDEvm sql.NullString) (Blockchain, error)
+ GetBlockchainByID(ctx context.Context, id string) (Blockchain, error)
+ GetBlockchainEndpoints(ctx context.Context, id string) (GetBlockchainEndpointsRow, error)
+ GetBlockchainExplorer(ctx context.Context, id string) (GetBlockchainExplorerRow, error)
+ GetBlockchainWithAssetInfo(ctx context.Context, id string) (GetBlockchainWithAssetInfoRow, error)
+ GetCredentialByID(ctx context.Context, credentialID string) (Credential, error)
+ GetCredentialsByHandle(ctx context.Context, handle string) ([]Credential, error)
+ GetCryptoListingByApiID(ctx context.Context, apiID string) (CryptoListing, error)
+ GetCryptoListingByID(ctx context.Context, id string) (CryptoListing, error)
+ GetCryptoListingBySymbol(ctx context.Context, symbol string) (CryptoListing, error)
+ GetCryptoListingByWebsiteSlug(ctx context.Context, websiteSlug string) (CryptoListing, error)
+ GetFearGreedIndexByID(ctx context.Context, id string) (FearGreedIndex, error)
+ GetGlobalMarketByID(ctx context.Context, id string) (GlobalMarket, error)
+ GetHealthByEndpoint(ctx context.Context, endpointUrl string) (Health, error)
+ GetHealthByID(ctx context.Context, id string) (Health, error)
+ GetLatestFearGreedIndex(ctx context.Context) (FearGreedIndex, error)
+ GetLatestGlobalMarket(ctx context.Context) (GlobalMarket, error)
+ GetPriceByAssetID(ctx context.Context, assetID string) (Price, error)
+ GetPriceByID(ctx context.Context, id string) (Price, error)
+ GetPriceConversionByCurrency(ctx context.Context, arg GetPriceConversionByCurrencyParams) (PriceConversion, error)
+ GetPriceConversionByID(ctx context.Context, id string) (PriceConversion, error)
+ GetPriceConversionsByPriceID(ctx context.Context, priceID string) ([]PriceConversion, error)
+ GetProfileByAddress(ctx context.Context, address string) (Profile, error)
+ GetProfileByHandle(ctx context.Context, handle string) (Profile, error)
+ GetProfileByID(ctx context.Context, id string) (Profile, error)
+ GetServiceByAddress(ctx context.Context, address string) (Service, error)
+ GetServiceByChainAndAddress(ctx context.Context, arg GetServiceByChainAndAddressParams) (Service, error)
+ GetServiceByID(ctx context.Context, id string) (Service, error)
+ GetVaultByID(ctx context.Context, id string) (Vault, error)
+ GetVaultConfigByCID(ctx context.Context, cid string) (Vault, error)
+ GetVaultRedirectURIBySessionID(ctx context.Context, sessionID string) (string, error)
+ GetVaultsByHandle(ctx context.Context, handle string) ([]Vault, error)
+ // ACCOUNT QUERIES
+ InsertAccount(ctx context.Context, arg InsertAccountParams) (Account, error)
+ // ACTIVITY QUERIES
+ InsertActivity(ctx context.Context, arg InsertActivityParams) (Activity, error)
+ // ASSET QUERIES
+ InsertAsset(ctx context.Context, arg InsertAssetParams) (Asset, error)
+ // BLOCKCHAIN QUERIES
+ InsertBlockchain(ctx context.Context, arg InsertBlockchainParams) (Blockchain, error)
+ // CREDENTIAL QUERIES
+ InsertCredential(ctx context.Context, arg InsertCredentialParams) (Credential, error)
+ // CRYPTO LISTINGS QUERIES (NEW)
+ InsertCryptoListing(ctx context.Context, arg InsertCryptoListingParams) (CryptoListing, error)
+ // FEAR AND GREED INDEX QUERIES (NEW)
+ InsertFearGreedIndex(ctx context.Context, arg InsertFearGreedIndexParams) (FearGreedIndex, error)
+ // GLOBAL MARKET QUERIES (NEW)
+ InsertGlobalMarket(ctx context.Context, arg InsertGlobalMarketParams) (GlobalMarket, error)
+ // HEALTH QUERIES
+ InsertHealth(ctx context.Context, arg InsertHealthParams) (Health, error)
+ // PRICE QUERIES (UPDATED)
+ InsertPrice(ctx context.Context, arg InsertPriceParams) (Price, error)
+ // PRICE CONVERSION QUERIES (NEW)
+ InsertPriceConversion(ctx context.Context, arg InsertPriceConversionParams) (PriceConversion, error)
+ // PROFILE QUERIES
+ InsertProfile(ctx context.Context, arg InsertProfileParams) (Profile, error)
+ // SERVICE QUERIES
+ InsertService(ctx context.Context, arg InsertServiceParams) (Service, error)
+ // VAULT QUERIES
+ InsertVault(ctx context.Context, arg InsertVaultParams) (Vault, error)
+ ListActivitiesByAccount(ctx context.Context, arg ListActivitiesByAccountParams) ([]Activity, error)
+ ListActivitiesByStatus(ctx context.Context, arg ListActivitiesByStatusParams) ([]Activity, error)
+ ListActivitiesByType(ctx context.Context, arg ListActivitiesByTypeParams) ([]Activity, error)
+ ListAllBlockchains(ctx context.Context) ([]Blockchain, error)
+ ListAssetsByChain(ctx context.Context, chainID string) ([]Asset, error)
+ ListAssetsWithLatestPrices(ctx context.Context, arg ListAssetsWithLatestPricesParams) ([]ListAssetsWithLatestPricesRow, error)
+ ListBlockchainsByChainType(ctx context.Context, dollar_1 sql.NullString) ([]Blockchain, error)
+ ListBlockchainsWithAssetInfo(ctx context.Context, arg ListBlockchainsWithAssetInfoParams) ([]ListBlockchainsWithAssetInfoRow, error)
+ ListBlockchainsWithERC20Support(ctx context.Context) ([]Blockchain, error)
+ ListBlockchainsWithExtensionSupport(ctx context.Context) ([]Blockchain, error)
+ ListBlockchainsWithMobileSupport(ctx context.Context) ([]Blockchain, error)
+ ListBlockchainsWithStaking(ctx context.Context) ([]Blockchain, error)
+ ListCryptoListings(ctx context.Context, arg ListCryptoListingsParams) ([]CryptoListing, error)
+ ListDelegatorAccounts(ctx context.Context) ([]Account, error)
+ ListFearGreedIndexHistory(ctx context.Context, arg ListFearGreedIndexHistoryParams) ([]FearGreedIndex, error)
+ ListGlobalMarketHistory(ctx context.Context, arg ListGlobalMarketHistoryParams) ([]GlobalMarket, error)
+ ListHealthByChain(ctx context.Context, arg ListHealthByChainParams) ([]Health, error)
+ ListHealthByStatus(ctx context.Context, arg ListHealthByStatusParams) ([]Health, error)
+ ListHealthChecksNeedingUpdate(ctx context.Context, limit int64) ([]Health, error)
+ ListPriceHistoryByAssetID(ctx context.Context, arg ListPriceHistoryByAssetIDParams) ([]Price, error)
+ ListProfiles(ctx context.Context, arg ListProfilesParams) ([]Profile, error)
+ ListServicesByChain(ctx context.Context, arg ListServicesByChainParams) ([]Service, error)
+ ListServicesByOwner(ctx context.Context, arg ListServicesByOwnerParams) ([]Service, error)
+ ListValidatorAccounts(ctx context.Context) ([]Account, error)
+ SearchBlockchains(ctx context.Context, arg SearchBlockchainsParams) ([]Blockchain, error)
+ SoftDeleteAccount(ctx context.Context, id string) error
+ SoftDeleteActivity(ctx context.Context, id string) error
+ SoftDeleteAsset(ctx context.Context, id string) error
+ SoftDeleteBlockchain(ctx context.Context, id string) error
+ SoftDeleteCredential(ctx context.Context, credentialID string) error
+ SoftDeleteCryptoListing(ctx context.Context, id string) error
+ SoftDeleteFearGreedIndex(ctx context.Context, id string) error
+ SoftDeleteGlobalMarket(ctx context.Context, id string) error
+ SoftDeleteHealth(ctx context.Context, id string) error
+ SoftDeletePriceConversion(ctx context.Context, id string) error
+ SoftDeleteProfile(ctx context.Context, address string) error
+ SoftDeleteService(ctx context.Context, id string) error
+ SoftDeleteVault(ctx context.Context, id string) error
+ UpdateAccountLabel(ctx context.Context, arg UpdateAccountLabelParams) (Account, error)
+ UpdateAccountSequence(ctx context.Context, arg UpdateAccountSequenceParams) (Account, error)
+ UpdateActivityStatus(ctx context.Context, arg UpdateActivityStatusParams) (Activity, error)
+ UpdateAsset(ctx context.Context, arg UpdateAssetParams) (Asset, error)
+ UpdateBlockchain(ctx context.Context, arg UpdateBlockchainParams) (Blockchain, error)
+ UpdateBlockchainDescriptions(ctx context.Context, arg UpdateBlockchainDescriptionsParams) (Blockchain, error)
+ UpdateBlockchainEndpoints(ctx context.Context, arg UpdateBlockchainEndpointsParams) (Blockchain, error)
+ UpdateBlockchainExplorer(ctx context.Context, arg UpdateBlockchainExplorerParams) (Blockchain, error)
+ UpdateBlockchainFeeInfo(ctx context.Context, arg UpdateBlockchainFeeInfoParams) (Blockchain, error)
+ UpdateBlockchainImages(ctx context.Context, arg UpdateBlockchainImagesParams) (Blockchain, error)
+ UpdateBlockchainSocialLinks(ctx context.Context, arg UpdateBlockchainSocialLinksParams) (Blockchain, error)
+ UpdateCryptoListing(ctx context.Context, arg UpdateCryptoListingParams) (CryptoListing, error)
+ UpdateFearGreedIndex(ctx context.Context, arg UpdateFearGreedIndexParams) (FearGreedIndex, error)
+ UpdateGlobalMarket(ctx context.Context, arg UpdateGlobalMarketParams) (GlobalMarket, error)
+ UpdateHealthCheck(ctx context.Context, arg UpdateHealthCheckParams) (Health, error)
+ UpdatePrice(ctx context.Context, arg UpdatePriceParams) (Price, error)
+ UpdatePriceConversion(ctx context.Context, arg UpdatePriceConversionParams) (PriceConversion, error)
+ UpdateProfile(ctx context.Context, arg UpdateProfileParams) (Profile, error)
+ UpdateService(ctx context.Context, arg UpdateServiceParams) (Service, error)
+ UpdateVault(ctx context.Context, arg UpdateVaultParams) (Vault, error)
+}
+
+var _ Querier = (*Queries)(nil)
diff --git a/internal/sink/models/query.sql.go b/internal/sink/models/query.sql.go
new file mode 100644
index 0000000..8e2ff32
--- /dev/null
+++ b/internal/sink/models/query.sql.go
@@ -0,0 +1,5380 @@
+// Code generated by sqlc. DO NOT EDIT.
+// versions:
+// sqlc v1.28.0
+// source: query.sql
+
+package models
+
+import (
+ "context"
+ "database/sql"
+ "time"
+)
+
+const checkHandleExists = `-- name: CheckHandleExists :one
+SELECT COUNT(*) > 0 as handle_exists FROM profiles
+WHERE handle = ?
+AND deleted_at IS NULL
+`
+
+func (q *Queries) CheckHandleExists(ctx context.Context, handle string) (bool, error) {
+ row := q.db.QueryRowContext(ctx, checkHandleExists, handle)
+ var handle_exists bool
+ err := row.Scan(&handle_exists)
+ return handle_exists, err
+}
+
+const countBlockchainsByChainType = `-- name: CountBlockchainsByChainType :one
+SELECT COUNT(*) as count FROM blockchains
+WHERE chain_type LIKE '%' || ? || '%' AND deleted_at IS NULL
+`
+
+func (q *Queries) CountBlockchainsByChainType(ctx context.Context, dollar_1 sql.NullString) (int64, error) {
+ row := q.db.QueryRowContext(ctx, countBlockchainsByChainType, dollar_1)
+ var count int64
+ err := row.Scan(&count)
+ return count, err
+}
+
+const getAccountByAddress = `-- name: GetAccountByAddress :one
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE address = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAccountByAddress(ctx context.Context, address string) (Account, error) {
+ row := q.db.QueryRowContext(ctx, getAccountByAddress, address)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const getAccountByController = `-- name: GetAccountByController :one
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE controller = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAccountByController(ctx context.Context, controller string) (Account, error) {
+ row := q.db.QueryRowContext(ctx, getAccountByController, controller)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const getAccountByID = `-- name: GetAccountByID :one
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAccountByID(ctx context.Context, id string) (Account, error) {
+ row := q.db.QueryRowContext(ctx, getAccountByID, id)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const getAccountByNumber = `-- name: GetAccountByNumber :one
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE number = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAccountByNumber(ctx context.Context, number int64) (Account, error) {
+ row := q.db.QueryRowContext(ctx, getAccountByNumber, number)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const getAccountByPublicKey = `-- name: GetAccountByPublicKey :one
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE public_key = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAccountByPublicKey(ctx context.Context, publicKey string) (Account, error) {
+ row := q.db.QueryRowContext(ctx, getAccountByPublicKey, publicKey)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const getAccountBySequence = `-- name: GetAccountBySequence :one
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE sequence = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAccountBySequence(ctx context.Context, sequence int64) (Account, error) {
+ row := q.db.QueryRowContext(ctx, getAccountBySequence, sequence)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const getAccountsByChainID = `-- name: GetAccountsByChainID :many
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY sequence DESC
+`
+
+func (q *Queries) GetAccountsByChainID(ctx context.Context, chainID string) ([]Account, error) {
+ rows, err := q.db.QueryContext(ctx, getAccountsByChainID, chainID)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Account
+ for rows.Next() {
+ var i Account
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const getAccountsByController = `-- name: GetAccountsByController :many
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE controller = ? AND deleted_at IS NULL
+ORDER BY created_at DESC
+`
+
+func (q *Queries) GetAccountsByController(ctx context.Context, controller string) ([]Account, error) {
+ rows, err := q.db.QueryContext(ctx, getAccountsByController, controller)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Account
+ for rows.Next() {
+ var i Account
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const getAccountsByHandle = `-- name: GetAccountsByHandle :many
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE handle = ? AND deleted_at IS NULL
+ORDER BY created_at DESC
+`
+
+func (q *Queries) GetAccountsByHandle(ctx context.Context, handle string) ([]Account, error) {
+ rows, err := q.db.QueryContext(ctx, getAccountsByHandle, handle)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Account
+ for rows.Next() {
+ var i Account
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const getAccountsByLabel = `-- name: GetAccountsByLabel :many
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE label = ? AND deleted_at IS NULL
+ORDER BY created_at DESC
+`
+
+func (q *Queries) GetAccountsByLabel(ctx context.Context, label string) ([]Account, error) {
+ rows, err := q.db.QueryContext(ctx, getAccountsByLabel, label)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Account
+ for rows.Next() {
+ var i Account
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const getActivityByID = `-- name: GetActivityByID :one
+SELECT id, created_at, updated_at, deleted_at, account_id, tx_hash, tx_type, status, amount, fee, gas_used, gas_wanted, memo, block_height, timestamp, raw_log, error FROM activities
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetActivityByID(ctx context.Context, id string) (Activity, error) {
+ row := q.db.QueryRowContext(ctx, getActivityByID, id)
+ var i Activity
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AccountID,
+ &i.TxHash,
+ &i.TxType,
+ &i.Status,
+ &i.Amount,
+ &i.Fee,
+ &i.GasUsed,
+ &i.GasWanted,
+ &i.Memo,
+ &i.BlockHeight,
+ &i.Timestamp,
+ &i.RawLog,
+ &i.Error,
+ )
+ return i, err
+}
+
+const getActivityByTxHash = `-- name: GetActivityByTxHash :one
+SELECT id, created_at, updated_at, deleted_at, account_id, tx_hash, tx_type, status, amount, fee, gas_used, gas_wanted, memo, block_height, timestamp, raw_log, error FROM activities
+WHERE tx_hash = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetActivityByTxHash(ctx context.Context, txHash sql.NullString) (Activity, error) {
+ row := q.db.QueryRowContext(ctx, getActivityByTxHash, txHash)
+ var i Activity
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AccountID,
+ &i.TxHash,
+ &i.TxType,
+ &i.Status,
+ &i.Amount,
+ &i.Fee,
+ &i.GasUsed,
+ &i.GasWanted,
+ &i.Memo,
+ &i.BlockHeight,
+ &i.Timestamp,
+ &i.RawLog,
+ &i.Error,
+ )
+ return i, err
+}
+
+const getAssetByChainAndSymbol = `-- name: GetAssetByChainAndSymbol :one
+SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
+WHERE chain_id = ? AND symbol = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+type GetAssetByChainAndSymbolParams struct {
+ ChainID string `json:"chain_id"`
+ Symbol string `json:"symbol"`
+}
+
+func (q *Queries) GetAssetByChainAndSymbol(ctx context.Context, arg GetAssetByChainAndSymbolParams) (Asset, error) {
+ row := q.db.QueryRowContext(ctx, getAssetByChainAndSymbol, arg.ChainID, arg.Symbol)
+ var i Asset
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ )
+ return i, err
+}
+
+const getAssetByID = `-- name: GetAssetByID :one
+SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAssetByID(ctx context.Context, id string) (Asset, error) {
+ row := q.db.QueryRowContext(ctx, getAssetByID, id)
+ var i Asset
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ )
+ return i, err
+}
+
+const getAssetBySymbol = `-- name: GetAssetBySymbol :one
+SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
+WHERE symbol = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetAssetBySymbol(ctx context.Context, symbol string) (Asset, error) {
+ row := q.db.QueryRowContext(ctx, getAssetBySymbol, symbol)
+ var i Asset
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ )
+ return i, err
+}
+
+const getAssetWithLatestPrice = `-- name: GetAssetWithLatestPrice :one
+SELECT a.id, a.created_at, a.updated_at, a.deleted_at, a.name, a.symbol, a.decimals, a.chain_id, a.channel, a.asset_type, a.coingecko_id, p.price_usd, p.price_btc, p.volume_24h_usd, p.market_cap_usd,
+ p.available_supply, p.total_supply, p.max_supply,
+ p.percent_change_1h, p.percent_change_24h, p.percent_change_7d,
+ p.rank, p.last_updated
+FROM assets a
+LEFT JOIN (
+ SELECT p1.id, p1.created_at, p1.updated_at, p1.deleted_at, p1.asset_id, p1.price_usd, p1.price_btc, p1.volume_24h_usd, p1.market_cap_usd, p1.available_supply, p1.total_supply, p1.max_supply, p1.percent_change_1h, p1.percent_change_24h, p1.percent_change_7d, p1.rank, p1.last_updated
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE a.id = ? AND a.deleted_at IS NULL
+LIMIT 1
+`
+
+type GetAssetWithLatestPriceRow struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Name string `json:"name"`
+ Symbol string `json:"symbol"`
+ Decimals int64 `json:"decimals"`
+ ChainID string `json:"chain_id"`
+ Channel string `json:"channel"`
+ AssetType string `json:"asset_type"`
+ CoingeckoID sql.NullString `json:"coingecko_id"`
+ PriceUsd sql.NullFloat64 `json:"price_usd"`
+ PriceBtc sql.NullFloat64 `json:"price_btc"`
+ Volume24hUsd sql.NullFloat64 `json:"volume_24h_usd"`
+ MarketCapUsd sql.NullFloat64 `json:"market_cap_usd"`
+ AvailableSupply sql.NullFloat64 `json:"available_supply"`
+ TotalSupply sql.NullFloat64 `json:"total_supply"`
+ MaxSupply sql.NullFloat64 `json:"max_supply"`
+ PercentChange1h sql.NullFloat64 `json:"percent_change_1h"`
+ PercentChange24h sql.NullFloat64 `json:"percent_change_24h"`
+ PercentChange7d sql.NullFloat64 `json:"percent_change_7d"`
+ Rank sql.NullInt64 `json:"rank"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+func (q *Queries) GetAssetWithLatestPrice(ctx context.Context, id string) (GetAssetWithLatestPriceRow, error) {
+ row := q.db.QueryRowContext(ctx, getAssetWithLatestPrice, id)
+ var i GetAssetWithLatestPriceRow
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ &i.Volume24hUsd,
+ &i.MarketCapUsd,
+ &i.AvailableSupply,
+ &i.TotalSupply,
+ &i.MaxSupply,
+ &i.PercentChange1h,
+ &i.PercentChange24h,
+ &i.PercentChange7d,
+ &i.Rank,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const getBlockchainByChainName = `-- name: GetBlockchainByChainName :one
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE chain_name = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetBlockchainByChainName(ctx context.Context, chainName string) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, getBlockchainByChainName, chainName)
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const getBlockchainByCosmosChainID = `-- name: GetBlockchainByCosmosChainID :one
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE chain_id_cosmos = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetBlockchainByCosmosChainID(ctx context.Context, chainIDCosmos sql.NullString) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, getBlockchainByCosmosChainID, chainIDCosmos)
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const getBlockchainByEvmChainID = `-- name: GetBlockchainByEvmChainID :one
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE chain_id_evm = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetBlockchainByEvmChainID(ctx context.Context, chainIDEvm sql.NullString) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, getBlockchainByEvmChainID, chainIDEvm)
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const getBlockchainByID = `-- name: GetBlockchainByID :one
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetBlockchainByID(ctx context.Context, id string) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, getBlockchainByID, id)
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const getBlockchainEndpoints = `-- name: GetBlockchainEndpoints :one
+SELECT id, chain_name, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint
+FROM blockchains
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+type GetBlockchainEndpointsRow struct {
+ ID string `json:"id"`
+ ChainName string `json:"chain_name"`
+ LcdEndpoint sql.NullString `json:"lcd_endpoint"`
+ GrpcEndpoint sql.NullString `json:"grpc_endpoint"`
+ EvmRpcEndpoint sql.NullString `json:"evm_rpc_endpoint"`
+}
+
+func (q *Queries) GetBlockchainEndpoints(ctx context.Context, id string) (GetBlockchainEndpointsRow, error) {
+ row := q.db.QueryRowContext(ctx, getBlockchainEndpoints, id)
+ var i GetBlockchainEndpointsRow
+ err := row.Scan(
+ &i.ID,
+ &i.ChainName,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ )
+ return i, err
+}
+
+const getBlockchainExplorer = `-- name: GetBlockchainExplorer :one
+SELECT id, chain_name, explorer
+FROM blockchains
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+type GetBlockchainExplorerRow struct {
+ ID string `json:"id"`
+ ChainName string `json:"chain_name"`
+ Explorer sql.NullString `json:"explorer"`
+}
+
+func (q *Queries) GetBlockchainExplorer(ctx context.Context, id string) (GetBlockchainExplorerRow, error) {
+ row := q.db.QueryRowContext(ctx, getBlockchainExplorer, id)
+ var i GetBlockchainExplorerRow
+ err := row.Scan(&i.ID, &i.ChainName, &i.Explorer)
+ return i, err
+}
+
+const getBlockchainWithAssetInfo = `-- name: GetBlockchainWithAssetInfo :one
+SELECT b.id, b.created_at, b.updated_at, b.deleted_at, b.chain_name, b.chain_id_cosmos, b.chain_id_evm, b.api_name, b.bech_account_prefix, b.bech_validator_prefix, b.main_asset_symbol, b.main_asset_denom, b.staking_asset_symbol, b.staking_asset_denom, b.is_stake_enabled, b.chain_image, b.main_asset_image, b.staking_asset_image, b.chain_type, b.is_support_mobile_wallet, b.is_support_extension_wallet, b.is_support_erc20, b.description_en, b.description_ko, b.description_ja, b.origin_genesis_time, b.account_type, b.btc_staking, b.cosmos_fee_info, b.evm_fee_info, b.lcd_endpoint, b.grpc_endpoint, b.evm_rpc_endpoint, b.explorer, b.about, b.forum, a.id as asset_id, a.symbol, a.decimals, p.price_usd, p.price_btc
+FROM blockchains b
+LEFT JOIN assets a ON b.main_asset_symbol = a.symbol
+LEFT JOIN (
+ SELECT p1.id, p1.created_at, p1.updated_at, p1.deleted_at, p1.asset_id, p1.price_usd, p1.price_btc, p1.volume_24h_usd, p1.market_cap_usd, p1.available_supply, p1.total_supply, p1.max_supply, p1.percent_change_1h, p1.percent_change_24h, p1.percent_change_7d, p1.rank, p1.last_updated
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE b.id = ? AND b.deleted_at IS NULL
+LIMIT 1
+`
+
+type GetBlockchainWithAssetInfoRow struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ ChainName string `json:"chain_name"`
+ ChainIDCosmos sql.NullString `json:"chain_id_cosmos"`
+ ChainIDEvm sql.NullString `json:"chain_id_evm"`
+ ApiName sql.NullString `json:"api_name"`
+ BechAccountPrefix sql.NullString `json:"bech_account_prefix"`
+ BechValidatorPrefix sql.NullString `json:"bech_validator_prefix"`
+ MainAssetSymbol sql.NullString `json:"main_asset_symbol"`
+ MainAssetDenom sql.NullString `json:"main_asset_denom"`
+ StakingAssetSymbol sql.NullString `json:"staking_asset_symbol"`
+ StakingAssetDenom sql.NullString `json:"staking_asset_denom"`
+ IsStakeEnabled bool `json:"is_stake_enabled"`
+ ChainImage sql.NullString `json:"chain_image"`
+ MainAssetImage sql.NullString `json:"main_asset_image"`
+ StakingAssetImage sql.NullString `json:"staking_asset_image"`
+ ChainType string `json:"chain_type"`
+ IsSupportMobileWallet bool `json:"is_support_mobile_wallet"`
+ IsSupportExtensionWallet bool `json:"is_support_extension_wallet"`
+ IsSupportErc20 bool `json:"is_support_erc20"`
+ DescriptionEn sql.NullString `json:"description_en"`
+ DescriptionKo sql.NullString `json:"description_ko"`
+ DescriptionJa sql.NullString `json:"description_ja"`
+ OriginGenesisTime sql.NullTime `json:"origin_genesis_time"`
+ AccountType string `json:"account_type"`
+ BtcStaking sql.NullString `json:"btc_staking"`
+ CosmosFeeInfo sql.NullString `json:"cosmos_fee_info"`
+ EvmFeeInfo sql.NullString `json:"evm_fee_info"`
+ LcdEndpoint sql.NullString `json:"lcd_endpoint"`
+ GrpcEndpoint sql.NullString `json:"grpc_endpoint"`
+ EvmRpcEndpoint sql.NullString `json:"evm_rpc_endpoint"`
+ Explorer sql.NullString `json:"explorer"`
+ About sql.NullString `json:"about"`
+ Forum sql.NullString `json:"forum"`
+ AssetID sql.NullString `json:"asset_id"`
+ Symbol sql.NullString `json:"symbol"`
+ Decimals sql.NullInt64 `json:"decimals"`
+ PriceUsd sql.NullFloat64 `json:"price_usd"`
+ PriceBtc sql.NullFloat64 `json:"price_btc"`
+}
+
+func (q *Queries) GetBlockchainWithAssetInfo(ctx context.Context, id string) (GetBlockchainWithAssetInfoRow, error) {
+ row := q.db.QueryRowContext(ctx, getBlockchainWithAssetInfo, id)
+ var i GetBlockchainWithAssetInfoRow
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ &i.AssetID,
+ &i.Symbol,
+ &i.Decimals,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ )
+ return i, err
+}
+
+const getCredentialByID = `-- name: GetCredentialByID :one
+SELECT id, created_at, updated_at, deleted_at, handle, credential_id, authenticator_attachment, origin, type, transports FROM credentials
+WHERE credential_id = ?
+AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetCredentialByID(ctx context.Context, credentialID string) (Credential, error) {
+ row := q.db.QueryRowContext(ctx, getCredentialByID, credentialID)
+ var i Credential
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.CredentialID,
+ &i.AuthenticatorAttachment,
+ &i.Origin,
+ &i.Type,
+ &i.Transports,
+ )
+ return i, err
+}
+
+const getCredentialsByHandle = `-- name: GetCredentialsByHandle :many
+SELECT id, created_at, updated_at, deleted_at, handle, credential_id, authenticator_attachment, origin, type, transports FROM credentials
+WHERE handle = ?
+AND deleted_at IS NULL
+`
+
+func (q *Queries) GetCredentialsByHandle(ctx context.Context, handle string) ([]Credential, error) {
+ rows, err := q.db.QueryContext(ctx, getCredentialsByHandle, handle)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Credential
+ for rows.Next() {
+ var i Credential
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.CredentialID,
+ &i.AuthenticatorAttachment,
+ &i.Origin,
+ &i.Type,
+ &i.Transports,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const getCryptoListingByApiID = `-- name: GetCryptoListingByApiID :one
+SELECT id, created_at, updated_at, deleted_at, api_id, name, symbol, website_slug FROM crypto_listings
+WHERE api_id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetCryptoListingByApiID(ctx context.Context, apiID string) (CryptoListing, error) {
+ row := q.db.QueryRowContext(ctx, getCryptoListingByApiID, apiID)
+ var i CryptoListing
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ApiID,
+ &i.Name,
+ &i.Symbol,
+ &i.WebsiteSlug,
+ )
+ return i, err
+}
+
+const getCryptoListingByID = `-- name: GetCryptoListingByID :one
+SELECT id, created_at, updated_at, deleted_at, api_id, name, symbol, website_slug FROM crypto_listings
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetCryptoListingByID(ctx context.Context, id string) (CryptoListing, error) {
+ row := q.db.QueryRowContext(ctx, getCryptoListingByID, id)
+ var i CryptoListing
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ApiID,
+ &i.Name,
+ &i.Symbol,
+ &i.WebsiteSlug,
+ )
+ return i, err
+}
+
+const getCryptoListingBySymbol = `-- name: GetCryptoListingBySymbol :one
+SELECT id, created_at, updated_at, deleted_at, api_id, name, symbol, website_slug FROM crypto_listings
+WHERE symbol = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetCryptoListingBySymbol(ctx context.Context, symbol string) (CryptoListing, error) {
+ row := q.db.QueryRowContext(ctx, getCryptoListingBySymbol, symbol)
+ var i CryptoListing
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ApiID,
+ &i.Name,
+ &i.Symbol,
+ &i.WebsiteSlug,
+ )
+ return i, err
+}
+
+const getCryptoListingByWebsiteSlug = `-- name: GetCryptoListingByWebsiteSlug :one
+SELECT id, created_at, updated_at, deleted_at, api_id, name, symbol, website_slug FROM crypto_listings
+WHERE website_slug = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetCryptoListingByWebsiteSlug(ctx context.Context, websiteSlug string) (CryptoListing, error) {
+ row := q.db.QueryRowContext(ctx, getCryptoListingByWebsiteSlug, websiteSlug)
+ var i CryptoListing
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ApiID,
+ &i.Name,
+ &i.Symbol,
+ &i.WebsiteSlug,
+ )
+ return i, err
+}
+
+const getFearGreedIndexByID = `-- name: GetFearGreedIndexByID :one
+SELECT id, created_at, updated_at, deleted_at, value, value_classification, timestamp, time_until_update FROM fear_greed_index
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetFearGreedIndexByID(ctx context.Context, id string) (FearGreedIndex, error) {
+ row := q.db.QueryRowContext(ctx, getFearGreedIndexByID, id)
+ var i FearGreedIndex
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Value,
+ &i.ValueClassification,
+ &i.Timestamp,
+ &i.TimeUntilUpdate,
+ )
+ return i, err
+}
+
+const getGlobalMarketByID = `-- name: GetGlobalMarketByID :one
+SELECT id, created_at, updated_at, deleted_at, total_market_cap_usd, total_24h_volume_usd, bitcoin_percentage_of_market_cap, active_currencies, active_assets, active_markets, last_updated FROM global_market
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetGlobalMarketByID(ctx context.Context, id string) (GlobalMarket, error) {
+ row := q.db.QueryRowContext(ctx, getGlobalMarketByID, id)
+ var i GlobalMarket
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.TotalMarketCapUsd,
+ &i.Total24hVolumeUsd,
+ &i.BitcoinPercentageOfMarketCap,
+ &i.ActiveCurrencies,
+ &i.ActiveAssets,
+ &i.ActiveMarkets,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const getHealthByEndpoint = `-- name: GetHealthByEndpoint :one
+SELECT id, created_at, updated_at, deleted_at, endpoint_url, endpoint_type, chain_id, status, response_time_ms, last_checked, next_check, failure_count, success_count, response_data, error_message FROM health
+WHERE endpoint_url = ? AND deleted_at IS NULL
+ORDER BY last_checked DESC
+LIMIT 1
+`
+
+func (q *Queries) GetHealthByEndpoint(ctx context.Context, endpointUrl string) (Health, error) {
+ row := q.db.QueryRowContext(ctx, getHealthByEndpoint, endpointUrl)
+ var i Health
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.EndpointUrl,
+ &i.EndpointType,
+ &i.ChainID,
+ &i.Status,
+ &i.ResponseTimeMs,
+ &i.LastChecked,
+ &i.NextCheck,
+ &i.FailureCount,
+ &i.SuccessCount,
+ &i.ResponseData,
+ &i.ErrorMessage,
+ )
+ return i, err
+}
+
+const getHealthByID = `-- name: GetHealthByID :one
+SELECT id, created_at, updated_at, deleted_at, endpoint_url, endpoint_type, chain_id, status, response_time_ms, last_checked, next_check, failure_count, success_count, response_data, error_message FROM health
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetHealthByID(ctx context.Context, id string) (Health, error) {
+ row := q.db.QueryRowContext(ctx, getHealthByID, id)
+ var i Health
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.EndpointUrl,
+ &i.EndpointType,
+ &i.ChainID,
+ &i.Status,
+ &i.ResponseTimeMs,
+ &i.LastChecked,
+ &i.NextCheck,
+ &i.FailureCount,
+ &i.SuccessCount,
+ &i.ResponseData,
+ &i.ErrorMessage,
+ )
+ return i, err
+}
+
+const getLatestFearGreedIndex = `-- name: GetLatestFearGreedIndex :one
+SELECT id, created_at, updated_at, deleted_at, value, value_classification, timestamp, time_until_update FROM fear_greed_index
+WHERE deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT 1
+`
+
+func (q *Queries) GetLatestFearGreedIndex(ctx context.Context) (FearGreedIndex, error) {
+ row := q.db.QueryRowContext(ctx, getLatestFearGreedIndex)
+ var i FearGreedIndex
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Value,
+ &i.ValueClassification,
+ &i.Timestamp,
+ &i.TimeUntilUpdate,
+ )
+ return i, err
+}
+
+const getLatestGlobalMarket = `-- name: GetLatestGlobalMarket :one
+SELECT id, created_at, updated_at, deleted_at, total_market_cap_usd, total_24h_volume_usd, bitcoin_percentage_of_market_cap, active_currencies, active_assets, active_markets, last_updated FROM global_market
+WHERE deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT 1
+`
+
+func (q *Queries) GetLatestGlobalMarket(ctx context.Context) (GlobalMarket, error) {
+ row := q.db.QueryRowContext(ctx, getLatestGlobalMarket)
+ var i GlobalMarket
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.TotalMarketCapUsd,
+ &i.Total24hVolumeUsd,
+ &i.BitcoinPercentageOfMarketCap,
+ &i.ActiveCurrencies,
+ &i.ActiveAssets,
+ &i.ActiveMarkets,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const getPriceByAssetID = `-- name: GetPriceByAssetID :one
+SELECT id, created_at, updated_at, deleted_at, asset_id, price_usd, price_btc, volume_24h_usd, market_cap_usd, available_supply, total_supply, max_supply, percent_change_1h, percent_change_24h, percent_change_7d, rank, last_updated FROM prices
+WHERE asset_id = ? AND deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT 1
+`
+
+func (q *Queries) GetPriceByAssetID(ctx context.Context, assetID string) (Price, error) {
+ row := q.db.QueryRowContext(ctx, getPriceByAssetID, assetID)
+ var i Price
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AssetID,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ &i.Volume24hUsd,
+ &i.MarketCapUsd,
+ &i.AvailableSupply,
+ &i.TotalSupply,
+ &i.MaxSupply,
+ &i.PercentChange1h,
+ &i.PercentChange24h,
+ &i.PercentChange7d,
+ &i.Rank,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const getPriceByID = `-- name: GetPriceByID :one
+SELECT id, created_at, updated_at, deleted_at, asset_id, price_usd, price_btc, volume_24h_usd, market_cap_usd, available_supply, total_supply, max_supply, percent_change_1h, percent_change_24h, percent_change_7d, rank, last_updated FROM prices
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetPriceByID(ctx context.Context, id string) (Price, error) {
+ row := q.db.QueryRowContext(ctx, getPriceByID, id)
+ var i Price
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AssetID,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ &i.Volume24hUsd,
+ &i.MarketCapUsd,
+ &i.AvailableSupply,
+ &i.TotalSupply,
+ &i.MaxSupply,
+ &i.PercentChange1h,
+ &i.PercentChange24h,
+ &i.PercentChange7d,
+ &i.Rank,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const getPriceConversionByCurrency = `-- name: GetPriceConversionByCurrency :one
+SELECT id, created_at, updated_at, deleted_at, price_id, currency_code, price, volume_24h, market_cap, last_updated FROM price_conversions
+WHERE price_id = ? AND currency_code = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+type GetPriceConversionByCurrencyParams struct {
+ PriceID string `json:"price_id"`
+ CurrencyCode string `json:"currency_code"`
+}
+
+func (q *Queries) GetPriceConversionByCurrency(ctx context.Context, arg GetPriceConversionByCurrencyParams) (PriceConversion, error) {
+ row := q.db.QueryRowContext(ctx, getPriceConversionByCurrency, arg.PriceID, arg.CurrencyCode)
+ var i PriceConversion
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.PriceID,
+ &i.CurrencyCode,
+ &i.Price,
+ &i.Volume24h,
+ &i.MarketCap,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const getPriceConversionByID = `-- name: GetPriceConversionByID :one
+SELECT id, created_at, updated_at, deleted_at, price_id, currency_code, price, volume_24h, market_cap, last_updated FROM price_conversions
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetPriceConversionByID(ctx context.Context, id string) (PriceConversion, error) {
+ row := q.db.QueryRowContext(ctx, getPriceConversionByID, id)
+ var i PriceConversion
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.PriceID,
+ &i.CurrencyCode,
+ &i.Price,
+ &i.Volume24h,
+ &i.MarketCap,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const getPriceConversionsByPriceID = `-- name: GetPriceConversionsByPriceID :many
+SELECT id, created_at, updated_at, deleted_at, price_id, currency_code, price, volume_24h, market_cap, last_updated FROM price_conversions
+WHERE price_id = ? AND deleted_at IS NULL
+ORDER BY currency_code ASC
+`
+
+func (q *Queries) GetPriceConversionsByPriceID(ctx context.Context, priceID string) ([]PriceConversion, error) {
+ rows, err := q.db.QueryContext(ctx, getPriceConversionsByPriceID, priceID)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []PriceConversion
+ for rows.Next() {
+ var i PriceConversion
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.PriceID,
+ &i.CurrencyCode,
+ &i.Price,
+ &i.Volume24h,
+ &i.MarketCap,
+ &i.LastUpdated,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const getProfileByAddress = `-- name: GetProfileByAddress :one
+SELECT id, created_at, updated_at, deleted_at, address, handle, origin, name FROM profiles
+WHERE address = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetProfileByAddress(ctx context.Context, address string) (Profile, error) {
+ row := q.db.QueryRowContext(ctx, getProfileByAddress, address)
+ var i Profile
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Address,
+ &i.Handle,
+ &i.Origin,
+ &i.Name,
+ )
+ return i, err
+}
+
+const getProfileByHandle = `-- name: GetProfileByHandle :one
+SELECT id, created_at, updated_at, deleted_at, address, handle, origin, name FROM profiles
+WHERE handle = ?
+AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetProfileByHandle(ctx context.Context, handle string) (Profile, error) {
+ row := q.db.QueryRowContext(ctx, getProfileByHandle, handle)
+ var i Profile
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Address,
+ &i.Handle,
+ &i.Origin,
+ &i.Name,
+ )
+ return i, err
+}
+
+const getProfileByID = `-- name: GetProfileByID :one
+SELECT id, created_at, updated_at, deleted_at, address, handle, origin, name FROM profiles
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetProfileByID(ctx context.Context, id string) (Profile, error) {
+ row := q.db.QueryRowContext(ctx, getProfileByID, id)
+ var i Profile
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Address,
+ &i.Handle,
+ &i.Origin,
+ &i.Name,
+ )
+ return i, err
+}
+
+const getServiceByAddress = `-- name: GetServiceByAddress :one
+SELECT id, created_at, updated_at, deleted_at, name, description, chain_id, address, owner_address, metadata, status, block_height FROM services
+WHERE address = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetServiceByAddress(ctx context.Context, address string) (Service, error) {
+ row := q.db.QueryRowContext(ctx, getServiceByAddress, address)
+ var i Service
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Description,
+ &i.ChainID,
+ &i.Address,
+ &i.OwnerAddress,
+ &i.Metadata,
+ &i.Status,
+ &i.BlockHeight,
+ )
+ return i, err
+}
+
+const getServiceByChainAndAddress = `-- name: GetServiceByChainAndAddress :one
+SELECT id, created_at, updated_at, deleted_at, name, description, chain_id, address, owner_address, metadata, status, block_height FROM services
+WHERE chain_id = ? AND address = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+type GetServiceByChainAndAddressParams struct {
+ ChainID string `json:"chain_id"`
+ Address string `json:"address"`
+}
+
+func (q *Queries) GetServiceByChainAndAddress(ctx context.Context, arg GetServiceByChainAndAddressParams) (Service, error) {
+ row := q.db.QueryRowContext(ctx, getServiceByChainAndAddress, arg.ChainID, arg.Address)
+ var i Service
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Description,
+ &i.ChainID,
+ &i.Address,
+ &i.OwnerAddress,
+ &i.Metadata,
+ &i.Status,
+ &i.BlockHeight,
+ )
+ return i, err
+}
+
+const getServiceByID = `-- name: GetServiceByID :one
+SELECT id, created_at, updated_at, deleted_at, name, description, chain_id, address, owner_address, metadata, status, block_height FROM services
+WHERE id = ? AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetServiceByID(ctx context.Context, id string) (Service, error) {
+ row := q.db.QueryRowContext(ctx, getServiceByID, id)
+ var i Service
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Description,
+ &i.ChainID,
+ &i.Address,
+ &i.OwnerAddress,
+ &i.Metadata,
+ &i.Status,
+ &i.BlockHeight,
+ )
+ return i, err
+}
+
+const getVaultByID = `-- name: GetVaultByID :one
+SELECT id, created_at, updated_at, deleted_at, handle, origin, address, cid, config, session_id, redirect_uri FROM vaults
+WHERE id = ?
+AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetVaultByID(ctx context.Context, id string) (Vault, error) {
+ row := q.db.QueryRowContext(ctx, getVaultByID, id)
+ var i Vault
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.Origin,
+ &i.Address,
+ &i.Cid,
+ &i.Config,
+ &i.SessionID,
+ &i.RedirectUri,
+ )
+ return i, err
+}
+
+const getVaultConfigByCID = `-- name: GetVaultConfigByCID :one
+SELECT id, created_at, updated_at, deleted_at, handle, origin, address, cid, config, session_id, redirect_uri FROM vaults
+WHERE cid = ?
+AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetVaultConfigByCID(ctx context.Context, cid string) (Vault, error) {
+ row := q.db.QueryRowContext(ctx, getVaultConfigByCID, cid)
+ var i Vault
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.Origin,
+ &i.Address,
+ &i.Cid,
+ &i.Config,
+ &i.SessionID,
+ &i.RedirectUri,
+ )
+ return i, err
+}
+
+const getVaultRedirectURIBySessionID = `-- name: GetVaultRedirectURIBySessionID :one
+SELECT redirect_uri FROM vaults
+WHERE session_id = ?
+AND deleted_at IS NULL
+LIMIT 1
+`
+
+func (q *Queries) GetVaultRedirectURIBySessionID(ctx context.Context, sessionID string) (string, error) {
+ row := q.db.QueryRowContext(ctx, getVaultRedirectURIBySessionID, sessionID)
+ var redirect_uri string
+ err := row.Scan(&redirect_uri)
+ return redirect_uri, err
+}
+
+const getVaultsByHandle = `-- name: GetVaultsByHandle :many
+SELECT id, created_at, updated_at, deleted_at, handle, origin, address, cid, config, session_id, redirect_uri FROM vaults
+WHERE handle = ?
+AND deleted_at IS NULL
+ORDER BY created_at DESC
+`
+
+func (q *Queries) GetVaultsByHandle(ctx context.Context, handle string) ([]Vault, error) {
+ rows, err := q.db.QueryContext(ctx, getVaultsByHandle, handle)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Vault
+ for rows.Next() {
+ var i Vault
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.Origin,
+ &i.Address,
+ &i.Cid,
+ &i.Config,
+ &i.SessionID,
+ &i.RedirectUri,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const insertAccount = `-- name: InsertAccount :one
+INSERT INTO accounts (
+ number,
+ sequence,
+ address,
+ public_key,
+ chain_id,
+ block_created,
+ controller,
+ label,
+ is_subsidiary,
+ is_validator,
+ is_delegator,
+ is_accountable
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable
+`
+
+type InsertAccountParams struct {
+ Number int64 `json:"number"`
+ Sequence int64 `json:"sequence"`
+ Address string `json:"address"`
+ PublicKey string `json:"public_key"`
+ ChainID string `json:"chain_id"`
+ BlockCreated int64 `json:"block_created"`
+ Controller string `json:"controller"`
+ Label string `json:"label"`
+ IsSubsidiary bool `json:"is_subsidiary"`
+ IsValidator bool `json:"is_validator"`
+ IsDelegator bool `json:"is_delegator"`
+ IsAccountable bool `json:"is_accountable"`
+}
+
+// ACCOUNT QUERIES
+func (q *Queries) InsertAccount(ctx context.Context, arg InsertAccountParams) (Account, error) {
+ row := q.db.QueryRowContext(ctx, insertAccount,
+ arg.Number,
+ arg.Sequence,
+ arg.Address,
+ arg.PublicKey,
+ arg.ChainID,
+ arg.BlockCreated,
+ arg.Controller,
+ arg.Label,
+ arg.IsSubsidiary,
+ arg.IsValidator,
+ arg.IsDelegator,
+ arg.IsAccountable,
+ )
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const insertActivity = `-- name: InsertActivity :one
+INSERT INTO activities (
+ account_id,
+ tx_hash,
+ tx_type,
+ status,
+ amount,
+ fee,
+ gas_used,
+ gas_wanted,
+ memo,
+ block_height,
+ timestamp,
+ raw_log,
+ error
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, account_id, tx_hash, tx_type, status, amount, fee, gas_used, gas_wanted, memo, block_height, timestamp, raw_log, error
+`
+
+type InsertActivityParams struct {
+ AccountID string `json:"account_id"`
+ TxHash sql.NullString `json:"tx_hash"`
+ TxType string `json:"tx_type"`
+ Status string `json:"status"`
+ Amount sql.NullString `json:"amount"`
+ Fee sql.NullString `json:"fee"`
+ GasUsed sql.NullInt64 `json:"gas_used"`
+ GasWanted sql.NullInt64 `json:"gas_wanted"`
+ Memo sql.NullString `json:"memo"`
+ BlockHeight sql.NullInt64 `json:"block_height"`
+ Timestamp time.Time `json:"timestamp"`
+ RawLog sql.NullString `json:"raw_log"`
+ Error sql.NullString `json:"error"`
+}
+
+// ACTIVITY QUERIES
+func (q *Queries) InsertActivity(ctx context.Context, arg InsertActivityParams) (Activity, error) {
+ row := q.db.QueryRowContext(ctx, insertActivity,
+ arg.AccountID,
+ arg.TxHash,
+ arg.TxType,
+ arg.Status,
+ arg.Amount,
+ arg.Fee,
+ arg.GasUsed,
+ arg.GasWanted,
+ arg.Memo,
+ arg.BlockHeight,
+ arg.Timestamp,
+ arg.RawLog,
+ arg.Error,
+ )
+ var i Activity
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AccountID,
+ &i.TxHash,
+ &i.TxType,
+ &i.Status,
+ &i.Amount,
+ &i.Fee,
+ &i.GasUsed,
+ &i.GasWanted,
+ &i.Memo,
+ &i.BlockHeight,
+ &i.Timestamp,
+ &i.RawLog,
+ &i.Error,
+ )
+ return i, err
+}
+
+const insertAsset = `-- name: InsertAsset :one
+INSERT INTO assets (
+ name,
+ symbol,
+ decimals,
+ chain_id,
+ channel,
+ asset_type,
+ coingecko_id
+) VALUES (?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id
+`
+
+type InsertAssetParams struct {
+ Name string `json:"name"`
+ Symbol string `json:"symbol"`
+ Decimals int64 `json:"decimals"`
+ ChainID string `json:"chain_id"`
+ Channel string `json:"channel"`
+ AssetType string `json:"asset_type"`
+ CoingeckoID sql.NullString `json:"coingecko_id"`
+}
+
+// ASSET QUERIES
+func (q *Queries) InsertAsset(ctx context.Context, arg InsertAssetParams) (Asset, error) {
+ row := q.db.QueryRowContext(ctx, insertAsset,
+ arg.Name,
+ arg.Symbol,
+ arg.Decimals,
+ arg.ChainID,
+ arg.Channel,
+ arg.AssetType,
+ arg.CoingeckoID,
+ )
+ var i Asset
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ )
+ return i, err
+}
+
+const insertBlockchain = `-- name: InsertBlockchain :one
+INSERT INTO blockchains (
+ id,
+ chain_name,
+ chain_id_cosmos,
+ chain_id_evm,
+ api_name,
+ bech_account_prefix,
+ bech_validator_prefix,
+ main_asset_symbol,
+ main_asset_denom,
+ staking_asset_symbol,
+ staking_asset_denom,
+ is_stake_enabled,
+ chain_image,
+ main_asset_image,
+ staking_asset_image,
+ chain_type,
+ is_support_mobile_wallet,
+ is_support_extension_wallet,
+ is_support_erc20,
+ description_en,
+ description_ko,
+ description_ja,
+ origin_genesis_time,
+ account_type,
+ btc_staking,
+ cosmos_fee_info,
+ evm_fee_info,
+ lcd_endpoint,
+ grpc_endpoint,
+ evm_rpc_endpoint,
+ explorer,
+ about,
+ forum
+) VALUES (
+ ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
+)
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type InsertBlockchainParams struct {
+ ID string `json:"id"`
+ ChainName string `json:"chain_name"`
+ ChainIDCosmos sql.NullString `json:"chain_id_cosmos"`
+ ChainIDEvm sql.NullString `json:"chain_id_evm"`
+ ApiName sql.NullString `json:"api_name"`
+ BechAccountPrefix sql.NullString `json:"bech_account_prefix"`
+ BechValidatorPrefix sql.NullString `json:"bech_validator_prefix"`
+ MainAssetSymbol sql.NullString `json:"main_asset_symbol"`
+ MainAssetDenom sql.NullString `json:"main_asset_denom"`
+ StakingAssetSymbol sql.NullString `json:"staking_asset_symbol"`
+ StakingAssetDenom sql.NullString `json:"staking_asset_denom"`
+ IsStakeEnabled bool `json:"is_stake_enabled"`
+ ChainImage sql.NullString `json:"chain_image"`
+ MainAssetImage sql.NullString `json:"main_asset_image"`
+ StakingAssetImage sql.NullString `json:"staking_asset_image"`
+ ChainType string `json:"chain_type"`
+ IsSupportMobileWallet bool `json:"is_support_mobile_wallet"`
+ IsSupportExtensionWallet bool `json:"is_support_extension_wallet"`
+ IsSupportErc20 bool `json:"is_support_erc20"`
+ DescriptionEn sql.NullString `json:"description_en"`
+ DescriptionKo sql.NullString `json:"description_ko"`
+ DescriptionJa sql.NullString `json:"description_ja"`
+ OriginGenesisTime sql.NullTime `json:"origin_genesis_time"`
+ AccountType string `json:"account_type"`
+ BtcStaking sql.NullString `json:"btc_staking"`
+ CosmosFeeInfo sql.NullString `json:"cosmos_fee_info"`
+ EvmFeeInfo sql.NullString `json:"evm_fee_info"`
+ LcdEndpoint sql.NullString `json:"lcd_endpoint"`
+ GrpcEndpoint sql.NullString `json:"grpc_endpoint"`
+ EvmRpcEndpoint sql.NullString `json:"evm_rpc_endpoint"`
+ Explorer sql.NullString `json:"explorer"`
+ About sql.NullString `json:"about"`
+ Forum sql.NullString `json:"forum"`
+}
+
+// BLOCKCHAIN QUERIES
+func (q *Queries) InsertBlockchain(ctx context.Context, arg InsertBlockchainParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, insertBlockchain,
+ arg.ID,
+ arg.ChainName,
+ arg.ChainIDCosmos,
+ arg.ChainIDEvm,
+ arg.ApiName,
+ arg.BechAccountPrefix,
+ arg.BechValidatorPrefix,
+ arg.MainAssetSymbol,
+ arg.MainAssetDenom,
+ arg.StakingAssetSymbol,
+ arg.StakingAssetDenom,
+ arg.IsStakeEnabled,
+ arg.ChainImage,
+ arg.MainAssetImage,
+ arg.StakingAssetImage,
+ arg.ChainType,
+ arg.IsSupportMobileWallet,
+ arg.IsSupportExtensionWallet,
+ arg.IsSupportErc20,
+ arg.DescriptionEn,
+ arg.DescriptionKo,
+ arg.DescriptionJa,
+ arg.OriginGenesisTime,
+ arg.AccountType,
+ arg.BtcStaking,
+ arg.CosmosFeeInfo,
+ arg.EvmFeeInfo,
+ arg.LcdEndpoint,
+ arg.GrpcEndpoint,
+ arg.EvmRpcEndpoint,
+ arg.Explorer,
+ arg.About,
+ arg.Forum,
+ )
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const insertCredential = `-- name: InsertCredential :one
+INSERT INTO credentials (
+ handle,
+ credential_id,
+ authenticator_attachment,
+ origin,
+ type,
+ transports
+) VALUES (?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, handle, credential_id, authenticator_attachment, origin, type, transports
+`
+
+type InsertCredentialParams struct {
+ Handle string `json:"handle"`
+ CredentialID string `json:"credential_id"`
+ AuthenticatorAttachment string `json:"authenticator_attachment"`
+ Origin string `json:"origin"`
+ Type string `json:"type"`
+ Transports string `json:"transports"`
+}
+
+// CREDENTIAL QUERIES
+func (q *Queries) InsertCredential(ctx context.Context, arg InsertCredentialParams) (Credential, error) {
+ row := q.db.QueryRowContext(ctx, insertCredential,
+ arg.Handle,
+ arg.CredentialID,
+ arg.AuthenticatorAttachment,
+ arg.Origin,
+ arg.Type,
+ arg.Transports,
+ )
+ var i Credential
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.CredentialID,
+ &i.AuthenticatorAttachment,
+ &i.Origin,
+ &i.Type,
+ &i.Transports,
+ )
+ return i, err
+}
+
+const insertCryptoListing = `-- name: InsertCryptoListing :one
+INSERT INTO crypto_listings (
+ api_id,
+ name,
+ symbol,
+ website_slug
+) VALUES (?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, api_id, name, symbol, website_slug
+`
+
+type InsertCryptoListingParams struct {
+ ApiID string `json:"api_id"`
+ Name string `json:"name"`
+ Symbol string `json:"symbol"`
+ WebsiteSlug string `json:"website_slug"`
+}
+
+// CRYPTO LISTINGS QUERIES (NEW)
+func (q *Queries) InsertCryptoListing(ctx context.Context, arg InsertCryptoListingParams) (CryptoListing, error) {
+ row := q.db.QueryRowContext(ctx, insertCryptoListing,
+ arg.ApiID,
+ arg.Name,
+ arg.Symbol,
+ arg.WebsiteSlug,
+ )
+ var i CryptoListing
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ApiID,
+ &i.Name,
+ &i.Symbol,
+ &i.WebsiteSlug,
+ )
+ return i, err
+}
+
+const insertFearGreedIndex = `-- name: InsertFearGreedIndex :one
+INSERT INTO fear_greed_index (
+ value,
+ value_classification,
+ timestamp,
+ time_until_update
+) VALUES (?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, value, value_classification, timestamp, time_until_update
+`
+
+type InsertFearGreedIndexParams struct {
+ Value int64 `json:"value"`
+ ValueClassification string `json:"value_classification"`
+ Timestamp time.Time `json:"timestamp"`
+ TimeUntilUpdate sql.NullString `json:"time_until_update"`
+}
+
+// FEAR AND GREED INDEX QUERIES (NEW)
+func (q *Queries) InsertFearGreedIndex(ctx context.Context, arg InsertFearGreedIndexParams) (FearGreedIndex, error) {
+ row := q.db.QueryRowContext(ctx, insertFearGreedIndex,
+ arg.Value,
+ arg.ValueClassification,
+ arg.Timestamp,
+ arg.TimeUntilUpdate,
+ )
+ var i FearGreedIndex
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Value,
+ &i.ValueClassification,
+ &i.Timestamp,
+ &i.TimeUntilUpdate,
+ )
+ return i, err
+}
+
+const insertGlobalMarket = `-- name: InsertGlobalMarket :one
+INSERT INTO global_market (
+ total_market_cap_usd,
+ total_24h_volume_usd,
+ bitcoin_percentage_of_market_cap,
+ active_currencies,
+ active_assets,
+ active_markets,
+ last_updated
+) VALUES (?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, total_market_cap_usd, total_24h_volume_usd, bitcoin_percentage_of_market_cap, active_currencies, active_assets, active_markets, last_updated
+`
+
+type InsertGlobalMarketParams struct {
+ TotalMarketCapUsd sql.NullFloat64 `json:"total_market_cap_usd"`
+ Total24hVolumeUsd sql.NullFloat64 `json:"total_24h_volume_usd"`
+ BitcoinPercentageOfMarketCap sql.NullFloat64 `json:"bitcoin_percentage_of_market_cap"`
+ ActiveCurrencies sql.NullInt64 `json:"active_currencies"`
+ ActiveAssets sql.NullInt64 `json:"active_assets"`
+ ActiveMarkets sql.NullInt64 `json:"active_markets"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+// GLOBAL MARKET QUERIES (NEW)
+func (q *Queries) InsertGlobalMarket(ctx context.Context, arg InsertGlobalMarketParams) (GlobalMarket, error) {
+ row := q.db.QueryRowContext(ctx, insertGlobalMarket,
+ arg.TotalMarketCapUsd,
+ arg.Total24hVolumeUsd,
+ arg.BitcoinPercentageOfMarketCap,
+ arg.ActiveCurrencies,
+ arg.ActiveAssets,
+ arg.ActiveMarkets,
+ arg.LastUpdated,
+ )
+ var i GlobalMarket
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.TotalMarketCapUsd,
+ &i.Total24hVolumeUsd,
+ &i.BitcoinPercentageOfMarketCap,
+ &i.ActiveCurrencies,
+ &i.ActiveAssets,
+ &i.ActiveMarkets,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const insertHealth = `-- name: InsertHealth :one
+INSERT INTO health (
+ endpoint_url,
+ endpoint_type,
+ chain_id,
+ status,
+ response_time_ms,
+ last_checked,
+ next_check,
+ failure_count,
+ success_count,
+ response_data,
+ error_message
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, endpoint_url, endpoint_type, chain_id, status, response_time_ms, last_checked, next_check, failure_count, success_count, response_data, error_message
+`
+
+type InsertHealthParams struct {
+ EndpointUrl string `json:"endpoint_url"`
+ EndpointType string `json:"endpoint_type"`
+ ChainID sql.NullString `json:"chain_id"`
+ Status string `json:"status"`
+ ResponseTimeMs sql.NullInt64 `json:"response_time_ms"`
+ LastChecked time.Time `json:"last_checked"`
+ NextCheck sql.NullTime `json:"next_check"`
+ FailureCount int64 `json:"failure_count"`
+ SuccessCount int64 `json:"success_count"`
+ ResponseData sql.NullString `json:"response_data"`
+ ErrorMessage sql.NullString `json:"error_message"`
+}
+
+// HEALTH QUERIES
+func (q *Queries) InsertHealth(ctx context.Context, arg InsertHealthParams) (Health, error) {
+ row := q.db.QueryRowContext(ctx, insertHealth,
+ arg.EndpointUrl,
+ arg.EndpointType,
+ arg.ChainID,
+ arg.Status,
+ arg.ResponseTimeMs,
+ arg.LastChecked,
+ arg.NextCheck,
+ arg.FailureCount,
+ arg.SuccessCount,
+ arg.ResponseData,
+ arg.ErrorMessage,
+ )
+ var i Health
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.EndpointUrl,
+ &i.EndpointType,
+ &i.ChainID,
+ &i.Status,
+ &i.ResponseTimeMs,
+ &i.LastChecked,
+ &i.NextCheck,
+ &i.FailureCount,
+ &i.SuccessCount,
+ &i.ResponseData,
+ &i.ErrorMessage,
+ )
+ return i, err
+}
+
+const insertPrice = `-- name: InsertPrice :one
+INSERT INTO prices (
+ asset_id,
+ price_usd,
+ price_btc,
+ volume_24h_usd,
+ market_cap_usd,
+ available_supply,
+ total_supply,
+ max_supply,
+ percent_change_1h,
+ percent_change_24h,
+ percent_change_7d,
+ rank,
+ last_updated
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, asset_id, price_usd, price_btc, volume_24h_usd, market_cap_usd, available_supply, total_supply, max_supply, percent_change_1h, percent_change_24h, percent_change_7d, rank, last_updated
+`
+
+type InsertPriceParams struct {
+ AssetID string `json:"asset_id"`
+ PriceUsd sql.NullFloat64 `json:"price_usd"`
+ PriceBtc sql.NullFloat64 `json:"price_btc"`
+ Volume24hUsd sql.NullFloat64 `json:"volume_24h_usd"`
+ MarketCapUsd sql.NullFloat64 `json:"market_cap_usd"`
+ AvailableSupply sql.NullFloat64 `json:"available_supply"`
+ TotalSupply sql.NullFloat64 `json:"total_supply"`
+ MaxSupply sql.NullFloat64 `json:"max_supply"`
+ PercentChange1h sql.NullFloat64 `json:"percent_change_1h"`
+ PercentChange24h sql.NullFloat64 `json:"percent_change_24h"`
+ PercentChange7d sql.NullFloat64 `json:"percent_change_7d"`
+ Rank sql.NullInt64 `json:"rank"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+// PRICE QUERIES (UPDATED)
+func (q *Queries) InsertPrice(ctx context.Context, arg InsertPriceParams) (Price, error) {
+ row := q.db.QueryRowContext(ctx, insertPrice,
+ arg.AssetID,
+ arg.PriceUsd,
+ arg.PriceBtc,
+ arg.Volume24hUsd,
+ arg.MarketCapUsd,
+ arg.AvailableSupply,
+ arg.TotalSupply,
+ arg.MaxSupply,
+ arg.PercentChange1h,
+ arg.PercentChange24h,
+ arg.PercentChange7d,
+ arg.Rank,
+ arg.LastUpdated,
+ )
+ var i Price
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AssetID,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ &i.Volume24hUsd,
+ &i.MarketCapUsd,
+ &i.AvailableSupply,
+ &i.TotalSupply,
+ &i.MaxSupply,
+ &i.PercentChange1h,
+ &i.PercentChange24h,
+ &i.PercentChange7d,
+ &i.Rank,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const insertPriceConversion = `-- name: InsertPriceConversion :one
+INSERT INTO price_conversions (
+ price_id,
+ currency_code,
+ price,
+ volume_24h,
+ market_cap,
+ last_updated
+) VALUES (?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, price_id, currency_code, price, volume_24h, market_cap, last_updated
+`
+
+type InsertPriceConversionParams struct {
+ PriceID string `json:"price_id"`
+ CurrencyCode string `json:"currency_code"`
+ Price sql.NullFloat64 `json:"price"`
+ Volume24h sql.NullFloat64 `json:"volume_24h"`
+ MarketCap sql.NullFloat64 `json:"market_cap"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+// PRICE CONVERSION QUERIES (NEW)
+func (q *Queries) InsertPriceConversion(ctx context.Context, arg InsertPriceConversionParams) (PriceConversion, error) {
+ row := q.db.QueryRowContext(ctx, insertPriceConversion,
+ arg.PriceID,
+ arg.CurrencyCode,
+ arg.Price,
+ arg.Volume24h,
+ arg.MarketCap,
+ arg.LastUpdated,
+ )
+ var i PriceConversion
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.PriceID,
+ &i.CurrencyCode,
+ &i.Price,
+ &i.Volume24h,
+ &i.MarketCap,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const insertProfile = `-- name: InsertProfile :one
+INSERT INTO profiles (
+ address,
+ handle,
+ origin,
+ name
+) VALUES (?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, address, handle, origin, name
+`
+
+type InsertProfileParams struct {
+ Address string `json:"address"`
+ Handle string `json:"handle"`
+ Origin string `json:"origin"`
+ Name string `json:"name"`
+}
+
+// PROFILE QUERIES
+func (q *Queries) InsertProfile(ctx context.Context, arg InsertProfileParams) (Profile, error) {
+ row := q.db.QueryRowContext(ctx, insertProfile,
+ arg.Address,
+ arg.Handle,
+ arg.Origin,
+ arg.Name,
+ )
+ var i Profile
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Address,
+ &i.Handle,
+ &i.Origin,
+ &i.Name,
+ )
+ return i, err
+}
+
+const insertService = `-- name: InsertService :one
+INSERT INTO services (
+ name,
+ description,
+ chain_id,
+ address,
+ owner_address,
+ metadata,
+ status,
+ block_height
+) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, name, description, chain_id, address, owner_address, metadata, status, block_height
+`
+
+type InsertServiceParams struct {
+ Name string `json:"name"`
+ Description sql.NullString `json:"description"`
+ ChainID string `json:"chain_id"`
+ Address string `json:"address"`
+ OwnerAddress string `json:"owner_address"`
+ Metadata sql.NullString `json:"metadata"`
+ Status string `json:"status"`
+ BlockHeight int64 `json:"block_height"`
+}
+
+// SERVICE QUERIES
+func (q *Queries) InsertService(ctx context.Context, arg InsertServiceParams) (Service, error) {
+ row := q.db.QueryRowContext(ctx, insertService,
+ arg.Name,
+ arg.Description,
+ arg.ChainID,
+ arg.Address,
+ arg.OwnerAddress,
+ arg.Metadata,
+ arg.Status,
+ arg.BlockHeight,
+ )
+ var i Service
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Description,
+ &i.ChainID,
+ &i.Address,
+ &i.OwnerAddress,
+ &i.Metadata,
+ &i.Status,
+ &i.BlockHeight,
+ )
+ return i, err
+}
+
+const insertVault = `-- name: InsertVault :one
+INSERT INTO vaults (
+ handle,
+ origin,
+ address,
+ cid,
+ config,
+ session_id,
+ redirect_uri
+) VALUES (?, ?, ?, ?, ?, ?, ?)
+RETURNING id, created_at, updated_at, deleted_at, handle, origin, address, cid, config, session_id, redirect_uri
+`
+
+type InsertVaultParams struct {
+ Handle string `json:"handle"`
+ Origin string `json:"origin"`
+ Address string `json:"address"`
+ Cid string `json:"cid"`
+ Config string `json:"config"`
+ SessionID string `json:"session_id"`
+ RedirectUri string `json:"redirect_uri"`
+}
+
+// VAULT QUERIES
+func (q *Queries) InsertVault(ctx context.Context, arg InsertVaultParams) (Vault, error) {
+ row := q.db.QueryRowContext(ctx, insertVault,
+ arg.Handle,
+ arg.Origin,
+ arg.Address,
+ arg.Cid,
+ arg.Config,
+ arg.SessionID,
+ arg.RedirectUri,
+ )
+ var i Vault
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.Origin,
+ &i.Address,
+ &i.Cid,
+ &i.Config,
+ &i.SessionID,
+ &i.RedirectUri,
+ )
+ return i, err
+}
+
+const listActivitiesByAccount = `-- name: ListActivitiesByAccount :many
+SELECT id, created_at, updated_at, deleted_at, account_id, tx_hash, tx_type, status, amount, fee, gas_used, gas_wanted, memo, block_height, timestamp, raw_log, error FROM activities
+WHERE account_id = ? AND deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?
+`
+
+type ListActivitiesByAccountParams struct {
+ AccountID string `json:"account_id"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListActivitiesByAccount(ctx context.Context, arg ListActivitiesByAccountParams) ([]Activity, error) {
+ rows, err := q.db.QueryContext(ctx, listActivitiesByAccount, arg.AccountID, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Activity
+ for rows.Next() {
+ var i Activity
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AccountID,
+ &i.TxHash,
+ &i.TxType,
+ &i.Status,
+ &i.Amount,
+ &i.Fee,
+ &i.GasUsed,
+ &i.GasWanted,
+ &i.Memo,
+ &i.BlockHeight,
+ &i.Timestamp,
+ &i.RawLog,
+ &i.Error,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listActivitiesByStatus = `-- name: ListActivitiesByStatus :many
+SELECT id, created_at, updated_at, deleted_at, account_id, tx_hash, tx_type, status, amount, fee, gas_used, gas_wanted, memo, block_height, timestamp, raw_log, error FROM activities
+WHERE status = ? AND deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?
+`
+
+type ListActivitiesByStatusParams struct {
+ Status string `json:"status"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListActivitiesByStatus(ctx context.Context, arg ListActivitiesByStatusParams) ([]Activity, error) {
+ rows, err := q.db.QueryContext(ctx, listActivitiesByStatus, arg.Status, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Activity
+ for rows.Next() {
+ var i Activity
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AccountID,
+ &i.TxHash,
+ &i.TxType,
+ &i.Status,
+ &i.Amount,
+ &i.Fee,
+ &i.GasUsed,
+ &i.GasWanted,
+ &i.Memo,
+ &i.BlockHeight,
+ &i.Timestamp,
+ &i.RawLog,
+ &i.Error,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listActivitiesByType = `-- name: ListActivitiesByType :many
+SELECT id, created_at, updated_at, deleted_at, account_id, tx_hash, tx_type, status, amount, fee, gas_used, gas_wanted, memo, block_height, timestamp, raw_log, error FROM activities
+WHERE tx_type = ? AND deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?
+`
+
+type ListActivitiesByTypeParams struct {
+ TxType string `json:"tx_type"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListActivitiesByType(ctx context.Context, arg ListActivitiesByTypeParams) ([]Activity, error) {
+ rows, err := q.db.QueryContext(ctx, listActivitiesByType, arg.TxType, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Activity
+ for rows.Next() {
+ var i Activity
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AccountID,
+ &i.TxHash,
+ &i.TxType,
+ &i.Status,
+ &i.Amount,
+ &i.Fee,
+ &i.GasUsed,
+ &i.GasWanted,
+ &i.Memo,
+ &i.BlockHeight,
+ &i.Timestamp,
+ &i.RawLog,
+ &i.Error,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listAllBlockchains = `-- name: ListAllBlockchains :many
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE deleted_at IS NULL
+ORDER BY chain_name ASC
+`
+
+func (q *Queries) ListAllBlockchains(ctx context.Context) ([]Blockchain, error) {
+ rows, err := q.db.QueryContext(ctx, listAllBlockchains)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Blockchain
+ for rows.Next() {
+ var i Blockchain
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listAssetsByChain = `-- name: ListAssetsByChain :many
+SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY symbol ASC
+`
+
+func (q *Queries) ListAssetsByChain(ctx context.Context, chainID string) ([]Asset, error) {
+ rows, err := q.db.QueryContext(ctx, listAssetsByChain, chainID)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Asset
+ for rows.Next() {
+ var i Asset
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listAssetsWithLatestPrices = `-- name: ListAssetsWithLatestPrices :many
+SELECT a.id, a.created_at, a.updated_at, a.deleted_at, a.name, a.symbol, a.decimals, a.chain_id, a.channel, a.asset_type, a.coingecko_id, p.price_usd, p.price_btc, p.volume_24h_usd, p.market_cap_usd,
+ p.available_supply, p.total_supply, p.max_supply,
+ p.percent_change_1h, p.percent_change_24h, p.percent_change_7d,
+ p.rank, p.last_updated
+FROM assets a
+LEFT JOIN (
+ SELECT p1.id, p1.created_at, p1.updated_at, p1.deleted_at, p1.asset_id, p1.price_usd, p1.price_btc, p1.volume_24h_usd, p1.market_cap_usd, p1.available_supply, p1.total_supply, p1.max_supply, p1.percent_change_1h, p1.percent_change_24h, p1.percent_change_7d, p1.rank, p1.last_updated
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE a.deleted_at IS NULL
+ORDER BY p.rank ASC, a.symbol ASC
+LIMIT ? OFFSET ?
+`
+
+type ListAssetsWithLatestPricesParams struct {
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+type ListAssetsWithLatestPricesRow struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ Name string `json:"name"`
+ Symbol string `json:"symbol"`
+ Decimals int64 `json:"decimals"`
+ ChainID string `json:"chain_id"`
+ Channel string `json:"channel"`
+ AssetType string `json:"asset_type"`
+ CoingeckoID sql.NullString `json:"coingecko_id"`
+ PriceUsd sql.NullFloat64 `json:"price_usd"`
+ PriceBtc sql.NullFloat64 `json:"price_btc"`
+ Volume24hUsd sql.NullFloat64 `json:"volume_24h_usd"`
+ MarketCapUsd sql.NullFloat64 `json:"market_cap_usd"`
+ AvailableSupply sql.NullFloat64 `json:"available_supply"`
+ TotalSupply sql.NullFloat64 `json:"total_supply"`
+ MaxSupply sql.NullFloat64 `json:"max_supply"`
+ PercentChange1h sql.NullFloat64 `json:"percent_change_1h"`
+ PercentChange24h sql.NullFloat64 `json:"percent_change_24h"`
+ PercentChange7d sql.NullFloat64 `json:"percent_change_7d"`
+ Rank sql.NullInt64 `json:"rank"`
+ LastUpdated time.Time `json:"last_updated"`
+}
+
+func (q *Queries) ListAssetsWithLatestPrices(ctx context.Context, arg ListAssetsWithLatestPricesParams) ([]ListAssetsWithLatestPricesRow, error) {
+ rows, err := q.db.QueryContext(ctx, listAssetsWithLatestPrices, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []ListAssetsWithLatestPricesRow
+ for rows.Next() {
+ var i ListAssetsWithLatestPricesRow
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ &i.Volume24hUsd,
+ &i.MarketCapUsd,
+ &i.AvailableSupply,
+ &i.TotalSupply,
+ &i.MaxSupply,
+ &i.PercentChange1h,
+ &i.PercentChange24h,
+ &i.PercentChange7d,
+ &i.Rank,
+ &i.LastUpdated,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listBlockchainsByChainType = `-- name: ListBlockchainsByChainType :many
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE chain_type LIKE '%' || ? || '%' AND deleted_at IS NULL
+ORDER BY chain_name ASC
+`
+
+func (q *Queries) ListBlockchainsByChainType(ctx context.Context, dollar_1 sql.NullString) ([]Blockchain, error) {
+ rows, err := q.db.QueryContext(ctx, listBlockchainsByChainType, dollar_1)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Blockchain
+ for rows.Next() {
+ var i Blockchain
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listBlockchainsWithAssetInfo = `-- name: ListBlockchainsWithAssetInfo :many
+SELECT b.id, b.created_at, b.updated_at, b.deleted_at, b.chain_name, b.chain_id_cosmos, b.chain_id_evm, b.api_name, b.bech_account_prefix, b.bech_validator_prefix, b.main_asset_symbol, b.main_asset_denom, b.staking_asset_symbol, b.staking_asset_denom, b.is_stake_enabled, b.chain_image, b.main_asset_image, b.staking_asset_image, b.chain_type, b.is_support_mobile_wallet, b.is_support_extension_wallet, b.is_support_erc20, b.description_en, b.description_ko, b.description_ja, b.origin_genesis_time, b.account_type, b.btc_staking, b.cosmos_fee_info, b.evm_fee_info, b.lcd_endpoint, b.grpc_endpoint, b.evm_rpc_endpoint, b.explorer, b.about, b.forum, a.id as asset_id, a.symbol, a.decimals, p.price_usd, p.price_btc
+FROM blockchains b
+LEFT JOIN assets a ON b.main_asset_symbol = a.symbol
+LEFT JOIN (
+ SELECT p1.id, p1.created_at, p1.updated_at, p1.deleted_at, p1.asset_id, p1.price_usd, p1.price_btc, p1.volume_24h_usd, p1.market_cap_usd, p1.available_supply, p1.total_supply, p1.max_supply, p1.percent_change_1h, p1.percent_change_24h, p1.percent_change_7d, p1.rank, p1.last_updated
+ FROM prices p1
+ INNER JOIN (
+ SELECT asset_id, MAX(last_updated) as max_date
+ FROM prices
+ WHERE deleted_at IS NULL
+ GROUP BY asset_id
+ ) p2 ON p1.asset_id = p2.asset_id AND p1.last_updated = p2.max_date
+ WHERE p1.deleted_at IS NULL
+) p ON a.id = p.asset_id
+WHERE b.deleted_at IS NULL
+ORDER BY b.chain_name ASC
+LIMIT ? OFFSET ?
+`
+
+type ListBlockchainsWithAssetInfoParams struct {
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+type ListBlockchainsWithAssetInfoRow struct {
+ ID string `json:"id"`
+ CreatedAt time.Time `json:"created_at"`
+ UpdatedAt time.Time `json:"updated_at"`
+ DeletedAt sql.NullTime `json:"deleted_at"`
+ ChainName string `json:"chain_name"`
+ ChainIDCosmos sql.NullString `json:"chain_id_cosmos"`
+ ChainIDEvm sql.NullString `json:"chain_id_evm"`
+ ApiName sql.NullString `json:"api_name"`
+ BechAccountPrefix sql.NullString `json:"bech_account_prefix"`
+ BechValidatorPrefix sql.NullString `json:"bech_validator_prefix"`
+ MainAssetSymbol sql.NullString `json:"main_asset_symbol"`
+ MainAssetDenom sql.NullString `json:"main_asset_denom"`
+ StakingAssetSymbol sql.NullString `json:"staking_asset_symbol"`
+ StakingAssetDenom sql.NullString `json:"staking_asset_denom"`
+ IsStakeEnabled bool `json:"is_stake_enabled"`
+ ChainImage sql.NullString `json:"chain_image"`
+ MainAssetImage sql.NullString `json:"main_asset_image"`
+ StakingAssetImage sql.NullString `json:"staking_asset_image"`
+ ChainType string `json:"chain_type"`
+ IsSupportMobileWallet bool `json:"is_support_mobile_wallet"`
+ IsSupportExtensionWallet bool `json:"is_support_extension_wallet"`
+ IsSupportErc20 bool `json:"is_support_erc20"`
+ DescriptionEn sql.NullString `json:"description_en"`
+ DescriptionKo sql.NullString `json:"description_ko"`
+ DescriptionJa sql.NullString `json:"description_ja"`
+ OriginGenesisTime sql.NullTime `json:"origin_genesis_time"`
+ AccountType string `json:"account_type"`
+ BtcStaking sql.NullString `json:"btc_staking"`
+ CosmosFeeInfo sql.NullString `json:"cosmos_fee_info"`
+ EvmFeeInfo sql.NullString `json:"evm_fee_info"`
+ LcdEndpoint sql.NullString `json:"lcd_endpoint"`
+ GrpcEndpoint sql.NullString `json:"grpc_endpoint"`
+ EvmRpcEndpoint sql.NullString `json:"evm_rpc_endpoint"`
+ Explorer sql.NullString `json:"explorer"`
+ About sql.NullString `json:"about"`
+ Forum sql.NullString `json:"forum"`
+ AssetID sql.NullString `json:"asset_id"`
+ Symbol sql.NullString `json:"symbol"`
+ Decimals sql.NullInt64 `json:"decimals"`
+ PriceUsd sql.NullFloat64 `json:"price_usd"`
+ PriceBtc sql.NullFloat64 `json:"price_btc"`
+}
+
+func (q *Queries) ListBlockchainsWithAssetInfo(ctx context.Context, arg ListBlockchainsWithAssetInfoParams) ([]ListBlockchainsWithAssetInfoRow, error) {
+ rows, err := q.db.QueryContext(ctx, listBlockchainsWithAssetInfo, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []ListBlockchainsWithAssetInfoRow
+ for rows.Next() {
+ var i ListBlockchainsWithAssetInfoRow
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ &i.AssetID,
+ &i.Symbol,
+ &i.Decimals,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listBlockchainsWithERC20Support = `-- name: ListBlockchainsWithERC20Support :many
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE is_support_erc20 = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC
+`
+
+func (q *Queries) ListBlockchainsWithERC20Support(ctx context.Context) ([]Blockchain, error) {
+ rows, err := q.db.QueryContext(ctx, listBlockchainsWithERC20Support)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Blockchain
+ for rows.Next() {
+ var i Blockchain
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listBlockchainsWithExtensionSupport = `-- name: ListBlockchainsWithExtensionSupport :many
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE is_support_extension_wallet = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC
+`
+
+func (q *Queries) ListBlockchainsWithExtensionSupport(ctx context.Context) ([]Blockchain, error) {
+ rows, err := q.db.QueryContext(ctx, listBlockchainsWithExtensionSupport)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Blockchain
+ for rows.Next() {
+ var i Blockchain
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listBlockchainsWithMobileSupport = `-- name: ListBlockchainsWithMobileSupport :many
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE is_support_mobile_wallet = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC
+`
+
+func (q *Queries) ListBlockchainsWithMobileSupport(ctx context.Context) ([]Blockchain, error) {
+ rows, err := q.db.QueryContext(ctx, listBlockchainsWithMobileSupport)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Blockchain
+ for rows.Next() {
+ var i Blockchain
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listBlockchainsWithStaking = `-- name: ListBlockchainsWithStaking :many
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE is_stake_enabled = 1 AND deleted_at IS NULL
+ORDER BY chain_name ASC
+`
+
+func (q *Queries) ListBlockchainsWithStaking(ctx context.Context) ([]Blockchain, error) {
+ rows, err := q.db.QueryContext(ctx, listBlockchainsWithStaking)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Blockchain
+ for rows.Next() {
+ var i Blockchain
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listCryptoListings = `-- name: ListCryptoListings :many
+SELECT id, created_at, updated_at, deleted_at, api_id, name, symbol, website_slug FROM crypto_listings
+WHERE deleted_at IS NULL
+ORDER BY name ASC
+LIMIT ? OFFSET ?
+`
+
+type ListCryptoListingsParams struct {
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListCryptoListings(ctx context.Context, arg ListCryptoListingsParams) ([]CryptoListing, error) {
+ rows, err := q.db.QueryContext(ctx, listCryptoListings, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []CryptoListing
+ for rows.Next() {
+ var i CryptoListing
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ApiID,
+ &i.Name,
+ &i.Symbol,
+ &i.WebsiteSlug,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listDelegatorAccounts = `-- name: ListDelegatorAccounts :many
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE is_delegator = 1
+AND deleted_at IS NULL
+ORDER BY created_at DESC
+`
+
+func (q *Queries) ListDelegatorAccounts(ctx context.Context) ([]Account, error) {
+ rows, err := q.db.QueryContext(ctx, listDelegatorAccounts)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Account
+ for rows.Next() {
+ var i Account
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listFearGreedIndexHistory = `-- name: ListFearGreedIndexHistory :many
+SELECT id, created_at, updated_at, deleted_at, value, value_classification, timestamp, time_until_update FROM fear_greed_index
+WHERE deleted_at IS NULL
+ORDER BY timestamp DESC
+LIMIT ? OFFSET ?
+`
+
+type ListFearGreedIndexHistoryParams struct {
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListFearGreedIndexHistory(ctx context.Context, arg ListFearGreedIndexHistoryParams) ([]FearGreedIndex, error) {
+ rows, err := q.db.QueryContext(ctx, listFearGreedIndexHistory, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []FearGreedIndex
+ for rows.Next() {
+ var i FearGreedIndex
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Value,
+ &i.ValueClassification,
+ &i.Timestamp,
+ &i.TimeUntilUpdate,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listGlobalMarketHistory = `-- name: ListGlobalMarketHistory :many
+SELECT id, created_at, updated_at, deleted_at, total_market_cap_usd, total_24h_volume_usd, bitcoin_percentage_of_market_cap, active_currencies, active_assets, active_markets, last_updated FROM global_market
+WHERE deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT ? OFFSET ?
+`
+
+type ListGlobalMarketHistoryParams struct {
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListGlobalMarketHistory(ctx context.Context, arg ListGlobalMarketHistoryParams) ([]GlobalMarket, error) {
+ rows, err := q.db.QueryContext(ctx, listGlobalMarketHistory, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []GlobalMarket
+ for rows.Next() {
+ var i GlobalMarket
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.TotalMarketCapUsd,
+ &i.Total24hVolumeUsd,
+ &i.BitcoinPercentageOfMarketCap,
+ &i.ActiveCurrencies,
+ &i.ActiveAssets,
+ &i.ActiveMarkets,
+ &i.LastUpdated,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listHealthByChain = `-- name: ListHealthByChain :many
+SELECT id, created_at, updated_at, deleted_at, endpoint_url, endpoint_type, chain_id, status, response_time_ms, last_checked, next_check, failure_count, success_count, response_data, error_message FROM health
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY last_checked DESC
+LIMIT ? OFFSET ?
+`
+
+type ListHealthByChainParams struct {
+ ChainID sql.NullString `json:"chain_id"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListHealthByChain(ctx context.Context, arg ListHealthByChainParams) ([]Health, error) {
+ rows, err := q.db.QueryContext(ctx, listHealthByChain, arg.ChainID, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Health
+ for rows.Next() {
+ var i Health
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.EndpointUrl,
+ &i.EndpointType,
+ &i.ChainID,
+ &i.Status,
+ &i.ResponseTimeMs,
+ &i.LastChecked,
+ &i.NextCheck,
+ &i.FailureCount,
+ &i.SuccessCount,
+ &i.ResponseData,
+ &i.ErrorMessage,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listHealthByStatus = `-- name: ListHealthByStatus :many
+SELECT id, created_at, updated_at, deleted_at, endpoint_url, endpoint_type, chain_id, status, response_time_ms, last_checked, next_check, failure_count, success_count, response_data, error_message FROM health
+WHERE status = ? AND deleted_at IS NULL
+ORDER BY last_checked DESC
+LIMIT ? OFFSET ?
+`
+
+type ListHealthByStatusParams struct {
+ Status string `json:"status"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListHealthByStatus(ctx context.Context, arg ListHealthByStatusParams) ([]Health, error) {
+ rows, err := q.db.QueryContext(ctx, listHealthByStatus, arg.Status, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Health
+ for rows.Next() {
+ var i Health
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.EndpointUrl,
+ &i.EndpointType,
+ &i.ChainID,
+ &i.Status,
+ &i.ResponseTimeMs,
+ &i.LastChecked,
+ &i.NextCheck,
+ &i.FailureCount,
+ &i.SuccessCount,
+ &i.ResponseData,
+ &i.ErrorMessage,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listHealthChecksNeedingUpdate = `-- name: ListHealthChecksNeedingUpdate :many
+SELECT id, created_at, updated_at, deleted_at, endpoint_url, endpoint_type, chain_id, status, response_time_ms, last_checked, next_check, failure_count, success_count, response_data, error_message FROM health
+WHERE next_check <= CURRENT_TIMESTAMP AND deleted_at IS NULL
+ORDER BY next_check ASC
+LIMIT ?
+`
+
+func (q *Queries) ListHealthChecksNeedingUpdate(ctx context.Context, limit int64) ([]Health, error) {
+ rows, err := q.db.QueryContext(ctx, listHealthChecksNeedingUpdate, limit)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Health
+ for rows.Next() {
+ var i Health
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.EndpointUrl,
+ &i.EndpointType,
+ &i.ChainID,
+ &i.Status,
+ &i.ResponseTimeMs,
+ &i.LastChecked,
+ &i.NextCheck,
+ &i.FailureCount,
+ &i.SuccessCount,
+ &i.ResponseData,
+ &i.ErrorMessage,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listPriceHistoryByAssetID = `-- name: ListPriceHistoryByAssetID :many
+SELECT id, created_at, updated_at, deleted_at, asset_id, price_usd, price_btc, volume_24h_usd, market_cap_usd, available_supply, total_supply, max_supply, percent_change_1h, percent_change_24h, percent_change_7d, rank, last_updated FROM prices
+WHERE asset_id = ? AND deleted_at IS NULL
+ORDER BY last_updated DESC
+LIMIT ? OFFSET ?
+`
+
+type ListPriceHistoryByAssetIDParams struct {
+ AssetID string `json:"asset_id"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListPriceHistoryByAssetID(ctx context.Context, arg ListPriceHistoryByAssetIDParams) ([]Price, error) {
+ rows, err := q.db.QueryContext(ctx, listPriceHistoryByAssetID, arg.AssetID, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Price
+ for rows.Next() {
+ var i Price
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AssetID,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ &i.Volume24hUsd,
+ &i.MarketCapUsd,
+ &i.AvailableSupply,
+ &i.TotalSupply,
+ &i.MaxSupply,
+ &i.PercentChange1h,
+ &i.PercentChange24h,
+ &i.PercentChange7d,
+ &i.Rank,
+ &i.LastUpdated,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listProfiles = `-- name: ListProfiles :many
+SELECT id, created_at, updated_at, deleted_at, address, handle, origin, name FROM profiles
+WHERE deleted_at IS NULL
+ORDER BY created_at DESC
+LIMIT ? OFFSET ?
+`
+
+type ListProfilesParams struct {
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListProfiles(ctx context.Context, arg ListProfilesParams) ([]Profile, error) {
+ rows, err := q.db.QueryContext(ctx, listProfiles, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Profile
+ for rows.Next() {
+ var i Profile
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Address,
+ &i.Handle,
+ &i.Origin,
+ &i.Name,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listServicesByChain = `-- name: ListServicesByChain :many
+SELECT id, created_at, updated_at, deleted_at, name, description, chain_id, address, owner_address, metadata, status, block_height FROM services
+WHERE chain_id = ? AND deleted_at IS NULL
+ORDER BY name ASC
+LIMIT ? OFFSET ?
+`
+
+type ListServicesByChainParams struct {
+ ChainID string `json:"chain_id"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListServicesByChain(ctx context.Context, arg ListServicesByChainParams) ([]Service, error) {
+ rows, err := q.db.QueryContext(ctx, listServicesByChain, arg.ChainID, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Service
+ for rows.Next() {
+ var i Service
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Description,
+ &i.ChainID,
+ &i.Address,
+ &i.OwnerAddress,
+ &i.Metadata,
+ &i.Status,
+ &i.BlockHeight,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listServicesByOwner = `-- name: ListServicesByOwner :many
+SELECT id, created_at, updated_at, deleted_at, name, description, chain_id, address, owner_address, metadata, status, block_height FROM services
+WHERE owner_address = ? AND deleted_at IS NULL
+ORDER BY created_at DESC
+LIMIT ? OFFSET ?
+`
+
+type ListServicesByOwnerParams struct {
+ OwnerAddress string `json:"owner_address"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) ListServicesByOwner(ctx context.Context, arg ListServicesByOwnerParams) ([]Service, error) {
+ rows, err := q.db.QueryContext(ctx, listServicesByOwner, arg.OwnerAddress, arg.Limit, arg.Offset)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Service
+ for rows.Next() {
+ var i Service
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Description,
+ &i.ChainID,
+ &i.Address,
+ &i.OwnerAddress,
+ &i.Metadata,
+ &i.Status,
+ &i.BlockHeight,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const listValidatorAccounts = `-- name: ListValidatorAccounts :many
+SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
+WHERE is_validator = 1
+AND deleted_at IS NULL
+ORDER BY created_at DESC
+`
+
+func (q *Queries) ListValidatorAccounts(ctx context.Context) ([]Account, error) {
+ rows, err := q.db.QueryContext(ctx, listValidatorAccounts)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Account
+ for rows.Next() {
+ var i Account
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const searchBlockchains = `-- name: SearchBlockchains :many
+SELECT id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum FROM blockchains
+WHERE (
+ chain_name LIKE '%' || ? || '%' OR
+ main_asset_symbol LIKE '%' || ? || '%' OR
+ staking_asset_symbol LIKE '%' || ? || '%' OR
+ description_en LIKE '%' || ? || '%'
+) AND deleted_at IS NULL
+ORDER BY chain_name ASC
+LIMIT ? OFFSET ?
+`
+
+type SearchBlockchainsParams struct {
+ Column1 sql.NullString `json:"column_1"`
+ Column2 sql.NullString `json:"column_2"`
+ Column3 sql.NullString `json:"column_3"`
+ Column4 sql.NullString `json:"column_4"`
+ Limit int64 `json:"limit"`
+ Offset int64 `json:"offset"`
+}
+
+func (q *Queries) SearchBlockchains(ctx context.Context, arg SearchBlockchainsParams) ([]Blockchain, error) {
+ rows, err := q.db.QueryContext(ctx, searchBlockchains,
+ arg.Column1,
+ arg.Column2,
+ arg.Column3,
+ arg.Column4,
+ arg.Limit,
+ arg.Offset,
+ )
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []Blockchain
+ for rows.Next() {
+ var i Blockchain
+ if err := rows.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Close(); err != nil {
+ return nil, err
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
+const softDeleteAccount = `-- name: SoftDeleteAccount :exec
+UPDATE accounts
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteAccount(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteAccount, id)
+ return err
+}
+
+const softDeleteActivity = `-- name: SoftDeleteActivity :exec
+UPDATE activities
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteActivity(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteActivity, id)
+ return err
+}
+
+const softDeleteAsset = `-- name: SoftDeleteAsset :exec
+UPDATE assets
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteAsset(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteAsset, id)
+ return err
+}
+
+const softDeleteBlockchain = `-- name: SoftDeleteBlockchain :exec
+UPDATE blockchains
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteBlockchain(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteBlockchain, id)
+ return err
+}
+
+const softDeleteCredential = `-- name: SoftDeleteCredential :exec
+UPDATE credentials
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE credential_id = ?
+`
+
+func (q *Queries) SoftDeleteCredential(ctx context.Context, credentialID string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteCredential, credentialID)
+ return err
+}
+
+const softDeleteCryptoListing = `-- name: SoftDeleteCryptoListing :exec
+UPDATE crypto_listings
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteCryptoListing(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteCryptoListing, id)
+ return err
+}
+
+const softDeleteFearGreedIndex = `-- name: SoftDeleteFearGreedIndex :exec
+UPDATE fear_greed_index
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteFearGreedIndex(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteFearGreedIndex, id)
+ return err
+}
+
+const softDeleteGlobalMarket = `-- name: SoftDeleteGlobalMarket :exec
+UPDATE global_market
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteGlobalMarket(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteGlobalMarket, id)
+ return err
+}
+
+const softDeleteHealth = `-- name: SoftDeleteHealth :exec
+UPDATE health
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteHealth(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteHealth, id)
+ return err
+}
+
+const softDeletePriceConversion = `-- name: SoftDeletePriceConversion :exec
+UPDATE price_conversions
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeletePriceConversion(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeletePriceConversion, id)
+ return err
+}
+
+const softDeleteProfile = `-- name: SoftDeleteProfile :exec
+UPDATE profiles
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE address = ?
+`
+
+func (q *Queries) SoftDeleteProfile(ctx context.Context, address string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteProfile, address)
+ return err
+}
+
+const softDeleteService = `-- name: SoftDeleteService :exec
+UPDATE services
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteService(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteService, id)
+ return err
+}
+
+const softDeleteVault = `-- name: SoftDeleteVault :exec
+UPDATE vaults
+SET deleted_at = CURRENT_TIMESTAMP
+WHERE id = ?
+`
+
+func (q *Queries) SoftDeleteVault(ctx context.Context, id string) error {
+ _, err := q.db.ExecContext(ctx, softDeleteVault, id)
+ return err
+}
+
+const updateAccountLabel = `-- name: UpdateAccountLabel :one
+UPDATE accounts
+SET
+ label = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable
+`
+
+type UpdateAccountLabelParams struct {
+ Label string `json:"label"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateAccountLabel(ctx context.Context, arg UpdateAccountLabelParams) (Account, error) {
+ row := q.db.QueryRowContext(ctx, updateAccountLabel, arg.Label, arg.ID)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const updateAccountSequence = `-- name: UpdateAccountSequence :one
+UPDATE accounts
+SET
+ sequence = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE address = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, block_created, controller, label, handle, is_subsidiary, is_validator, is_delegator, is_accountable
+`
+
+type UpdateAccountSequenceParams struct {
+ Sequence int64 `json:"sequence"`
+ Address string `json:"address"`
+}
+
+func (q *Queries) UpdateAccountSequence(ctx context.Context, arg UpdateAccountSequenceParams) (Account, error) {
+ row := q.db.QueryRowContext(ctx, updateAccountSequence, arg.Sequence, arg.Address)
+ var i Account
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Number,
+ &i.Sequence,
+ &i.Address,
+ &i.PublicKey,
+ &i.ChainID,
+ &i.BlockCreated,
+ &i.Controller,
+ &i.Label,
+ &i.Handle,
+ &i.IsSubsidiary,
+ &i.IsValidator,
+ &i.IsDelegator,
+ &i.IsAccountable,
+ )
+ return i, err
+}
+
+const updateActivityStatus = `-- name: UpdateActivityStatus :one
+UPDATE activities
+SET
+ status = ?,
+ tx_hash = ?,
+ block_height = ?,
+ gas_used = ?,
+ raw_log = ?,
+ error = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, account_id, tx_hash, tx_type, status, amount, fee, gas_used, gas_wanted, memo, block_height, timestamp, raw_log, error
+`
+
+type UpdateActivityStatusParams struct {
+ Status string `json:"status"`
+ TxHash sql.NullString `json:"tx_hash"`
+ BlockHeight sql.NullInt64 `json:"block_height"`
+ GasUsed sql.NullInt64 `json:"gas_used"`
+ RawLog sql.NullString `json:"raw_log"`
+ Error sql.NullString `json:"error"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateActivityStatus(ctx context.Context, arg UpdateActivityStatusParams) (Activity, error) {
+ row := q.db.QueryRowContext(ctx, updateActivityStatus,
+ arg.Status,
+ arg.TxHash,
+ arg.BlockHeight,
+ arg.GasUsed,
+ arg.RawLog,
+ arg.Error,
+ arg.ID,
+ )
+ var i Activity
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AccountID,
+ &i.TxHash,
+ &i.TxType,
+ &i.Status,
+ &i.Amount,
+ &i.Fee,
+ &i.GasUsed,
+ &i.GasWanted,
+ &i.Memo,
+ &i.BlockHeight,
+ &i.Timestamp,
+ &i.RawLog,
+ &i.Error,
+ )
+ return i, err
+}
+
+const updateAsset = `-- name: UpdateAsset :one
+UPDATE assets
+SET
+ name = ?,
+ decimals = ?,
+ channel = ?,
+ asset_type = ?,
+ coingecko_id = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id
+`
+
+type UpdateAssetParams struct {
+ Name string `json:"name"`
+ Decimals int64 `json:"decimals"`
+ Channel string `json:"channel"`
+ AssetType string `json:"asset_type"`
+ CoingeckoID sql.NullString `json:"coingecko_id"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateAsset(ctx context.Context, arg UpdateAssetParams) (Asset, error) {
+ row := q.db.QueryRowContext(ctx, updateAsset,
+ arg.Name,
+ arg.Decimals,
+ arg.Channel,
+ arg.AssetType,
+ arg.CoingeckoID,
+ arg.ID,
+ )
+ var i Asset
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Symbol,
+ &i.Decimals,
+ &i.ChainID,
+ &i.Channel,
+ &i.AssetType,
+ &i.CoingeckoID,
+ )
+ return i, err
+}
+
+const updateBlockchain = `-- name: UpdateBlockchain :one
+UPDATE blockchains
+SET
+ chain_name = ?,
+ chain_id_cosmos = ?,
+ chain_id_evm = ?,
+ api_name = ?,
+ bech_account_prefix = ?,
+ bech_validator_prefix = ?,
+ main_asset_symbol = ?,
+ main_asset_denom = ?,
+ staking_asset_symbol = ?,
+ staking_asset_denom = ?,
+ is_stake_enabled = ?,
+ chain_image = ?,
+ main_asset_image = ?,
+ staking_asset_image = ?,
+ chain_type = ?,
+ is_support_mobile_wallet = ?,
+ is_support_extension_wallet = ?,
+ is_support_erc20 = ?,
+ description_en = ?,
+ description_ko = ?,
+ description_ja = ?,
+ origin_genesis_time = ?,
+ account_type = ?,
+ btc_staking = ?,
+ cosmos_fee_info = ?,
+ evm_fee_info = ?,
+ lcd_endpoint = ?,
+ grpc_endpoint = ?,
+ evm_rpc_endpoint = ?,
+ explorer = ?,
+ about = ?,
+ forum = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type UpdateBlockchainParams struct {
+ ChainName string `json:"chain_name"`
+ ChainIDCosmos sql.NullString `json:"chain_id_cosmos"`
+ ChainIDEvm sql.NullString `json:"chain_id_evm"`
+ ApiName sql.NullString `json:"api_name"`
+ BechAccountPrefix sql.NullString `json:"bech_account_prefix"`
+ BechValidatorPrefix sql.NullString `json:"bech_validator_prefix"`
+ MainAssetSymbol sql.NullString `json:"main_asset_symbol"`
+ MainAssetDenom sql.NullString `json:"main_asset_denom"`
+ StakingAssetSymbol sql.NullString `json:"staking_asset_symbol"`
+ StakingAssetDenom sql.NullString `json:"staking_asset_denom"`
+ IsStakeEnabled bool `json:"is_stake_enabled"`
+ ChainImage sql.NullString `json:"chain_image"`
+ MainAssetImage sql.NullString `json:"main_asset_image"`
+ StakingAssetImage sql.NullString `json:"staking_asset_image"`
+ ChainType string `json:"chain_type"`
+ IsSupportMobileWallet bool `json:"is_support_mobile_wallet"`
+ IsSupportExtensionWallet bool `json:"is_support_extension_wallet"`
+ IsSupportErc20 bool `json:"is_support_erc20"`
+ DescriptionEn sql.NullString `json:"description_en"`
+ DescriptionKo sql.NullString `json:"description_ko"`
+ DescriptionJa sql.NullString `json:"description_ja"`
+ OriginGenesisTime sql.NullTime `json:"origin_genesis_time"`
+ AccountType string `json:"account_type"`
+ BtcStaking sql.NullString `json:"btc_staking"`
+ CosmosFeeInfo sql.NullString `json:"cosmos_fee_info"`
+ EvmFeeInfo sql.NullString `json:"evm_fee_info"`
+ LcdEndpoint sql.NullString `json:"lcd_endpoint"`
+ GrpcEndpoint sql.NullString `json:"grpc_endpoint"`
+ EvmRpcEndpoint sql.NullString `json:"evm_rpc_endpoint"`
+ Explorer sql.NullString `json:"explorer"`
+ About sql.NullString `json:"about"`
+ Forum sql.NullString `json:"forum"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateBlockchain(ctx context.Context, arg UpdateBlockchainParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, updateBlockchain,
+ arg.ChainName,
+ arg.ChainIDCosmos,
+ arg.ChainIDEvm,
+ arg.ApiName,
+ arg.BechAccountPrefix,
+ arg.BechValidatorPrefix,
+ arg.MainAssetSymbol,
+ arg.MainAssetDenom,
+ arg.StakingAssetSymbol,
+ arg.StakingAssetDenom,
+ arg.IsStakeEnabled,
+ arg.ChainImage,
+ arg.MainAssetImage,
+ arg.StakingAssetImage,
+ arg.ChainType,
+ arg.IsSupportMobileWallet,
+ arg.IsSupportExtensionWallet,
+ arg.IsSupportErc20,
+ arg.DescriptionEn,
+ arg.DescriptionKo,
+ arg.DescriptionJa,
+ arg.OriginGenesisTime,
+ arg.AccountType,
+ arg.BtcStaking,
+ arg.CosmosFeeInfo,
+ arg.EvmFeeInfo,
+ arg.LcdEndpoint,
+ arg.GrpcEndpoint,
+ arg.EvmRpcEndpoint,
+ arg.Explorer,
+ arg.About,
+ arg.Forum,
+ arg.ID,
+ )
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const updateBlockchainDescriptions = `-- name: UpdateBlockchainDescriptions :one
+UPDATE blockchains
+SET
+ description_en = ?,
+ description_ko = ?,
+ description_ja = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type UpdateBlockchainDescriptionsParams struct {
+ DescriptionEn sql.NullString `json:"description_en"`
+ DescriptionKo sql.NullString `json:"description_ko"`
+ DescriptionJa sql.NullString `json:"description_ja"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateBlockchainDescriptions(ctx context.Context, arg UpdateBlockchainDescriptionsParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, updateBlockchainDescriptions,
+ arg.DescriptionEn,
+ arg.DescriptionKo,
+ arg.DescriptionJa,
+ arg.ID,
+ )
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const updateBlockchainEndpoints = `-- name: UpdateBlockchainEndpoints :one
+UPDATE blockchains
+SET
+ lcd_endpoint = ?,
+ grpc_endpoint = ?,
+ evm_rpc_endpoint = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type UpdateBlockchainEndpointsParams struct {
+ LcdEndpoint sql.NullString `json:"lcd_endpoint"`
+ GrpcEndpoint sql.NullString `json:"grpc_endpoint"`
+ EvmRpcEndpoint sql.NullString `json:"evm_rpc_endpoint"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateBlockchainEndpoints(ctx context.Context, arg UpdateBlockchainEndpointsParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, updateBlockchainEndpoints,
+ arg.LcdEndpoint,
+ arg.GrpcEndpoint,
+ arg.EvmRpcEndpoint,
+ arg.ID,
+ )
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const updateBlockchainExplorer = `-- name: UpdateBlockchainExplorer :one
+UPDATE blockchains
+SET
+ explorer = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type UpdateBlockchainExplorerParams struct {
+ Explorer sql.NullString `json:"explorer"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateBlockchainExplorer(ctx context.Context, arg UpdateBlockchainExplorerParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, updateBlockchainExplorer, arg.Explorer, arg.ID)
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const updateBlockchainFeeInfo = `-- name: UpdateBlockchainFeeInfo :one
+UPDATE blockchains
+SET
+ cosmos_fee_info = ?,
+ evm_fee_info = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type UpdateBlockchainFeeInfoParams struct {
+ CosmosFeeInfo sql.NullString `json:"cosmos_fee_info"`
+ EvmFeeInfo sql.NullString `json:"evm_fee_info"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateBlockchainFeeInfo(ctx context.Context, arg UpdateBlockchainFeeInfoParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, updateBlockchainFeeInfo, arg.CosmosFeeInfo, arg.EvmFeeInfo, arg.ID)
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const updateBlockchainImages = `-- name: UpdateBlockchainImages :one
+UPDATE blockchains
+SET
+ chain_image = ?,
+ main_asset_image = ?,
+ staking_asset_image = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type UpdateBlockchainImagesParams struct {
+ ChainImage sql.NullString `json:"chain_image"`
+ MainAssetImage sql.NullString `json:"main_asset_image"`
+ StakingAssetImage sql.NullString `json:"staking_asset_image"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateBlockchainImages(ctx context.Context, arg UpdateBlockchainImagesParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, updateBlockchainImages,
+ arg.ChainImage,
+ arg.MainAssetImage,
+ arg.StakingAssetImage,
+ arg.ID,
+ )
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const updateBlockchainSocialLinks = `-- name: UpdateBlockchainSocialLinks :one
+UPDATE blockchains
+SET
+ about = ?,
+ forum = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, chain_name, chain_id_cosmos, chain_id_evm, api_name, bech_account_prefix, bech_validator_prefix, main_asset_symbol, main_asset_denom, staking_asset_symbol, staking_asset_denom, is_stake_enabled, chain_image, main_asset_image, staking_asset_image, chain_type, is_support_mobile_wallet, is_support_extension_wallet, is_support_erc20, description_en, description_ko, description_ja, origin_genesis_time, account_type, btc_staking, cosmos_fee_info, evm_fee_info, lcd_endpoint, grpc_endpoint, evm_rpc_endpoint, explorer, about, forum
+`
+
+type UpdateBlockchainSocialLinksParams struct {
+ About sql.NullString `json:"about"`
+ Forum sql.NullString `json:"forum"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateBlockchainSocialLinks(ctx context.Context, arg UpdateBlockchainSocialLinksParams) (Blockchain, error) {
+ row := q.db.QueryRowContext(ctx, updateBlockchainSocialLinks, arg.About, arg.Forum, arg.ID)
+ var i Blockchain
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ChainName,
+ &i.ChainIDCosmos,
+ &i.ChainIDEvm,
+ &i.ApiName,
+ &i.BechAccountPrefix,
+ &i.BechValidatorPrefix,
+ &i.MainAssetSymbol,
+ &i.MainAssetDenom,
+ &i.StakingAssetSymbol,
+ &i.StakingAssetDenom,
+ &i.IsStakeEnabled,
+ &i.ChainImage,
+ &i.MainAssetImage,
+ &i.StakingAssetImage,
+ &i.ChainType,
+ &i.IsSupportMobileWallet,
+ &i.IsSupportExtensionWallet,
+ &i.IsSupportErc20,
+ &i.DescriptionEn,
+ &i.DescriptionKo,
+ &i.DescriptionJa,
+ &i.OriginGenesisTime,
+ &i.AccountType,
+ &i.BtcStaking,
+ &i.CosmosFeeInfo,
+ &i.EvmFeeInfo,
+ &i.LcdEndpoint,
+ &i.GrpcEndpoint,
+ &i.EvmRpcEndpoint,
+ &i.Explorer,
+ &i.About,
+ &i.Forum,
+ )
+ return i, err
+}
+
+const updateCryptoListing = `-- name: UpdateCryptoListing :one
+UPDATE crypto_listings
+SET
+ name = ?,
+ symbol = ?,
+ website_slug = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, api_id, name, symbol, website_slug
+`
+
+type UpdateCryptoListingParams struct {
+ Name string `json:"name"`
+ Symbol string `json:"symbol"`
+ WebsiteSlug string `json:"website_slug"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateCryptoListing(ctx context.Context, arg UpdateCryptoListingParams) (CryptoListing, error) {
+ row := q.db.QueryRowContext(ctx, updateCryptoListing,
+ arg.Name,
+ arg.Symbol,
+ arg.WebsiteSlug,
+ arg.ID,
+ )
+ var i CryptoListing
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.ApiID,
+ &i.Name,
+ &i.Symbol,
+ &i.WebsiteSlug,
+ )
+ return i, err
+}
+
+const updateFearGreedIndex = `-- name: UpdateFearGreedIndex :one
+UPDATE fear_greed_index
+SET
+ value = ?,
+ value_classification = ?,
+ timestamp = ?,
+ time_until_update = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, value, value_classification, timestamp, time_until_update
+`
+
+type UpdateFearGreedIndexParams struct {
+ Value int64 `json:"value"`
+ ValueClassification string `json:"value_classification"`
+ Timestamp time.Time `json:"timestamp"`
+ TimeUntilUpdate sql.NullString `json:"time_until_update"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateFearGreedIndex(ctx context.Context, arg UpdateFearGreedIndexParams) (FearGreedIndex, error) {
+ row := q.db.QueryRowContext(ctx, updateFearGreedIndex,
+ arg.Value,
+ arg.ValueClassification,
+ arg.Timestamp,
+ arg.TimeUntilUpdate,
+ arg.ID,
+ )
+ var i FearGreedIndex
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Value,
+ &i.ValueClassification,
+ &i.Timestamp,
+ &i.TimeUntilUpdate,
+ )
+ return i, err
+}
+
+const updateGlobalMarket = `-- name: UpdateGlobalMarket :one
+UPDATE global_market
+SET
+ total_market_cap_usd = ?,
+ total_24h_volume_usd = ?,
+ bitcoin_percentage_of_market_cap = ?,
+ active_currencies = ?,
+ active_assets = ?,
+ active_markets = ?,
+ last_updated = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, total_market_cap_usd, total_24h_volume_usd, bitcoin_percentage_of_market_cap, active_currencies, active_assets, active_markets, last_updated
+`
+
+type UpdateGlobalMarketParams struct {
+ TotalMarketCapUsd sql.NullFloat64 `json:"total_market_cap_usd"`
+ Total24hVolumeUsd sql.NullFloat64 `json:"total_24h_volume_usd"`
+ BitcoinPercentageOfMarketCap sql.NullFloat64 `json:"bitcoin_percentage_of_market_cap"`
+ ActiveCurrencies sql.NullInt64 `json:"active_currencies"`
+ ActiveAssets sql.NullInt64 `json:"active_assets"`
+ ActiveMarkets sql.NullInt64 `json:"active_markets"`
+ LastUpdated time.Time `json:"last_updated"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateGlobalMarket(ctx context.Context, arg UpdateGlobalMarketParams) (GlobalMarket, error) {
+ row := q.db.QueryRowContext(ctx, updateGlobalMarket,
+ arg.TotalMarketCapUsd,
+ arg.Total24hVolumeUsd,
+ arg.BitcoinPercentageOfMarketCap,
+ arg.ActiveCurrencies,
+ arg.ActiveAssets,
+ arg.ActiveMarkets,
+ arg.LastUpdated,
+ arg.ID,
+ )
+ var i GlobalMarket
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.TotalMarketCapUsd,
+ &i.Total24hVolumeUsd,
+ &i.BitcoinPercentageOfMarketCap,
+ &i.ActiveCurrencies,
+ &i.ActiveAssets,
+ &i.ActiveMarkets,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const updateHealthCheck = `-- name: UpdateHealthCheck :one
+UPDATE health
+SET
+ status = ?,
+ response_time_ms = ?,
+ last_checked = CURRENT_TIMESTAMP,
+ next_check = ?,
+ failure_count = CASE WHEN status = 'failed' THEN failure_count + 1 ELSE failure_count END,
+ success_count = CASE WHEN status = 'success' THEN success_count + 1 ELSE success_count END,
+ response_data = ?,
+ error_message = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, endpoint_url, endpoint_type, chain_id, status, response_time_ms, last_checked, next_check, failure_count, success_count, response_data, error_message
+`
+
+type UpdateHealthCheckParams struct {
+ Status string `json:"status"`
+ ResponseTimeMs sql.NullInt64 `json:"response_time_ms"`
+ NextCheck sql.NullTime `json:"next_check"`
+ ResponseData sql.NullString `json:"response_data"`
+ ErrorMessage sql.NullString `json:"error_message"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateHealthCheck(ctx context.Context, arg UpdateHealthCheckParams) (Health, error) {
+ row := q.db.QueryRowContext(ctx, updateHealthCheck,
+ arg.Status,
+ arg.ResponseTimeMs,
+ arg.NextCheck,
+ arg.ResponseData,
+ arg.ErrorMessage,
+ arg.ID,
+ )
+ var i Health
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.EndpointUrl,
+ &i.EndpointType,
+ &i.ChainID,
+ &i.Status,
+ &i.ResponseTimeMs,
+ &i.LastChecked,
+ &i.NextCheck,
+ &i.FailureCount,
+ &i.SuccessCount,
+ &i.ResponseData,
+ &i.ErrorMessage,
+ )
+ return i, err
+}
+
+const updatePrice = `-- name: UpdatePrice :one
+UPDATE prices
+SET
+ price_usd = ?,
+ price_btc = ?,
+ volume_24h_usd = ?,
+ market_cap_usd = ?,
+ available_supply = ?,
+ total_supply = ?,
+ max_supply = ?,
+ percent_change_1h = ?,
+ percent_change_24h = ?,
+ percent_change_7d = ?,
+ rank = ?,
+ last_updated = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, asset_id, price_usd, price_btc, volume_24h_usd, market_cap_usd, available_supply, total_supply, max_supply, percent_change_1h, percent_change_24h, percent_change_7d, rank, last_updated
+`
+
+type UpdatePriceParams struct {
+ PriceUsd sql.NullFloat64 `json:"price_usd"`
+ PriceBtc sql.NullFloat64 `json:"price_btc"`
+ Volume24hUsd sql.NullFloat64 `json:"volume_24h_usd"`
+ MarketCapUsd sql.NullFloat64 `json:"market_cap_usd"`
+ AvailableSupply sql.NullFloat64 `json:"available_supply"`
+ TotalSupply sql.NullFloat64 `json:"total_supply"`
+ MaxSupply sql.NullFloat64 `json:"max_supply"`
+ PercentChange1h sql.NullFloat64 `json:"percent_change_1h"`
+ PercentChange24h sql.NullFloat64 `json:"percent_change_24h"`
+ PercentChange7d sql.NullFloat64 `json:"percent_change_7d"`
+ Rank sql.NullInt64 `json:"rank"`
+ LastUpdated time.Time `json:"last_updated"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdatePrice(ctx context.Context, arg UpdatePriceParams) (Price, error) {
+ row := q.db.QueryRowContext(ctx, updatePrice,
+ arg.PriceUsd,
+ arg.PriceBtc,
+ arg.Volume24hUsd,
+ arg.MarketCapUsd,
+ arg.AvailableSupply,
+ arg.TotalSupply,
+ arg.MaxSupply,
+ arg.PercentChange1h,
+ arg.PercentChange24h,
+ arg.PercentChange7d,
+ arg.Rank,
+ arg.LastUpdated,
+ arg.ID,
+ )
+ var i Price
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.AssetID,
+ &i.PriceUsd,
+ &i.PriceBtc,
+ &i.Volume24hUsd,
+ &i.MarketCapUsd,
+ &i.AvailableSupply,
+ &i.TotalSupply,
+ &i.MaxSupply,
+ &i.PercentChange1h,
+ &i.PercentChange24h,
+ &i.PercentChange7d,
+ &i.Rank,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const updatePriceConversion = `-- name: UpdatePriceConversion :one
+UPDATE price_conversions
+SET
+ price = ?,
+ volume_24h = ?,
+ market_cap = ?,
+ last_updated = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, price_id, currency_code, price, volume_24h, market_cap, last_updated
+`
+
+type UpdatePriceConversionParams struct {
+ Price sql.NullFloat64 `json:"price"`
+ Volume24h sql.NullFloat64 `json:"volume_24h"`
+ MarketCap sql.NullFloat64 `json:"market_cap"`
+ LastUpdated time.Time `json:"last_updated"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdatePriceConversion(ctx context.Context, arg UpdatePriceConversionParams) (PriceConversion, error) {
+ row := q.db.QueryRowContext(ctx, updatePriceConversion,
+ arg.Price,
+ arg.Volume24h,
+ arg.MarketCap,
+ arg.LastUpdated,
+ arg.ID,
+ )
+ var i PriceConversion
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.PriceID,
+ &i.CurrencyCode,
+ &i.Price,
+ &i.Volume24h,
+ &i.MarketCap,
+ &i.LastUpdated,
+ )
+ return i, err
+}
+
+const updateProfile = `-- name: UpdateProfile :one
+UPDATE profiles
+SET
+ name = ?,
+ handle = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE address = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, address, handle, origin, name
+`
+
+type UpdateProfileParams struct {
+ Name string `json:"name"`
+ Handle string `json:"handle"`
+ Address string `json:"address"`
+}
+
+func (q *Queries) UpdateProfile(ctx context.Context, arg UpdateProfileParams) (Profile, error) {
+ row := q.db.QueryRowContext(ctx, updateProfile, arg.Name, arg.Handle, arg.Address)
+ var i Profile
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Address,
+ &i.Handle,
+ &i.Origin,
+ &i.Name,
+ )
+ return i, err
+}
+
+const updateService = `-- name: UpdateService :one
+UPDATE services
+SET
+ name = ?,
+ description = ?,
+ owner_address = ?,
+ metadata = ?,
+ status = ?,
+ block_height = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, name, description, chain_id, address, owner_address, metadata, status, block_height
+`
+
+type UpdateServiceParams struct {
+ Name string `json:"name"`
+ Description sql.NullString `json:"description"`
+ OwnerAddress string `json:"owner_address"`
+ Metadata sql.NullString `json:"metadata"`
+ Status string `json:"status"`
+ BlockHeight int64 `json:"block_height"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateService(ctx context.Context, arg UpdateServiceParams) (Service, error) {
+ row := q.db.QueryRowContext(ctx, updateService,
+ arg.Name,
+ arg.Description,
+ arg.OwnerAddress,
+ arg.Metadata,
+ arg.Status,
+ arg.BlockHeight,
+ arg.ID,
+ )
+ var i Service
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Name,
+ &i.Description,
+ &i.ChainID,
+ &i.Address,
+ &i.OwnerAddress,
+ &i.Metadata,
+ &i.Status,
+ &i.BlockHeight,
+ )
+ return i, err
+}
+
+const updateVault = `-- name: UpdateVault :one
+UPDATE vaults
+SET
+ config = ?,
+ updated_at = CURRENT_TIMESTAMP
+WHERE id = ?
+AND deleted_at IS NULL
+RETURNING id, created_at, updated_at, deleted_at, handle, origin, address, cid, config, session_id, redirect_uri
+`
+
+type UpdateVaultParams struct {
+ Config string `json:"config"`
+ ID string `json:"id"`
+}
+
+func (q *Queries) UpdateVault(ctx context.Context, arg UpdateVaultParams) (Vault, error) {
+ row := q.db.QueryRowContext(ctx, updateVault, arg.Config, arg.ID)
+ var i Vault
+ err := row.Scan(
+ &i.ID,
+ &i.CreatedAt,
+ &i.UpdatedAt,
+ &i.DeletedAt,
+ &i.Handle,
+ &i.Origin,
+ &i.Address,
+ &i.Cid,
+ &i.Config,
+ &i.SessionID,
+ &i.RedirectUri,
+ )
+ return i, err
+}
diff --git a/internal/sink/state.go b/internal/sink/state.go
new file mode 100644
index 0000000..d1d4163
--- /dev/null
+++ b/internal/sink/state.go
@@ -0,0 +1,38 @@
+package sink
+
+import (
+ "encoding/json"
+ "time"
+)
+
+type Status struct {
+ SessionID string `json:"session_id"`
+ Status string `json:"status"`
+ Expires int64 `json:"expires"`
+ Handle string `json:"handle"`
+ CaptchaValid bool `json:"captcha_valid"`
+}
+
+func (s *Status) Marshal() ([]byte, error) {
+ return json.Marshal(s)
+}
+
+func (s *Status) Unmarshal(b []byte) error {
+ return json.Unmarshal(b, s)
+}
+
+func (s *Status) IsExpired() bool {
+ return s.Expires < time.Now().Unix()
+}
+
+func (s *Status) IsNewUser() bool {
+ return s.Status == "default"
+}
+
+func (s *Status) IsExpiredUser() bool {
+ return s.Status == "expired"
+}
+
+func (s *Status) IsValidUser() bool {
+ return s.Status == "valid"
+}
diff --git a/internal/ui/base.templ b/internal/ui/base.templ
new file mode 100644
index 0000000..b8bed88
--- /dev/null
+++ b/internal/ui/base.templ
@@ -0,0 +1,30 @@
+package ui
+
+templ Body() {
+
+ { children... }
+
+}
+
+// Head is a component that renders the head of the document
+templ Head() {
+
+
+
+ @ApexCharts()
+ @Helia()
+ @Dexie()
+ @Htmx()
+ @Tailwind()
+ @Shoelace()
+ @DefaultStyles()
+ { children... }
+
+}
+
+templ HTML() {
+
+
+ { children... }
+
+}
diff --git a/internal/ui/base_templ.go b/internal/ui/base_templ.go
new file mode 100644
index 0000000..3c73957
--- /dev/null
+++ b/internal/ui/base_templ.go
@@ -0,0 +1,151 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package ui
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+func Body() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// Head is a component that renders the head of the document
+func Head() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = ApexCharts().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = Helia().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = Dexie().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = Htmx().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = Tailwind().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = Shoelace().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = DefaultStyles().Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var2.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func HTML() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var3.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/internal/ui/imports.templ b/internal/ui/imports.templ
new file mode 100644
index 0000000..acc7bfd
--- /dev/null
+++ b/internal/ui/imports.templ
@@ -0,0 +1,141 @@
+package ui
+
+import "fmt"
+
+var (
+ apexChartsHandle = templ.NewOnceHandle()
+ d3Handle = templ.NewOnceHandle()
+ dexieHandle = templ.NewOnceHandle()
+ heliaHandle = templ.NewOnceHandle()
+ htmxHandle = templ.NewOnceHandle()
+)
+
+// d3 is a component that renders the D3.js library
+templ D3() {
+ @d3Handle.Once() {
+
+ }
+}
+
+// dexie is a component that renders the Dexie.js library
+templ Dexie() {
+ @dexieHandle.Once() {
+
+
+ }
+}
+
+templ ApexCharts() {
+ @apexChartsHandle.Once() {
+
+ }
+}
+
+// In package deps
+templ Helia() {
+ @heliaHandle.Once() {
+
+
+
+
+
+ }
+}
+
+// Htmx is a component that renders the Htmx.js library
+templ Htmx() {
+ @htmxHandle.Once() {
+
+
+
+
+
+
+ }
+}
+
+func jsDelivrURL(pkg string, version string, path string) string {
+ return fmt.Sprintf("https://cdn.jsdelivr.net/npm/%s/%s/%s", pkg, version, path)
+}
diff --git a/internal/ui/imports_templ.go b/internal/ui/imports_templ.go
new file mode 100644
index 0000000..f924d4d
--- /dev/null
+++ b/internal/ui/imports_templ.go
@@ -0,0 +1,368 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package ui
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import "fmt"
+
+var (
+ apexChartsHandle = templ.NewOnceHandle()
+ d3Handle = templ.NewOnceHandle()
+ dexieHandle = templ.NewOnceHandle()
+ heliaHandle = templ.NewOnceHandle()
+ htmxHandle = templ.NewOnceHandle()
+)
+
+// d3 is a component that renders the D3.js library
+func D3() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = d3Handle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// dexie is a component that renders the Dexie.js library
+func Dexie() 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_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ templ_7745c5c3_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 = templruntime.WriteString(templ_7745c5c3_Buffer, 2, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = dexieHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func ApexCharts() 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_Var7 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var7 == nil {
+ templ_7745c5c3_Var7 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Var8 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = apexChartsHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var8), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// In package deps
+func Helia() 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_Var9 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var9 == nil {
+ templ_7745c5c3_Var9 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Var10 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 6, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = heliaHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var10), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// Htmx is a component that renders the Htmx.js library
+func Htmx() 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_Var12 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 7, " ")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = htmxHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var12), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func jsDelivrURL(pkg string, version string, path string) string {
+ return fmt.Sprintf("https://cdn.jsdelivr.net/npm/%s/%s/%s", pkg, version, path)
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/internal/ui/layout.templ b/internal/ui/layout.templ
new file mode 100644
index 0000000..eba3110
--- /dev/null
+++ b/internal/ui/layout.templ
@@ -0,0 +1,69 @@
+package ui
+
+// Columns is a component that renders a responsive flex container that stacks on mobile
+templ Columns() {
+
+ { children... }
+
+}
+
+templ Container() {
+
+}
+
+templ Nav() {
+
+}
+
+templ NavCTA(href string, text string) {
+ { text }
+}
+
+templ NavItem(href string, text string) {
+ { text }
+}
+
+templ NavLogo(title string) {
+
+ { children... }
+ { title }
+
+}
+
+templ NavLeft() {
+
+ { children... }
+
+}
+
+templ NavRight() {
+
+ { children... }
+
+}
+
+// Rows is a component that renders a responsive flex container that wraps on mobile
+templ Rows() {
+
+ { children... }
+
+}
+
+templ Separator(text string) {
+
+}
diff --git a/internal/ui/layout_templ.go b/internal/ui/layout_templ.go
new file mode 100644
index 0000000..8df8187
--- /dev/null
+++ b/internal/ui/layout_templ.go
@@ -0,0 +1,437 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package ui
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+// Columns is a component that renders a responsive flex container that stacks on mobile
+func Columns() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var1 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var1 == nil {
+ templ_7745c5c3_Var1 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func Container() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var2.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func Nav() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func NavCTA(href string, text 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_Var4 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var4 == nil {
+ templ_7745c5c3_Var4 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var6 string
+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(text)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/ui/layout.templ`, Line: 29, Col: 47}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func NavItem(href string, text 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_Var7 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var7 == nil {
+ templ_7745c5c3_Var7 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var9 string
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(text)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/ui/layout.templ`, Line: 33, Col: 44}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func NavLogo(title 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_Var10 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var10 == nil {
+ templ_7745c5c3_Var10 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var10.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var11 string
+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(title)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/ui/layout.templ`, Line: 39, Col: 41}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func NavLeft() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var12 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var12 == nil {
+ templ_7745c5c3_Var12 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var12.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func NavRight() 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_Var13 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var13 == nil {
+ templ_7745c5c3_Var13 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var13.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// Rows is a component that renders a responsive flex container that wraps on mobile
+func Rows() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var14 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var14 == nil {
+ templ_7745c5c3_Var14 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templ_7745c5c3_Var14.Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func Separator(text 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_Var15 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var15 == nil {
+ templ_7745c5c3_Var15 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var16 string
+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(text)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/ui/layout.templ`, Line: 66, Col: 45}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "
")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/internal/ui/meta.templ b/internal/ui/meta.templ
new file mode 100644
index 0000000..67f2347
--- /dev/null
+++ b/internal/ui/meta.templ
@@ -0,0 +1,27 @@
+package ui
+
+import "github.com/sonr-io/motr/internal/sink"
+
+templ MetaComponent(m sink.Metadata) {
+ { m.Title }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/internal/ui/meta_templ.go b/internal/ui/meta_templ.go
new file mode 100644
index 0000000..91f8a01
--- /dev/null
+++ b/internal/ui/meta_templ.go
@@ -0,0 +1,276 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package ui
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+import "github.com/sonr-io/motr/internal/sink"
+
+func MetaComponent(m sink.Metadata) 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ var templ_7745c5c3_Var2 string
+ templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(m.Title)
+ if templ_7745c5c3_Err != nil {
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/ui/meta.templ`, Line: 6, Col: 17}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/internal/ui/style.templ b/internal/ui/style.templ
new file mode 100644
index 0000000..b3e1a63
--- /dev/null
+++ b/internal/ui/style.templ
@@ -0,0 +1,65 @@
+package ui
+
+var (
+ tailwindHandle = templ.NewOnceHandle()
+)
+
+// Shoelace dependencies
+templ Shoelace() {
+
+
+
+}
+
+// Tailwind css dependencies
+templ Tailwind() {
+ @tailwindHandle.Once() {
+
+ }
+}
+
+templ DefaultStyles() {
+
+}
diff --git a/internal/ui/style_templ.go b/internal/ui/style_templ.go
new file mode 100644
index 0000000..9c0a285
--- /dev/null
+++ b/internal/ui/style_templ.go
@@ -0,0 +1,122 @@
+// Code generated by templ - DO NOT EDIT.
+
+// templ: version: v0.3.857
+package ui
+
+//lint:file-ignore SA4006 This context is only used if a nested component is present.
+
+import "github.com/a-h/templ"
+import templruntime "github.com/a-h/templ/runtime"
+
+var (
+ tailwindHandle = templ.NewOnceHandle()
+)
+
+// Shoelace dependencies
+func Shoelace() 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+// Tailwind css dependencies
+func Tailwind() 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_Var3 := 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 = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+ templ_7745c5c3_Err = tailwindHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+func DefaultStyles() templ.Component {
+ return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+ templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
+ if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
+ return templ_7745c5c3_CtxErr
+ }
+ templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
+ if !templ_7745c5c3_IsBuffer {
+ defer func() {
+ templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err == nil {
+ templ_7745c5c3_Err = templ_7745c5c3_BufErr
+ }
+ }()
+ }
+ ctx = templ.InitializeContext(ctx)
+ templ_7745c5c3_Var4 := templ.GetChildren(ctx)
+ if templ_7745c5c3_Var4 == nil {
+ templ_7745c5c3_Var4 = templ.NopComponent
+ }
+ ctx = templ.ClearChildren(ctx)
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "")
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+ return nil
+ })
+}
+
+var _ = templruntime.GeneratedTemplate
diff --git a/main.go b/main.go
deleted file mode 100644
index 064695d..0000000
--- a/main.go
+++ /dev/null
@@ -1,27 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package main
-
-import (
- "log"
-
- wasmhttp "github.com/nlepage/go-wasm-http-server/v2"
- "github.com/onsonr/motr/app"
- "github.com/onsonr/motr/internal/database"
-)
-
-func main() {
- // configString := "TODO"
- dbq, err := database.New()
- if err != nil {
- log.Fatal(err)
- return
- }
- _, err = app.New(app.WithDatabase(dbq))
- if err != nil {
- log.Fatal(err)
- return
- }
- wasmhttp.Serve(nil)
-}
diff --git a/manifest/manifest.go b/manifest/manifest.go
deleted file mode 100644
index 0566140..0000000
--- a/manifest/manifest.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package config
-
-type WebManifest struct {
- // Required fields
- Name string `json:"name"` // Full name of the application
- ShortName string `json:"short_name"` // Short version of the name
-
- // Display and appearance
- Description string `json:"description,omitempty"` // Purpose and features of the application
- Display string `json:"display,omitempty"` // Preferred display mode: fullscreen, standalone, minimal-ui, browser
- DisplayOverride []string `json:"display_override,omitempty"`
- ThemeColor string `json:"theme_color,omitempty"` // Default theme color for the application
- BackgroundColor string `json:"background_color,omitempty"` // Background color during launch
- Orientation string `json:"orientation,omitempty"` // Default orientation: any, natural, landscape, portrait
-
- // URLs and scope
- StartURL string `json:"start_url"` // Starting URL when launching
- Scope string `json:"scope,omitempty"` // Navigation scope of the web application
- ServiceWorker ServiceWorker `json:"service_worker,omitempty"`
-
- // Icons
- Icons []IconDefinition `json:"icons,omitempty"`
-
- // Optional features
- RelatedApplications []RelatedApplication `json:"related_applications,omitempty"`
- PreferRelatedApplications bool `json:"prefer_related_applications,omitempty"`
- Shortcuts []Shortcut `json:"shortcuts,omitempty"`
-
- // Experimental features (uncomment if needed)
- FileHandlers []FileHandler `json:"file_handlers,omitempty"`
- ProtocolHandlers []ProtocolHandler `json:"protocol_handlers,omitempty"`
-}
-
-type FileHandler struct {
- Action string `json:"action"`
- Accept map[string][]string `json:"accept"`
-}
-
-type LaunchHandler struct {
- Action string `json:"action"`
-}
-
-type IconDefinition struct {
- Src string `json:"src"`
- Sizes string `json:"sizes"`
- Type string `json:"type,omitempty"`
- Purpose string `json:"purpose,omitempty"`
-}
-
-type ProtocolHandler struct {
- Scheme string `json:"scheme"`
- URL string `json:"url"`
-}
-
-type RelatedApplication struct {
- Platform string `json:"platform"`
- URL string `json:"url,omitempty"`
- ID string `json:"id,omitempty"`
-}
-
-type Shortcut struct {
- Name string `json:"name"`
- ShortName string `json:"short_name,omitempty"`
- Description string `json:"description,omitempty"`
- URL string `json:"url"`
- Icons []IconDefinition `json:"icons,omitempty"`
-}
-
-type ServiceWorker struct {
- Scope string `json:"scope"`
- Src string `json:"src"`
- UseCache bool `json:"use_cache"`
-}
diff --git a/pkg/config/config.go b/pkg/config/config.go
deleted file mode 100644
index be419ce..0000000
--- a/pkg/config/config.go
+++ /dev/null
@@ -1,24 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package config
-
-import "encoding/json"
-
-// MotrConfig is the configuration for the Motr application assumed to be in the same directory as the dwn index
-type MotrConfig struct {
- CID string `json:"cid"`
- Address string `json:"address"`
- GatewayURL string `json:"gateway_url"`
- APIURL string `json:"api_url"`
- RPCURL string `json:"rpc_url"`
- ChainID string `json:"chain_id"`
- Version string `json:"version"`
-}
-
-// LoadFromString loads the config from the given JSON string
-func LoadFromString(configString string) (*MotrConfig, error) {
- var config MotrConfig
- err := json.Unmarshal([]byte(configString), &config)
- return &config, err
-}
diff --git a/pkg/config/middleware.go b/pkg/config/middleware.go
deleted file mode 100644
index 2e28e55..0000000
--- a/pkg/config/middleware.go
+++ /dev/null
@@ -1,24 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package config
-
-import (
- "database/sql"
-
- "github.com/onsonr/motr/x/identity"
- "github.com/onsonr/motr/x/portfolio"
- "github.com/onsonr/motr/x/user"
-)
-
-type DBConnection struct {
- DB *sql.DB
- Identity identity.Model
- Portfolio portfolio.Model
- User user.Model
-}
-
-type RuntimeContext interface {
- GetMotrConfig() *MotrConfig
- GetDatabaseConnection() *DBConnection
-}
diff --git a/pkg/htmx/middleware.go b/pkg/htmx/middleware.go
deleted file mode 100644
index 1ef1df4..0000000
--- a/pkg/htmx/middleware.go
+++ /dev/null
@@ -1 +0,0 @@
-package htmx
diff --git a/pkg/ipfs/client.go b/pkg/ipfs/client.go
deleted file mode 100644
index a0c59fc..0000000
--- a/pkg/ipfs/client.go
+++ /dev/null
@@ -1 +0,0 @@
-package ipfs
diff --git a/pkg/ipfs/middleware.go b/pkg/ipfs/middleware.go
deleted file mode 100644
index a0c59fc..0000000
--- a/pkg/ipfs/middleware.go
+++ /dev/null
@@ -1 +0,0 @@
-package ipfs
diff --git a/pkg/sonr/client.go b/pkg/sonr/client.go
deleted file mode 100644
index ef52fe9..0000000
--- a/pkg/sonr/client.go
+++ /dev/null
@@ -1 +0,0 @@
-package sonr
diff --git a/pkg/sonr/middleware.go b/pkg/sonr/middleware.go
deleted file mode 100644
index ef52fe9..0000000
--- a/pkg/sonr/middleware.go
+++ /dev/null
@@ -1 +0,0 @@
-package sonr
diff --git a/pkg/ucan/middleware.go b/pkg/ucan/middleware.go
deleted file mode 100644
index a847881..0000000
--- a/pkg/ucan/middleware.go
+++ /dev/null
@@ -1 +0,0 @@
-package ucan
diff --git a/pkg/ucan/protected.go b/pkg/ucan/protected.go
deleted file mode 100644
index a847881..0000000
--- a/pkg/ucan/protected.go
+++ /dev/null
@@ -1 +0,0 @@
-package ucan
diff --git a/pkg/ucan/token.go b/pkg/ucan/token.go
deleted file mode 100644
index a847881..0000000
--- a/pkg/ucan/token.go
+++ /dev/null
@@ -1 +0,0 @@
-package ucan
diff --git a/pkg/ucan/validator.go b/pkg/ucan/validator.go
deleted file mode 100644
index a847881..0000000
--- a/pkg/ucan/validator.go
+++ /dev/null
@@ -1 +0,0 @@
-package ucan
diff --git a/sqlc.yaml b/sqlc.yaml
new file mode 100644
index 0000000..06d9723
--- /dev/null
+++ b/sqlc.yaml
@@ -0,0 +1,11 @@
+version: "2"
+sql:
+ - engine: "sqlite"
+ queries: "./cmd/vault/query.sql"
+ schema: "./cmd/vault/schema.sql"
+ gen:
+ go:
+ emit_interface: true
+ emit_json_tags: true
+ package: "models"
+ out: "./internal/sink/models"
diff --git a/web/bun.lock b/web/bun.lock
deleted file mode 100644
index dc0e231..0000000
--- a/web/bun.lock
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "lockfileVersion": 1,
- "workspaces": {
- "": {
- "name": "motr",
- "devDependencies": {
- "@types/bun": "latest",
- },
- "peerDependencies": {
- "typescript": "^5.0.0",
- },
- },
- },
- "packages": {
- "@types/bun": ["@types/bun@1.2.8", "", { "dependencies": { "bun-types": "1.2.7" } }, "sha512-t8L1RvJVUghW5V+M/fL3Thbxcs0HwNsXsnTEBEfEVqGteiJToOlZ/fyOEaR1kZsNqnu+3XA4RI/qmnX4w6+S+w=="],
-
- "@types/node": ["@types/node@22.14.0", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-Kmpl+z84ILoG+3T/zQFyAJsU6EPTmOCj8/2+83fSN6djd6I4o7uOuGIH6vq3PrjY5BGitSbFuMN18j3iknubbA=="],
-
- "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
-
- "bun-types": ["bun-types@1.2.7", "", { "dependencies": { "@types/node": "*", "@types/ws": "*" } }, "sha512-P4hHhk7kjF99acXqKvltyuMQ2kf/rzIw3ylEDpCxDS9Xa0X0Yp/gJu/vDCucmWpiur5qJ0lwB2bWzOXa2GlHqA=="],
-
- "typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="],
-
- "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
- }
-}
diff --git a/web/index.html b/web/index.html
deleted file mode 100644
index 5a3486d..0000000
--- a/web/index.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
- Motr
-
-
-
-
-
-
-
diff --git a/web/sw.js b/web/sw.js
deleted file mode 100644
index cc4edeb..0000000
--- a/web/sw.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// Note the 'go.1.23.4' below, that matches the version you just found:
-importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.23.1/misc/wasm/wasm_exec.js')
-importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v2.2.1/sw.js')
-
-
-
-
-addEventListener('activate', (event) => {
- event.waitUntil(clients.claim())
-})
-
-registerWasmHTTPListener('app.wasm', { base: 'vault' })
diff --git a/x/identity/handler.go b/x/identity/handler.go
deleted file mode 100644
index 3fbab00..0000000
--- a/x/identity/handler.go
+++ /dev/null
@@ -1,35 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package identity
-
-import (
- "context"
- "database/sql"
-
- "github.com/labstack/echo/v4"
- "github.com/onsonr/motr/x/identity/model"
- "github.com/onsonr/motr/x/identity/view"
-)
-
-type Model = *model.Queries
-
-func InitTables(db *sql.DB) (Model, error) {
- if _, err := db.ExecContext(context.Background(), model.Schema); err != nil {
- return nil, err
- }
- return model.New(db), nil
-}
-
-func RegisterRoutes(e *echo.Echo, m Model, mdws ...echo.MiddlewareFunc) {
- // API Routes
- // g := e.Group("/api/identity/v1")
- // controller.HandleAccounts(g, m)
- // controller.HandleCredentials(g, m)
- // controller.HandleDevices(g, m)
-
- // View Routes
- e.GET("/authorize", view.HandleView)
- e.GET("/login", view.HandleView)
- e.GET("/register", view.HandleView)
-}
diff --git a/x/identity/model/db.go b/x/identity/model/db.go
deleted file mode 100644
index d044a9e..0000000
--- a/x/identity/model/db.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "context"
- "database/sql"
-)
-
-type DBTX interface {
- ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
- PrepareContext(context.Context, string) (*sql.Stmt, error)
- QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
- QueryRowContext(context.Context, string, ...interface{}) *sql.Row
-}
-
-func New(db DBTX) *Queries {
- return &Queries{db: db}
-}
-
-type Queries struct {
- db DBTX
-}
-
-func (q *Queries) WithTx(tx *sql.Tx) *Queries {
- return &Queries{
- db: tx,
- }
-}
diff --git a/x/identity/model/embed.go b/x/identity/model/embed.go
deleted file mode 100644
index 739963c..0000000
--- a/x/identity/model/embed.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package model
-
-import _ "embed"
-
-//go:embed query.sql
-var Query string
-
-//go:embed schema.sql
-var Schema string
diff --git a/x/identity/model/models.go b/x/identity/model/models.go
deleted file mode 100644
index d3b54c4..0000000
--- a/x/identity/model/models.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "database/sql"
- "time"
-)
-
-type Account struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- Number int64 `json:"number"`
- Sequence int64 `json:"sequence"`
- Address string `json:"address"`
- PublicKey string `json:"public_key"`
- ChainID string `json:"chain_id"`
- Controller string `json:"controller"`
- IsSubsidiary bool `json:"is_subsidiary"`
- IsValidator bool `json:"is_validator"`
- IsDelegator bool `json:"is_delegator"`
- IsAccountable bool `json:"is_accountable"`
-}
-
-type Credential struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- Handle string `json:"handle"`
- CredentialID string `json:"credential_id"`
- AuthenticatorAttachment string `json:"authenticator_attachment"`
- Origin string `json:"origin"`
- Type string `json:"type"`
- Transports string `json:"transports"`
-}
-
-type Device struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- ProfileID string `json:"profile_id"`
- CredentialID string `json:"credential_id"`
- Name string `json:"name"`
- DeviceType string `json:"device_type"`
- OsName string `json:"os_name"`
- OsVersion string `json:"os_version"`
- BrowserName sql.NullString `json:"browser_name"`
- BrowserVersion sql.NullString `json:"browser_version"`
- LastUsedAt time.Time `json:"last_used_at"`
- IsTrusted bool `json:"is_trusted"`
- IsCurrent bool `json:"is_current"`
- Fingerprint string `json:"fingerprint"`
- UserAgent sql.NullString `json:"user_agent"`
- IpAddress sql.NullString `json:"ip_address"`
-}
diff --git a/x/identity/model/querier.go b/x/identity/model/querier.go
deleted file mode 100644
index 39cf48e..0000000
--- a/x/identity/model/querier.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "context"
-)
-
-type Querier interface {
- CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error)
- // Device table methods
- CreateDevice(ctx context.Context, arg CreateDeviceParams) (Device, error)
- GetAccountByAddress(ctx context.Context, address string) (Account, error)
- GetAccountByID(ctx context.Context, id string) (Account, error)
- GetAccountsByChainID(ctx context.Context, chainID string) ([]Account, error)
- GetAccountsByController(ctx context.Context, controller string) ([]Account, error)
- GetCredentialByID(ctx context.Context, credentialID string) (Credential, error)
- GetCredentialsByHandle(ctx context.Context, handle string) ([]Credential, error)
- GetCredentialsByProfile(ctx context.Context, profileID string) ([]Credential, error)
- GetDelegatorAccounts(ctx context.Context) ([]Account, error)
- GetDeviceByFingerprint(ctx context.Context, arg GetDeviceByFingerprintParams) (Device, error)
- GetDeviceByID(ctx context.Context, id string) (Device, error)
- GetTrustedDevicesByProfile(ctx context.Context, profileID string) ([]Device, error)
- GetValidatorAccounts(ctx context.Context) ([]Account, error)
- InsertCredential(ctx context.Context, arg InsertCredentialParams) (Credential, error)
- ListAccounts(ctx context.Context) ([]Account, error)
- ListDevicesByProfile(ctx context.Context, profileID string) ([]Device, error)
- SoftDeleteAccount(ctx context.Context, id string) error
- SoftDeleteCredential(ctx context.Context, credentialID string) error
- SoftDeleteDevice(ctx context.Context, id string) error
- UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error)
- UpdateAccountSequence(ctx context.Context, arg UpdateAccountSequenceParams) (Account, error)
- // Additional credential methods for better integration with devices
- UpdateCredential(ctx context.Context, arg UpdateCredentialParams) (Credential, error)
- UpdateDevice(ctx context.Context, arg UpdateDeviceParams) (Device, error)
- UpdateDeviceLastUsed(ctx context.Context, arg UpdateDeviceLastUsedParams) (Device, error)
-}
-
-var _ Querier = (*Queries)(nil)
diff --git a/x/identity/model/query.sql b/x/identity/model/query.sql
deleted file mode 100644
index 3471935..0000000
--- a/x/identity/model/query.sql
+++ /dev/null
@@ -1,183 +0,0 @@
--- name: CreateAccount :one
-INSERT INTO accounts (
- id,
- number,
- sequence,
- address,
- public_key,
- chain_id,
- controller,
- is_subsidiary,
- is_validator,
- is_delegator,
- is_accountable
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING *;
-
--- name: GetAccountByID :one
-SELECT * FROM accounts
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetAccountByAddress :one
-SELECT * FROM accounts
-WHERE address = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetAccountsByChainID :many
-SELECT * FROM accounts
-WHERE chain_id = ? AND deleted_at IS NULL
-ORDER BY number;
-
--- name: ListAccounts :many
-SELECT * FROM accounts
-WHERE deleted_at IS NULL
-ORDER BY chain_id, number;
-
--- name: UpdateAccountSequence :one
-UPDATE accounts
-SET
- sequence = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: UpdateAccount :one
-UPDATE accounts
-SET
- public_key = ?,
- controller = ?,
- is_subsidiary = ?,
- is_validator = ?,
- is_delegator = ?,
- is_accountable = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: SoftDeleteAccount :exec
-UPDATE accounts
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?;
-
--- name: GetAccountsByController :many
-SELECT * FROM accounts
-WHERE controller = ? AND deleted_at IS NULL
-ORDER BY chain_id, number;
-
--- name: GetValidatorAccounts :many
-SELECT * FROM accounts
-WHERE is_validator = true AND deleted_at IS NULL
-ORDER BY chain_id, number;
-
--- name: GetDelegatorAccounts :many
-SELECT * FROM accounts
-WHERE is_delegator = true AND deleted_at IS NULL
-ORDER BY chain_id, number;
-
--- name: InsertCredential :one
-INSERT INTO credentials (
- handle,
- credential_id,
- origin,
- type,
- transports
-) VALUES (?, ?, ?, ?, ?)
-RETURNING *;
-
--- name: GetCredentialsByHandle :many
-SELECT * FROM credentials
-WHERE handle = ?
-AND deleted_at IS NULL;
-
--- name: GetCredentialByID :one
-SELECT * FROM credentials
-WHERE credential_id = ?
-AND deleted_at IS NULL
-LIMIT 1;
-
--- name: SoftDeleteCredential :exec
-UPDATE credentials
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE credential_id = ?;
-
-
--- Additional credential methods for better integration with devices
--- name: UpdateCredential :one
-UPDATE credentials
-SET
- authenticator_attachment = ?,
- transports = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE credential_id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: GetCredentialsByProfile :many
-SELECT c.* FROM credentials c
-JOIN devices d ON c.credential_id = d.credential_id
-WHERE d.profile_id = ? AND c.deleted_at IS NULL AND d.deleted_at IS NULL;
-
--- Device table methods
--- name: CreateDevice :one
-INSERT INTO devices (
- id,
- profile_id,
- credential_id,
- name,
- device_type,
- os_name,
- os_version,
- browser_name,
- browser_version,
- is_trusted,
- is_current,
- fingerprint,
- user_agent,
- ip_address
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING *;
-
--- name: GetDeviceByID :one
-SELECT * FROM devices
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetDeviceByFingerprint :one
-SELECT * FROM devices
-WHERE profile_id = ? AND fingerprint = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: ListDevicesByProfile :many
-SELECT * FROM devices
-WHERE profile_id = ? AND deleted_at IS NULL
-ORDER BY last_used_at DESC;
-
--- name: GetTrustedDevicesByProfile :many
-SELECT * FROM devices
-WHERE profile_id = ? AND is_trusted = true AND deleted_at IS NULL
-ORDER BY last_used_at DESC;
-
--- name: UpdateDevice :one
-UPDATE devices
-SET
- name = ?,
- is_trusted = ?,
- is_current = ?,
- last_used_at = CURRENT_TIMESTAMP,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: UpdateDeviceLastUsed :one
-UPDATE devices
-SET
- last_used_at = CURRENT_TIMESTAMP,
- ip_address = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: SoftDeleteDevice :exec
-UPDATE devices
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?;
diff --git a/x/identity/model/query.sql.go b/x/identity/model/query.sql.go
deleted file mode 100644
index 6b6eab6..0000000
--- a/x/identity/model/query.sql.go
+++ /dev/null
@@ -1,993 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-// source: query.sql
-
-package model
-
-import (
- "context"
- "database/sql"
-)
-
-const createAccount = `-- name: CreateAccount :one
-INSERT INTO accounts (
- id,
- number,
- sequence,
- address,
- public_key,
- chain_id,
- controller,
- is_subsidiary,
- is_validator,
- is_delegator,
- is_accountable
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable
-`
-
-type CreateAccountParams struct {
- ID string `json:"id"`
- Number int64 `json:"number"`
- Sequence int64 `json:"sequence"`
- Address string `json:"address"`
- PublicKey string `json:"public_key"`
- ChainID string `json:"chain_id"`
- Controller string `json:"controller"`
- IsSubsidiary bool `json:"is_subsidiary"`
- IsValidator bool `json:"is_validator"`
- IsDelegator bool `json:"is_delegator"`
- IsAccountable bool `json:"is_accountable"`
-}
-
-func (q *Queries) CreateAccount(ctx context.Context, arg CreateAccountParams) (Account, error) {
- row := q.db.QueryRowContext(ctx, createAccount,
- arg.ID,
- arg.Number,
- arg.Sequence,
- arg.Address,
- arg.PublicKey,
- arg.ChainID,
- arg.Controller,
- arg.IsSubsidiary,
- arg.IsValidator,
- arg.IsDelegator,
- arg.IsAccountable,
- )
- var i Account
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- )
- return i, err
-}
-
-const createDevice = `-- name: CreateDevice :one
-INSERT INTO devices (
- id,
- profile_id,
- credential_id,
- name,
- device_type,
- os_name,
- os_version,
- browser_name,
- browser_version,
- is_trusted,
- is_current,
- fingerprint,
- user_agent,
- ip_address
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING id, created_at, updated_at, deleted_at, profile_id, credential_id, name, device_type, os_name, os_version, browser_name, browser_version, last_used_at, is_trusted, is_current, fingerprint, user_agent, ip_address
-`
-
-type CreateDeviceParams struct {
- ID string `json:"id"`
- ProfileID string `json:"profile_id"`
- CredentialID string `json:"credential_id"`
- Name string `json:"name"`
- DeviceType string `json:"device_type"`
- OsName string `json:"os_name"`
- OsVersion string `json:"os_version"`
- BrowserName sql.NullString `json:"browser_name"`
- BrowserVersion sql.NullString `json:"browser_version"`
- IsTrusted bool `json:"is_trusted"`
- IsCurrent bool `json:"is_current"`
- Fingerprint string `json:"fingerprint"`
- UserAgent sql.NullString `json:"user_agent"`
- IpAddress sql.NullString `json:"ip_address"`
-}
-
-// Device table methods
-func (q *Queries) CreateDevice(ctx context.Context, arg CreateDeviceParams) (Device, error) {
- row := q.db.QueryRowContext(ctx, createDevice,
- arg.ID,
- arg.ProfileID,
- arg.CredentialID,
- arg.Name,
- arg.DeviceType,
- arg.OsName,
- arg.OsVersion,
- arg.BrowserName,
- arg.BrowserVersion,
- arg.IsTrusted,
- arg.IsCurrent,
- arg.Fingerprint,
- arg.UserAgent,
- arg.IpAddress,
- )
- var i Device
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ProfileID,
- &i.CredentialID,
- &i.Name,
- &i.DeviceType,
- &i.OsName,
- &i.OsVersion,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.LastUsedAt,
- &i.IsTrusted,
- &i.IsCurrent,
- &i.Fingerprint,
- &i.UserAgent,
- &i.IpAddress,
- )
- return i, err
-}
-
-const getAccountByAddress = `-- name: GetAccountByAddress :one
-SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
-WHERE address = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetAccountByAddress(ctx context.Context, address string) (Account, error) {
- row := q.db.QueryRowContext(ctx, getAccountByAddress, address)
- var i Account
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- )
- return i, err
-}
-
-const getAccountByID = `-- name: GetAccountByID :one
-SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetAccountByID(ctx context.Context, id string) (Account, error) {
- row := q.db.QueryRowContext(ctx, getAccountByID, id)
- var i Account
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- )
- return i, err
-}
-
-const getAccountsByChainID = `-- name: GetAccountsByChainID :many
-SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
-WHERE chain_id = ? AND deleted_at IS NULL
-ORDER BY number
-`
-
-func (q *Queries) GetAccountsByChainID(ctx context.Context, chainID string) ([]Account, error) {
- rows, err := q.db.QueryContext(ctx, getAccountsByChainID, chainID)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Account
- for rows.Next() {
- var i Account
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const getAccountsByController = `-- name: GetAccountsByController :many
-SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
-WHERE controller = ? AND deleted_at IS NULL
-ORDER BY chain_id, number
-`
-
-func (q *Queries) GetAccountsByController(ctx context.Context, controller string) ([]Account, error) {
- rows, err := q.db.QueryContext(ctx, getAccountsByController, controller)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Account
- for rows.Next() {
- var i Account
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const getCredentialByID = `-- name: GetCredentialByID :one
-SELECT id, created_at, updated_at, deleted_at, handle, credential_id, authenticator_attachment, origin, type, transports FROM credentials
-WHERE credential_id = ?
-AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetCredentialByID(ctx context.Context, credentialID string) (Credential, error) {
- row := q.db.QueryRowContext(ctx, getCredentialByID, credentialID)
- var i Credential
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Handle,
- &i.CredentialID,
- &i.AuthenticatorAttachment,
- &i.Origin,
- &i.Type,
- &i.Transports,
- )
- return i, err
-}
-
-const getCredentialsByHandle = `-- name: GetCredentialsByHandle :many
-SELECT id, created_at, updated_at, deleted_at, handle, credential_id, authenticator_attachment, origin, type, transports FROM credentials
-WHERE handle = ?
-AND deleted_at IS NULL
-`
-
-func (q *Queries) GetCredentialsByHandle(ctx context.Context, handle string) ([]Credential, error) {
- rows, err := q.db.QueryContext(ctx, getCredentialsByHandle, handle)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Credential
- for rows.Next() {
- var i Credential
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Handle,
- &i.CredentialID,
- &i.AuthenticatorAttachment,
- &i.Origin,
- &i.Type,
- &i.Transports,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const getCredentialsByProfile = `-- name: GetCredentialsByProfile :many
-SELECT c.id, c.created_at, c.updated_at, c.deleted_at, c.handle, c.credential_id, c.authenticator_attachment, c.origin, c.type, c.transports FROM credentials c
-JOIN devices d ON c.credential_id = d.credential_id
-WHERE d.profile_id = ? AND c.deleted_at IS NULL AND d.deleted_at IS NULL
-`
-
-func (q *Queries) GetCredentialsByProfile(ctx context.Context, profileID string) ([]Credential, error) {
- rows, err := q.db.QueryContext(ctx, getCredentialsByProfile, profileID)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Credential
- for rows.Next() {
- var i Credential
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Handle,
- &i.CredentialID,
- &i.AuthenticatorAttachment,
- &i.Origin,
- &i.Type,
- &i.Transports,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const getDelegatorAccounts = `-- name: GetDelegatorAccounts :many
-SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
-WHERE is_delegator = true AND deleted_at IS NULL
-ORDER BY chain_id, number
-`
-
-func (q *Queries) GetDelegatorAccounts(ctx context.Context) ([]Account, error) {
- rows, err := q.db.QueryContext(ctx, getDelegatorAccounts)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Account
- for rows.Next() {
- var i Account
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const getDeviceByFingerprint = `-- name: GetDeviceByFingerprint :one
-SELECT id, created_at, updated_at, deleted_at, profile_id, credential_id, name, device_type, os_name, os_version, browser_name, browser_version, last_used_at, is_trusted, is_current, fingerprint, user_agent, ip_address FROM devices
-WHERE profile_id = ? AND fingerprint = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-type GetDeviceByFingerprintParams struct {
- ProfileID string `json:"profile_id"`
- Fingerprint string `json:"fingerprint"`
-}
-
-func (q *Queries) GetDeviceByFingerprint(ctx context.Context, arg GetDeviceByFingerprintParams) (Device, error) {
- row := q.db.QueryRowContext(ctx, getDeviceByFingerprint, arg.ProfileID, arg.Fingerprint)
- var i Device
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ProfileID,
- &i.CredentialID,
- &i.Name,
- &i.DeviceType,
- &i.OsName,
- &i.OsVersion,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.LastUsedAt,
- &i.IsTrusted,
- &i.IsCurrent,
- &i.Fingerprint,
- &i.UserAgent,
- &i.IpAddress,
- )
- return i, err
-}
-
-const getDeviceByID = `-- name: GetDeviceByID :one
-SELECT id, created_at, updated_at, deleted_at, profile_id, credential_id, name, device_type, os_name, os_version, browser_name, browser_version, last_used_at, is_trusted, is_current, fingerprint, user_agent, ip_address FROM devices
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetDeviceByID(ctx context.Context, id string) (Device, error) {
- row := q.db.QueryRowContext(ctx, getDeviceByID, id)
- var i Device
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ProfileID,
- &i.CredentialID,
- &i.Name,
- &i.DeviceType,
- &i.OsName,
- &i.OsVersion,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.LastUsedAt,
- &i.IsTrusted,
- &i.IsCurrent,
- &i.Fingerprint,
- &i.UserAgent,
- &i.IpAddress,
- )
- return i, err
-}
-
-const getTrustedDevicesByProfile = `-- name: GetTrustedDevicesByProfile :many
-SELECT id, created_at, updated_at, deleted_at, profile_id, credential_id, name, device_type, os_name, os_version, browser_name, browser_version, last_used_at, is_trusted, is_current, fingerprint, user_agent, ip_address FROM devices
-WHERE profile_id = ? AND is_trusted = true AND deleted_at IS NULL
-ORDER BY last_used_at DESC
-`
-
-func (q *Queries) GetTrustedDevicesByProfile(ctx context.Context, profileID string) ([]Device, error) {
- rows, err := q.db.QueryContext(ctx, getTrustedDevicesByProfile, profileID)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Device
- for rows.Next() {
- var i Device
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ProfileID,
- &i.CredentialID,
- &i.Name,
- &i.DeviceType,
- &i.OsName,
- &i.OsVersion,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.LastUsedAt,
- &i.IsTrusted,
- &i.IsCurrent,
- &i.Fingerprint,
- &i.UserAgent,
- &i.IpAddress,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const getValidatorAccounts = `-- name: GetValidatorAccounts :many
-SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
-WHERE is_validator = true AND deleted_at IS NULL
-ORDER BY chain_id, number
-`
-
-func (q *Queries) GetValidatorAccounts(ctx context.Context) ([]Account, error) {
- rows, err := q.db.QueryContext(ctx, getValidatorAccounts)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Account
- for rows.Next() {
- var i Account
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const insertCredential = `-- name: InsertCredential :one
-INSERT INTO credentials (
- handle,
- credential_id,
- origin,
- type,
- transports
-) VALUES (?, ?, ?, ?, ?)
-RETURNING id, created_at, updated_at, deleted_at, handle, credential_id, authenticator_attachment, origin, type, transports
-`
-
-type InsertCredentialParams struct {
- Handle string `json:"handle"`
- CredentialID string `json:"credential_id"`
- Origin string `json:"origin"`
- Type string `json:"type"`
- Transports string `json:"transports"`
-}
-
-func (q *Queries) InsertCredential(ctx context.Context, arg InsertCredentialParams) (Credential, error) {
- row := q.db.QueryRowContext(ctx, insertCredential,
- arg.Handle,
- arg.CredentialID,
- arg.Origin,
- arg.Type,
- arg.Transports,
- )
- var i Credential
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Handle,
- &i.CredentialID,
- &i.AuthenticatorAttachment,
- &i.Origin,
- &i.Type,
- &i.Transports,
- )
- return i, err
-}
-
-const listAccounts = `-- name: ListAccounts :many
-SELECT id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable FROM accounts
-WHERE deleted_at IS NULL
-ORDER BY chain_id, number
-`
-
-func (q *Queries) ListAccounts(ctx context.Context) ([]Account, error) {
- rows, err := q.db.QueryContext(ctx, listAccounts)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Account
- for rows.Next() {
- var i Account
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listDevicesByProfile = `-- name: ListDevicesByProfile :many
-SELECT id, created_at, updated_at, deleted_at, profile_id, credential_id, name, device_type, os_name, os_version, browser_name, browser_version, last_used_at, is_trusted, is_current, fingerprint, user_agent, ip_address FROM devices
-WHERE profile_id = ? AND deleted_at IS NULL
-ORDER BY last_used_at DESC
-`
-
-func (q *Queries) ListDevicesByProfile(ctx context.Context, profileID string) ([]Device, error) {
- rows, err := q.db.QueryContext(ctx, listDevicesByProfile, profileID)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Device
- for rows.Next() {
- var i Device
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ProfileID,
- &i.CredentialID,
- &i.Name,
- &i.DeviceType,
- &i.OsName,
- &i.OsVersion,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.LastUsedAt,
- &i.IsTrusted,
- &i.IsCurrent,
- &i.Fingerprint,
- &i.UserAgent,
- &i.IpAddress,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const softDeleteAccount = `-- name: SoftDeleteAccount :exec
-UPDATE accounts
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?
-`
-
-func (q *Queries) SoftDeleteAccount(ctx context.Context, id string) error {
- _, err := q.db.ExecContext(ctx, softDeleteAccount, id)
- return err
-}
-
-const softDeleteCredential = `-- name: SoftDeleteCredential :exec
-UPDATE credentials
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE credential_id = ?
-`
-
-func (q *Queries) SoftDeleteCredential(ctx context.Context, credentialID string) error {
- _, err := q.db.ExecContext(ctx, softDeleteCredential, credentialID)
- return err
-}
-
-const softDeleteDevice = `-- name: SoftDeleteDevice :exec
-UPDATE devices
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?
-`
-
-func (q *Queries) SoftDeleteDevice(ctx context.Context, id string) error {
- _, err := q.db.ExecContext(ctx, softDeleteDevice, id)
- return err
-}
-
-const updateAccount = `-- name: UpdateAccount :one
-UPDATE accounts
-SET
- public_key = ?,
- controller = ?,
- is_subsidiary = ?,
- is_validator = ?,
- is_delegator = ?,
- is_accountable = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable
-`
-
-type UpdateAccountParams struct {
- PublicKey string `json:"public_key"`
- Controller string `json:"controller"`
- IsSubsidiary bool `json:"is_subsidiary"`
- IsValidator bool `json:"is_validator"`
- IsDelegator bool `json:"is_delegator"`
- IsAccountable bool `json:"is_accountable"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateAccount(ctx context.Context, arg UpdateAccountParams) (Account, error) {
- row := q.db.QueryRowContext(ctx, updateAccount,
- arg.PublicKey,
- arg.Controller,
- arg.IsSubsidiary,
- arg.IsValidator,
- arg.IsDelegator,
- arg.IsAccountable,
- arg.ID,
- )
- var i Account
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- )
- return i, err
-}
-
-const updateAccountSequence = `-- name: UpdateAccountSequence :one
-UPDATE accounts
-SET
- sequence = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, number, sequence, address, public_key, chain_id, controller, is_subsidiary, is_validator, is_delegator, is_accountable
-`
-
-type UpdateAccountSequenceParams struct {
- Sequence int64 `json:"sequence"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateAccountSequence(ctx context.Context, arg UpdateAccountSequenceParams) (Account, error) {
- row := q.db.QueryRowContext(ctx, updateAccountSequence, arg.Sequence, arg.ID)
- var i Account
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Number,
- &i.Sequence,
- &i.Address,
- &i.PublicKey,
- &i.ChainID,
- &i.Controller,
- &i.IsSubsidiary,
- &i.IsValidator,
- &i.IsDelegator,
- &i.IsAccountable,
- )
- return i, err
-}
-
-const updateCredential = `-- name: UpdateCredential :one
-UPDATE credentials
-SET
- authenticator_attachment = ?,
- transports = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE credential_id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, handle, credential_id, authenticator_attachment, origin, type, transports
-`
-
-type UpdateCredentialParams struct {
- AuthenticatorAttachment string `json:"authenticator_attachment"`
- Transports string `json:"transports"`
- CredentialID string `json:"credential_id"`
-}
-
-// Additional credential methods for better integration with devices
-func (q *Queries) UpdateCredential(ctx context.Context, arg UpdateCredentialParams) (Credential, error) {
- row := q.db.QueryRowContext(ctx, updateCredential, arg.AuthenticatorAttachment, arg.Transports, arg.CredentialID)
- var i Credential
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Handle,
- &i.CredentialID,
- &i.AuthenticatorAttachment,
- &i.Origin,
- &i.Type,
- &i.Transports,
- )
- return i, err
-}
-
-const updateDevice = `-- name: UpdateDevice :one
-UPDATE devices
-SET
- name = ?,
- is_trusted = ?,
- is_current = ?,
- last_used_at = CURRENT_TIMESTAMP,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, profile_id, credential_id, name, device_type, os_name, os_version, browser_name, browser_version, last_used_at, is_trusted, is_current, fingerprint, user_agent, ip_address
-`
-
-type UpdateDeviceParams struct {
- Name string `json:"name"`
- IsTrusted bool `json:"is_trusted"`
- IsCurrent bool `json:"is_current"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateDevice(ctx context.Context, arg UpdateDeviceParams) (Device, error) {
- row := q.db.QueryRowContext(ctx, updateDevice,
- arg.Name,
- arg.IsTrusted,
- arg.IsCurrent,
- arg.ID,
- )
- var i Device
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ProfileID,
- &i.CredentialID,
- &i.Name,
- &i.DeviceType,
- &i.OsName,
- &i.OsVersion,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.LastUsedAt,
- &i.IsTrusted,
- &i.IsCurrent,
- &i.Fingerprint,
- &i.UserAgent,
- &i.IpAddress,
- )
- return i, err
-}
-
-const updateDeviceLastUsed = `-- name: UpdateDeviceLastUsed :one
-UPDATE devices
-SET
- last_used_at = CURRENT_TIMESTAMP,
- ip_address = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, profile_id, credential_id, name, device_type, os_name, os_version, browser_name, browser_version, last_used_at, is_trusted, is_current, fingerprint, user_agent, ip_address
-`
-
-type UpdateDeviceLastUsedParams struct {
- IpAddress sql.NullString `json:"ip_address"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateDeviceLastUsed(ctx context.Context, arg UpdateDeviceLastUsedParams) (Device, error) {
- row := q.db.QueryRowContext(ctx, updateDeviceLastUsed, arg.IpAddress, arg.ID)
- var i Device
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ProfileID,
- &i.CredentialID,
- &i.Name,
- &i.DeviceType,
- &i.OsName,
- &i.OsVersion,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.LastUsedAt,
- &i.IsTrusted,
- &i.IsCurrent,
- &i.Fingerprint,
- &i.UserAgent,
- &i.IpAddress,
- )
- return i, err
-}
diff --git a/x/identity/model/schema.sql b/x/identity/model/schema.sql
deleted file mode 100644
index e55257c..0000000
--- a/x/identity/model/schema.sql
+++ /dev/null
@@ -1,72 +0,0 @@
--- Accounts represent blockchain accounts
-CREATE TABLE accounts (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- number INTEGER NOT NULL,
- sequence INTEGER NOT NULL DEFAULT 0,
- address TEXT NOT NULL UNIQUE,
- public_key TEXT NOT NULL,
- chain_id TEXT NOT NULL,
- controller TEXT NOT NULL,
- is_subsidiary BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_subsidiary IN (0,1)),
- is_validator BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_validator IN (0,1)),
- is_delegator BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_delegator IN (0,1)),
- is_accountable BOOLEAN NOT NULL DEFAULT TRUE CHECK(is_accountable IN (0,1))
-);
-
-CREATE INDEX idx_accounts_address ON accounts(address);
-CREATE INDEX idx_accounts_chain_id ON accounts(chain_id);
-CREATE INDEX idx_accounts_deleted_at ON accounts(deleted_at);
-
-
-
--- Credentials store WebAuthn credentials
-CREATE TABLE credentials (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- handle TEXT NOT NULL,
- credential_id TEXT NOT NULL UNIQUE,
- authenticator_attachment TEXT NOT NULL,
- origin TEXT NOT NULL,
- type TEXT NOT NULL,
- transports TEXT NOT NULL
-);
-
-CREATE INDEX idx_credentials_handle ON credentials(handle);
-CREATE INDEX idx_credentials_origin ON credentials(origin);
-CREATE INDEX idx_credentials_deleted_at ON credentials(deleted_at);
-
--- Devices link profiles to their authenticated devices
-CREATE TABLE devices (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- profile_id TEXT NOT NULL,
- credential_id TEXT NOT NULL,
- name TEXT NOT NULL, -- User-friendly device name
- device_type TEXT NOT NULL, -- mobile, desktop, tablet, etc.
- os_name TEXT NOT NULL, -- iOS, Android, Windows, macOS, etc.
- os_version TEXT NOT NULL, -- OS version string
- browser_name TEXT, -- Browser name if applicable
- browser_version TEXT, -- Browser version if applicable
- last_used_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- is_trusted BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_trusted IN (0,1)),
- is_current BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_current IN (0,1)),
- fingerprint TEXT NOT NULL, -- Device fingerprint for additional verification
- user_agent TEXT, -- Full user agent string
- ip_address TEXT, -- Last known IP address
- FOREIGN KEY (profile_id) REFERENCES profiles(id),
- FOREIGN KEY (credential_id) REFERENCES credentials(id),
- UNIQUE(profile_id, fingerprint)
-);
-
-CREATE INDEX idx_devices_profile_id ON devices(profile_id);
-CREATE INDEX idx_devices_credential_id ON devices(credential_id);
-CREATE INDEX idx_devices_is_trusted ON devices(is_trusted);
-CREATE INDEX idx_devices_last_used_at ON devices(last_used_at);
-CREATE INDEX idx_devices_deleted_at ON devices(deleted_at);
diff --git a/x/identity/model/sqlc.yaml b/x/identity/model/sqlc.yaml
deleted file mode 100644
index b9b3445..0000000
--- a/x/identity/model/sqlc.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-version: "2"
-sql:
- - engine: "sqlite"
- queries: "query.sql"
- schema: "schema.sql"
- gen:
- go:
- emit_interface: true
- emit_json_tags: true
- package: "model"
- out: "."
diff --git a/x/identity/view/authorize.templ b/x/identity/view/authorize.templ
deleted file mode 100644
index 8fbf1ab..0000000
--- a/x/identity/view/authorize.templ
+++ /dev/null
@@ -1,8 +0,0 @@
-
-package view
-
-templ authorizeView(data any) {
-
-
Authorize
-
-}
diff --git a/x/identity/view/login.templ b/x/identity/view/login.templ
deleted file mode 100644
index 8bfaed6..0000000
--- a/x/identity/view/login.templ
+++ /dev/null
@@ -1,7 +0,0 @@
-package view
-
-templ loginView(data any) {
-
-
Login
-
-}
diff --git a/x/identity/view/register.templ b/x/identity/view/register.templ
deleted file mode 100644
index d69e7da..0000000
--- a/x/identity/view/register.templ
+++ /dev/null
@@ -1,7 +0,0 @@
-package view
-
-templ registerView(data any) {
-
-
Register
-
-}
diff --git a/x/identity/view/view.go b/x/identity/view/view.go
deleted file mode 100644
index 4504b52..0000000
--- a/x/identity/view/view.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package view
-
-import (
- "github.com/labstack/echo/v4"
- "github.com/onsonr/motr/pkg/htmx"
-)
-
-func HandleView(c echo.Context) error {
- return htmx.Render(c, registerView(nil))
-}
diff --git a/x/portfolio/handler.go b/x/portfolio/handler.go
deleted file mode 100644
index 96312d7..0000000
--- a/x/portfolio/handler.go
+++ /dev/null
@@ -1,35 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package portfolio
-
-import (
- "context"
- "database/sql"
-
- "github.com/labstack/echo/v4"
- "github.com/onsonr/motr/x/portfolio/model"
- "github.com/onsonr/motr/x/portfolio/view"
-)
-
-type Model = *model.Queries
-
-func InitTables(db *sql.DB) (Model, error) {
- if _, err := db.ExecContext(context.Background(), model.Schema); err != nil {
- return nil, err
- }
- return model.New(db), nil
-}
-
-func RegisterRoutes(e *echo.Echo, m Model, mdws ...echo.MiddlewareFunc) {
- // API Routes
- // g := e.Group("/api/portfolio/v1")
- // controller.HandleAssets(g, m)
- // controller.HandleBalances(g, m)
- // controller.HandleChains(g, m)
-
- // View Routes
- e.GET("/allocation", view.HandleView)
- e.GET("/market", view.HandleView)
- e.GET("/transactions", view.HandleView)
-}
diff --git a/x/portfolio/model/embed.go b/x/portfolio/model/embed.go
deleted file mode 100644
index 739963c..0000000
--- a/x/portfolio/model/embed.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package model
-
-import _ "embed"
-
-//go:embed query.sql
-var Query string
-
-//go:embed schema.sql
-var Schema string
diff --git a/x/portfolio/model/models.go b/x/portfolio/model/models.go
deleted file mode 100644
index 467c22f..0000000
--- a/x/portfolio/model/models.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "database/sql"
- "time"
-)
-
-type Asset struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- Name string `json:"name"`
- Symbol string `json:"symbol"`
- Decimals int64 `json:"decimals"`
- ChainID string `json:"chain_id"`
- Channel string `json:"channel"`
- AssetType string `json:"asset_type"`
- CoingeckoID sql.NullString `json:"coingecko_id"`
-}
-
-type Balance struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- AccountID string `json:"account_id"`
- AssetID string `json:"asset_id"`
- Amount string `json:"amount"`
- LastUpdatedHeight int64 `json:"last_updated_height"`
- IsDelegated bool `json:"is_delegated"`
- IsStaked bool `json:"is_staked"`
- IsVesting bool `json:"is_vesting"`
-}
-
-type Chain struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- ChainID string `json:"chain_id"`
- ChainName string `json:"chain_name"`
- PrettyName string `json:"pretty_name"`
- NetworkType string `json:"network_type"`
- Bech32Prefix string `json:"bech32_prefix"`
- DaemonName string `json:"daemon_name"`
- NodeHome string `json:"node_home"`
- Slip44 int64 `json:"slip44"`
- Fees string `json:"fees"`
- StakingDenom string `json:"staking_denom"`
- LogoUri sql.NullString `json:"logo_uri"`
- Apis string `json:"apis"`
- Explorers sql.NullString `json:"explorers"`
- IsEnabled bool `json:"is_enabled"`
- Status string `json:"status"`
- Codebase sql.NullString `json:"codebase"`
-}
diff --git a/x/portfolio/model/querier.go b/x/portfolio/model/querier.go
deleted file mode 100644
index c323c21..0000000
--- a/x/portfolio/model/querier.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "context"
- "database/sql"
-)
-
-type Querier interface {
- CreateAsset(ctx context.Context, arg CreateAssetParams) (Asset, error)
- // Balance table methods
- CreateBalance(ctx context.Context, arg CreateBalanceParams) (Balance, error)
- // Chain table methods
- CreateChain(ctx context.Context, arg CreateChainParams) (Chain, error)
- GetAssetByCoingeckoID(ctx context.Context, coingeckoID sql.NullString) (Asset, error)
- GetAssetByID(ctx context.Context, id string) (Asset, error)
- GetAssetBySymbolAndChain(ctx context.Context, arg GetAssetBySymbolAndChainParams) (Asset, error)
- GetBalanceByAccountAndAsset(ctx context.Context, arg GetBalanceByAccountAndAssetParams) (Balance, error)
- GetBalanceByID(ctx context.Context, id string) (Balance, error)
- GetChainByChainID(ctx context.Context, chainID string) (Chain, error)
- GetChainByID(ctx context.Context, id string) (Chain, error)
- ListAssets(ctx context.Context) ([]Asset, error)
- ListAssetsByChain(ctx context.Context, chainID string) ([]Asset, error)
- ListAssetsByType(ctx context.Context, assetType string) ([]Asset, error)
- ListBalancesByAccount(ctx context.Context, accountID string) ([]Balance, error)
- ListChains(ctx context.Context) ([]Chain, error)
- ListChainsByNetworkType(ctx context.Context, networkType string) ([]Chain, error)
- ListChainsByStatus(ctx context.Context, status string) ([]Chain, error)
- ListEnabledChains(ctx context.Context) ([]Chain, error)
- SearchAssetsByName(ctx context.Context, name string) ([]Asset, error)
- SearchChainsByName(ctx context.Context, arg SearchChainsByNameParams) ([]Chain, error)
- SoftDeleteAsset(ctx context.Context, id string) error
- SoftDeleteBalance(ctx context.Context, id string) error
- SoftDeleteChain(ctx context.Context, id string) error
- UpdateAsset(ctx context.Context, arg UpdateAssetParams) (Asset, error)
- UpdateBalance(ctx context.Context, arg UpdateBalanceParams) (Balance, error)
- UpdateChain(ctx context.Context, arg UpdateChainParams) (Chain, error)
- UpdateChainStatus(ctx context.Context, arg UpdateChainStatusParams) (Chain, error)
-}
-
-var _ Querier = (*Queries)(nil)
diff --git a/x/portfolio/model/query.sql b/x/portfolio/model/query.sql
deleted file mode 100644
index f87fcea..0000000
--- a/x/portfolio/model/query.sql
+++ /dev/null
@@ -1,208 +0,0 @@
-
--- Balance table methods
--- name: CreateBalance :one
-INSERT INTO balances (
- id,
- account_id,
- asset_id,
- amount,
- last_updated_height,
- is_delegated,
- is_staked,
- is_vesting
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING *;
-
--- name: GetBalanceByID :one
-SELECT * FROM balances
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetBalanceByAccountAndAsset :one
-SELECT * FROM balances
-WHERE account_id = ? AND asset_id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: ListBalancesByAccount :many
-SELECT * FROM balances
-WHERE account_id = ? AND deleted_at IS NULL
-ORDER BY asset_id;
-
--- name: UpdateBalance :one
-UPDATE balances
-SET
- amount = ?,
- last_updated_height = ?,
- is_delegated = ?,
- is_staked = ?,
- is_vesting = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: SoftDeleteBalance :exec
-UPDATE balances
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?;
-
-
--- name: CreateAsset :one
-INSERT INTO assets (
- id,
- name,
- symbol,
- decimals,
- chain_id,
- channel,
- asset_type,
- coingecko_id
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING *;
-
--- name: GetAssetByID :one
-SELECT * FROM assets
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetAssetBySymbolAndChain :one
-SELECT * FROM assets
-WHERE symbol = ? AND chain_id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: ListAssets :many
-SELECT * FROM assets
-WHERE deleted_at IS NULL
-ORDER BY chain_id, symbol;
-
--- name: ListAssetsByChain :many
-SELECT * FROM assets
-WHERE chain_id = ? AND deleted_at IS NULL
-ORDER BY symbol;
-
--- name: ListAssetsByType :many
-SELECT * FROM assets
-WHERE asset_type = ? AND deleted_at IS NULL
-ORDER BY chain_id, symbol;
-
--- name: SearchAssetsByName :many
-SELECT * FROM assets
-WHERE name LIKE ? AND deleted_at IS NULL
-ORDER BY chain_id, name
-LIMIT 100;
-
--- name: UpdateAsset :one
-UPDATE assets
-SET
- name = ?,
- decimals = ?,
- channel = ?,
- asset_type = ?,
- coingecko_id = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: SoftDeleteAsset :exec
-UPDATE assets
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?;
-
--- name: GetAssetByCoingeckoID :one
-SELECT * FROM assets
-WHERE coingecko_id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- Chain table methods
--- name: CreateChain :one
-INSERT INTO chains (
- id,
- chain_id,
- chain_name,
- pretty_name,
- network_type,
- bech32_prefix,
- daemon_name,
- node_home,
- slip44,
- fees,
- staking_denom,
- logo_uri,
- apis,
- explorers,
- is_enabled,
- status,
- codebase
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING *;
-
--- name: GetChainByID :one
-SELECT * FROM chains
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetChainByChainID :one
-SELECT * FROM chains
-WHERE chain_id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: ListChains :many
-SELECT * FROM chains
-WHERE deleted_at IS NULL
-ORDER BY network_type, chain_name;
-
--- name: ListChainsByNetworkType :many
-SELECT * FROM chains
-WHERE network_type = ? AND deleted_at IS NULL
-ORDER BY chain_name;
-
--- name: ListEnabledChains :many
-SELECT * FROM chains
-WHERE is_enabled = true AND deleted_at IS NULL
-ORDER BY network_type, chain_name;
-
--- name: ListChainsByStatus :many
-SELECT * FROM chains
-WHERE status = ? AND deleted_at IS NULL
-ORDER BY network_type, chain_name;
-
--- name: SearchChainsByName :many
-SELECT * FROM chains
-WHERE (chain_name LIKE ? OR pretty_name LIKE ?) AND deleted_at IS NULL
-ORDER BY network_type, chain_name
-LIMIT 100;
-
--- name: UpdateChain :one
-UPDATE chains
-SET
- chain_name = ?,
- pretty_name = ?,
- network_type = ?,
- bech32_prefix = ?,
- daemon_name = ?,
- node_home = ?,
- slip44 = ?,
- fees = ?,
- staking_denom = ?,
- logo_uri = ?,
- apis = ?,
- explorers = ?,
- is_enabled = ?,
- status = ?,
- codebase = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: UpdateChainStatus :one
-UPDATE chains
-SET
- is_enabled = ?,
- status = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING *;
-
--- name: SoftDeleteChain :exec
-UPDATE chains
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?;
diff --git a/x/portfolio/model/query.sql.go b/x/portfolio/model/query.sql.go
deleted file mode 100644
index 12f72c1..0000000
--- a/x/portfolio/model/query.sql.go
+++ /dev/null
@@ -1,1133 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-// source: query.sql
-
-package model
-
-import (
- "context"
- "database/sql"
-)
-
-const createAsset = `-- name: CreateAsset :one
-INSERT INTO assets (
- id,
- name,
- symbol,
- decimals,
- chain_id,
- channel,
- asset_type,
- coingecko_id
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id
-`
-
-type CreateAssetParams struct {
- ID string `json:"id"`
- Name string `json:"name"`
- Symbol string `json:"symbol"`
- Decimals int64 `json:"decimals"`
- ChainID string `json:"chain_id"`
- Channel string `json:"channel"`
- AssetType string `json:"asset_type"`
- CoingeckoID sql.NullString `json:"coingecko_id"`
-}
-
-func (q *Queries) CreateAsset(ctx context.Context, arg CreateAssetParams) (Asset, error) {
- row := q.db.QueryRowContext(ctx, createAsset,
- arg.ID,
- arg.Name,
- arg.Symbol,
- arg.Decimals,
- arg.ChainID,
- arg.Channel,
- arg.AssetType,
- arg.CoingeckoID,
- )
- var i Asset
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- )
- return i, err
-}
-
-const createBalance = `-- name: CreateBalance :one
-INSERT INTO balances (
- id,
- account_id,
- asset_id,
- amount,
- last_updated_height,
- is_delegated,
- is_staked,
- is_vesting
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING id, created_at, updated_at, deleted_at, account_id, asset_id, amount, last_updated_height, is_delegated, is_staked, is_vesting
-`
-
-type CreateBalanceParams struct {
- ID string `json:"id"`
- AccountID string `json:"account_id"`
- AssetID string `json:"asset_id"`
- Amount string `json:"amount"`
- LastUpdatedHeight int64 `json:"last_updated_height"`
- IsDelegated bool `json:"is_delegated"`
- IsStaked bool `json:"is_staked"`
- IsVesting bool `json:"is_vesting"`
-}
-
-// Balance table methods
-func (q *Queries) CreateBalance(ctx context.Context, arg CreateBalanceParams) (Balance, error) {
- row := q.db.QueryRowContext(ctx, createBalance,
- arg.ID,
- arg.AccountID,
- arg.AssetID,
- arg.Amount,
- arg.LastUpdatedHeight,
- arg.IsDelegated,
- arg.IsStaked,
- arg.IsVesting,
- )
- var i Balance
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.AccountID,
- &i.AssetID,
- &i.Amount,
- &i.LastUpdatedHeight,
- &i.IsDelegated,
- &i.IsStaked,
- &i.IsVesting,
- )
- return i, err
-}
-
-const createChain = `-- name: CreateChain :one
-INSERT INTO chains (
- id,
- chain_id,
- chain_name,
- pretty_name,
- network_type,
- bech32_prefix,
- daemon_name,
- node_home,
- slip44,
- fees,
- staking_denom,
- logo_uri,
- apis,
- explorers,
- is_enabled,
- status,
- codebase
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-RETURNING id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase
-`
-
-type CreateChainParams struct {
- ID string `json:"id"`
- ChainID string `json:"chain_id"`
- ChainName string `json:"chain_name"`
- PrettyName string `json:"pretty_name"`
- NetworkType string `json:"network_type"`
- Bech32Prefix string `json:"bech32_prefix"`
- DaemonName string `json:"daemon_name"`
- NodeHome string `json:"node_home"`
- Slip44 int64 `json:"slip44"`
- Fees string `json:"fees"`
- StakingDenom string `json:"staking_denom"`
- LogoUri sql.NullString `json:"logo_uri"`
- Apis string `json:"apis"`
- Explorers sql.NullString `json:"explorers"`
- IsEnabled bool `json:"is_enabled"`
- Status string `json:"status"`
- Codebase sql.NullString `json:"codebase"`
-}
-
-// Chain table methods
-func (q *Queries) CreateChain(ctx context.Context, arg CreateChainParams) (Chain, error) {
- row := q.db.QueryRowContext(ctx, createChain,
- arg.ID,
- arg.ChainID,
- arg.ChainName,
- arg.PrettyName,
- arg.NetworkType,
- arg.Bech32Prefix,
- arg.DaemonName,
- arg.NodeHome,
- arg.Slip44,
- arg.Fees,
- arg.StakingDenom,
- arg.LogoUri,
- arg.Apis,
- arg.Explorers,
- arg.IsEnabled,
- arg.Status,
- arg.Codebase,
- )
- var i Chain
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- )
- return i, err
-}
-
-const getAssetByCoingeckoID = `-- name: GetAssetByCoingeckoID :one
-SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
-WHERE coingecko_id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetAssetByCoingeckoID(ctx context.Context, coingeckoID sql.NullString) (Asset, error) {
- row := q.db.QueryRowContext(ctx, getAssetByCoingeckoID, coingeckoID)
- var i Asset
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- )
- return i, err
-}
-
-const getAssetByID = `-- name: GetAssetByID :one
-SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetAssetByID(ctx context.Context, id string) (Asset, error) {
- row := q.db.QueryRowContext(ctx, getAssetByID, id)
- var i Asset
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- )
- return i, err
-}
-
-const getAssetBySymbolAndChain = `-- name: GetAssetBySymbolAndChain :one
-SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
-WHERE symbol = ? AND chain_id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-type GetAssetBySymbolAndChainParams struct {
- Symbol string `json:"symbol"`
- ChainID string `json:"chain_id"`
-}
-
-func (q *Queries) GetAssetBySymbolAndChain(ctx context.Context, arg GetAssetBySymbolAndChainParams) (Asset, error) {
- row := q.db.QueryRowContext(ctx, getAssetBySymbolAndChain, arg.Symbol, arg.ChainID)
- var i Asset
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- )
- return i, err
-}
-
-const getBalanceByAccountAndAsset = `-- name: GetBalanceByAccountAndAsset :one
-SELECT id, created_at, updated_at, deleted_at, account_id, asset_id, amount, last_updated_height, is_delegated, is_staked, is_vesting FROM balances
-WHERE account_id = ? AND asset_id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-type GetBalanceByAccountAndAssetParams struct {
- AccountID string `json:"account_id"`
- AssetID string `json:"asset_id"`
-}
-
-func (q *Queries) GetBalanceByAccountAndAsset(ctx context.Context, arg GetBalanceByAccountAndAssetParams) (Balance, error) {
- row := q.db.QueryRowContext(ctx, getBalanceByAccountAndAsset, arg.AccountID, arg.AssetID)
- var i Balance
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.AccountID,
- &i.AssetID,
- &i.Amount,
- &i.LastUpdatedHeight,
- &i.IsDelegated,
- &i.IsStaked,
- &i.IsVesting,
- )
- return i, err
-}
-
-const getBalanceByID = `-- name: GetBalanceByID :one
-SELECT id, created_at, updated_at, deleted_at, account_id, asset_id, amount, last_updated_height, is_delegated, is_staked, is_vesting FROM balances
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetBalanceByID(ctx context.Context, id string) (Balance, error) {
- row := q.db.QueryRowContext(ctx, getBalanceByID, id)
- var i Balance
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.AccountID,
- &i.AssetID,
- &i.Amount,
- &i.LastUpdatedHeight,
- &i.IsDelegated,
- &i.IsStaked,
- &i.IsVesting,
- )
- return i, err
-}
-
-const getChainByChainID = `-- name: GetChainByChainID :one
-SELECT id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase FROM chains
-WHERE chain_id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetChainByChainID(ctx context.Context, chainID string) (Chain, error) {
- row := q.db.QueryRowContext(ctx, getChainByChainID, chainID)
- var i Chain
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- )
- return i, err
-}
-
-const getChainByID = `-- name: GetChainByID :one
-SELECT id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase FROM chains
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetChainByID(ctx context.Context, id string) (Chain, error) {
- row := q.db.QueryRowContext(ctx, getChainByID, id)
- var i Chain
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- )
- return i, err
-}
-
-const listAssets = `-- name: ListAssets :many
-SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
-WHERE deleted_at IS NULL
-ORDER BY chain_id, symbol
-`
-
-func (q *Queries) ListAssets(ctx context.Context) ([]Asset, error) {
- rows, err := q.db.QueryContext(ctx, listAssets)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Asset
- for rows.Next() {
- var i Asset
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listAssetsByChain = `-- name: ListAssetsByChain :many
-SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
-WHERE chain_id = ? AND deleted_at IS NULL
-ORDER BY symbol
-`
-
-func (q *Queries) ListAssetsByChain(ctx context.Context, chainID string) ([]Asset, error) {
- rows, err := q.db.QueryContext(ctx, listAssetsByChain, chainID)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Asset
- for rows.Next() {
- var i Asset
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listAssetsByType = `-- name: ListAssetsByType :many
-SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
-WHERE asset_type = ? AND deleted_at IS NULL
-ORDER BY chain_id, symbol
-`
-
-func (q *Queries) ListAssetsByType(ctx context.Context, assetType string) ([]Asset, error) {
- rows, err := q.db.QueryContext(ctx, listAssetsByType, assetType)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Asset
- for rows.Next() {
- var i Asset
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listBalancesByAccount = `-- name: ListBalancesByAccount :many
-SELECT id, created_at, updated_at, deleted_at, account_id, asset_id, amount, last_updated_height, is_delegated, is_staked, is_vesting FROM balances
-WHERE account_id = ? AND deleted_at IS NULL
-ORDER BY asset_id
-`
-
-func (q *Queries) ListBalancesByAccount(ctx context.Context, accountID string) ([]Balance, error) {
- rows, err := q.db.QueryContext(ctx, listBalancesByAccount, accountID)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Balance
- for rows.Next() {
- var i Balance
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.AccountID,
- &i.AssetID,
- &i.Amount,
- &i.LastUpdatedHeight,
- &i.IsDelegated,
- &i.IsStaked,
- &i.IsVesting,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listChains = `-- name: ListChains :many
-SELECT id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase FROM chains
-WHERE deleted_at IS NULL
-ORDER BY network_type, chain_name
-`
-
-func (q *Queries) ListChains(ctx context.Context) ([]Chain, error) {
- rows, err := q.db.QueryContext(ctx, listChains)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Chain
- for rows.Next() {
- var i Chain
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listChainsByNetworkType = `-- name: ListChainsByNetworkType :many
-SELECT id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase FROM chains
-WHERE network_type = ? AND deleted_at IS NULL
-ORDER BY chain_name
-`
-
-func (q *Queries) ListChainsByNetworkType(ctx context.Context, networkType string) ([]Chain, error) {
- rows, err := q.db.QueryContext(ctx, listChainsByNetworkType, networkType)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Chain
- for rows.Next() {
- var i Chain
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listChainsByStatus = `-- name: ListChainsByStatus :many
-SELECT id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase FROM chains
-WHERE status = ? AND deleted_at IS NULL
-ORDER BY network_type, chain_name
-`
-
-func (q *Queries) ListChainsByStatus(ctx context.Context, status string) ([]Chain, error) {
- rows, err := q.db.QueryContext(ctx, listChainsByStatus, status)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Chain
- for rows.Next() {
- var i Chain
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const listEnabledChains = `-- name: ListEnabledChains :many
-SELECT id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase FROM chains
-WHERE is_enabled = true AND deleted_at IS NULL
-ORDER BY network_type, chain_name
-`
-
-func (q *Queries) ListEnabledChains(ctx context.Context) ([]Chain, error) {
- rows, err := q.db.QueryContext(ctx, listEnabledChains)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Chain
- for rows.Next() {
- var i Chain
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const searchAssetsByName = `-- name: SearchAssetsByName :many
-SELECT id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id FROM assets
-WHERE name LIKE ? AND deleted_at IS NULL
-ORDER BY chain_id, name
-LIMIT 100
-`
-
-func (q *Queries) SearchAssetsByName(ctx context.Context, name string) ([]Asset, error) {
- rows, err := q.db.QueryContext(ctx, searchAssetsByName, name)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Asset
- for rows.Next() {
- var i Asset
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const searchChainsByName = `-- name: SearchChainsByName :many
-SELECT id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase FROM chains
-WHERE (chain_name LIKE ? OR pretty_name LIKE ?) AND deleted_at IS NULL
-ORDER BY network_type, chain_name
-LIMIT 100
-`
-
-type SearchChainsByNameParams struct {
- ChainName string `json:"chain_name"`
- PrettyName string `json:"pretty_name"`
-}
-
-func (q *Queries) SearchChainsByName(ctx context.Context, arg SearchChainsByNameParams) ([]Chain, error) {
- rows, err := q.db.QueryContext(ctx, searchChainsByName, arg.ChainName, arg.PrettyName)
- if err != nil {
- return nil, err
- }
- defer rows.Close()
- var items []Chain
- for rows.Next() {
- var i Chain
- if err := rows.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- ); err != nil {
- return nil, err
- }
- items = append(items, i)
- }
- if err := rows.Close(); err != nil {
- return nil, err
- }
- if err := rows.Err(); err != nil {
- return nil, err
- }
- return items, nil
-}
-
-const softDeleteAsset = `-- name: SoftDeleteAsset :exec
-UPDATE assets
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?
-`
-
-func (q *Queries) SoftDeleteAsset(ctx context.Context, id string) error {
- _, err := q.db.ExecContext(ctx, softDeleteAsset, id)
- return err
-}
-
-const softDeleteBalance = `-- name: SoftDeleteBalance :exec
-UPDATE balances
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?
-`
-
-func (q *Queries) SoftDeleteBalance(ctx context.Context, id string) error {
- _, err := q.db.ExecContext(ctx, softDeleteBalance, id)
- return err
-}
-
-const softDeleteChain = `-- name: SoftDeleteChain :exec
-UPDATE chains
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE id = ?
-`
-
-func (q *Queries) SoftDeleteChain(ctx context.Context, id string) error {
- _, err := q.db.ExecContext(ctx, softDeleteChain, id)
- return err
-}
-
-const updateAsset = `-- name: UpdateAsset :one
-UPDATE assets
-SET
- name = ?,
- decimals = ?,
- channel = ?,
- asset_type = ?,
- coingecko_id = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, name, symbol, decimals, chain_id, channel, asset_type, coingecko_id
-`
-
-type UpdateAssetParams struct {
- Name string `json:"name"`
- Decimals int64 `json:"decimals"`
- Channel string `json:"channel"`
- AssetType string `json:"asset_type"`
- CoingeckoID sql.NullString `json:"coingecko_id"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateAsset(ctx context.Context, arg UpdateAssetParams) (Asset, error) {
- row := q.db.QueryRowContext(ctx, updateAsset,
- arg.Name,
- arg.Decimals,
- arg.Channel,
- arg.AssetType,
- arg.CoingeckoID,
- arg.ID,
- )
- var i Asset
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Name,
- &i.Symbol,
- &i.Decimals,
- &i.ChainID,
- &i.Channel,
- &i.AssetType,
- &i.CoingeckoID,
- )
- return i, err
-}
-
-const updateBalance = `-- name: UpdateBalance :one
-UPDATE balances
-SET
- amount = ?,
- last_updated_height = ?,
- is_delegated = ?,
- is_staked = ?,
- is_vesting = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, account_id, asset_id, amount, last_updated_height, is_delegated, is_staked, is_vesting
-`
-
-type UpdateBalanceParams struct {
- Amount string `json:"amount"`
- LastUpdatedHeight int64 `json:"last_updated_height"`
- IsDelegated bool `json:"is_delegated"`
- IsStaked bool `json:"is_staked"`
- IsVesting bool `json:"is_vesting"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateBalance(ctx context.Context, arg UpdateBalanceParams) (Balance, error) {
- row := q.db.QueryRowContext(ctx, updateBalance,
- arg.Amount,
- arg.LastUpdatedHeight,
- arg.IsDelegated,
- arg.IsStaked,
- arg.IsVesting,
- arg.ID,
- )
- var i Balance
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.AccountID,
- &i.AssetID,
- &i.Amount,
- &i.LastUpdatedHeight,
- &i.IsDelegated,
- &i.IsStaked,
- &i.IsVesting,
- )
- return i, err
-}
-
-const updateChain = `-- name: UpdateChain :one
-UPDATE chains
-SET
- chain_name = ?,
- pretty_name = ?,
- network_type = ?,
- bech32_prefix = ?,
- daemon_name = ?,
- node_home = ?,
- slip44 = ?,
- fees = ?,
- staking_denom = ?,
- logo_uri = ?,
- apis = ?,
- explorers = ?,
- is_enabled = ?,
- status = ?,
- codebase = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase
-`
-
-type UpdateChainParams struct {
- ChainName string `json:"chain_name"`
- PrettyName string `json:"pretty_name"`
- NetworkType string `json:"network_type"`
- Bech32Prefix string `json:"bech32_prefix"`
- DaemonName string `json:"daemon_name"`
- NodeHome string `json:"node_home"`
- Slip44 int64 `json:"slip44"`
- Fees string `json:"fees"`
- StakingDenom string `json:"staking_denom"`
- LogoUri sql.NullString `json:"logo_uri"`
- Apis string `json:"apis"`
- Explorers sql.NullString `json:"explorers"`
- IsEnabled bool `json:"is_enabled"`
- Status string `json:"status"`
- Codebase sql.NullString `json:"codebase"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateChain(ctx context.Context, arg UpdateChainParams) (Chain, error) {
- row := q.db.QueryRowContext(ctx, updateChain,
- arg.ChainName,
- arg.PrettyName,
- arg.NetworkType,
- arg.Bech32Prefix,
- arg.DaemonName,
- arg.NodeHome,
- arg.Slip44,
- arg.Fees,
- arg.StakingDenom,
- arg.LogoUri,
- arg.Apis,
- arg.Explorers,
- arg.IsEnabled,
- arg.Status,
- arg.Codebase,
- arg.ID,
- )
- var i Chain
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- )
- return i, err
-}
-
-const updateChainStatus = `-- name: UpdateChainStatus :one
-UPDATE chains
-SET
- is_enabled = ?,
- status = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ? AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, chain_id, chain_name, pretty_name, network_type, bech32_prefix, daemon_name, node_home, slip44, fees, staking_denom, logo_uri, apis, explorers, is_enabled, status, codebase
-`
-
-type UpdateChainStatusParams struct {
- IsEnabled bool `json:"is_enabled"`
- Status string `json:"status"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateChainStatus(ctx context.Context, arg UpdateChainStatusParams) (Chain, error) {
- row := q.db.QueryRowContext(ctx, updateChainStatus, arg.IsEnabled, arg.Status, arg.ID)
- var i Chain
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.ChainID,
- &i.ChainName,
- &i.PrettyName,
- &i.NetworkType,
- &i.Bech32Prefix,
- &i.DaemonName,
- &i.NodeHome,
- &i.Slip44,
- &i.Fees,
- &i.StakingDenom,
- &i.LogoUri,
- &i.Apis,
- &i.Explorers,
- &i.IsEnabled,
- &i.Status,
- &i.Codebase,
- )
- return i, err
-}
diff --git a/x/portfolio/model/schema.sql b/x/portfolio/model/schema.sql
deleted file mode 100644
index 50beeb8..0000000
--- a/x/portfolio/model/schema.sql
+++ /dev/null
@@ -1,72 +0,0 @@
--- Assets represent tokens and coins
-CREATE TABLE assets (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- name TEXT NOT NULL,
- symbol TEXT NOT NULL,
- decimals INTEGER NOT NULL CHECK(decimals >= 0),
- chain_id TEXT NOT NULL,
- channel TEXT NOT NULL,
- asset_type TEXT NOT NULL,
- coingecko_id TEXT,
- UNIQUE(chain_id, symbol)
-);
-
-CREATE INDEX idx_assets_symbol ON assets(symbol);
-CREATE INDEX idx_assets_chain_id ON assets(chain_id);
-CREATE INDEX idx_assets_deleted_at ON assets(deleted_at);
-
-
--- Balances track asset holdings for accounts
-CREATE TABLE balances (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- account_id TEXT NOT NULL,
- asset_id TEXT NOT NULL,
- amount TEXT NOT NULL, -- Stored as string to handle large decimal numbers precisely
- last_updated_height INTEGER NOT NULL DEFAULT 0,
- is_delegated BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_delegated IN (0,1)),
- is_staked BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_staked IN (0,1)),
- is_vesting BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_vesting IN (0,1)),
- FOREIGN KEY (account_id) REFERENCES accounts(id),
- FOREIGN KEY (asset_id) REFERENCES assets(id),
- UNIQUE(account_id, asset_id)
-);
-
-CREATE INDEX idx_balances_account_id ON balances(account_id);
-CREATE INDEX idx_balances_asset_id ON balances(asset_id);
-CREATE INDEX idx_balances_deleted_at ON balances(deleted_at);
-
--- Chains table following Cosmos chain registry specification
-CREATE TABLE chains (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- chain_id TEXT NOT NULL UNIQUE,
- chain_name TEXT NOT NULL,
- pretty_name TEXT NOT NULL,
- network_type TEXT NOT NULL, -- mainnet, testnet, devnet
- bech32_prefix TEXT NOT NULL,
- daemon_name TEXT NOT NULL,
- node_home TEXT NOT NULL,
- slip44 INTEGER NOT NULL,
- fees TEXT NOT NULL, -- JSON structure for fee information
- staking_denom TEXT NOT NULL,
- logo_uri TEXT,
- apis TEXT NOT NULL, -- JSON structure for API endpoints (rpc, rest, grpc)
- explorers TEXT, -- JSON structure for block explorers
- is_enabled BOOLEAN NOT NULL DEFAULT TRUE CHECK(is_enabled IN (0,1)),
- status TEXT NOT NULL DEFAULT 'live', -- live, upcoming, killed
- codebase TEXT -- JSON structure for GitHub repos, etc.
-);
-
-CREATE INDEX idx_chains_chain_id ON chains(chain_id);
-CREATE INDEX idx_chains_network_type ON chains(network_type);
-CREATE INDEX idx_chains_deleted_at ON chains(deleted_at);
-CREATE INDEX idx_chains_is_enabled ON chains(is_enabled);
-
diff --git a/x/portfolio/model/sqlc.yaml b/x/portfolio/model/sqlc.yaml
deleted file mode 100644
index b9b3445..0000000
--- a/x/portfolio/model/sqlc.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-version: "2"
-sql:
- - engine: "sqlite"
- queries: "query.sql"
- schema: "schema.sql"
- gen:
- go:
- emit_interface: true
- emit_json_tags: true
- package: "model"
- out: "."
diff --git a/x/portfolio/view/allocation.templ b/x/portfolio/view/allocation.templ
deleted file mode 100644
index a2a3be8..0000000
--- a/x/portfolio/view/allocation.templ
+++ /dev/null
@@ -1,7 +0,0 @@
-package view
-
-templ allocationView(data any) {
-
-
Allocation
-
-}
diff --git a/x/portfolio/view/market.templ b/x/portfolio/view/market.templ
deleted file mode 100644
index 75ec64f..0000000
--- a/x/portfolio/view/market.templ
+++ /dev/null
@@ -1,7 +0,0 @@
-package view
-
-templ marketView(data any) {
-
-
Account
-
-}
diff --git a/x/portfolio/view/market_templ.go b/x/portfolio/view/market_templ.go
deleted file mode 100644
index b9cac89..0000000
--- a/x/portfolio/view/market_templ.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Code generated by templ - DO NOT EDIT.
-
-// templ: version: v0.3.857
-package view
-
-//lint:file-ignore SA4006 This context is only used if a nested component is present.
-
-import "github.com/a-h/templ"
-import templruntime "github.com/a-h/templ/runtime"
-
-func marketView(data any) templ.Component {
- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
- return templ_7745c5c3_CtxErr
- }
- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
- if !templ_7745c5c3_IsBuffer {
- defer func() {
- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err == nil {
- templ_7745c5c3_Err = templ_7745c5c3_BufErr
- }
- }()
- }
- ctx = templ.InitializeContext(ctx)
- templ_7745c5c3_Var1 := templ.GetChildren(ctx)
- if templ_7745c5c3_Var1 == nil {
- templ_7745c5c3_Var1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Account
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- return nil
- })
-}
-
-var _ = templruntime.GeneratedTemplate
diff --git a/x/portfolio/view/transactions.templ b/x/portfolio/view/transactions.templ
deleted file mode 100644
index 26f05b7..0000000
--- a/x/portfolio/view/transactions.templ
+++ /dev/null
@@ -1,7 +0,0 @@
-package view
-
-templ transactionsView(data any) {
-
-
Transactions
-
-}
diff --git a/x/portfolio/view/transactions_templ.go b/x/portfolio/view/transactions_templ.go
deleted file mode 100644
index 2f4b804..0000000
--- a/x/portfolio/view/transactions_templ.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Code generated by templ - DO NOT EDIT.
-
-// templ: version: v0.3.857
-package view
-
-//lint:file-ignore SA4006 This context is only used if a nested component is present.
-
-import "github.com/a-h/templ"
-import templruntime "github.com/a-h/templ/runtime"
-
-func transactionsView(data any) templ.Component {
- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
- return templ_7745c5c3_CtxErr
- }
- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
- if !templ_7745c5c3_IsBuffer {
- defer func() {
- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err == nil {
- templ_7745c5c3_Err = templ_7745c5c3_BufErr
- }
- }()
- }
- ctx = templ.InitializeContext(ctx)
- templ_7745c5c3_Var1 := templ.GetChildren(ctx)
- if templ_7745c5c3_Var1 == nil {
- templ_7745c5c3_Var1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Transactions
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- return nil
- })
-}
-
-var _ = templruntime.GeneratedTemplate
diff --git a/x/portfolio/view/view.go b/x/portfolio/view/view.go
deleted file mode 100644
index 55b2965..0000000
--- a/x/portfolio/view/view.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package view
-
-import (
- "github.com/labstack/echo/v4"
- "github.com/onsonr/motr/pkg/htmx"
-)
-
-func HandleView(c echo.Context) error {
- return htmx.Render(c, marketView(nil))
-}
diff --git a/x/user/handler.go b/x/user/handler.go
deleted file mode 100644
index 0b075e5..0000000
--- a/x/user/handler.go
+++ /dev/null
@@ -1,35 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package user
-
-import (
- "context"
- "database/sql"
-
- "github.com/labstack/echo/v4"
- "github.com/onsonr/motr/x/user/model"
- "github.com/onsonr/motr/x/user/view"
-)
-
-type Model = *model.Queries
-
-func InitTables(db *sql.DB) (Model, error) {
- if _, err := db.ExecContext(context.Background(), model.Schema); err != nil {
- return nil, err
- }
- return model.New(db), nil
-}
-
-func RegisterRoutes(e *echo.Echo, m Model, mdws ...echo.MiddlewareFunc) {
- // // API Routes
- // g := e.Group("/api/user/v1")
- // controller.HandleProfiles(g, m)
- // controller.HandleSessions(g, m)
- // controller.HandleVault(g, m)
- //
- // View Routes
- e.GET("/dashboard", view.HandleView)
- e.GET("/settings", view.HandleView)
- e.GET("/wallet", view.HandleView)
-}
diff --git a/x/user/model/db.go b/x/user/model/db.go
deleted file mode 100644
index d044a9e..0000000
--- a/x/user/model/db.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "context"
- "database/sql"
-)
-
-type DBTX interface {
- ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
- PrepareContext(context.Context, string) (*sql.Stmt, error)
- QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
- QueryRowContext(context.Context, string, ...interface{}) *sql.Row
-}
-
-func New(db DBTX) *Queries {
- return &Queries{db: db}
-}
-
-type Queries struct {
- db DBTX
-}
-
-func (q *Queries) WithTx(tx *sql.Tx) *Queries {
- return &Queries{
- db: tx,
- }
-}
diff --git a/x/user/model/embed.go b/x/user/model/embed.go
deleted file mode 100644
index 739963c..0000000
--- a/x/user/model/embed.go
+++ /dev/null
@@ -1,9 +0,0 @@
-package model
-
-import _ "embed"
-
-//go:embed query.sql
-var Query string
-
-//go:embed schema.sql
-var Schema string
diff --git a/x/user/model/models.go b/x/user/model/models.go
deleted file mode 100644
index 29f4131..0000000
--- a/x/user/model/models.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "database/sql"
- "time"
-)
-
-type Profile struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- Address string `json:"address"`
- Handle string `json:"handle"`
- Origin string `json:"origin"`
- Name string `json:"name"`
-}
-
-type Session struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- BrowserName string `json:"browser_name"`
- BrowserVersion string `json:"browser_version"`
- ClientIpaddr string `json:"client_ipaddr"`
- Platform string `json:"platform"`
- IsDesktop bool `json:"is_desktop"`
- IsMobile bool `json:"is_mobile"`
- IsTablet bool `json:"is_tablet"`
- IsTv bool `json:"is_tv"`
- IsBot bool `json:"is_bot"`
- Challenge string `json:"challenge"`
- IsHumanFirst bool `json:"is_human_first"`
- IsHumanLast bool `json:"is_human_last"`
- ProfileID int64 `json:"profile_id"`
-}
-
-type Vault struct {
- ID string `json:"id"`
- CreatedAt time.Time `json:"created_at"`
- UpdatedAt time.Time `json:"updated_at"`
- DeletedAt sql.NullTime `json:"deleted_at"`
- Handle string `json:"handle"`
- Origin string `json:"origin"`
- Address string `json:"address"`
- Cid string `json:"cid"`
- Config string `json:"config"`
- SessionID string `json:"session_id"`
- RedirectUri string `json:"redirect_uri"`
-}
diff --git a/x/user/model/querier.go b/x/user/model/querier.go
deleted file mode 100644
index 9ede1d4..0000000
--- a/x/user/model/querier.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-
-package model
-
-import (
- "context"
-)
-
-type Querier interface {
- CheckHandleExists(ctx context.Context, handle string) (bool, error)
- CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error)
- GetChallengeBySessionID(ctx context.Context, id string) (string, error)
- GetHumanVerificationNumbers(ctx context.Context, id string) (GetHumanVerificationNumbersRow, error)
- GetProfileByAddress(ctx context.Context, address string) (Profile, error)
- GetProfileByHandle(ctx context.Context, handle string) (Profile, error)
- GetProfileByID(ctx context.Context, id string) (Profile, error)
- GetSessionByClientIP(ctx context.Context, clientIpaddr string) (Session, error)
- GetSessionByID(ctx context.Context, id string) (Session, error)
- GetVaultConfigByCID(ctx context.Context, cid string) (Vault, error)
- GetVaultRedirectURIBySessionID(ctx context.Context, sessionID string) (string, error)
- InsertProfile(ctx context.Context, arg InsertProfileParams) (Profile, error)
- SoftDeleteProfile(ctx context.Context, address string) error
- UpdateProfile(ctx context.Context, arg UpdateProfileParams) (Profile, error)
- UpdateSessionHumanVerification(ctx context.Context, arg UpdateSessionHumanVerificationParams) (Session, error)
- UpdateSessionWithProfileID(ctx context.Context, arg UpdateSessionWithProfileIDParams) (Session, error)
-}
-
-var _ Querier = (*Queries)(nil)
diff --git a/x/user/model/query.sql b/x/user/model/query.sql
deleted file mode 100644
index f4020f3..0000000
--- a/x/user/model/query.sql
+++ /dev/null
@@ -1,116 +0,0 @@
--- name: GetVaultConfigByCID :one
-SELECT * FROM vaults
-WHERE cid = ?
-AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetVaultRedirectURIBySessionID :one
-SELECT redirect_uri FROM vaults
-WHERE session_id = ?
-AND deleted_at IS NULL
-LIMIT 1;
-
--- name: CreateSession :one
-INSERT INTO sessions (
- id,
- browser_name,
- browser_version,
- client_ipaddr,
- platform,
- is_desktop,
- is_mobile,
- is_tablet,
- is_tv,
- is_bot,
- challenge,
- is_human_first,
- is_human_last,
- profile_id
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
-RETURNING *;
-
--- name: GetChallengeBySessionID :one
-SELECT challenge FROM sessions
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetHumanVerificationNumbers :one
-SELECT is_human_first, is_human_last FROM sessions
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetSessionByID :one
-SELECT * FROM sessions
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetSessionByClientIP :one
-SELECT * FROM sessions
-WHERE client_ipaddr = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: UpdateSessionHumanVerification :one
-UPDATE sessions
-SET
- is_human_first = ?,
- is_human_last = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ?
-RETURNING *;
-
--- name: UpdateSessionWithProfileID :one
-UPDATE sessions
-SET
- profile_id = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ?
-RETURNING *;
-
--- name: CheckHandleExists :one
-SELECT COUNT(*) > 0 as handle_exists FROM profiles
-WHERE handle = ?
-AND deleted_at IS NULL;
-
-
--- name: InsertProfile :one
-INSERT INTO profiles (
- address,
- handle,
- origin,
- name
-) VALUES (?, ?, ?, ?)
-RETURNING *;
-
--- name: GetProfileByID :one
-SELECT * FROM profiles
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1;
-
--- name: GetProfileByAddress :one
-SELECT * FROM profiles
-WHERE address = ? AND deleted_at IS NULL
-LIMIT 1;
-
-
--- name: SoftDeleteProfile :exec
-UPDATE profiles
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE address = ?;
-
--- name: UpdateProfile :one
-UPDATE profiles
-SET
- name = ?,
- handle = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE address = ?
-AND deleted_at IS NULL
-RETURNING *;
-
--- name: GetProfileByHandle :one
-SELECT * FROM profiles
-WHERE handle = ?
-AND deleted_at IS NULL
-LIMIT 1;
-
-
diff --git a/x/user/model/query.sql.go b/x/user/model/query.sql.go
deleted file mode 100644
index 90ccb68..0000000
--- a/x/user/model/query.sql.go
+++ /dev/null
@@ -1,462 +0,0 @@
-// Code generated by sqlc. DO NOT EDIT.
-// versions:
-// sqlc v1.28.0
-// source: query.sql
-
-package model
-
-import (
- "context"
-)
-
-const checkHandleExists = `-- name: CheckHandleExists :one
-SELECT COUNT(*) > 0 as handle_exists FROM profiles
-WHERE handle = ?
-AND deleted_at IS NULL
-`
-
-func (q *Queries) CheckHandleExists(ctx context.Context, handle string) (bool, error) {
- row := q.db.QueryRowContext(ctx, checkHandleExists, handle)
- var handle_exists bool
- err := row.Scan(&handle_exists)
- return handle_exists, err
-}
-
-const createSession = `-- name: CreateSession :one
-INSERT INTO sessions (
- id,
- browser_name,
- browser_version,
- client_ipaddr,
- platform,
- is_desktop,
- is_mobile,
- is_tablet,
- is_tv,
- is_bot,
- challenge,
- is_human_first,
- is_human_last,
- profile_id
-) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
-RETURNING id, created_at, updated_at, deleted_at, browser_name, browser_version, client_ipaddr, platform, is_desktop, is_mobile, is_tablet, is_tv, is_bot, challenge, is_human_first, is_human_last, profile_id
-`
-
-type CreateSessionParams struct {
- ID string `json:"id"`
- BrowserName string `json:"browser_name"`
- BrowserVersion string `json:"browser_version"`
- ClientIpaddr string `json:"client_ipaddr"`
- Platform string `json:"platform"`
- IsDesktop bool `json:"is_desktop"`
- IsMobile bool `json:"is_mobile"`
- IsTablet bool `json:"is_tablet"`
- IsTv bool `json:"is_tv"`
- IsBot bool `json:"is_bot"`
- Challenge string `json:"challenge"`
- IsHumanFirst bool `json:"is_human_first"`
- IsHumanLast bool `json:"is_human_last"`
- ProfileID int64 `json:"profile_id"`
-}
-
-func (q *Queries) CreateSession(ctx context.Context, arg CreateSessionParams) (Session, error) {
- row := q.db.QueryRowContext(ctx, createSession,
- arg.ID,
- arg.BrowserName,
- arg.BrowserVersion,
- arg.ClientIpaddr,
- arg.Platform,
- arg.IsDesktop,
- arg.IsMobile,
- arg.IsTablet,
- arg.IsTv,
- arg.IsBot,
- arg.Challenge,
- arg.IsHumanFirst,
- arg.IsHumanLast,
- arg.ProfileID,
- )
- var i Session
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.ClientIpaddr,
- &i.Platform,
- &i.IsDesktop,
- &i.IsMobile,
- &i.IsTablet,
- &i.IsTv,
- &i.IsBot,
- &i.Challenge,
- &i.IsHumanFirst,
- &i.IsHumanLast,
- &i.ProfileID,
- )
- return i, err
-}
-
-const getChallengeBySessionID = `-- name: GetChallengeBySessionID :one
-SELECT challenge FROM sessions
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetChallengeBySessionID(ctx context.Context, id string) (string, error) {
- row := q.db.QueryRowContext(ctx, getChallengeBySessionID, id)
- var challenge string
- err := row.Scan(&challenge)
- return challenge, err
-}
-
-const getHumanVerificationNumbers = `-- name: GetHumanVerificationNumbers :one
-SELECT is_human_first, is_human_last FROM sessions
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-type GetHumanVerificationNumbersRow struct {
- IsHumanFirst bool `json:"is_human_first"`
- IsHumanLast bool `json:"is_human_last"`
-}
-
-func (q *Queries) GetHumanVerificationNumbers(ctx context.Context, id string) (GetHumanVerificationNumbersRow, error) {
- row := q.db.QueryRowContext(ctx, getHumanVerificationNumbers, id)
- var i GetHumanVerificationNumbersRow
- err := row.Scan(&i.IsHumanFirst, &i.IsHumanLast)
- return i, err
-}
-
-const getProfileByAddress = `-- name: GetProfileByAddress :one
-SELECT id, created_at, updated_at, deleted_at, address, handle, origin, name FROM profiles
-WHERE address = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetProfileByAddress(ctx context.Context, address string) (Profile, error) {
- row := q.db.QueryRowContext(ctx, getProfileByAddress, address)
- var i Profile
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Address,
- &i.Handle,
- &i.Origin,
- &i.Name,
- )
- return i, err
-}
-
-const getProfileByHandle = `-- name: GetProfileByHandle :one
-SELECT id, created_at, updated_at, deleted_at, address, handle, origin, name FROM profiles
-WHERE handle = ?
-AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetProfileByHandle(ctx context.Context, handle string) (Profile, error) {
- row := q.db.QueryRowContext(ctx, getProfileByHandle, handle)
- var i Profile
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Address,
- &i.Handle,
- &i.Origin,
- &i.Name,
- )
- return i, err
-}
-
-const getProfileByID = `-- name: GetProfileByID :one
-SELECT id, created_at, updated_at, deleted_at, address, handle, origin, name FROM profiles
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetProfileByID(ctx context.Context, id string) (Profile, error) {
- row := q.db.QueryRowContext(ctx, getProfileByID, id)
- var i Profile
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Address,
- &i.Handle,
- &i.Origin,
- &i.Name,
- )
- return i, err
-}
-
-const getSessionByClientIP = `-- name: GetSessionByClientIP :one
-SELECT id, created_at, updated_at, deleted_at, browser_name, browser_version, client_ipaddr, platform, is_desktop, is_mobile, is_tablet, is_tv, is_bot, challenge, is_human_first, is_human_last, profile_id FROM sessions
-WHERE client_ipaddr = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetSessionByClientIP(ctx context.Context, clientIpaddr string) (Session, error) {
- row := q.db.QueryRowContext(ctx, getSessionByClientIP, clientIpaddr)
- var i Session
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.ClientIpaddr,
- &i.Platform,
- &i.IsDesktop,
- &i.IsMobile,
- &i.IsTablet,
- &i.IsTv,
- &i.IsBot,
- &i.Challenge,
- &i.IsHumanFirst,
- &i.IsHumanLast,
- &i.ProfileID,
- )
- return i, err
-}
-
-const getSessionByID = `-- name: GetSessionByID :one
-SELECT id, created_at, updated_at, deleted_at, browser_name, browser_version, client_ipaddr, platform, is_desktop, is_mobile, is_tablet, is_tv, is_bot, challenge, is_human_first, is_human_last, profile_id FROM sessions
-WHERE id = ? AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetSessionByID(ctx context.Context, id string) (Session, error) {
- row := q.db.QueryRowContext(ctx, getSessionByID, id)
- var i Session
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.ClientIpaddr,
- &i.Platform,
- &i.IsDesktop,
- &i.IsMobile,
- &i.IsTablet,
- &i.IsTv,
- &i.IsBot,
- &i.Challenge,
- &i.IsHumanFirst,
- &i.IsHumanLast,
- &i.ProfileID,
- )
- return i, err
-}
-
-const getVaultConfigByCID = `-- name: GetVaultConfigByCID :one
-SELECT id, created_at, updated_at, deleted_at, handle, origin, address, cid, config, session_id, redirect_uri FROM vaults
-WHERE cid = ?
-AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetVaultConfigByCID(ctx context.Context, cid string) (Vault, error) {
- row := q.db.QueryRowContext(ctx, getVaultConfigByCID, cid)
- var i Vault
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Handle,
- &i.Origin,
- &i.Address,
- &i.Cid,
- &i.Config,
- &i.SessionID,
- &i.RedirectUri,
- )
- return i, err
-}
-
-const getVaultRedirectURIBySessionID = `-- name: GetVaultRedirectURIBySessionID :one
-SELECT redirect_uri FROM vaults
-WHERE session_id = ?
-AND deleted_at IS NULL
-LIMIT 1
-`
-
-func (q *Queries) GetVaultRedirectURIBySessionID(ctx context.Context, sessionID string) (string, error) {
- row := q.db.QueryRowContext(ctx, getVaultRedirectURIBySessionID, sessionID)
- var redirect_uri string
- err := row.Scan(&redirect_uri)
- return redirect_uri, err
-}
-
-const insertProfile = `-- name: InsertProfile :one
-INSERT INTO profiles (
- address,
- handle,
- origin,
- name
-) VALUES (?, ?, ?, ?)
-RETURNING id, created_at, updated_at, deleted_at, address, handle, origin, name
-`
-
-type InsertProfileParams struct {
- Address string `json:"address"`
- Handle string `json:"handle"`
- Origin string `json:"origin"`
- Name string `json:"name"`
-}
-
-func (q *Queries) InsertProfile(ctx context.Context, arg InsertProfileParams) (Profile, error) {
- row := q.db.QueryRowContext(ctx, insertProfile,
- arg.Address,
- arg.Handle,
- arg.Origin,
- arg.Name,
- )
- var i Profile
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Address,
- &i.Handle,
- &i.Origin,
- &i.Name,
- )
- return i, err
-}
-
-const softDeleteProfile = `-- name: SoftDeleteProfile :exec
-UPDATE profiles
-SET deleted_at = CURRENT_TIMESTAMP
-WHERE address = ?
-`
-
-func (q *Queries) SoftDeleteProfile(ctx context.Context, address string) error {
- _, err := q.db.ExecContext(ctx, softDeleteProfile, address)
- return err
-}
-
-const updateProfile = `-- name: UpdateProfile :one
-UPDATE profiles
-SET
- name = ?,
- handle = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE address = ?
-AND deleted_at IS NULL
-RETURNING id, created_at, updated_at, deleted_at, address, handle, origin, name
-`
-
-type UpdateProfileParams struct {
- Name string `json:"name"`
- Handle string `json:"handle"`
- Address string `json:"address"`
-}
-
-func (q *Queries) UpdateProfile(ctx context.Context, arg UpdateProfileParams) (Profile, error) {
- row := q.db.QueryRowContext(ctx, updateProfile, arg.Name, arg.Handle, arg.Address)
- var i Profile
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.Address,
- &i.Handle,
- &i.Origin,
- &i.Name,
- )
- return i, err
-}
-
-const updateSessionHumanVerification = `-- name: UpdateSessionHumanVerification :one
-UPDATE sessions
-SET
- is_human_first = ?,
- is_human_last = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ?
-RETURNING id, created_at, updated_at, deleted_at, browser_name, browser_version, client_ipaddr, platform, is_desktop, is_mobile, is_tablet, is_tv, is_bot, challenge, is_human_first, is_human_last, profile_id
-`
-
-type UpdateSessionHumanVerificationParams struct {
- IsHumanFirst bool `json:"is_human_first"`
- IsHumanLast bool `json:"is_human_last"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateSessionHumanVerification(ctx context.Context, arg UpdateSessionHumanVerificationParams) (Session, error) {
- row := q.db.QueryRowContext(ctx, updateSessionHumanVerification, arg.IsHumanFirst, arg.IsHumanLast, arg.ID)
- var i Session
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.ClientIpaddr,
- &i.Platform,
- &i.IsDesktop,
- &i.IsMobile,
- &i.IsTablet,
- &i.IsTv,
- &i.IsBot,
- &i.Challenge,
- &i.IsHumanFirst,
- &i.IsHumanLast,
- &i.ProfileID,
- )
- return i, err
-}
-
-const updateSessionWithProfileID = `-- name: UpdateSessionWithProfileID :one
-UPDATE sessions
-SET
- profile_id = ?,
- updated_at = CURRENT_TIMESTAMP
-WHERE id = ?
-RETURNING id, created_at, updated_at, deleted_at, browser_name, browser_version, client_ipaddr, platform, is_desktop, is_mobile, is_tablet, is_tv, is_bot, challenge, is_human_first, is_human_last, profile_id
-`
-
-type UpdateSessionWithProfileIDParams struct {
- ProfileID int64 `json:"profile_id"`
- ID string `json:"id"`
-}
-
-func (q *Queries) UpdateSessionWithProfileID(ctx context.Context, arg UpdateSessionWithProfileIDParams) (Session, error) {
- row := q.db.QueryRowContext(ctx, updateSessionWithProfileID, arg.ProfileID, arg.ID)
- var i Session
- err := row.Scan(
- &i.ID,
- &i.CreatedAt,
- &i.UpdatedAt,
- &i.DeletedAt,
- &i.BrowserName,
- &i.BrowserVersion,
- &i.ClientIpaddr,
- &i.Platform,
- &i.IsDesktop,
- &i.IsMobile,
- &i.IsTablet,
- &i.IsTv,
- &i.IsBot,
- &i.Challenge,
- &i.IsHumanFirst,
- &i.IsHumanLast,
- &i.ProfileID,
- )
- return i, err
-}
diff --git a/x/user/model/schema.sql b/x/user/model/schema.sql
deleted file mode 100644
index b18faac..0000000
--- a/x/user/model/schema.sql
+++ /dev/null
@@ -1,62 +0,0 @@
--- Profiles represent user identities
-CREATE TABLE profiles (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- address TEXT NOT NULL,
- handle TEXT NOT NULL UNIQUE,
- origin TEXT NOT NULL,
- name TEXT NOT NULL,
- UNIQUE(address, origin)
-);
-
--- Indexes for common queries
-CREATE INDEX idx_profiles_handle ON profiles(handle);
-CREATE INDEX idx_profiles_address ON profiles(address);
-CREATE INDEX idx_profiles_deleted_at ON profiles(deleted_at);
-
--- Sessions track user authentication state
-CREATE TABLE sessions (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- browser_name TEXT NOT NULL,
- browser_version TEXT NOT NULL,
- client_ipaddr TEXT NOT NULL,
- platform TEXT NOT NULL,
- is_desktop BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_desktop IN (0,1)),
- is_mobile BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_mobile IN (0,1)),
- is_tablet BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_tablet IN (0,1)),
- is_tv BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_tv IN (0,1)),
- is_bot BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_bot IN (0,1)),
- challenge TEXT NOT NULL,
- is_human_first BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_human_first IN (0,1)),
- is_human_last BOOLEAN NOT NULL DEFAULT FALSE CHECK(is_human_last IN (0,1)),
- profile_id INTEGER NOT NULL
-);
-
-CREATE INDEX idx_sessions_profile_id ON sessions(profile_id);
-CREATE INDEX idx_sessions_client_ipaddr ON sessions(client_ipaddr);
-CREATE INDEX idx_sessions_deleted_at ON sessions(deleted_at);
-
-
--- Vaults store encrypted data
-CREATE TABLE vaults (
- id TEXT PRIMARY KEY,
- created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- deleted_at TIMESTAMP,
- handle TEXT NOT NULL,
- origin TEXT NOT NULL,
- address TEXT NOT NULL,
- cid TEXT NOT NULL UNIQUE,
- config TEXT NOT NULL,
- session_id TEXT NOT NULL,
- redirect_uri TEXT NOT NULL
-);
-
-CREATE INDEX idx_vaults_handle ON vaults(handle);
-CREATE INDEX idx_vaults_session_id ON vaults(session_id);
-CREATE INDEX idx_vaults_deleted_at ON vaults(deleted_at);
diff --git a/x/user/model/sqlc.yaml b/x/user/model/sqlc.yaml
deleted file mode 100644
index b9b3445..0000000
--- a/x/user/model/sqlc.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-version: "2"
-sql:
- - engine: "sqlite"
- queries: "query.sql"
- schema: "schema.sql"
- gen:
- go:
- emit_interface: true
- emit_json_tags: true
- package: "model"
- out: "."
diff --git a/x/user/view/dashboard.templ b/x/user/view/dashboard.templ
deleted file mode 100644
index b8eaf9a..0000000
--- a/x/user/view/dashboard.templ
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-package view
-
-templ dashboardView(data any) {
-
-
Authorize
-
-}
diff --git a/x/user/view/dashboard_templ.go b/x/user/view/dashboard_templ.go
deleted file mode 100644
index 3412271..0000000
--- a/x/user/view/dashboard_templ.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by templ - DO NOT EDIT.
-
-// templ: version: v0.3.857
-
-package view
-
-//lint:file-ignore SA4006 This context is only used if a nested component is present.
-
-import "github.com/a-h/templ"
-import templruntime "github.com/a-h/templ/runtime"
-
-func dashboardView(data any) templ.Component {
- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
- return templ_7745c5c3_CtxErr
- }
- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
- if !templ_7745c5c3_IsBuffer {
- defer func() {
- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err == nil {
- templ_7745c5c3_Err = templ_7745c5c3_BufErr
- }
- }()
- }
- ctx = templ.InitializeContext(ctx)
- templ_7745c5c3_Var1 := templ.GetChildren(ctx)
- if templ_7745c5c3_Var1 == nil {
- templ_7745c5c3_Var1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Authorize
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- return nil
- })
-}
-
-var _ = templruntime.GeneratedTemplate
diff --git a/x/user/view/settings.templ b/x/user/view/settings.templ
deleted file mode 100644
index 10cb668..0000000
--- a/x/user/view/settings.templ
+++ /dev/null
@@ -1,7 +0,0 @@
-package view
-
-templ settingsView(data any) {
-
-
Authorize
-
-}
diff --git a/x/user/view/settings_templ.go b/x/user/view/settings_templ.go
deleted file mode 100644
index 2a1d012..0000000
--- a/x/user/view/settings_templ.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Code generated by templ - DO NOT EDIT.
-
-// templ: version: v0.3.857
-package view
-
-//lint:file-ignore SA4006 This context is only used if a nested component is present.
-
-import "github.com/a-h/templ"
-import templruntime "github.com/a-h/templ/runtime"
-
-func settingsView(data any) templ.Component {
- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
- return templ_7745c5c3_CtxErr
- }
- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
- if !templ_7745c5c3_IsBuffer {
- defer func() {
- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err == nil {
- templ_7745c5c3_Err = templ_7745c5c3_BufErr
- }
- }()
- }
- ctx = templ.InitializeContext(ctx)
- templ_7745c5c3_Var1 := templ.GetChildren(ctx)
- if templ_7745c5c3_Var1 == nil {
- templ_7745c5c3_Var1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Authorize
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- return nil
- })
-}
-
-var _ = templruntime.GeneratedTemplate
diff --git a/x/user/view/view.go b/x/user/view/view.go
deleted file mode 100644
index 5c868c9..0000000
--- a/x/user/view/view.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build js && wasm
-// +build js,wasm
-
-package view
-
-import (
- "github.com/labstack/echo/v4"
- "github.com/onsonr/motr/pkg/htmx"
-)
-
-func HandleView(c echo.Context) error {
- return htmx.Render(c, dashboardView(nil))
-}
diff --git a/x/user/view/wallet.templ b/x/user/view/wallet.templ
deleted file mode 100644
index 66284a3..0000000
--- a/x/user/view/wallet.templ
+++ /dev/null
@@ -1,7 +0,0 @@
-package view
-
-templ walletView(data any) {
-
-
Authorize
-
-}
diff --git a/x/user/view/wallet_templ.go b/x/user/view/wallet_templ.go
deleted file mode 100644
index 013f3fb..0000000
--- a/x/user/view/wallet_templ.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Code generated by templ - DO NOT EDIT.
-
-// templ: version: v0.3.857
-package view
-
-//lint:file-ignore SA4006 This context is only used if a nested component is present.
-
-import "github.com/a-h/templ"
-import templruntime "github.com/a-h/templ/runtime"
-
-func walletView(data any) templ.Component {
- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
- return templ_7745c5c3_CtxErr
- }
- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
- if !templ_7745c5c3_IsBuffer {
- defer func() {
- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
- if templ_7745c5c3_Err == nil {
- templ_7745c5c3_Err = templ_7745c5c3_BufErr
- }
- }()
- }
- ctx = templ.InitializeContext(ctx)
- templ_7745c5c3_Var1 := templ.GetChildren(ctx)
- if templ_7745c5c3_Var1 == nil {
- templ_7745c5c3_Var1 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "Authorize
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- return nil
- })
-}
-
-var _ = templruntime.GeneratedTemplate