feature/1115 execute ucan token (#1177)

- **deps: remove tigerbeetle-go dependency**
- **refactor: remove unused landing page components and models**
- **feat: add pin and publish vault handlers**
- **refactor: move payment and credential services to webui browser
package**
- **refactor: remove unused credentials management components**
- **feat: add landing page components and middleware for credentials and
payments**
- **refactor: remove unused imports in vault config**
- **refactor: remove unused bank, DID, and DWN gRPC clients**
- **refactor: rename client files and improve code structure**
- **feat: add session middleware helpers and landing page components**
- **feat: add user profile registration flow**
- **feat: Implement WebAuthn registration flow**
- **feat: add error view for users without WebAuthn devices**
- **chore: update htmx to include extensions**
- **refactor: rename pin handler to claim handler and update routes**
- **chore: update import paths after moving UI components and styles**
- **fix: address potential server errors by handling and logging them
properly**
- **refactor: move vault config to gateway package and update related
dependencies**
- **style: simplify form styling and remove unnecessary components**
- **feat: improve UI design for registration flow**
- **feat: implement passkey-based authentication**
- **refactor: migrate registration forms to use reusable form
components**
- **refactor: remove tailwindcss setup and use CDN instead**
- **style: update submit button style to use outline variant**
- **refactor: refactor server and IPFS client, remove MPC encryption**
- **refactor: Abstract keyshare functionality and improve message
encoding**
- **refactor: improve keyset JSON marshaling and error handling**
- **feat: add support for digital signatures using MPC keys**
- **fix: Refactor MarshalJSON to use standard json.Marshal for Message
serialization**
- **fix: Encode messages before storing in keyshare structs**
- **style: update form input styles for improved user experience**
- **refactor: improve code structure in registration handlers**
- **refactor: consolidate signer middleware and IPFS interaction**
- **refactor: rename MPC signing and refresh protocol functions**
- **refactor: update hway configuration loading mechanism**
- **feat: integrate database support for sessions and users**
- **refactor: remove devnet infrastructure and simplify build process**
- **docs(guides): add Sonr DID module guide**
- **feat: integrate progress bar into registration form**
- **refactor: migrate WebAuthn dependencies to protocol package**
- **feat: enhance user registration with passkey integration and
improved form styling**
- **refactor: move gateway view handlers to internal pages package**
- **refactor: Move address package to MPC module**
- **feat: integrate turnstile for registration**
- **style: remove unnecessary size attribute from buttons**
- **refactor: rename cookie package to session/cookie**
- **refactor: remove unnecessary types.Session dependency**
- **refactor: rename pkg/core to pkg/chain**
- **refactor: simplify deployment process by removing testnet-specific
Taskfile and devbox configuration**
- **feat: add error redirect functionality and improve routes**
- **feat: implement custom error handling for gateway**
- **chore: update version number to 0.0.7 in template**
- **feat: add IPFS client implementation**
- **feat: Implement full IPFS client interface with comprehensive
methods**
- **refactor: improve IPFS client path handling**
- **refactor: Move UCAN middleware to controller package**
- **feat: add UCAN middleware to motr**
- **refactor: update libp2p dependency**
- **docs: add UCAN specification document**
- **refactor: move UCAN controller logic to common package**
- **refactor: rename exports.go to common.go**
- **feat: add UCAN token support**
- **refactor: migrate UCAN token parsing to dedicated package**
- **refactor: improve CometBFT and app config initialization**
- **refactor: improve deployment scripts and documentation**
- **feat: integrate IPFS and producer middleware**
- **refactor: rename agent directory to aider**
- **fix: correct libp2p import path**
- **refactor: remove redundant dependency**
- **cleanup: remove unnecessary test files**
- **refactor: move attention types to crypto/ucan package**
- **feat: expand capabilities and resource types for UCANs**
- **refactor: rename sonr.go to codec.go and update related imports**
- **feat: add IPFS-based token store**
- **feat: Implement IPFS-based token store with caching and UCAN
integration**
- **feat: Add dynamic attenuation constructor for UCAN presets**
- **fix: Handle missing or invalid attenuation data with
EmptyAttenuation**
- **fix: Update UCAN attenuation tests with correct capability types**
- **feat: integrate UCAN-based authorization into the producer
middleware**
- **refactor: remove unused dependency on go-ucan**
- **refactor: Move address handling logic to DID module**
- **feat: Add support for compressed and uncompressed Secp256k1 public
keys in didkey**
- **test: Add test for generating DID key from MPC keyshares**
- **feat: Add methods for extracting compressed and uncompressed public
keys in share types**
- **feat: Add BaseKeyshare struct with public key conversion methods**
- **refactor: Use compressed and uncompressed public keys in keyshare,
fix public key usage in tests and verification**
- **feat: add support for key generation policy type**
- **fix: correct typo in VaultPermissions constant**
- **refactor: move JWT related code to ucan package**
- **refactor: move UCAN JWT and source code to spec package**
This commit is contained in:
Prad Nukala
2024-12-05 20:36:58 -05:00
committed by GitHub
parent e62ec45e82
commit bd51342fdf
256 changed files with 10823 additions and 7096 deletions
+34
View File
@@ -6,3 +6,37 @@ This directory contains the configuration files for deploying the Sonr blockchai
- `devnet`: Configuration for deploying the Sonr blockchain on the devnet (local development).
- `testnet`: Configuration for deploying the Sonr blockchain on the testnet (current prod setup)
## Usage
Configuration is automatically loaded from the `PKL` files in the root of the repository. These templates are generated during deployment initialization.
To deploy the total network, run the following command:
```bash
devbox run <network>
```
Replace `<network>` with either `devnet` or `testnet` from the root of the repository.
## Components
### Sonr
The Sonr blockchain is deployed using the `sonrd` binary. This binary is built using the `Makefile` in the root of the repository.
### IPFS
IPFS is deployed using the `ipfs` binary. This binary is built using the `Makefile` in the root of the repository.
### Hway
Hway is deployed using the `hway` binary. This binary is built using the `Makefile` in the root of the repository.
### Synapse
Synapse is deployed using the `matrix-synapse` binary. This binary is built using the `Makefile` in the root of the repository.
### Tigerbeetle
Tigerbeetle is deployed using the `tigerbeetle` binary. This binary is built using the `Makefile` in the root of the repository.
+55
View File
@@ -0,0 +1,55 @@
# https://taskfile.dev
version: "3"
vars:
GREETING: Hello, World!
tasks:
init:sonrd:
cmds:
- sonrd init {{.NODE_NAME}} --chain-id {{.CHAIN_ID}} --home {{.HOME}}
init:ipfs:
cmds:
- ipfs init
init:hway:
cmds:
- sonrd hway init {{.NODE_NAME}} --home {{.HOME}}
start:sonrd:
cmds:
- sonrd start --home {{.HOME}}
start:ipfs:
cmds:
- ipfs daemon
start:hway:
cmds:
- sonrd hway start --home {{.HOME}}
stop:sonrd:
cmds:
- sonrd stop
stop:ipfs:
cmds:
- ipfs daemon stop
stop:hway:
cmds:
- sonrd hway stop
clean:sonrd:
cmds:
- rm -rf {{.HOME}}
clean:ipfs:
cmds:
- rm -rf ~/.ipfs
clean:hway:
cmds:
- rm -rf {{.HOME}}/data/hway
-12
View File
@@ -1,12 +0,0 @@
# https://taskfile.dev
version: '3'
vars:
GREETING: Hello, World!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
-48
View File
@@ -1,48 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
"packages": [
"go@1.23",
"bun@latest",
"ipfs@latest",
"skate@latest",
"air@latest",
"go-task@latest",
"templ@latest",
"tigerbeetle@latest"
],
"env": {
"GOPATH": "$HOME/go",
"PATH": "./build:$HOME/go/bin:$PATH",
"CHAIN_ID": "sonr-devnet-1",
"DENOM": "usnr",
"KEYRING": "test",
"MONIKER": "cupertino",
"BINARY": "sonrd",
"ACC0_NAME": "acc0",
"ACC1_NAME": "acc1",
"ACC0_ADDRESS": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y",
"ACC1_ADDRESS": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd",
"ACC0_MNEMONIC": "$(skate get ACC0_MNEMONIC)",
"ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)"
},
"shell": {
"init_hook": [
"export ROOT=$(git rev-parse --show-toplevel)"
],
"scripts": {
"sonr": [
"cd $ROOT",
"make sh-testnet"
],
"ipfs": [
"cd $ROOT",
"make setup-ipfs",
"ipfs daemon"
],
"hway": [
"cd $ROOT",
"air"
]
}
}
}
-96
View File
@@ -97,102 +97,6 @@
}
}
},
"go-task@latest": {
"last_modified": "2024-11-28T07:51:56Z",
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#go-task",
"source": "devbox-search",
"version": "3.40.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/ynnx5bghcar86a89026rdysvpf51b2li-go-task-3.40.0",
"default": true
}
],
"store_path": "/nix/store/ynnx5bghcar86a89026rdysvpf51b2li-go-task-3.40.0"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/2ga7yc7nn0k01n2w3wa6fjbp0i31r6d6-go-task-3.40.0",
"default": true
}
],
"store_path": "/nix/store/2ga7yc7nn0k01n2w3wa6fjbp0i31r6d6-go-task-3.40.0"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/0fc73lrh98s9i7qjsxk8gjddxam5kv76-go-task-3.40.0",
"default": true
}
],
"store_path": "/nix/store/0fc73lrh98s9i7qjsxk8gjddxam5kv76-go-task-3.40.0"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/x5pbyv5p0yj3fl77j4bmgcj8s7jjcjwn-go-task-3.40.0",
"default": true
}
],
"store_path": "/nix/store/x5pbyv5p0yj3fl77j4bmgcj8s7jjcjwn-go-task-3.40.0"
}
}
},
"go@1.23": {
"last_modified": "2024-11-16T04:25:12Z",
"resolved": "github:NixOS/nixpkgs/34a626458d686f1b58139620a8b2793e9e123bba#go",
"source": "devbox-search",
"version": "1.23.3",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3",
"default": true
}
],
"store_path": "/nix/store/qrj2wp6vzfpjfrrlcmr22818zg83fb73-go-1.23.3"
},
"aarch64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3",
"default": true
}
],
"store_path": "/nix/store/dm66qyl19skrwcmk4rb9xcs64xc1d071-go-1.23.3"
},
"x86_64-darwin": {
"outputs": [
{
"name": "out",
"path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3",
"default": true
}
],
"store_path": "/nix/store/vkjn6njpz4gy5ma763vh8hh93bgjwycr-go-1.23.3"
},
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3",
"default": true
}
],
"store_path": "/nix/store/bavnchxi7v6xs077jxv7fl5rrqc3y87w-go-1.23.3"
}
}
},
"ipfs@latest": {
"last_modified": "2023-02-24T09:01:09Z",
"resolved": "github:NixOS/nixpkgs/7d0ed7f2e5aea07ab22ccb338d27fbe347ed2f11#ipfs",
+2 -13
View File
@@ -1,29 +1,18 @@
version: "0.6"
processes:
ipfs:
namespace: devnet
command: "devbox run ipfs"
background: true
availability:
restart: never
max_restarts: 0
sonr:
namespace: devnet
background: true
command: "devbox run sonr"
command: "make sh-testnet"
restart: never
max_restarts: 1
depends:
- ipfs
hway:
namespace: devnet
background: true
command: "devbox run hway"
command: "./build/hway"
restart: never
max_restarts: 1
depends:
- ipfs
- sonr
-12
View File
@@ -1,12 +0,0 @@
# https://taskfile.dev
version: '3'
vars:
GREETING: Hello, World!
tasks:
default:
cmds:
- echo "{{.GREETING}}"
silent: true
-50
View File
@@ -1,50 +0,0 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json",
"packages": {
"go": "1.23",
"bun": "latest",
"ipfs": "latest",
"skate": "latest",
"cloudflared": "latest",
"go-task": "latest",
"tigerbeetle": "latest",
"matrix-synapse": {
"version": "latest",
"excluded_platforms": [
"aarch64-darwin"
]
}
},
"env": {
"GOPATH": "$HOME/go",
"PATH": "./build:$HOME/go/bin:$PATH",
"CHAIN_ID": "sonr-testnet-1",
"DENOM": "usnr",
"KEYRING": "test",
"MONIKER": "florence",
"BINARY": "sonrd",
"ACC0_NAME": "acc0",
"ACC1_NAME": "acc1",
"ACC0_ADDRESS": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y",
"ACC1_ADDRESS": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd",
"ACC0_MNEMONIC": "$(skate get ACC0_MNEMONIC)",
"ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)",
"TUNNEL_TOKEN": "$(skate get CLOUDFLARE_TUNNEL_TOKEN)"
},
"shell": {
"init_hook": [
"export ROOT=$(git rev-parse --show-toplevel)"
],
"scripts": {
"sonr": [
"cd $ROOT",
"make sh-testnet"
],
"ipfs": [
"cd $ROOT",
"make setup-ipfs",
"ipfs daemon"
]
}
}
}