mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat: add enums.pulsar.go file for PermissionScope enum (#4)
* feat: add enums.pulsar.go file for PermissionScope enum
* refactor: remove PERMISSION_SCOPE_IDENTIFIERS_ENS enum value
* feat: Add MsgRegisterService to handle service registration
The commit message for these changes would be:
feat: Add MsgRegisterService to handle service registration
This commit adds a new message type `MsgRegisterService` to the DID module's transaction proto file. This message allows users to register a new service with a given permission scope and origin URI. The domain must have a valid TXT record containing the public key.
The changes include:
- Adding the `MsgRegisterService` message type with fields for authority, origin URI, and scopes
- Adding the `MsgRegisterServiceResponse` message type to handle the response
- Updating the Msg service to include a new `RegisterService` RPC method
- Implementing the `RegisterService` method in the keeper
This feature allows users to register new services on the DID chain, which is an important part of the overall DID functionality.
* (no commit message provided)
* fix: Add ProveWitness and SyncVault RPCs
The commit message should be:
feat: Add ProveWitness and SyncVault RPCs
This change adds two new RPCs to the DID module:
1. ProveWitness: An operation to prove the controller has a valid property using ZK Accumulators.
2. SyncVault: Synchronizes the controller with the Vault Motr DWN WASM Wallet.
These new RPCs allow for more advanced DID management functionality.
* fix: Remove unused `Meta` message from `genesis.proto`
* refactor: Simplify the types and properties to keep a consistent structure for the blockchain
* (no commit message provided)
* {}
* feat: add Equal methods for AssetInfo and ChainInfo types
This commit is contained in:
@@ -17,9 +17,9 @@ type AliasesTable interface {
|
||||
Has(ctx context.Context, id string) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, id string) (*Aliases, error)
|
||||
HasByHandle(ctx context.Context, handle string) (found bool, err error)
|
||||
// GetByHandle returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByHandle(ctx context.Context, handle string) (*Aliases, error)
|
||||
HasBySubject(ctx context.Context, subject string) (found bool, err error)
|
||||
// GetBySubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetBySubject(ctx context.Context, subject string) (*Aliases, error)
|
||||
List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error)
|
||||
ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error
|
||||
@@ -60,16 +60,16 @@ func (this AliasesIdIndexKey) WithId(id string) AliasesIdIndexKey {
|
||||
return this
|
||||
}
|
||||
|
||||
type AliasesHandleIndexKey struct {
|
||||
type AliasesSubjectIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x AliasesHandleIndexKey) id() uint32 { return 1 }
|
||||
func (x AliasesHandleIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AliasesHandleIndexKey) aliasesIndexKey() {}
|
||||
func (x AliasesSubjectIndexKey) id() uint32 { return 1 }
|
||||
func (x AliasesSubjectIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AliasesSubjectIndexKey) aliasesIndexKey() {}
|
||||
|
||||
func (this AliasesHandleIndexKey) WithHandle(handle string) AliasesHandleIndexKey {
|
||||
this.vs = []interface{}{handle}
|
||||
func (this AliasesSubjectIndexKey) WithSubject(subject string) AliasesSubjectIndexKey {
|
||||
this.vs = []interface{}{subject}
|
||||
return this
|
||||
}
|
||||
|
||||
@@ -109,16 +109,16 @@ func (this aliasesTable) Get(ctx context.Context, id string) (*Aliases, error) {
|
||||
return &aliases, nil
|
||||
}
|
||||
|
||||
func (this aliasesTable) HasByHandle(ctx context.Context, handle string) (found bool, err error) {
|
||||
func (this aliasesTable) HasBySubject(ctx context.Context, subject string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
handle,
|
||||
subject,
|
||||
)
|
||||
}
|
||||
|
||||
func (this aliasesTable) GetByHandle(ctx context.Context, handle string) (*Aliases, error) {
|
||||
func (this aliasesTable) GetBySubject(ctx context.Context, subject string) (*Aliases, error) {
|
||||
var aliases Aliases
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &aliases,
|
||||
handle,
|
||||
subject,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user