mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 18:31:41 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e98504813 | ||
|
|
ab0bd3a5e1 | ||
|
|
62628ed0d8 | ||
|
|
b1e5464843 | ||
|
|
8e1359f126 | ||
|
|
f84a87574c | ||
|
|
1c16d367ed | ||
|
|
dc191fdbba | ||
|
|
875c410443 | ||
|
|
bcf5dfa70c | ||
|
|
77d76938a3 | ||
|
|
1267bc426a | ||
|
|
5e74045f3d | ||
|
|
3adf42925d | ||
|
|
f95fa2c906 | ||
|
|
ac2f65844c | ||
|
|
546dd7b4ad | ||
|
|
fcf4ab5b4f | ||
|
|
c57d5e8f1a | ||
|
|
cd57226a45 | ||
|
|
f5a11061ac |
@@ -2,6 +2,6 @@
|
|||||||
name = "cz_conventional_commits"
|
name = "cz_conventional_commits"
|
||||||
tag_format = "v$version"
|
tag_format = "v$version"
|
||||||
version_scheme = "semver"
|
version_scheme = "semver"
|
||||||
version = "0.5.6"
|
version = "0.5.9"
|
||||||
update_changelog_on_bump = true
|
update_changelog_on_bump = true
|
||||||
major_version_zero = true
|
major_version_zero = true
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
name: Bug Report
|
||||||
|
description: File a bug report.
|
||||||
|
title: "ERROR: "
|
||||||
|
labels: ["#BUG", "#HELP"]
|
||||||
|
projects: ["onsonr/39"]
|
||||||
|
body:
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Operating System
|
||||||
|
description: What operating system are you using?
|
||||||
|
placeholder: "Example: macOS Big Sur"
|
||||||
|
value: operating system
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
attributes:
|
||||||
|
label: Network
|
||||||
|
description: What network are you using?
|
||||||
|
multiple: false
|
||||||
|
options:
|
||||||
|
- LocalNet
|
||||||
|
- TestNet
|
||||||
|
- MainNet
|
||||||
|
default: 0
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Code of Conduct
|
||||||
|
description:
|
||||||
|
The Code of Conduct helps create a safe space for everyone. We require
|
||||||
|
that everyone agrees to it.
|
||||||
|
options:
|
||||||
|
- label: I agree to follow this project's [Code of Conduct](link/to/coc)
|
||||||
|
required: true
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: "Thanks for completing our form!"
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: Community Discussions
|
||||||
|
url: https://github.com/orgs/onsonr/discussions
|
||||||
|
about: Please submit ideas and suggestions here.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: Tracking issue
|
||||||
|
description: Use this template for tracking new features.
|
||||||
|
title: "(v0.6): FEATURE NAME"
|
||||||
|
labels: ["#TRACK", "#OKR"]
|
||||||
|
assignees: ["prnk28"]
|
||||||
|
projects: ["onsonr/37"]
|
||||||
|
body:
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Is this associated with a milestone?
|
||||||
|
description: This is a tracking issue for tracking a new feature for a given milestone.
|
||||||
|
options:
|
||||||
|
- label: I have confirmed this is an OKR tracking issue
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Objective
|
||||||
|
description: Explain the objective of the feature and add any relevant links.
|
||||||
|
render: markdown
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
attributes:
|
||||||
|
label: Task List
|
||||||
|
description: |
|
||||||
|
Break down the objective into a list of tasks to be completed.
|
||||||
|
value: |
|
||||||
|
- [ ]
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
name: Default Todo
|
||||||
|
about: Break down feature requirements into tasks.
|
||||||
|
title: "Name of the new task"
|
||||||
|
labels:
|
||||||
|
- "#TODO"
|
||||||
|
- "#OKR"
|
||||||
|
assignees: "prnk28"
|
||||||
|
projects: "onsonr/37"
|
||||||
|
---
|
||||||
|
|
||||||
|
### Description
|
||||||
|
|
||||||
|
The expected deliverable of the task.
|
||||||
|
|
||||||
|
### Associated Files
|
||||||
|
|
||||||
|
These files will be modified by this task.
|
||||||
|
|
||||||
|
### References
|
||||||
|
|
||||||
|
Use these documents to help you complete the task.
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||||
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||||
r2-bucket: pkljar
|
r2-bucket: pkljar
|
||||||
source-dir: deploy/config
|
source-dir: pkl
|
||||||
destination-dir: .
|
destination-dir: .
|
||||||
|
|
||||||
upload_nebula_cdn:
|
upload_nebula_cdn:
|
||||||
|
|||||||
@@ -1,3 +1,37 @@
|
|||||||
|
## v0.5.9 (2024-10-06)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- add Motr support
|
||||||
|
- update UIUX PKL to utilize optional fields
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- Update source directory for asset publishing
|
||||||
|
|
||||||
|
## v0.5.8 (2024-10-04)
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- Remove unused logs configuration
|
||||||
|
|
||||||
|
## v0.5.7 (2024-10-04)
|
||||||
|
|
||||||
|
### Feat
|
||||||
|
|
||||||
|
- **devbox**: use process-compose for testnet services
|
||||||
|
- remove motr.mjs dependency
|
||||||
|
- add markdown rendering to issue templates
|
||||||
|
- update issue templates for better clarity
|
||||||
|
- add issue templates for tracking and task issues
|
||||||
|
- add issue templates for bug report and tracking
|
||||||
|
- introduce docker-compose based setup
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
|
||||||
|
- update issue template headings
|
||||||
|
- rename bug-report issue template to bug
|
||||||
|
|
||||||
## v0.5.6 (2024-10-03)
|
## v0.5.6 (2024-10-03)
|
||||||
|
|
||||||
### Feat
|
### Feat
|
||||||
|
|||||||
@@ -315,10 +315,10 @@ nebula:
|
|||||||
|
|
||||||
pkl:
|
pkl:
|
||||||
@echo "(pkl) Building PKL"
|
@echo "(pkl) Building PKL"
|
||||||
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./deploy/config/DWN.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 ./deploy/config/ORM.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 ./deploy/config/Txns.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 ./deploy/config/UIUX.pkl
|
go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/UIUX.pkl
|
||||||
|
|
||||||
start-caddy:
|
start-caddy:
|
||||||
@echo "(start-caddy) Starting caddy"
|
@echo "(start-caddy) Starting caddy"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{}
|
|
||||||
+40
-16
@@ -30,22 +30,46 @@
|
|||||||
},
|
},
|
||||||
"shell": {
|
"shell": {
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": ["air"],
|
"dev": [
|
||||||
"build:docker": ["make local-image"],
|
"air"
|
||||||
"build:hway": ["make nebula", "make hway"],
|
],
|
||||||
"build:nebula": ["make nebula"],
|
"build:docker": [
|
||||||
"build:sonrd": ["make motr", "make build"],
|
"make local-image"
|
||||||
"build": ["make motr", "make build", "make hway"],
|
],
|
||||||
"gen:proto": ["make proto-gen"],
|
"build:hway": [
|
||||||
"gen:pkl": ["make pkl"],
|
"make nebula",
|
||||||
"gen:templ": ["make templ"],
|
"make hway"
|
||||||
"start:hway": ["make templ", "make hway", "make start-hway"],
|
],
|
||||||
"start:testnet": ["make templ", "make install", "make sh-testnet"],
|
"build:nebula": [
|
||||||
"start": ["process-compose up -d"],
|
"make nebula"
|
||||||
"stop": ["process-compose down"],
|
],
|
||||||
"test:e2e": ["make templ", "make test-e2e"],
|
"build:motr": [
|
||||||
"test:unit": ["make templ", "make test-unit"],
|
"make motr"
|
||||||
"test": ["make templ", "make test"]
|
],
|
||||||
|
"build:sonrd": [
|
||||||
|
"make motr",
|
||||||
|
"make build"
|
||||||
|
],
|
||||||
|
"build": [
|
||||||
|
"make motr",
|
||||||
|
"make build",
|
||||||
|
"make hway"
|
||||||
|
],
|
||||||
|
"gen:proto": [
|
||||||
|
"make proto-gen"
|
||||||
|
],
|
||||||
|
"gen:pkl": [
|
||||||
|
"make pkl"
|
||||||
|
],
|
||||||
|
"gen:templ": [
|
||||||
|
"make templ"
|
||||||
|
],
|
||||||
|
"start": [
|
||||||
|
"process-compose up -f ./deploy/testnet/process-compose.yaml"
|
||||||
|
],
|
||||||
|
"stop": [
|
||||||
|
"process-compose down -f ./deploy/testnet/process-compose.yaml"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
package dwn
|
package dwn
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"`
|
Ipfs *IPFS `pkl:"ipfs"`
|
||||||
|
|
||||||
Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"`
|
Sonr *Sonr `pkl:"sonr"`
|
||||||
|
|
||||||
Motr *Motr `pkl:"motr" json:"motr,omitempty"`
|
Motr *Motr `pkl:"motr"`
|
||||||
|
|
||||||
Schema *Schema `pkl:"schema" json:"schema,omitempty"`
|
Schema *Schema `pkl:"schema"`
|
||||||
|
|
||||||
ProxyUrl string `pkl:"proxyUrl" json:"proxyUrl,omitempty"`
|
ProxyUrl string `pkl:"proxyUrl"`
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
package dwn
|
package dwn
|
||||||
|
|
||||||
type IPFS struct {
|
type IPFS struct {
|
||||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
ApiUrl string `pkl:"apiUrl"`
|
||||||
|
|
||||||
GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"`
|
GatewayUrl string `pkl:"gatewayUrl"`
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -2,9 +2,9 @@
|
|||||||
package dwn
|
package dwn
|
||||||
|
|
||||||
type Motr struct {
|
type Motr struct {
|
||||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
Keyshare string `pkl:"keyshare"`
|
||||||
|
|
||||||
Address string `pkl:"address" json:"address,omitempty"`
|
Address string `pkl:"address"`
|
||||||
|
|
||||||
Origin string `pkl:"origin" json:"origin,omitempty"`
|
Origin string `pkl:"origin"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,19 +4,19 @@ package dwn
|
|||||||
type Schema struct {
|
type Schema struct {
|
||||||
Version int `pkl:"version"`
|
Version int `pkl:"version"`
|
||||||
|
|
||||||
Account string `pkl:"account" json:"account,omitempty"`
|
Account string `pkl:"account"`
|
||||||
|
|
||||||
Asset string `pkl:"asset" json:"asset,omitempty"`
|
Asset string `pkl:"asset"`
|
||||||
|
|
||||||
Chain string `pkl:"chain" json:"chain,omitempty"`
|
Chain string `pkl:"chain"`
|
||||||
|
|
||||||
Credential string `pkl:"credential" json:"credential,omitempty"`
|
Credential string `pkl:"credential"`
|
||||||
|
|
||||||
Jwk string `pkl:"jwk" json:"jwk,omitempty"`
|
Jwk string `pkl:"jwk"`
|
||||||
|
|
||||||
Grant string `pkl:"grant" json:"grant,omitempty"`
|
Grant string `pkl:"grant"`
|
||||||
|
|
||||||
Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"`
|
Keyshare string `pkl:"keyshare"`
|
||||||
|
|
||||||
Profile string `pkl:"profile" json:"profile,omitempty"`
|
Profile string `pkl:"profile"`
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -2,13 +2,13 @@
|
|||||||
package dwn
|
package dwn
|
||||||
|
|
||||||
type Sonr struct {
|
type Sonr struct {
|
||||||
ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"`
|
ApiUrl string `pkl:"apiUrl"`
|
||||||
|
|
||||||
GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"`
|
GrpcUrl string `pkl:"grpcUrl"`
|
||||||
|
|
||||||
RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"`
|
RpcUrl string `pkl:"rpcUrl"`
|
||||||
|
|
||||||
WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"`
|
WebSocketUrl string `pkl:"webSocketUrl"`
|
||||||
|
|
||||||
ChainId string `pkl:"chainId" json:"chainId,omitempty"`
|
ChainId string `pkl:"chainId"`
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,31 @@
|
|||||||
|
amends "https://pkl.sh/DWN.pkl";
|
||||||
|
|
||||||
|
dwn = new Config {
|
||||||
|
ipfs = new IPFS {
|
||||||
|
apiUrl = "https://api.sonr-ipfs.land";
|
||||||
|
gatewayUrl = "https://ipfs.sonr.land";
|
||||||
|
};
|
||||||
|
sonr = new Sonr {
|
||||||
|
apiUrl = "https://api.sonr.land";
|
||||||
|
grpcUrl = "https://grpc.sonr.land";
|
||||||
|
rpcUrl = "https://rpc.sonr.land";
|
||||||
|
webSocketUrl = "wss://rpc.sonr.land/ws";
|
||||||
|
chainId = "sonr";
|
||||||
|
};
|
||||||
|
motr = new Motr {
|
||||||
|
keyshare = JSON.parse(keyshare);
|
||||||
|
address = address;
|
||||||
|
origin = "sonr.id";
|
||||||
|
};
|
||||||
|
schema = new Schema {
|
||||||
|
version = 1;
|
||||||
|
account = "account";
|
||||||
|
asset = "asset";
|
||||||
|
chain = "chain";
|
||||||
|
credential = "credential";
|
||||||
|
jwk = "jwk";
|
||||||
|
grant = "grant";
|
||||||
|
keyshare = "keyshare";
|
||||||
|
profile = "profile";
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -13,15 +13,11 @@ import (
|
|||||||
//go:embed app.wasm
|
//go:embed app.wasm
|
||||||
var dwnWasmData []byte
|
var dwnWasmData []byte
|
||||||
|
|
||||||
//go:embed motr.mjs
|
|
||||||
var motrMJSData []byte
|
|
||||||
|
|
||||||
//go:embed sw.js
|
//go:embed sw.js
|
||||||
var swJSData []byte
|
var swJSData []byte
|
||||||
|
|
||||||
var (
|
var (
|
||||||
dwnWasmFile = files.NewBytesFile(dwnWasmData)
|
dwnWasmFile = files.NewBytesFile(dwnWasmData)
|
||||||
motrMJSFile = files.NewBytesFile(motrMJSData)
|
|
||||||
swJSFile = files.NewBytesFile(swJSData)
|
swJSFile = files.NewBytesFile(swJSData)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -43,7 +39,6 @@ func NewVaultDirectory(cnfg *Config) (files.Node, error) {
|
|||||||
}
|
}
|
||||||
fileMap := map[string]files.Node{
|
fileMap := map[string]files.Node{
|
||||||
"config.json": files.NewBytesFile(dwnJSON),
|
"config.json": files.NewBytesFile(dwnJSON),
|
||||||
"motr.mjs": motrMJSFile,
|
|
||||||
"sw.js": swJSFile,
|
"sw.js": swJSFile,
|
||||||
"app.wasm": dwnWasmFile,
|
"app.wasm": dwnWasmFile,
|
||||||
"index.html": files.NewBytesFile(w.Bytes()),
|
"index.html": files.NewBytesFile(w.Bytes()),
|
||||||
|
|||||||
@@ -1,253 +0,0 @@
|
|||||||
// motr.mjs
|
|
||||||
|
|
||||||
import Dexie from "dexie";
|
|
||||||
|
|
||||||
export class Motr {
|
|
||||||
constructor(config) {
|
|
||||||
this.config = config;
|
|
||||||
this.vault = null;
|
|
||||||
this.initializeVault();
|
|
||||||
}
|
|
||||||
|
|
||||||
initializeVault() {
|
|
||||||
const { schema } = this.config;
|
|
||||||
this.vault = new Dexie("Vault");
|
|
||||||
this.vault.version(schema.version).stores(schema);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Account methods
|
|
||||||
async insertAccount(accountData) {
|
|
||||||
return this.vault.account.add(accountData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getAccount(id) {
|
|
||||||
return this.vault.account.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateAccount(id, accountData) {
|
|
||||||
return this.vault.account.update(id, accountData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteAccount(id) {
|
|
||||||
return this.vault.account.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Asset methods
|
|
||||||
async insertAsset(assetData) {
|
|
||||||
return this.vault.asset.add(assetData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getAsset(id) {
|
|
||||||
return this.vault.asset.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateAsset(id, assetData) {
|
|
||||||
return this.vault.asset.update(id, assetData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteAsset(id) {
|
|
||||||
return this.vault.asset.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Chain methods
|
|
||||||
async insertChain(chainData) {
|
|
||||||
return this.vault.chain.add(chainData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getChain(id) {
|
|
||||||
return this.vault.chain.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateChain(id, chainData) {
|
|
||||||
return this.vault.chain.update(id, chainData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteChain(id) {
|
|
||||||
return this.vault.chain.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Credential methods
|
|
||||||
async insertCredential(credentialData) {
|
|
||||||
const publicKey = await this.createPublicKeyCredential(credentialData);
|
|
||||||
credentialData.credentialId = publicKey.id;
|
|
||||||
credentialData.publicKey = publicKey.publicKey;
|
|
||||||
return this.vault.credential.add(credentialData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getCredential(id) {
|
|
||||||
return this.vault.credential.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateCredential(id, credentialData) {
|
|
||||||
return this.vault.credential.update(id, credentialData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteCredential(id) {
|
|
||||||
return this.vault.credential.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// JWK methods
|
|
||||||
async insertJwk(jwkData) {
|
|
||||||
return this.vault.jwk.add(jwkData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getJwk(id) {
|
|
||||||
return this.vault.jwk.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateJwk(id, jwkData) {
|
|
||||||
return this.vault.jwk.update(id, jwkData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteJwk(id) {
|
|
||||||
return this.vault.jwk.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Grant methods
|
|
||||||
async insertGrant(grantData) {
|
|
||||||
return this.vault.grant.add(grantData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getGrant(id) {
|
|
||||||
return this.vault.grant.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateGrant(id, grantData) {
|
|
||||||
return this.vault.grant.update(id, grantData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteGrant(id) {
|
|
||||||
return this.vault.grant.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keyshare methods
|
|
||||||
async insertKeyshare(keyshareData) {
|
|
||||||
return this.vault.keyshare.add(keyshareData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getKeyshare(id) {
|
|
||||||
return this.vault.keyshare.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateKeyshare(id, keyshareData) {
|
|
||||||
return this.vault.keyshare.update(id, keyshareData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteKeyshare(id) {
|
|
||||||
return this.vault.keyshare.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// PublicKey methods
|
|
||||||
async insertPublicKey(publicKeyData) {
|
|
||||||
return this.vault.publicKey.add(publicKeyData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getPublicKey(id) {
|
|
||||||
return this.vault.publicKey.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updatePublicKey(id, publicKeyData) {
|
|
||||||
return this.vault.publicKey.update(id, publicKeyData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deletePublicKey(id) {
|
|
||||||
return this.vault.publicKey.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Profile methods
|
|
||||||
async insertProfile(profileData) {
|
|
||||||
return this.vault.profile.add(profileData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getProfile(id) {
|
|
||||||
return this.vault.profile.get(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateProfile(id, profileData) {
|
|
||||||
return this.vault.profile.update(id, profileData);
|
|
||||||
}
|
|
||||||
|
|
||||||
async deleteProfile(id) {
|
|
||||||
return this.vault.profile.delete(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// WebAuthn methods
|
|
||||||
async createPublicKeyCredential(options) {
|
|
||||||
const publicKeyCredentialCreationOptions = {
|
|
||||||
challenge: new Uint8Array(32),
|
|
||||||
rp: {
|
|
||||||
name: this.config.motr.origin,
|
|
||||||
id: new URL(this.config.motr.origin).hostname,
|
|
||||||
},
|
|
||||||
user: {
|
|
||||||
id: new TextEncoder().encode(options.subject),
|
|
||||||
name: options.subject,
|
|
||||||
displayName: options.label,
|
|
||||||
},
|
|
||||||
pubKeyCredParams: [
|
|
||||||
{ alg: -7, type: "public-key" },
|
|
||||||
{ alg: -257, type: "public-key" },
|
|
||||||
],
|
|
||||||
authenticatorSelection: {
|
|
||||||
authenticatorAttachment: "platform",
|
|
||||||
userVerification: "required",
|
|
||||||
},
|
|
||||||
timeout: 60000,
|
|
||||||
attestation: "direct",
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
|
||||||
const credential = await navigator.credentials.create({
|
|
||||||
publicKey: publicKeyCredentialCreationOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
const publicKeyJwk = await crypto.subtle.exportKey(
|
|
||||||
"jwk",
|
|
||||||
credential.response.getPublicKey(),
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: credential.id,
|
|
||||||
publicKey: publicKeyJwk,
|
|
||||||
type: credential.type,
|
|
||||||
transports: credential.response.getTransports(),
|
|
||||||
};
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error creating credential:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async getPublicKeyCredential(options) {
|
|
||||||
const publicKeyCredentialRequestOptions = {
|
|
||||||
challenge: new Uint8Array(32),
|
|
||||||
rpId: new URL(this.config.motr.origin).hostname,
|
|
||||||
allowCredentials: options.allowCredentials || [],
|
|
||||||
userVerification: "required",
|
|
||||||
timeout: 60000,
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
|
||||||
const assertion = await navigator.credentials.get({
|
|
||||||
publicKey: publicKeyCredentialRequestOptions,
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: assertion.id,
|
|
||||||
type: assertion.type,
|
|
||||||
rawId: new Uint8Array(assertion.rawId),
|
|
||||||
response: {
|
|
||||||
authenticatorData: new Uint8Array(
|
|
||||||
assertion.response.authenticatorData,
|
|
||||||
),
|
|
||||||
clientDataJSON: new Uint8Array(assertion.response.clientDataJSON),
|
|
||||||
signature: new Uint8Array(assertion.response.signature),
|
|
||||||
userHandle: new Uint8Array(assertion.response.userHandle),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error getting credential:", error);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -41,9 +41,9 @@ templ SectionHero(hero *models.Hero) {
|
|||||||
|
|
||||||
templ heroImage(hero *models.Hero) {
|
templ heroImage(hero *models.Hero) {
|
||||||
<!-- Image -->
|
<!-- Image -->
|
||||||
<div class="max-w-5xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white">
|
<div class="max-w-5xl motion-preset-slide-up mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white">
|
||||||
<img
|
<img
|
||||||
class="rounded-lg"
|
class="rounded-lg "
|
||||||
src={ hero.Image.Src }
|
src={ hero.Image.Src }
|
||||||
width={ hero.Image.Width }
|
width={ hero.Image.Width }
|
||||||
height={ hero.Image.Height }
|
height={ hero.Image.Height }
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ func heroImage(hero *models.Hero) templ.Component {
|
|||||||
templ_7745c5c3_Var6 = templ.NopComponent
|
templ_7745c5c3_Var6 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg\" src=\"")
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!-- Image --><div class=\"max-w-5xl motion-preset-slide-up mx-auto px-4 sm:px-6 flex justify-center pb-12 md:pb-20 relative before:absolute before:-top-12 before:w-96 before:h-96 before:bg-zinc-900 before:opacity-[.15] before:rounded-full before:blur-3xl before:-z-10 from-zinc-100 to-white\"><img class=\"rounded-lg \" src=\"")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ type Feature struct {
|
|||||||
|
|
||||||
Description string `pkl:"description"`
|
Description string `pkl:"description"`
|
||||||
|
|
||||||
Icon string `pkl:"icon"`
|
Icon *string `pkl:"icon"`
|
||||||
|
|
||||||
Image *Image `pkl:"image"`
|
Image *Image `pkl:"image"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ type Highlights struct {
|
|||||||
|
|
||||||
Subheading string `pkl:"subheading"`
|
Subheading string `pkl:"subheading"`
|
||||||
|
|
||||||
Highlights []*Highlight `pkl:"highlights"`
|
Highlights []*Feature `pkl:"highlights"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,4 @@ package models
|
|||||||
|
|
||||||
type Home struct {
|
type Home struct {
|
||||||
Hero *Hero `pkl:"hero"`
|
Hero *Hero `pkl:"hero"`
|
||||||
|
|
||||||
Highlights []*Highlight `pkl:"highlights"`
|
|
||||||
|
|
||||||
Features []*Features `pkl:"features"`
|
|
||||||
|
|
||||||
Bento *Bento `pkl:"bento"`
|
|
||||||
|
|
||||||
Lowlights []*Lowlights `pkl:"lowlights"`
|
|
||||||
|
|
||||||
CallToAction *CallToAction `pkl:"callToAction"`
|
|
||||||
|
|
||||||
Footer *Footer `pkl:"footer"`
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,15 +10,9 @@ func init() {
|
|||||||
pkl.RegisterMapping("models#Button", Button{})
|
pkl.RegisterMapping("models#Button", Button{})
|
||||||
pkl.RegisterMapping("models#Image", Image{})
|
pkl.RegisterMapping("models#Image", Image{})
|
||||||
pkl.RegisterMapping("models#Stat", Stat{})
|
pkl.RegisterMapping("models#Stat", Stat{})
|
||||||
pkl.RegisterMapping("models#Highlight", Highlight{})
|
|
||||||
pkl.RegisterMapping("models#Features", Features{})
|
|
||||||
pkl.RegisterMapping("models#Bento", Bento{})
|
|
||||||
pkl.RegisterMapping("models#Lowlights", Lowlights{})
|
|
||||||
pkl.RegisterMapping("models#CallToAction", CallToAction{})
|
|
||||||
pkl.RegisterMapping("models#Footer", Footer{})
|
|
||||||
pkl.RegisterMapping("models#SocialLink", SocialLink{})
|
|
||||||
pkl.RegisterMapping("models#Link", Link{})
|
|
||||||
pkl.RegisterMapping("models#Input", Input{})
|
pkl.RegisterMapping("models#Input", Input{})
|
||||||
|
pkl.RegisterMapping("models#Link", Link{})
|
||||||
|
pkl.RegisterMapping("models#SocialLink", SocialLink{})
|
||||||
pkl.RegisterMapping("models#Feature", Feature{})
|
pkl.RegisterMapping("models#Feature", Feature{})
|
||||||
pkl.RegisterMapping("models#Highlights", Highlights{})
|
pkl.RegisterMapping("models#Highlights", Highlights{})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,198 +36,4 @@ home = new Home {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Highlights
|
|
||||||
highlights {
|
|
||||||
new Highlight {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
image = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/highlight-1.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
new Highlight {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
image = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/highlight-2.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Features
|
|
||||||
features {
|
|
||||||
new Features {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
image = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/feature-1.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
new Features {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
image = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/feature-2.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
new Features {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
image = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/feature-3.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Bento
|
|
||||||
bento = new Bento {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
primaryButton = new Button {
|
|
||||||
text = "Get Started";
|
|
||||||
href = "/register";
|
|
||||||
};
|
|
||||||
secondaryButton = new Button {
|
|
||||||
text = "Learn More";
|
|
||||||
href = "/about";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lowlights
|
|
||||||
lowlights {
|
|
||||||
new Lowlights {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
image = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/lowlight-1.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
new Lowlights {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
image = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/lowlight-2.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Call to Action
|
|
||||||
callToAction = new CallToAction {
|
|
||||||
title = "Simplified";
|
|
||||||
description = "Sonr is a modern re-imagination of online user identity, empowering users to take ownership of their digital footprint and unlocking a new era of self-sovereignty.";
|
|
||||||
primaryButton = new Button {
|
|
||||||
text = "Get Started";
|
|
||||||
href = "/register";
|
|
||||||
};
|
|
||||||
secondaryButton = new Button {
|
|
||||||
text = "Learn More";
|
|
||||||
href = "/about";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// Footer
|
|
||||||
footer = new Footer {
|
|
||||||
logo = new Image {
|
|
||||||
src = "https://cdn.sonr.id/img/logo.svg";
|
|
||||||
width = "500";
|
|
||||||
height = "500";
|
|
||||||
};
|
|
||||||
|
|
||||||
mediumLink = new SocialLink {
|
|
||||||
link = new Link {
|
|
||||||
text = "Medium";
|
|
||||||
href = "https://medium.com/sonr-io";
|
|
||||||
};
|
|
||||||
icon = "https://cdn.sonr.id/img/medium.svg";
|
|
||||||
};
|
|
||||||
|
|
||||||
twitterLink = new SocialLink {
|
|
||||||
link = new Link {
|
|
||||||
text = "Twitter";
|
|
||||||
href = "https://twitter.com/sonr";
|
|
||||||
};
|
|
||||||
icon = "https://cdn.sonr.id/img/twitter.svg";
|
|
||||||
};
|
|
||||||
|
|
||||||
discordLink = new SocialLink {
|
|
||||||
link = new Link {
|
|
||||||
text = "Discord";
|
|
||||||
href = "https://discord.com/invite/sonr";
|
|
||||||
};
|
|
||||||
icon = "https://cdn.sonr.id/img/discord.svg";
|
|
||||||
};
|
|
||||||
|
|
||||||
githubLink = new SocialLink {
|
|
||||||
link = new Link {
|
|
||||||
text = "GitHub";
|
|
||||||
href = "https://github.com/sonr-io";
|
|
||||||
};
|
|
||||||
icon = "https://cdn.sonr.id/img/github.svg";
|
|
||||||
};
|
|
||||||
|
|
||||||
companyLinks {
|
|
||||||
new Link {
|
|
||||||
text = "About";
|
|
||||||
href = "https://sonr.io/about";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Careers";
|
|
||||||
href = "https://sonr.io/careers";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Partners";
|
|
||||||
href = "https://sonr.io/partners";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Investors";
|
|
||||||
href = "https://sonr.io/investors";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Newsroom";
|
|
||||||
href = "https://sonr.io/newsroom";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Blog";
|
|
||||||
href = "https://sonr.io/blog";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
resourcesLinks {
|
|
||||||
new Link {
|
|
||||||
text = "Docs";
|
|
||||||
href = "https://docs.sonr.io";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Whitepaper";
|
|
||||||
href = "https://sonr.io/whitepaper";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "FAQ";
|
|
||||||
href = "https://sonr.io/faq";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Terms of Service";
|
|
||||||
href = "https://sonr.io/terms";
|
|
||||||
};
|
|
||||||
new Link {
|
|
||||||
text = "Privacy Policy";
|
|
||||||
href = "https://sonr.io/privacy";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,11 +11,12 @@
|
|||||||
"watch": "bun run watch:ts & bun run watch:css"
|
"watch": "bun run watch:ts & bun run watch:css"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"htmx.org": "^1.9.12",
|
|
||||||
"alpinejs": "^3.14.1",
|
|
||||||
"@tailwindcss/typography": "^0.5.15",
|
|
||||||
"@tailwindcss/forms": "^0.5.7",
|
"@tailwindcss/forms": "^0.5.7",
|
||||||
|
"@tailwindcss/typography": "^0.5.15",
|
||||||
|
"alpinejs": "^3.14.1",
|
||||||
|
"htmx.org": "^1.9.12",
|
||||||
"tailwindcss": "^3.3.0",
|
"tailwindcss": "^3.3.0",
|
||||||
|
"tailwindcss-motion": "^0.3.0-beta",
|
||||||
"typescript": "^4.9.0"
|
"typescript": "^4.9.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [require("@tailwindcss/typography"), require("@tailwindcss/forms")],
|
plugins: [require("@tailwindcss/typography"), require("@tailwindcss/forms"), require('tailwindcss-motion')],
|
||||||
};
|
};
|
||||||
|
|||||||
+30
-30
@@ -1,39 +1,39 @@
|
|||||||
package orm
|
package orm
|
||||||
|
|
||||||
const SCHEMA_VERSION = 1
|
import (
|
||||||
|
"reflect"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
func AccountSchema() string {
|
const SchemaVersion = 1
|
||||||
return "++, id, name, address, publicKey, chainCode, index, controller, createdAt"
|
|
||||||
|
func toCamelCase(s string) string {
|
||||||
|
if s == "" {
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
if len(s) == 1 {
|
||||||
|
return strings.ToLower(s)
|
||||||
|
}
|
||||||
|
return strings.ToLower(s[:1]) + s[1:]
|
||||||
}
|
}
|
||||||
|
|
||||||
func AssetSchema() string {
|
func GetSchema(structType interface{}) string {
|
||||||
return "++, id, name, symbol, decimals, chainCode, createdAt"
|
t := reflect.TypeOf(structType)
|
||||||
}
|
if t.Kind() == reflect.Ptr {
|
||||||
|
t = t.Elem()
|
||||||
|
}
|
||||||
|
|
||||||
func ChainSchema() string {
|
if t.Kind() != reflect.Struct {
|
||||||
return "++, id, name, networkId, chainCode, createdAt"
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func CredentialSchema() string {
|
var fields []string
|
||||||
return "++, id, subject, controller, attestationType, origin, label, deviceId, credentialId, publicKey, transport, signCount, userPresent, userVerified, backupEligible, backupState, cloneWarning, createdAt, updatedAt"
|
for i := 0; i < t.NumField(); i++ {
|
||||||
}
|
field := t.Field(i)
|
||||||
|
fieldName := toCamelCase(field.Name)
|
||||||
|
fields = append(fields, fieldName)
|
||||||
|
}
|
||||||
|
|
||||||
func DIDSchema() string {
|
// Add "++" at the beginning, separated by a comma
|
||||||
return "++, id, role, algorithm, encoding, curve, key_type, raw, jwk"
|
return "++, " + strings.Join(fields, ", ")
|
||||||
}
|
|
||||||
|
|
||||||
func JwkSchema() string {
|
|
||||||
return "++, kty, crv, x, y, n, e"
|
|
||||||
}
|
|
||||||
|
|
||||||
func GrantSchema() string {
|
|
||||||
return "++, subject, controller, origin, token, scopes, createdAt, updatedAt"
|
|
||||||
}
|
|
||||||
|
|
||||||
func KeyshareSchema() string {
|
|
||||||
return "++, id, data, role, createdAt, lastRefreshed"
|
|
||||||
}
|
|
||||||
|
|
||||||
func ProfileSchema() string {
|
|
||||||
return "++, id, subject, controller, originUri, publicMetadata, privateMetadata, createdAt, updatedAt"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,92 +6,43 @@ import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
|||||||
|
|
||||||
typealias JSON = String
|
typealias JSON = String
|
||||||
|
|
||||||
class JsonField extends go.Field {
|
|
||||||
structTags {
|
|
||||||
["json"] = "%{name},omitempty"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
@JsonField
|
|
||||||
ipfs: IPFS
|
ipfs: IPFS
|
||||||
|
|
||||||
@JsonField
|
|
||||||
sonr: Sonr
|
sonr: Sonr
|
||||||
|
|
||||||
@JsonField
|
|
||||||
motr: Motr
|
motr: Motr
|
||||||
|
|
||||||
@JsonField
|
|
||||||
schema: Schema
|
schema: Schema
|
||||||
|
|
||||||
@JsonField
|
|
||||||
proxyUrl: String
|
proxyUrl: String
|
||||||
}
|
}
|
||||||
|
|
||||||
class IPFS {
|
class IPFS {
|
||||||
@JsonField
|
|
||||||
apiUrl: String
|
apiUrl: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
gatewayUrl: String
|
gatewayUrl: String
|
||||||
}
|
}
|
||||||
|
|
||||||
class Motr {
|
class Motr {
|
||||||
@JsonField
|
|
||||||
keyshare: JSON
|
keyshare: JSON
|
||||||
|
|
||||||
@JsonField
|
|
||||||
address: String
|
address: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
origin: String
|
origin: String
|
||||||
}
|
}
|
||||||
|
|
||||||
class Schema {
|
class Schema {
|
||||||
version: Int
|
version: Int
|
||||||
|
|
||||||
@JsonField
|
|
||||||
account: String
|
account: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
asset: String
|
asset: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
chain: String
|
chain: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
credential: String
|
credential: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
jwk: String
|
jwk: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
grant: String
|
grant: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
keyshare: String
|
keyshare: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
profile: String
|
profile: String
|
||||||
}
|
}
|
||||||
|
|
||||||
class Sonr {
|
class Sonr {
|
||||||
@JsonField
|
|
||||||
apiUrl: String
|
apiUrl: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
grpcUrl: String
|
grpcUrl: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
rpcUrl: String
|
rpcUrl: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
webSocketUrl: String
|
webSocketUrl: String
|
||||||
|
|
||||||
@JsonField
|
|
||||||
chainId: String
|
chainId: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dwn : Config
|
||||||
|
|
||||||
@@ -54,14 +54,8 @@ class SocialLink {
|
|||||||
class Feature {
|
class Feature {
|
||||||
title: String
|
title: String
|
||||||
description: String
|
description: String
|
||||||
icon: String
|
icon: String?
|
||||||
image: Image
|
image: Image?
|
||||||
}
|
|
||||||
|
|
||||||
class Highlight {
|
|
||||||
title: String
|
|
||||||
description: String
|
|
||||||
image: Image
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Stat {
|
class Stat {
|
||||||
@@ -87,53 +81,10 @@ class Hero {
|
|||||||
class Highlights {
|
class Highlights {
|
||||||
heading: String
|
heading: String
|
||||||
subheading: String
|
subheading: String
|
||||||
highlights: Listing<Highlight>
|
highlights: Listing<Feature>
|
||||||
}
|
}
|
||||||
|
|
||||||
class Features {
|
|
||||||
title: String
|
|
||||||
description: String
|
|
||||||
image: Image
|
|
||||||
}
|
|
||||||
|
|
||||||
class Bento {
|
|
||||||
title: String
|
|
||||||
description: String
|
|
||||||
primaryButton: Button
|
|
||||||
secondaryButton: Button
|
|
||||||
}
|
|
||||||
|
|
||||||
class Lowlights {
|
|
||||||
title: String
|
|
||||||
description: String
|
|
||||||
image: Image
|
|
||||||
}
|
|
||||||
|
|
||||||
class CallToAction {
|
|
||||||
title: String
|
|
||||||
description: String
|
|
||||||
primaryButton: Button
|
|
||||||
secondaryButton: Button
|
|
||||||
}
|
|
||||||
|
|
||||||
class Footer {
|
|
||||||
logo: Image
|
|
||||||
mediumLink: SocialLink
|
|
||||||
twitterLink: SocialLink
|
|
||||||
discordLink: SocialLink
|
|
||||||
githubLink: SocialLink
|
|
||||||
companyLinks: Listing<Link>
|
|
||||||
resourcesLinks: Listing<Link>
|
|
||||||
}
|
|
||||||
|
|
||||||
class Home {
|
class Home {
|
||||||
hero: Hero
|
hero: Hero
|
||||||
highlights: Listing<Highlight>
|
|
||||||
features: Listing<Features>
|
|
||||||
bento: Bento
|
|
||||||
lowlights: Listing<Lowlights>
|
|
||||||
callToAction: CallToAction
|
|
||||||
footer: Footer
|
|
||||||
}
|
}
|
||||||
|
|
||||||
home : Home
|
home : Home
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
version: "0.6"
|
|
||||||
|
|
||||||
processes:
|
|
||||||
ipfs:
|
|
||||||
namespace: testnet
|
|
||||||
command: "sh scripts/setup_ipfs.sh"
|
|
||||||
background: true
|
|
||||||
availability:
|
|
||||||
restart: on_failure
|
|
||||||
max_restarts: 0
|
|
||||||
|
|
||||||
sonr:
|
|
||||||
namespace: testnet
|
|
||||||
command: "devbox run start:testnet"
|
|
||||||
restart: on_failure
|
|
||||||
max_restarts: 1
|
|
||||||
depends:
|
|
||||||
- ipfs
|
|
||||||
|
|
||||||
hway:
|
|
||||||
namespace: testnet
|
|
||||||
command: "devbox run start:hway"
|
|
||||||
restart: on_failure
|
|
||||||
max_restarts: 1
|
|
||||||
depends:
|
|
||||||
- ipfs
|
|
||||||
- sonr
|
|
||||||
|
|
||||||
tunnel:
|
|
||||||
namespace: public
|
|
||||||
command: "cloudflared tunnel run --token $TUNNEL_TOKEN"
|
|
||||||
restart: on_failure
|
|
||||||
max_restarts: 1
|
|
||||||
depends:
|
|
||||||
- caddy
|
|
||||||
@@ -34,14 +34,13 @@ func (p Params) Validate() error {
|
|||||||
// DefaultSchema returns the default schema
|
// DefaultSchema returns the default schema
|
||||||
func DefaultSchema() *Schema {
|
func DefaultSchema() *Schema {
|
||||||
return &Schema{
|
return &Schema{
|
||||||
Version: orm.SCHEMA_VERSION,
|
Version: orm.SchemaVersion,
|
||||||
Account: orm.AccountSchema(),
|
Account: orm.GetSchema(&orm.Account{}),
|
||||||
Asset: orm.AssetSchema(),
|
Asset: orm.GetSchema(&orm.Asset{}),
|
||||||
Chain: orm.ChainSchema(),
|
Chain: orm.GetSchema(&orm.Chain{}),
|
||||||
Credential: orm.CredentialSchema(),
|
Credential: orm.GetSchema(&orm.Credential{}),
|
||||||
Jwk: orm.JwkSchema(),
|
Grant: orm.GetSchema(&orm.Grant{}),
|
||||||
Grant: orm.GrantSchema(),
|
Keyshare: orm.GetSchema(&orm.Keyshare{}),
|
||||||
Keyshare: orm.KeyshareSchema(),
|
Profile: orm.GetSchema(&orm.Profile{}),
|
||||||
Profile: orm.ProfileSchema(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user