sonr/config/pkl/dwn.pkl
Prad Nukala a4dbb41202
feature/dwn database state (#18)
* refactor: move database, navigator scripts to state package

* feat: add Schema config for dwn

* test: add unit tests for InitializeDatabase

* feat: use templated index.html for the DWN frontend

* feat: introduce templ generation for templ

* chore(deps): update devbox.json to use latest packages

* chore: update devbox to use bun

* feat: introduce dwn config generation

* feat: add motr.mjs for vault management

* refactor: move front end from  to  (alert)

* feat: implement devbox integration and devbox-based process management

* feat: embed motr.mjs script for offline demo

* refactor: embed motr.mjs data in embed.go

* chore: update workflows to use actions/checkout@v4

* refactor: move process-compose.yaml to deploy directory

* refactor: remove unnecessary JSON conversion
2024-09-21 21:42:51 -04:00

98 lines
1.1 KiB
Plaintext

@go.Package { name = "github.com/onsonr/sonr/config/dwn" }
module dwn
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
typealias JSON = String
class JsonField extends go.Field {
structTags {
["json"] = "%{name},omitempty"
}
}
class Config {
@JsonField
ipfs: IPFS
@JsonField
sonr: Sonr
@JsonField
motr: Motr
@JsonField
schema: Schema
}
class IPFS {
@JsonField
apiUrl: String
@JsonField
gatewayUrl: String
}
class Motr {
@JsonField
keyshare: JSON
@JsonField
address: String
@JsonField
origin: String
}
class Schema {
version: Int
@JsonField
account: String
@JsonField
asset: String
@JsonField
chain: String
@JsonField
credential: String
@JsonField
jwk: String
@JsonField
grant: String
@JsonField
keyshare: String
@JsonField
publicKey: String
@JsonField
profile: String
}
class Sonr {
@JsonField
apiUrl: String
@JsonField
grpcUrl: String
@JsonField
rpcUrl: String
@JsonField
webSocketUrl: String
@JsonField
chainId: String
}