mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 18:01:39 +00:00
feature/implement vault allocation (#11)
* feat: add authentication middleware * feat: add REST API endpoints for database interactions * refactor: move DiscoveryDocument Pkl schema to oidc module * fix: replace sonrd with test_node.sh * feat: use NFT keeper to mint DID namespace NFT * refactor: move NFT class configuration to types * feat: add GlobalIntegrity genesis state * fix: ensure GlobalIntegrity is initialized in genesis * refactor: update all references to transactions module * refactor: improve genesis state struct * chore(did): update discovery endpoint to reflect base url * feat: remove unused context cache and client code * refactor: remove middleware dependency from keeper * feat: Add new query handlers for DID module * feat: Implement unimplemented params queries * feat: add support for first-party caveats * refactor: move motr command to cmd directory * feat: add support for GitHub releases * fix(motr): build app.wasm for motr package * feat: add card component * feat: add IndexedDB support for persistent storage * feat: Add Row and Column components * feat: add and components * refactor: improve button component * refactor: remove unnecessary button parameter in renderButton * feat: add vault service endpoint * feat: add input component
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/motr/api" }
|
||||
|
||||
module api
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
abstract class Request {
|
||||
route: String
|
||||
method: String
|
||||
headers: Map<String, String>
|
||||
origin: String?
|
||||
userAgent: String?
|
||||
body: Dynamic
|
||||
}
|
||||
|
||||
abstract class Response {
|
||||
statusCode: Int
|
||||
headers: Map<String, String>
|
||||
body: Dynamic
|
||||
}
|
||||
|
||||
class GetAccountsRequest extends Request {
|
||||
route = "/accounts"
|
||||
method = "GET"
|
||||
headers = {
|
||||
"Content-Type" = "application/json"
|
||||
}
|
||||
origin = null
|
||||
userAgent = null
|
||||
body = null
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/motr/api/bake" }
|
||||
|
||||
module bake
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
}
|
||||
}
|
||||
|
||||
abstract class Macroon {
|
||||
id: String
|
||||
location: String
|
||||
}
|
||||
|
||||
abstract class FirstPartyCaveats {
|
||||
scope: String
|
||||
exp: Int
|
||||
cnf: String
|
||||
aud: String
|
||||
}
|
||||
|
||||
abstract class ThirdPartyCaveats {
|
||||
scope: String
|
||||
exp: Int
|
||||
cnf: String
|
||||
aud: String
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/x/did/types/oidc" }
|
||||
|
||||
module oidc
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
class JsonField extends go.Field {
|
||||
structTags {
|
||||
["json"] = "%{name},omitempty"
|
||||
["param"] = "%{name}"
|
||||
}
|
||||
}
|
||||
|
||||
class DiscoveryDocument {
|
||||
@JsonField
|
||||
issuer: String
|
||||
|
||||
@JsonField
|
||||
authorization_endpoint: String
|
||||
|
||||
@JsonField
|
||||
token_endpoint: String
|
||||
|
||||
@JsonField
|
||||
userinfo_endpoint: String
|
||||
|
||||
@JsonField
|
||||
jwks_uri: String
|
||||
|
||||
@JsonField
|
||||
registration_endpoint: String
|
||||
|
||||
@JsonField
|
||||
scopes_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
response_types_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
response_modes_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
subject_types_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
id_token_signing_alg_values_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
claims_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
grant_types_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
acr_values_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
token_endpoint_auth_methods_supported: List<String>
|
||||
}
|
||||
+1
-83
@@ -196,43 +196,11 @@ class Keyshare {
|
||||
id: UInt
|
||||
|
||||
@JsonField
|
||||
metadata: String
|
||||
|
||||
@JsonField
|
||||
payloads: String
|
||||
|
||||
@JsonField
|
||||
protocol: String
|
||||
|
||||
@JsonField
|
||||
publicKey: String
|
||||
data: String
|
||||
|
||||
@JsonField
|
||||
role: Int
|
||||
|
||||
@JsonField
|
||||
version: Int
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
}
|
||||
|
||||
class PublicKey {
|
||||
@PrimaryKey
|
||||
id: UInt
|
||||
|
||||
@JsonField
|
||||
role: Int
|
||||
|
||||
@JsonField
|
||||
algorithm: Int
|
||||
|
||||
@JsonField
|
||||
encoding: Int
|
||||
|
||||
@JsonField
|
||||
jwk: String
|
||||
|
||||
@JsonField
|
||||
createdAt: String?
|
||||
}
|
||||
@@ -257,53 +225,3 @@ class Permission {
|
||||
updatedAt: String?
|
||||
}
|
||||
|
||||
//
|
||||
// OpenID Connect
|
||||
//
|
||||
|
||||
class DiscoveryDocument {
|
||||
@JsonField
|
||||
issuer: String
|
||||
|
||||
@JsonField
|
||||
authorization_endpoint: String
|
||||
|
||||
@JsonField
|
||||
token_endpoint: String
|
||||
|
||||
@JsonField
|
||||
userinfo_endpoint: String
|
||||
|
||||
@JsonField
|
||||
jwks_uri: String
|
||||
|
||||
@JsonField
|
||||
registration_endpoint: String
|
||||
|
||||
@JsonField
|
||||
scopes_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
response_types_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
response_modes_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
subject_types_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
id_token_signing_alg_values_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
claims_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
grant_types_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
acr_values_supported: List<String>
|
||||
|
||||
@JsonField
|
||||
token_endpoint_auth_methods_supported: List<String>
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
@go.Package { name = "github.com/onsonr/sonr/txns" }
|
||||
@go.Package { name = "github.com/onsonr/sonr/x/did/types/txns" }
|
||||
|
||||
module transactions
|
||||
module txns
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user