feature/1214 session fetch refactor (#1215)

* chore(docs): remove token economy guide

* refactor(context): update GatewayContext to use Querier interface

* chore(database): update schema path

* docs: Update READMEs for x/did, x/dwn, and x/svc with UCAN integration

* chore(pkg): update database scope name

* refactor(did): optimize GenesisState proto methods

* refactor(svc): update Service proto to use repeated fields

* refactor(api): rename MsgSpawn to MsgInitialize
This commit is contained in:
Prad Nukala
2024-12-24 15:38:17 +00:00
committed by GitHub
parent 398864fc6b
commit 0ec2f7d86a
68 changed files with 9551 additions and 9260 deletions
+5 -5
View File
@@ -14,10 +14,10 @@ import (
type GatewayContext struct {
echo.Context
*hwayorm.Queries
agent useragent.UserAgent
hwayorm.Querier
id string
ipfsClient common.IPFS
agent useragent.UserAgent
tokenStore common.IPFSTokenStore
stagedEnclaves map[string]mpc.Enclave
grpcAddr string
@@ -38,12 +38,12 @@ func UseGateway(env hway.Hway, ipc common.IPFS, db *hwayorm.Queries) echo.Middle
ua := useragent.NewParser()
ctx := &GatewayContext{
Context: c,
turnstileSiteKey: env.GetTurnstileSiteKey(),
agent: ua.Parse(c.Request().UserAgent()),
Queries: db,
Querier: db,
ipfsClient: ipc,
agent: ua.Parse(c.Request().UserAgent()),
grpcAddr: env.GetSonrGrpcUrl(),
tokenStore: common.NewUCANStore(ipc),
turnstileSiteKey: env.GetTurnstileSiteKey(),
}
return next(ctx)
}
+2 -2
View File
@@ -23,7 +23,7 @@ func UpdateProfile(c echo.Context) (*hwayorm.Profile, error) {
if err != nil {
return nil, err
}
return &profile, nil
return profile, nil
}
func ReadProfile(c echo.Context) (*hwayorm.Profile, error) {
@@ -36,7 +36,7 @@ func ReadProfile(c echo.Context) (*hwayorm.Profile, error) {
if err != nil {
return nil, err
}
return &profile, nil
return profile, nil
}
func DeleteProfile(c echo.Context) error {
+1 -1
View File
@@ -32,7 +32,7 @@ func (c *CredentialDescriptor) ToModel(handle, origin string) *hwayorm.Credentia
}
}
func CredentialArrayToDescriptors(credentials []hwayorm.Credential) []*CredentialDescriptor {
func CredentialArrayToDescriptors(credentials []*hwayorm.Credential) []*CredentialDescriptor {
var descriptors []*CredentialDescriptor
for _, cred := range credentials {
cd := &CredentialDescriptor{