feature/dwn sw js (#1103)

- **feat(macaroon): add  and  to macaroon genesis**
- **refactor: move schema definitions to dedicated file**
- **feat: remove Session model**
- **refactor: move session middleware to internal package**
This commit is contained in:
Prad Nukala
2024-10-02 01:40:49 -04:00
committed by GitHub
parent d62fb30eb8
commit edb109b542
55 changed files with 2472 additions and 543 deletions
+11 -9
View File
@@ -2,6 +2,8 @@ package types
import (
"encoding/json"
"github.com/onsonr/sonr/pkg/orm"
)
// DefaultParams returns default module parameters.
@@ -32,14 +34,14 @@ func (p Params) Validate() error {
// DefaultSchema returns the default schema
func DefaultSchema() *Schema {
return &Schema{
Version: 1,
Account: "++, id, name, address, publicKey, chainCode, index, controller, createdAt",
Asset: "++, id, name, symbol, decimals, chainCode, createdAt",
Chain: "++, id, name, networkId, chainCode, createdAt",
Credential: "++, id, subject, controller, attestationType, origin, label, deviceId, credentialId, publicKey, transport, signCount, userPresent, userVerified, backupEligible, backupState, cloneWarning, createdAt, updatedAt",
Jwk: "++, kty, crv, x, y, n, e",
Grant: "++, subject, controller, origin, token, scopes, createdAt, updatedAt",
Keyshare: "++, id, data, role, createdAt, lastRefreshed",
Profile: "++, id, subject, controller, originUri, publicMetadata, privateMetadata, createdAt, updatedAt",
Version: orm.SCHEMA_VERSION,
Account: orm.AccountSchema(),
Asset: orm.AssetSchema(),
Chain: orm.ChainSchema(),
Credential: orm.CredentialSchema(),
Jwk: orm.JwkSchema(),
Grant: orm.GrantSchema(),
Keyshare: orm.KeyshareSchema(),
Profile: orm.ProfileSchema(),
}
}