Skip to content

Commit

Permalink
feature/1110 abstract connected wallet operations (#1166)
Browse files Browse the repository at this point in the history
- **refactor: refactor DID module types and move to controller package**
- **refactor: move controller creation and resolution logic to keeper**
- **refactor: update imports to reflect controller package move**
- **refactor: update protobuf definitions for DID module**
- **docs: update proto README to reflect changes**
- **refactor: move hway to gateway, update node modules, and refactor
pkl generation**
- **build: update pkl-gen task to use new pkl file paths**
- **refactor: refactor DWN WASM build and deployment process**
- **refactor: refactor DID controller implementation to use
account-based storage**
- **refactor: move DID controller interface to base file and update
implementation**
- **chore: migrate to google protobuf**
- **feat: Add v0.52.0 Interfaces for Acc Abstraction**
- **refactor: replace public_key with public_key_hex in Assertion
message**
- **refactor: remove unused PubKey, JSONWebKey, and RawKey message types
and related code**
  • Loading branch information
prnk28 authored Nov 19, 2024
1 parent 01cb37e commit bf94277
Show file tree
Hide file tree
Showing 190 changed files with 9,112 additions and 13,805 deletions.
70 changes: 45 additions & 25 deletions .github/workflows/publish-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
issues: write

jobs:
buf_push:
buf_push_core:
name: Publish to buf.build/onsonr/sonr
runs-on: ubuntu-latest
steps:
Expand All @@ -24,40 +24,60 @@ jobs:
input: proto
buf_token: ${{ secrets.BUF_TOKEN }}

#
# upload_configs:
# runs-on: ubuntu-latest
# name: Publish to configs.sonr.id
# steps:
# - name: checkout
# uses: actions/checkout@v4
# - name: Upload to R2
# continue-on-error: true
# uses: ryand56/r2-upload-action@latest
# with:
# r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
# r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
# r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
# r2-bucket: configs
# source-dir: config
# destination-dir: ./pkl
#
buf_push_thirdparty:
name: Publish to buf.build/onsonr/thirdparty
runs-on: ubuntu-latest
steps:
# Run `git checkout`
- uses: actions/checkout@v3
# Install the `buf` CLI
- uses: bufbuild/buf-setup-action@v1
# Push only the Input in `proto` to the BSR
- uses: bufbuild/buf-push-action@v1
continue-on-error: true
with:
input: third_party/proto
buf_token: ${{ secrets.BUF_TOKEN }}

upload_pkl:
upload_motr_dwn:
runs-on: ubuntu-latest
name: Publish to pkl.sh
name: Publish to configs.sonr.id
steps:
- name: checkout
uses: actions/checkout@v4
- name: Upload to R2

- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true

- name: Setup go-task / task / taskfile
uses: rnorton5432/setup-task@v1

- name: Build DWN WASM
run: task dwn:build

- name: Upload WASM to R2
continue-on-error: true
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: pkljar
source-dir: pkl
destination-dir: .
r2-bucket: nebula
source-dir: ./build/app.wasm
destination-dir: wasm

- name: Upload SW JS to R2
continue-on-error: true
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: nebula
source-dir: ./pkg/motr/static/sw.js
destination-dir: js

upload_nebula_cdn:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ deploy/**/data
x/.DS_Store
.aider*
buildenv*
nebula/node_modules
node_modules
cmd/gateway/node_modules
pkg/nebula/node_modules

mprocs.yaml
build
Expand Down
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,14 @@ sh-testnet: mod-tidy

.PHONY: templ-gen pkl-gen

assets-gen:
@echo "(assets) Generating gateway cloudflare workers assets"
go run github.com/syumai/workers/cmd/workers-assets-gen -mode=go -o ./cmd/hway/build

templ-gen:
@echo "(templ) Generating templ files"
templ generate

pkl-gen:
@echo "(pkl) Building PKL"
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/DWN.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/ORM.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/Txns.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./third_party/pkl/src/sonr.configs.v1/DWN.pkl
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./third_party/pkl/src/sonr.models.v1/ORM.pkl

###############################################################################
### help ###
Expand Down
58 changes: 51 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
version: "3"

vars:
ROOT_DIR:
sh: pwd

tasks:
hway:assets:
internal: true
cmds:
- go run github.com/syumai/workers/cmd/workers-assets-gen -mode=go -o ./cmd/gateway/build

hway:build:
dir: cmd/hway
dir: cmd/gateway
env:
GOOS: js
GOARCH: wasm
cmds:
- task: hway:assets
- go build -o build/app.wasm main.go

hway:dev:
dir: cmd/hway
dir: cmd/gateway
cmds:
- task: nebula:build
- bunx wrangler dev

hway:deploy:
dir: cmd/hway
dir: cmd/gateway
cmds:
- task: nebula:build
- bunx wrangler deploy

motr:build:
dir: internal/dwn
dwn:build:
env:
GOOS: js
GOARCH: wasm
cmds:
- go build -o app.wasm wasm/main.go
- go build -o build/app.wasm ./cmd/dwn/main.go

nebula:build:
dir: pkg/nebula
Expand All @@ -40,3 +44,43 @@ tasks:
- bun run deps.mjs
- bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css
- templ generate

# ╭───────────────────────────────────────────────────────────╮
# │ Registration Components │
# ╰───────────────────────────────────────────────────────────╯

buf:push:
cmds:
- task: buf:push:sonr
- task: buf:push:thirdparty

buf:deps:
cmds:
- task: buf:deps:sonr
- task: buf:deps:thirdparty

buf:deps:sonr:
internal: true
dir: proto
cmds:
- buf dep update

buf:deps:thirdparty:
internal: true
dir: third_party/proto
cmds:
- buf dep update

buf:push:sonr:
internal: true
dir: proto
cmds:
- buf build
- buf push

buf:push:thirdparty:
internal: true
dir: third_party/proto
cmds:
- buf build
- buf push
69 changes: 32 additions & 37 deletions api/did/module/v1/module.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bf94277

Please sign in to comment.