diff --git a/Makefile b/Makefile index fda10386a..b928892b8 100644 --- a/Makefile +++ b/Makefile @@ -286,10 +286,21 @@ testnet-basic: setup-testnet sh-testnet: mod-tidy CHAIN_ID="sonr-testnet-1" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_node.sh +.PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet + +############################################################################### +### extras ### +############################################################################### + +.PHONY: buf-publish templ-gen + +templ-gen: + templ generate + buf-publish: cd ./proto && bunx buf dep update && bunx buf build && bunx buf push -.PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet buf-publish + ############################################################################### ### help ### diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index 39ed930dc..11d080e04 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -9,121 +9,121 @@ import ( ormerrors "cosmossdk.io/orm/types/ormerrors" ) -type AssertionTable interface { - Insert(ctx context.Context, assertion *Assertion) error - Update(ctx context.Context, assertion *Assertion) error - Save(ctx context.Context, assertion *Assertion) error - Delete(ctx context.Context, assertion *Assertion) error +type AccountTable interface { + Insert(ctx context.Context, account *Account) error + Update(ctx context.Context, account *Account) error + Save(ctx context.Context, account *Account) error + Delete(ctx context.Context, account *Account) error Has(ctx context.Context, did 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, did string) (*Assertion, error) + Get(ctx context.Context, did string) (*Account, error) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) // GetByControllerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerSubject(ctx context.Context, controller string, subject string) (*Assertion, error) - List(ctx context.Context, prefixKey AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) - ListRange(ctx context.Context, from, to AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) - DeleteBy(ctx context.Context, prefixKey AssertionIndexKey) error - DeleteRange(ctx context.Context, from, to AssertionIndexKey) error + GetByControllerSubject(ctx context.Context, controller string, subject string) (*Account, error) + List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) + ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) + DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error + DeleteRange(ctx context.Context, from, to AccountIndexKey) error doNotImplement() } -type AssertionIterator struct { +type AccountIterator struct { ormtable.Iterator } -func (i AssertionIterator) Value() (*Assertion, error) { - var assertion Assertion - err := i.UnmarshalMessage(&assertion) - return &assertion, err +func (i AccountIterator) Value() (*Account, error) { + var account Account + err := i.UnmarshalMessage(&account) + return &account, err } -type AssertionIndexKey interface { +type AccountIndexKey interface { id() uint32 values() []interface{} - assertionIndexKey() + accountIndexKey() } // primary key starting index.. -type AssertionPrimaryKey = AssertionDidIndexKey +type AccountPrimaryKey = AccountDidIndexKey -type AssertionDidIndexKey struct { +type AccountDidIndexKey struct { vs []interface{} } -func (x AssertionDidIndexKey) id() uint32 { return 0 } -func (x AssertionDidIndexKey) values() []interface{} { return x.vs } -func (x AssertionDidIndexKey) assertionIndexKey() {} +func (x AccountDidIndexKey) id() uint32 { return 0 } +func (x AccountDidIndexKey) values() []interface{} { return x.vs } +func (x AccountDidIndexKey) accountIndexKey() {} -func (this AssertionDidIndexKey) WithDid(did string) AssertionDidIndexKey { +func (this AccountDidIndexKey) WithDid(did string) AccountDidIndexKey { this.vs = []interface{}{did} return this } -type AssertionControllerSubjectIndexKey struct { +type AccountControllerSubjectIndexKey struct { vs []interface{} } -func (x AssertionControllerSubjectIndexKey) id() uint32 { return 1 } -func (x AssertionControllerSubjectIndexKey) values() []interface{} { return x.vs } -func (x AssertionControllerSubjectIndexKey) assertionIndexKey() {} +func (x AccountControllerSubjectIndexKey) id() uint32 { return 1 } +func (x AccountControllerSubjectIndexKey) values() []interface{} { return x.vs } +func (x AccountControllerSubjectIndexKey) accountIndexKey() {} -func (this AssertionControllerSubjectIndexKey) WithController(controller string) AssertionControllerSubjectIndexKey { +func (this AccountControllerSubjectIndexKey) WithController(controller string) AccountControllerSubjectIndexKey { this.vs = []interface{}{controller} return this } -func (this AssertionControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AssertionControllerSubjectIndexKey { +func (this AccountControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AccountControllerSubjectIndexKey { this.vs = []interface{}{controller, subject} return this } -type assertionTable struct { +type accountTable struct { table ormtable.Table } -func (this assertionTable) Insert(ctx context.Context, assertion *Assertion) error { - return this.table.Insert(ctx, assertion) +func (this accountTable) Insert(ctx context.Context, account *Account) error { + return this.table.Insert(ctx, account) } -func (this assertionTable) Update(ctx context.Context, assertion *Assertion) error { - return this.table.Update(ctx, assertion) +func (this accountTable) Update(ctx context.Context, account *Account) error { + return this.table.Update(ctx, account) } -func (this assertionTable) Save(ctx context.Context, assertion *Assertion) error { - return this.table.Save(ctx, assertion) +func (this accountTable) Save(ctx context.Context, account *Account) error { + return this.table.Save(ctx, account) } -func (this assertionTable) Delete(ctx context.Context, assertion *Assertion) error { - return this.table.Delete(ctx, assertion) +func (this accountTable) Delete(ctx context.Context, account *Account) error { + return this.table.Delete(ctx, account) } -func (this assertionTable) Has(ctx context.Context, did string) (found bool, err error) { +func (this accountTable) Has(ctx context.Context, did string) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, did) } -func (this assertionTable) Get(ctx context.Context, did string) (*Assertion, error) { - var assertion Assertion - found, err := this.table.PrimaryKey().Get(ctx, &assertion, did) +func (this accountTable) Get(ctx context.Context, did string) (*Account, error) { + var account Account + found, err := this.table.PrimaryKey().Get(ctx, &account, did) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &assertion, nil + return &account, nil } -func (this assertionTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) { +func (this accountTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, controller, subject, ) } -func (this assertionTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Assertion, error) { - var assertion Assertion - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &assertion, +func (this accountTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Account, error) { + var account Account + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account, controller, subject, ) @@ -133,530 +133,206 @@ func (this assertionTable) GetByControllerSubject(ctx context.Context, controlle if !found { return nil, ormerrors.NotFound } - return &assertion, nil + return &account, nil } -func (this assertionTable) List(ctx context.Context, prefixKey AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) { +func (this accountTable) List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return AssertionIterator{it}, err + return AccountIterator{it}, err } -func (this assertionTable) ListRange(ctx context.Context, from, to AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) { +func (this accountTable) ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return AssertionIterator{it}, err + return AccountIterator{it}, err } -func (this assertionTable) DeleteBy(ctx context.Context, prefixKey AssertionIndexKey) error { +func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this assertionTable) DeleteRange(ctx context.Context, from, to AssertionIndexKey) error { +func (this accountTable) DeleteRange(ctx context.Context, from, to AccountIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this assertionTable) doNotImplement() {} +func (this accountTable) doNotImplement() {} -var _ AssertionTable = assertionTable{} +var _ AccountTable = accountTable{} -func NewAssertionTable(db ormtable.Schema) (AssertionTable, error) { - table := db.GetTable(&Assertion{}) +func NewAccountTable(db ormtable.Schema) (AccountTable, error) { + table := db.GetTable(&Account{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Assertion{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName())) } - return assertionTable{table}, nil + return accountTable{table}, nil } -type AuthenticationTable interface { - Insert(ctx context.Context, authentication *Authentication) error - Update(ctx context.Context, authentication *Authentication) error - Save(ctx context.Context, authentication *Authentication) error - Delete(ctx context.Context, authentication *Authentication) error - Has(ctx context.Context, did 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, did string) (*Authentication, error) - HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) - // GetByControllerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByControllerSubject(ctx context.Context, controller string, subject string) (*Authentication, error) - List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) - ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) - DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error - DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error - - doNotImplement() -} - -type AuthenticationIterator struct { - ormtable.Iterator -} - -func (i AuthenticationIterator) Value() (*Authentication, error) { - var authentication Authentication - err := i.UnmarshalMessage(&authentication) - return &authentication, err -} - -type AuthenticationIndexKey interface { - id() uint32 - values() []interface{} - authenticationIndexKey() -} - -// primary key starting index.. -type AuthenticationPrimaryKey = AuthenticationDidIndexKey - -type AuthenticationDidIndexKey struct { - vs []interface{} -} - -func (x AuthenticationDidIndexKey) id() uint32 { return 0 } -func (x AuthenticationDidIndexKey) values() []interface{} { return x.vs } -func (x AuthenticationDidIndexKey) authenticationIndexKey() {} - -func (this AuthenticationDidIndexKey) WithDid(did string) AuthenticationDidIndexKey { - this.vs = []interface{}{did} - return this -} - -type AuthenticationControllerSubjectIndexKey struct { - vs []interface{} -} - -func (x AuthenticationControllerSubjectIndexKey) id() uint32 { return 1 } -func (x AuthenticationControllerSubjectIndexKey) values() []interface{} { return x.vs } -func (x AuthenticationControllerSubjectIndexKey) authenticationIndexKey() {} - -func (this AuthenticationControllerSubjectIndexKey) WithController(controller string) AuthenticationControllerSubjectIndexKey { - this.vs = []interface{}{controller} - return this -} - -func (this AuthenticationControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AuthenticationControllerSubjectIndexKey { - this.vs = []interface{}{controller, subject} - return this -} - -type authenticationTable struct { - table ormtable.Table -} - -func (this authenticationTable) Insert(ctx context.Context, authentication *Authentication) error { - return this.table.Insert(ctx, authentication) -} - -func (this authenticationTable) Update(ctx context.Context, authentication *Authentication) error { - return this.table.Update(ctx, authentication) -} - -func (this authenticationTable) Save(ctx context.Context, authentication *Authentication) error { - return this.table.Save(ctx, authentication) -} - -func (this authenticationTable) Delete(ctx context.Context, authentication *Authentication) error { - return this.table.Delete(ctx, authentication) -} - -func (this authenticationTable) Has(ctx context.Context, did string) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, did) -} - -func (this authenticationTable) Get(ctx context.Context, did string) (*Authentication, error) { - var authentication Authentication - found, err := this.table.PrimaryKey().Get(ctx, &authentication, did) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &authentication, nil -} - -func (this authenticationTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - controller, - subject, - ) -} - -func (this authenticationTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Authentication, error) { - var authentication Authentication - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &authentication, - controller, - subject, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &authentication, nil -} - -func (this authenticationTable) List(ctx context.Context, prefixKey AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return AuthenticationIterator{it}, err -} - -func (this authenticationTable) ListRange(ctx context.Context, from, to AuthenticationIndexKey, opts ...ormlist.Option) (AuthenticationIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return AuthenticationIterator{it}, err -} - -func (this authenticationTable) DeleteBy(ctx context.Context, prefixKey AuthenticationIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this authenticationTable) DeleteRange(ctx context.Context, from, to AuthenticationIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this authenticationTable) doNotImplement() {} - -var _ AuthenticationTable = authenticationTable{} - -func NewAuthenticationTable(db ormtable.Schema) (AuthenticationTable, error) { - table := db.GetTable(&Authentication{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Authentication{}).ProtoReflect().Descriptor().FullName())) - } - return authenticationTable{table}, nil -} - -type BiscuitTable interface { - Insert(ctx context.Context, biscuit *Biscuit) error - InsertReturningId(ctx context.Context, biscuit *Biscuit) (uint64, error) +type PublicKeyTable interface { + Insert(ctx context.Context, publicKey *PublicKey) error + InsertReturningNumber(ctx context.Context, publicKey *PublicKey) (uint64, error) LastInsertedSequence(ctx context.Context) (uint64, error) - Update(ctx context.Context, biscuit *Biscuit) error - Save(ctx context.Context, biscuit *Biscuit) error - Delete(ctx context.Context, biscuit *Biscuit) error - Has(ctx context.Context, id uint64) (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 uint64) (*Biscuit, error) - HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) - // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Biscuit, error) - List(ctx context.Context, prefixKey BiscuitIndexKey, opts ...ormlist.Option) (BiscuitIterator, error) - ListRange(ctx context.Context, from, to BiscuitIndexKey, opts ...ormlist.Option) (BiscuitIterator, error) - DeleteBy(ctx context.Context, prefixKey BiscuitIndexKey) error - DeleteRange(ctx context.Context, from, to BiscuitIndexKey) error - - doNotImplement() -} - -type BiscuitIterator struct { - ormtable.Iterator -} - -func (i BiscuitIterator) Value() (*Biscuit, error) { - var biscuit Biscuit - err := i.UnmarshalMessage(&biscuit) - return &biscuit, err -} - -type BiscuitIndexKey interface { - id() uint32 - values() []interface{} - biscuitIndexKey() -} - -// primary key starting index.. -type BiscuitPrimaryKey = BiscuitIdIndexKey - -type BiscuitIdIndexKey struct { - vs []interface{} -} - -func (x BiscuitIdIndexKey) id() uint32 { return 0 } -func (x BiscuitIdIndexKey) values() []interface{} { return x.vs } -func (x BiscuitIdIndexKey) biscuitIndexKey() {} - -func (this BiscuitIdIndexKey) WithId(id uint64) BiscuitIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type BiscuitSubjectOriginIndexKey struct { - vs []interface{} -} - -func (x BiscuitSubjectOriginIndexKey) id() uint32 { return 1 } -func (x BiscuitSubjectOriginIndexKey) values() []interface{} { return x.vs } -func (x BiscuitSubjectOriginIndexKey) biscuitIndexKey() {} - -func (this BiscuitSubjectOriginIndexKey) WithSubject(subject string) BiscuitSubjectOriginIndexKey { - this.vs = []interface{}{subject} - return this -} - -func (this BiscuitSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) BiscuitSubjectOriginIndexKey { - this.vs = []interface{}{subject, origin} - return this -} - -type biscuitTable struct { - table ormtable.AutoIncrementTable -} - -func (this biscuitTable) Insert(ctx context.Context, biscuit *Biscuit) error { - return this.table.Insert(ctx, biscuit) -} - -func (this biscuitTable) Update(ctx context.Context, biscuit *Biscuit) error { - return this.table.Update(ctx, biscuit) -} - -func (this biscuitTable) Save(ctx context.Context, biscuit *Biscuit) error { - return this.table.Save(ctx, biscuit) -} - -func (this biscuitTable) Delete(ctx context.Context, biscuit *Biscuit) error { - return this.table.Delete(ctx, biscuit) -} - -func (this biscuitTable) InsertReturningId(ctx context.Context, biscuit *Biscuit) (uint64, error) { - return this.table.InsertReturningPKey(ctx, biscuit) -} - -func (this biscuitTable) LastInsertedSequence(ctx context.Context) (uint64, error) { - return this.table.LastInsertedSequence(ctx) -} - -func (this biscuitTable) Has(ctx context.Context, id uint64) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this biscuitTable) Get(ctx context.Context, id uint64) (*Biscuit, error) { - var biscuit Biscuit - found, err := this.table.PrimaryKey().Get(ctx, &biscuit, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &biscuit, nil -} - -func (this biscuitTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - subject, - origin, - ) -} - -func (this biscuitTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Biscuit, error) { - var biscuit Biscuit - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &biscuit, - subject, - origin, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &biscuit, nil -} - -func (this biscuitTable) List(ctx context.Context, prefixKey BiscuitIndexKey, opts ...ormlist.Option) (BiscuitIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return BiscuitIterator{it}, err -} - -func (this biscuitTable) ListRange(ctx context.Context, from, to BiscuitIndexKey, opts ...ormlist.Option) (BiscuitIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return BiscuitIterator{it}, err -} - -func (this biscuitTable) DeleteBy(ctx context.Context, prefixKey BiscuitIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this biscuitTable) DeleteRange(ctx context.Context, from, to BiscuitIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this biscuitTable) doNotImplement() {} - -var _ BiscuitTable = biscuitTable{} - -func NewBiscuitTable(db ormtable.Schema) (BiscuitTable, error) { - table := db.GetTable(&Biscuit{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Biscuit{}).ProtoReflect().Descriptor().FullName())) - } - return biscuitTable{table.(ormtable.AutoIncrementTable)}, nil -} - -type ControllerTable interface { - Insert(ctx context.Context, controller *Controller) error - InsertReturningNumber(ctx context.Context, controller *Controller) (uint64, error) - LastInsertedSequence(ctx context.Context) (uint64, error) - Update(ctx context.Context, controller *Controller) error - Save(ctx context.Context, controller *Controller) error - Delete(ctx context.Context, controller *Controller) error + Update(ctx context.Context, publicKey *PublicKey) error + Save(ctx context.Context, publicKey *PublicKey) error + Delete(ctx context.Context, publicKey *PublicKey) error Has(ctx context.Context, number uint64) (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, number uint64) (*Controller, error) + Get(ctx context.Context, number uint64) (*PublicKey, error) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) // GetBySonrAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error) + GetBySonrAddress(ctx context.Context, sonr_address string) (*PublicKey, error) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) // GetByEthAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error) + GetByEthAddress(ctx context.Context, eth_address string) (*PublicKey, error) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) // GetByBtcAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error) + GetByBtcAddress(ctx context.Context, btc_address string) (*PublicKey, error) HasByDid(ctx context.Context, did string) (found bool, err error) // GetByDid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByDid(ctx context.Context, did string) (*Controller, error) - List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) - ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) - DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error - DeleteRange(ctx context.Context, from, to ControllerIndexKey) error + GetByDid(ctx context.Context, did string) (*PublicKey, error) + List(ctx context.Context, prefixKey PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) + ListRange(ctx context.Context, from, to PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) + DeleteBy(ctx context.Context, prefixKey PublicKeyIndexKey) error + DeleteRange(ctx context.Context, from, to PublicKeyIndexKey) error doNotImplement() } -type ControllerIterator struct { +type PublicKeyIterator struct { ormtable.Iterator } -func (i ControllerIterator) Value() (*Controller, error) { - var controller Controller - err := i.UnmarshalMessage(&controller) - return &controller, err +func (i PublicKeyIterator) Value() (*PublicKey, error) { + var publicKey PublicKey + err := i.UnmarshalMessage(&publicKey) + return &publicKey, err } -type ControllerIndexKey interface { +type PublicKeyIndexKey interface { id() uint32 values() []interface{} - controllerIndexKey() + publicKeyIndexKey() } // primary key starting index.. -type ControllerPrimaryKey = ControllerNumberIndexKey +type PublicKeyPrimaryKey = PublicKeyNumberIndexKey -type ControllerNumberIndexKey struct { +type PublicKeyNumberIndexKey struct { vs []interface{} } -func (x ControllerNumberIndexKey) id() uint32 { return 0 } -func (x ControllerNumberIndexKey) values() []interface{} { return x.vs } -func (x ControllerNumberIndexKey) controllerIndexKey() {} +func (x PublicKeyNumberIndexKey) id() uint32 { return 0 } +func (x PublicKeyNumberIndexKey) values() []interface{} { return x.vs } +func (x PublicKeyNumberIndexKey) publicKeyIndexKey() {} -func (this ControllerNumberIndexKey) WithNumber(number uint64) ControllerNumberIndexKey { +func (this PublicKeyNumberIndexKey) WithNumber(number uint64) PublicKeyNumberIndexKey { this.vs = []interface{}{number} return this } -type ControllerSonrAddressIndexKey struct { +type PublicKeySonrAddressIndexKey struct { vs []interface{} } -func (x ControllerSonrAddressIndexKey) id() uint32 { return 1 } -func (x ControllerSonrAddressIndexKey) values() []interface{} { return x.vs } -func (x ControllerSonrAddressIndexKey) controllerIndexKey() {} +func (x PublicKeySonrAddressIndexKey) id() uint32 { return 1 } +func (x PublicKeySonrAddressIndexKey) values() []interface{} { return x.vs } +func (x PublicKeySonrAddressIndexKey) publicKeyIndexKey() {} -func (this ControllerSonrAddressIndexKey) WithSonrAddress(sonr_address string) ControllerSonrAddressIndexKey { +func (this PublicKeySonrAddressIndexKey) WithSonrAddress(sonr_address string) PublicKeySonrAddressIndexKey { this.vs = []interface{}{sonr_address} return this } -type ControllerEthAddressIndexKey struct { +type PublicKeyEthAddressIndexKey struct { vs []interface{} } -func (x ControllerEthAddressIndexKey) id() uint32 { return 2 } -func (x ControllerEthAddressIndexKey) values() []interface{} { return x.vs } -func (x ControllerEthAddressIndexKey) controllerIndexKey() {} +func (x PublicKeyEthAddressIndexKey) id() uint32 { return 2 } +func (x PublicKeyEthAddressIndexKey) values() []interface{} { return x.vs } +func (x PublicKeyEthAddressIndexKey) publicKeyIndexKey() {} -func (this ControllerEthAddressIndexKey) WithEthAddress(eth_address string) ControllerEthAddressIndexKey { +func (this PublicKeyEthAddressIndexKey) WithEthAddress(eth_address string) PublicKeyEthAddressIndexKey { this.vs = []interface{}{eth_address} return this } -type ControllerBtcAddressIndexKey struct { +type PublicKeyBtcAddressIndexKey struct { vs []interface{} } -func (x ControllerBtcAddressIndexKey) id() uint32 { return 3 } -func (x ControllerBtcAddressIndexKey) values() []interface{} { return x.vs } -func (x ControllerBtcAddressIndexKey) controllerIndexKey() {} +func (x PublicKeyBtcAddressIndexKey) id() uint32 { return 3 } +func (x PublicKeyBtcAddressIndexKey) values() []interface{} { return x.vs } +func (x PublicKeyBtcAddressIndexKey) publicKeyIndexKey() {} -func (this ControllerBtcAddressIndexKey) WithBtcAddress(btc_address string) ControllerBtcAddressIndexKey { +func (this PublicKeyBtcAddressIndexKey) WithBtcAddress(btc_address string) PublicKeyBtcAddressIndexKey { this.vs = []interface{}{btc_address} return this } -type ControllerDidIndexKey struct { +type PublicKeyDidIndexKey struct { vs []interface{} } -func (x ControllerDidIndexKey) id() uint32 { return 4 } -func (x ControllerDidIndexKey) values() []interface{} { return x.vs } -func (x ControllerDidIndexKey) controllerIndexKey() {} +func (x PublicKeyDidIndexKey) id() uint32 { return 4 } +func (x PublicKeyDidIndexKey) values() []interface{} { return x.vs } +func (x PublicKeyDidIndexKey) publicKeyIndexKey() {} -func (this ControllerDidIndexKey) WithDid(did string) ControllerDidIndexKey { +func (this PublicKeyDidIndexKey) WithDid(did string) PublicKeyDidIndexKey { this.vs = []interface{}{did} return this } -type controllerTable struct { +type publicKeyTable struct { table ormtable.AutoIncrementTable } -func (this controllerTable) Insert(ctx context.Context, controller *Controller) error { - return this.table.Insert(ctx, controller) +func (this publicKeyTable) Insert(ctx context.Context, publicKey *PublicKey) error { + return this.table.Insert(ctx, publicKey) } -func (this controllerTable) Update(ctx context.Context, controller *Controller) error { - return this.table.Update(ctx, controller) +func (this publicKeyTable) Update(ctx context.Context, publicKey *PublicKey) error { + return this.table.Update(ctx, publicKey) } -func (this controllerTable) Save(ctx context.Context, controller *Controller) error { - return this.table.Save(ctx, controller) +func (this publicKeyTable) Save(ctx context.Context, publicKey *PublicKey) error { + return this.table.Save(ctx, publicKey) } -func (this controllerTable) Delete(ctx context.Context, controller *Controller) error { - return this.table.Delete(ctx, controller) +func (this publicKeyTable) Delete(ctx context.Context, publicKey *PublicKey) error { + return this.table.Delete(ctx, publicKey) } -func (this controllerTable) InsertReturningNumber(ctx context.Context, controller *Controller) (uint64, error) { - return this.table.InsertReturningPKey(ctx, controller) +func (this publicKeyTable) InsertReturningNumber(ctx context.Context, publicKey *PublicKey) (uint64, error) { + return this.table.InsertReturningPKey(ctx, publicKey) } -func (this controllerTable) LastInsertedSequence(ctx context.Context) (uint64, error) { +func (this publicKeyTable) LastInsertedSequence(ctx context.Context) (uint64, error) { return this.table.LastInsertedSequence(ctx) } -func (this controllerTable) Has(ctx context.Context, number uint64) (found bool, err error) { +func (this publicKeyTable) Has(ctx context.Context, number uint64) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, number) } -func (this controllerTable) Get(ctx context.Context, number uint64) (*Controller, error) { - var controller Controller - found, err := this.table.PrimaryKey().Get(ctx, &controller, number) +func (this publicKeyTable) Get(ctx context.Context, number uint64) (*PublicKey, error) { + var publicKey PublicKey + found, err := this.table.PrimaryKey().Get(ctx, &publicKey, number) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &controller, nil + return &publicKey, nil } -func (this controllerTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) { +func (this publicKeyTable) HasBySonrAddress(ctx context.Context, sonr_address string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, sonr_address, ) } -func (this controllerTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*Controller, error) { - var controller Controller - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &controller, +func (this publicKeyTable) GetBySonrAddress(ctx context.Context, sonr_address string) (*PublicKey, error) { + var publicKey PublicKey + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &publicKey, sonr_address, ) if err != nil { @@ -665,18 +341,18 @@ func (this controllerTable) GetBySonrAddress(ctx context.Context, sonr_address s if !found { return nil, ormerrors.NotFound } - return &controller, nil + return &publicKey, nil } -func (this controllerTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) { +func (this publicKeyTable) HasByEthAddress(ctx context.Context, eth_address string) (found bool, err error) { return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, eth_address, ) } -func (this controllerTable) GetByEthAddress(ctx context.Context, eth_address string) (*Controller, error) { - var controller Controller - found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &controller, +func (this publicKeyTable) GetByEthAddress(ctx context.Context, eth_address string) (*PublicKey, error) { + var publicKey PublicKey + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &publicKey, eth_address, ) if err != nil { @@ -685,18 +361,18 @@ func (this controllerTable) GetByEthAddress(ctx context.Context, eth_address str if !found { return nil, ormerrors.NotFound } - return &controller, nil + return &publicKey, nil } -func (this controllerTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) { +func (this publicKeyTable) HasByBtcAddress(ctx context.Context, btc_address string) (found bool, err error) { return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx, btc_address, ) } -func (this controllerTable) GetByBtcAddress(ctx context.Context, btc_address string) (*Controller, error) { - var controller Controller - found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &controller, +func (this publicKeyTable) GetByBtcAddress(ctx context.Context, btc_address string) (*PublicKey, error) { + var publicKey PublicKey + found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &publicKey, btc_address, ) if err != nil { @@ -705,18 +381,18 @@ func (this controllerTable) GetByBtcAddress(ctx context.Context, btc_address str if !found { return nil, ormerrors.NotFound } - return &controller, nil + return &publicKey, nil } -func (this controllerTable) HasByDid(ctx context.Context, did string) (found bool, err error) { +func (this publicKeyTable) HasByDid(ctx context.Context, did string) (found bool, err error) { return this.table.GetIndexByID(4).(ormtable.UniqueIndex).Has(ctx, did, ) } -func (this controllerTable) GetByDid(ctx context.Context, did string) (*Controller, error) { - var controller Controller - found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &controller, +func (this publicKeyTable) GetByDid(ctx context.Context, did string) (*PublicKey, error) { + var publicKey PublicKey + found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &publicKey, did, ) if err != nil { @@ -725,37 +401,37 @@ func (this controllerTable) GetByDid(ctx context.Context, did string) (*Controll if !found { return nil, ormerrors.NotFound } - return &controller, nil + return &publicKey, nil } -func (this controllerTable) List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) { +func (this publicKeyTable) List(ctx context.Context, prefixKey PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return ControllerIterator{it}, err + return PublicKeyIterator{it}, err } -func (this controllerTable) ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) { +func (this publicKeyTable) ListRange(ctx context.Context, from, to PublicKeyIndexKey, opts ...ormlist.Option) (PublicKeyIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return ControllerIterator{it}, err + return PublicKeyIterator{it}, err } -func (this controllerTable) DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error { +func (this publicKeyTable) DeleteBy(ctx context.Context, prefixKey PublicKeyIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this controllerTable) DeleteRange(ctx context.Context, from, to ControllerIndexKey) error { +func (this publicKeyTable) DeleteRange(ctx context.Context, from, to PublicKeyIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this controllerTable) doNotImplement() {} +func (this publicKeyTable) doNotImplement() {} -var _ ControllerTable = controllerTable{} +var _ PublicKeyTable = publicKeyTable{} -func NewControllerTable(db ormtable.Schema) (ControllerTable, error) { - table := db.GetTable(&Controller{}) +func NewPublicKeyTable(db ormtable.Schema) (PublicKeyTable, error) { + table := db.GetTable(&PublicKey{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Controller{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&PublicKey{}).ProtoReflect().Descriptor().FullName())) } - return controllerTable{table.(ormtable.AutoIncrementTable)}, nil + return publicKeyTable{table.(ormtable.AutoIncrementTable)}, nil } type VerificationTable interface { @@ -1016,37 +692,25 @@ func NewVerificationTable(db ormtable.Schema) (VerificationTable, error) { } type StateStore interface { - AssertionTable() AssertionTable - AuthenticationTable() AuthenticationTable - BiscuitTable() BiscuitTable - ControllerTable() ControllerTable + AccountTable() AccountTable + PublicKeyTable() PublicKeyTable VerificationTable() VerificationTable doNotImplement() } type stateStore struct { - assertion AssertionTable - authentication AuthenticationTable - biscuit BiscuitTable - controller ControllerTable - verification VerificationTable + account AccountTable + publicKey PublicKeyTable + verification VerificationTable } -func (x stateStore) AssertionTable() AssertionTable { - return x.assertion +func (x stateStore) AccountTable() AccountTable { + return x.account } -func (x stateStore) AuthenticationTable() AuthenticationTable { - return x.authentication -} - -func (x stateStore) BiscuitTable() BiscuitTable { - return x.biscuit -} - -func (x stateStore) ControllerTable() ControllerTable { - return x.controller +func (x stateStore) PublicKeyTable() PublicKeyTable { + return x.publicKey } func (x stateStore) VerificationTable() VerificationTable { @@ -1058,22 +722,12 @@ func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} func NewStateStore(db ormtable.Schema) (StateStore, error) { - assertionTable, err := NewAssertionTable(db) + accountTable, err := NewAccountTable(db) if err != nil { return nil, err } - authenticationTable, err := NewAuthenticationTable(db) - if err != nil { - return nil, err - } - - biscuitTable, err := NewBiscuitTable(db) - if err != nil { - return nil, err - } - - controllerTable, err := NewControllerTable(db) + publicKeyTable, err := NewPublicKeyTable(db) if err != nil { return nil, err } @@ -1084,10 +738,8 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { } return stateStore{ - assertionTable, - authenticationTable, - biscuitTable, - controllerTable, + accountTable, + publicKeyTable, verificationTable, }, nil } diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 7fe1e9a98..af60e7946 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -14,20 +14,20 @@ import ( sync "sync" ) -var _ protoreflect.Map = (*_Assertion_6_map)(nil) +var _ protoreflect.Map = (*_Account_6_map)(nil) -type _Assertion_6_map struct { +type _Account_6_map struct { m *map[string][]byte } -func (x *_Assertion_6_map) Len() int { +func (x *_Account_6_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } -func (x *_Assertion_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { +func (x *_Account_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } @@ -40,7 +40,7 @@ func (x *_Assertion_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) } } -func (x *_Assertion_6_map) Has(key protoreflect.MapKey) bool { +func (x *_Account_6_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } @@ -50,7 +50,7 @@ func (x *_Assertion_6_map) Has(key protoreflect.MapKey) bool { return ok } -func (x *_Assertion_6_map) Clear(key protoreflect.MapKey) { +func (x *_Account_6_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } @@ -59,7 +59,7 @@ func (x *_Assertion_6_map) Clear(key protoreflect.MapKey) { delete(*x.m, concreteKey) } -func (x *_Assertion_6_map) Get(key protoreflect.MapKey) protoreflect.Value { +func (x *_Account_6_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } @@ -72,7 +72,7 @@ func (x *_Assertion_6_map) Get(key protoreflect.MapKey) protoreflect.Value { return protoreflect.ValueOfBytes(v) } -func (x *_Assertion_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { +func (x *_Account_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } @@ -83,51 +83,51 @@ func (x *_Assertion_6_map) Set(key protoreflect.MapKey, value protoreflect.Value (*x.m)[concreteKey] = concreteValue } -func (x *_Assertion_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { +func (x *_Account_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } -func (x *_Assertion_6_map) NewValue() protoreflect.Value { +func (x *_Account_6_map) NewValue() protoreflect.Value { var v []byte return protoreflect.ValueOfBytes(v) } -func (x *_Assertion_6_map) IsValid() bool { +func (x *_Account_6_map) IsValid() bool { return x.m != nil } var ( - md_Assertion protoreflect.MessageDescriptor - fd_Assertion_did protoreflect.FieldDescriptor - fd_Assertion_controller protoreflect.FieldDescriptor - fd_Assertion_subject protoreflect.FieldDescriptor - fd_Assertion_public_key_hex protoreflect.FieldDescriptor - fd_Assertion_assertion_type protoreflect.FieldDescriptor - fd_Assertion_accumulator protoreflect.FieldDescriptor - fd_Assertion_creation_block protoreflect.FieldDescriptor + md_Account protoreflect.MessageDescriptor + fd_Account_did protoreflect.FieldDescriptor + fd_Account_controller protoreflect.FieldDescriptor + fd_Account_subject protoreflect.FieldDescriptor + fd_Account_public_key_hex protoreflect.FieldDescriptor + fd_Account_assertion_type protoreflect.FieldDescriptor + fd_Account_accumulator protoreflect.FieldDescriptor + fd_Account_creation_block protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() - md_Assertion = File_did_v1_state_proto.Messages().ByName("Assertion") - fd_Assertion_did = md_Assertion.Fields().ByName("did") - fd_Assertion_controller = md_Assertion.Fields().ByName("controller") - fd_Assertion_subject = md_Assertion.Fields().ByName("subject") - fd_Assertion_public_key_hex = md_Assertion.Fields().ByName("public_key_hex") - fd_Assertion_assertion_type = md_Assertion.Fields().ByName("assertion_type") - fd_Assertion_accumulator = md_Assertion.Fields().ByName("accumulator") - fd_Assertion_creation_block = md_Assertion.Fields().ByName("creation_block") + md_Account = File_did_v1_state_proto.Messages().ByName("Account") + fd_Account_did = md_Account.Fields().ByName("did") + fd_Account_controller = md_Account.Fields().ByName("controller") + fd_Account_subject = md_Account.Fields().ByName("subject") + fd_Account_public_key_hex = md_Account.Fields().ByName("public_key_hex") + fd_Account_assertion_type = md_Account.Fields().ByName("assertion_type") + fd_Account_accumulator = md_Account.Fields().ByName("accumulator") + fd_Account_creation_block = md_Account.Fields().ByName("creation_block") } -var _ protoreflect.Message = (*fastReflection_Assertion)(nil) +var _ protoreflect.Message = (*fastReflection_Account)(nil) -type fastReflection_Assertion Assertion +type fastReflection_Account Account -func (x *Assertion) ProtoReflect() protoreflect.Message { - return (*fastReflection_Assertion)(x) +func (x *Account) ProtoReflect() protoreflect.Message { + return (*fastReflection_Account)(x) } -func (x *Assertion) slowProtoReflect() protoreflect.Message { +func (x *Account) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_state_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -139,43 +139,43 @@ func (x *Assertion) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Assertion_messageType fastReflection_Assertion_messageType -var _ protoreflect.MessageType = fastReflection_Assertion_messageType{} +var _fastReflection_Account_messageType fastReflection_Account_messageType +var _ protoreflect.MessageType = fastReflection_Account_messageType{} -type fastReflection_Assertion_messageType struct{} +type fastReflection_Account_messageType struct{} -func (x fastReflection_Assertion_messageType) Zero() protoreflect.Message { - return (*fastReflection_Assertion)(nil) +func (x fastReflection_Account_messageType) Zero() protoreflect.Message { + return (*fastReflection_Account)(nil) } -func (x fastReflection_Assertion_messageType) New() protoreflect.Message { - return new(fastReflection_Assertion) +func (x fastReflection_Account_messageType) New() protoreflect.Message { + return new(fastReflection_Account) } -func (x fastReflection_Assertion_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Assertion +func (x fastReflection_Account_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Account } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Assertion) Descriptor() protoreflect.MessageDescriptor { - return md_Assertion +func (x *fastReflection_Account) Descriptor() protoreflect.MessageDescriptor { + return md_Account } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_Assertion) Type() protoreflect.MessageType { - return _fastReflection_Assertion_messageType +func (x *fastReflection_Account) Type() protoreflect.MessageType { + return _fastReflection_Account_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Assertion) New() protoreflect.Message { - return new(fastReflection_Assertion) +func (x *fastReflection_Account) New() protoreflect.Message { + return new(fastReflection_Account) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Assertion) Interface() protoreflect.ProtoMessage { - return (*Assertion)(x) +func (x *fastReflection_Account) Interface() protoreflect.ProtoMessage { + return (*Account)(x) } // Range iterates over every populated field in an undefined order, @@ -183,46 +183,46 @@ func (x *fastReflection_Assertion) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Assertion) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Account) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Did != "" { value := protoreflect.ValueOfString(x.Did) - if !f(fd_Assertion_did, value) { + if !f(fd_Account_did, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Assertion_controller, value) { + if !f(fd_Account_controller, value) { return } } if x.Subject != "" { value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Assertion_subject, value) { + if !f(fd_Account_subject, value) { return } } if x.PublicKeyHex != "" { value := protoreflect.ValueOfString(x.PublicKeyHex) - if !f(fd_Assertion_public_key_hex, value) { + if !f(fd_Account_public_key_hex, value) { return } } if x.AssertionType != "" { value := protoreflect.ValueOfString(x.AssertionType) - if !f(fd_Assertion_assertion_type, value) { + if !f(fd_Account_assertion_type, value) { return } } if len(x.Accumulator) != 0 { - value := protoreflect.ValueOfMap(&_Assertion_6_map{m: &x.Accumulator}) - if !f(fd_Assertion_accumulator, value) { + value := protoreflect.ValueOfMap(&_Account_6_map{m: &x.Accumulator}) + if !f(fd_Account_accumulator, value) { return } } if x.CreationBlock != int64(0) { value := protoreflect.ValueOfInt64(x.CreationBlock) - if !f(fd_Assertion_creation_block, value) { + if !f(fd_Account_creation_block, value) { return } } @@ -239,27 +239,27 @@ func (x *fastReflection_Assertion) Range(f func(protoreflect.FieldDescriptor, pr // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_Assertion) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Account) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Assertion.did": + case "did.v1.Account.did": return x.Did != "" - case "did.v1.Assertion.controller": + case "did.v1.Account.controller": return x.Controller != "" - case "did.v1.Assertion.subject": + case "did.v1.Account.subject": return x.Subject != "" - case "did.v1.Assertion.public_key_hex": + case "did.v1.Account.public_key_hex": return x.PublicKeyHex != "" - case "did.v1.Assertion.assertion_type": + case "did.v1.Account.assertion_type": return x.AssertionType != "" - case "did.v1.Assertion.accumulator": + case "did.v1.Account.accumulator": return len(x.Accumulator) != 0 - case "did.v1.Assertion.creation_block": + case "did.v1.Account.creation_block": return x.CreationBlock != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Assertion does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } @@ -269,27 +269,27 @@ func (x *fastReflection_Assertion) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Assertion) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Account) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Assertion.did": + case "did.v1.Account.did": x.Did = "" - case "did.v1.Assertion.controller": + case "did.v1.Account.controller": x.Controller = "" - case "did.v1.Assertion.subject": + case "did.v1.Account.subject": x.Subject = "" - case "did.v1.Assertion.public_key_hex": + case "did.v1.Account.public_key_hex": x.PublicKeyHex = "" - case "did.v1.Assertion.assertion_type": + case "did.v1.Account.assertion_type": x.AssertionType = "" - case "did.v1.Assertion.accumulator": + case "did.v1.Account.accumulator": x.Accumulator = nil - case "did.v1.Assertion.creation_block": + case "did.v1.Account.creation_block": x.CreationBlock = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Assertion does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } @@ -299,37 +299,37 @@ func (x *fastReflection_Assertion) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Assertion) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Account) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Assertion.did": + case "did.v1.Account.did": value := x.Did return protoreflect.ValueOfString(value) - case "did.v1.Assertion.controller": + case "did.v1.Account.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Assertion.subject": + case "did.v1.Account.subject": value := x.Subject return protoreflect.ValueOfString(value) - case "did.v1.Assertion.public_key_hex": + case "did.v1.Account.public_key_hex": value := x.PublicKeyHex return protoreflect.ValueOfString(value) - case "did.v1.Assertion.assertion_type": + case "did.v1.Account.assertion_type": value := x.AssertionType return protoreflect.ValueOfString(value) - case "did.v1.Assertion.accumulator": + case "did.v1.Account.accumulator": if len(x.Accumulator) == 0 { - return protoreflect.ValueOfMap(&_Assertion_6_map{}) + return protoreflect.ValueOfMap(&_Account_6_map{}) } - mapValue := &_Assertion_6_map{m: &x.Accumulator} + mapValue := &_Account_6_map{m: &x.Accumulator} return protoreflect.ValueOfMap(mapValue) - case "did.v1.Assertion.creation_block": + case "did.v1.Account.creation_block": value := x.CreationBlock return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Assertion does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", descriptor.FullName())) } } @@ -343,29 +343,29 @@ func (x *fastReflection_Assertion) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Assertion) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Account) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Assertion.did": + case "did.v1.Account.did": x.Did = value.Interface().(string) - case "did.v1.Assertion.controller": + case "did.v1.Account.controller": x.Controller = value.Interface().(string) - case "did.v1.Assertion.subject": + case "did.v1.Account.subject": x.Subject = value.Interface().(string) - case "did.v1.Assertion.public_key_hex": + case "did.v1.Account.public_key_hex": x.PublicKeyHex = value.Interface().(string) - case "did.v1.Assertion.assertion_type": + case "did.v1.Account.assertion_type": x.AssertionType = value.Interface().(string) - case "did.v1.Assertion.accumulator": + case "did.v1.Account.accumulator": mv := value.Map() - cmv := mv.(*_Assertion_6_map) + cmv := mv.(*_Account_6_map) x.Accumulator = *cmv.m - case "did.v1.Assertion.creation_block": + case "did.v1.Account.creation_block": x.CreationBlock = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Assertion does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } @@ -379,69 +379,69 @@ func (x *fastReflection_Assertion) Set(fd protoreflect.FieldDescriptor, value pr // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Assertion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Account) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Assertion.accumulator": + case "did.v1.Account.accumulator": if x.Accumulator == nil { x.Accumulator = make(map[string][]byte) } - value := &_Assertion_6_map{m: &x.Accumulator} + value := &_Account_6_map{m: &x.Accumulator} return protoreflect.ValueOfMap(value) - case "did.v1.Assertion.did": - panic(fmt.Errorf("field did of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.controller": - panic(fmt.Errorf("field controller of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.subject": - panic(fmt.Errorf("field subject of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.public_key_hex": - panic(fmt.Errorf("field public_key_hex of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.assertion_type": - panic(fmt.Errorf("field assertion_type of message did.v1.Assertion is not mutable")) - case "did.v1.Assertion.creation_block": - panic(fmt.Errorf("field creation_block of message did.v1.Assertion is not mutable")) + case "did.v1.Account.did": + panic(fmt.Errorf("field did of message did.v1.Account is not mutable")) + case "did.v1.Account.controller": + panic(fmt.Errorf("field controller of message did.v1.Account is not mutable")) + case "did.v1.Account.subject": + panic(fmt.Errorf("field subject of message did.v1.Account is not mutable")) + case "did.v1.Account.public_key_hex": + panic(fmt.Errorf("field public_key_hex of message did.v1.Account is not mutable")) + case "did.v1.Account.assertion_type": + panic(fmt.Errorf("field assertion_type of message did.v1.Account is not mutable")) + case "did.v1.Account.creation_block": + panic(fmt.Errorf("field creation_block of message did.v1.Account is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Assertion does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Assertion) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Account) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Assertion.did": + case "did.v1.Account.did": return protoreflect.ValueOfString("") - case "did.v1.Assertion.controller": + case "did.v1.Account.controller": return protoreflect.ValueOfString("") - case "did.v1.Assertion.subject": + case "did.v1.Account.subject": return protoreflect.ValueOfString("") - case "did.v1.Assertion.public_key_hex": + case "did.v1.Account.public_key_hex": return protoreflect.ValueOfString("") - case "did.v1.Assertion.assertion_type": + case "did.v1.Account.assertion_type": return protoreflect.ValueOfString("") - case "did.v1.Assertion.accumulator": + case "did.v1.Account.accumulator": m := make(map[string][]byte) - return protoreflect.ValueOfMap(&_Assertion_6_map{m: &m}) - case "did.v1.Assertion.creation_block": + return protoreflect.ValueOfMap(&_Account_6_map{m: &m}) + case "did.v1.Account.creation_block": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Account")) } - panic(fmt.Errorf("message did.v1.Assertion does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Account does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Assertion) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Account) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Assertion", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Account", d.FullName())) } panic("unreachable") } @@ -449,7 +449,7 @@ func (x *fastReflection_Assertion) WhichOneof(d protoreflect.OneofDescriptor) pr // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Assertion) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Account) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -460,7 +460,7 @@ func (x *fastReflection_Assertion) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Assertion) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Account) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -472,7 +472,7 @@ func (x *fastReflection_Assertion) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Assertion) IsValid() bool { +func (x *fastReflection_Account) IsValid() bool { return x != nil } @@ -482,9 +482,9 @@ func (x *fastReflection_Assertion) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Account) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Assertion) + x := input.Message.Interface().(*Account) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -551,7 +551,7 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Assertion) + x := input.Message.Interface().(*Account) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -664,7 +664,7 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Assertion) + x := input.Message.Interface().(*Account) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -696,10 +696,10 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Assertion: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Account: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Assertion: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1044,120 +1044,42 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.Map = (*_Authentication_6_map)(nil) - -type _Authentication_6_map struct { - m *map[string]string -} - -func (x *_Authentication_6_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Authentication_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Authentication_6_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_Authentication_6_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Authentication_6_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_Authentication_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Authentication_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") -} - -func (x *_Authentication_6_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Authentication_6_map) IsValid() bool { - return x.m != nil -} - var ( - md_Authentication protoreflect.MessageDescriptor - fd_Authentication_did protoreflect.FieldDescriptor - fd_Authentication_controller protoreflect.FieldDescriptor - fd_Authentication_subject protoreflect.FieldDescriptor - fd_Authentication_public_key_hex protoreflect.FieldDescriptor - fd_Authentication_credential_id protoreflect.FieldDescriptor - fd_Authentication_metadata protoreflect.FieldDescriptor - fd_Authentication_creation_block protoreflect.FieldDescriptor + md_PublicKey protoreflect.MessageDescriptor + fd_PublicKey_number protoreflect.FieldDescriptor + fd_PublicKey_did protoreflect.FieldDescriptor + fd_PublicKey_sonr_address protoreflect.FieldDescriptor + fd_PublicKey_eth_address protoreflect.FieldDescriptor + fd_PublicKey_btc_address protoreflect.FieldDescriptor + fd_PublicKey_public_key_hex protoreflect.FieldDescriptor + fd_PublicKey_ks_val protoreflect.FieldDescriptor + fd_PublicKey_claimed_block protoreflect.FieldDescriptor + fd_PublicKey_creation_block protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() - md_Authentication = File_did_v1_state_proto.Messages().ByName("Authentication") - fd_Authentication_did = md_Authentication.Fields().ByName("did") - fd_Authentication_controller = md_Authentication.Fields().ByName("controller") - fd_Authentication_subject = md_Authentication.Fields().ByName("subject") - fd_Authentication_public_key_hex = md_Authentication.Fields().ByName("public_key_hex") - fd_Authentication_credential_id = md_Authentication.Fields().ByName("credential_id") - fd_Authentication_metadata = md_Authentication.Fields().ByName("metadata") - fd_Authentication_creation_block = md_Authentication.Fields().ByName("creation_block") + md_PublicKey = File_did_v1_state_proto.Messages().ByName("PublicKey") + fd_PublicKey_number = md_PublicKey.Fields().ByName("number") + fd_PublicKey_did = md_PublicKey.Fields().ByName("did") + fd_PublicKey_sonr_address = md_PublicKey.Fields().ByName("sonr_address") + fd_PublicKey_eth_address = md_PublicKey.Fields().ByName("eth_address") + fd_PublicKey_btc_address = md_PublicKey.Fields().ByName("btc_address") + fd_PublicKey_public_key_hex = md_PublicKey.Fields().ByName("public_key_hex") + fd_PublicKey_ks_val = md_PublicKey.Fields().ByName("ks_val") + fd_PublicKey_claimed_block = md_PublicKey.Fields().ByName("claimed_block") + fd_PublicKey_creation_block = md_PublicKey.Fields().ByName("creation_block") } -var _ protoreflect.Message = (*fastReflection_Authentication)(nil) +var _ protoreflect.Message = (*fastReflection_PublicKey)(nil) -type fastReflection_Authentication Authentication +type fastReflection_PublicKey PublicKey -func (x *Authentication) ProtoReflect() protoreflect.Message { - return (*fastReflection_Authentication)(x) +func (x *PublicKey) ProtoReflect() protoreflect.Message { + return (*fastReflection_PublicKey)(x) } -func (x *Authentication) slowProtoReflect() protoreflect.Message { +func (x *PublicKey) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_state_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1169,43 +1091,43 @@ func (x *Authentication) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Authentication_messageType fastReflection_Authentication_messageType -var _ protoreflect.MessageType = fastReflection_Authentication_messageType{} +var _fastReflection_PublicKey_messageType fastReflection_PublicKey_messageType +var _ protoreflect.MessageType = fastReflection_PublicKey_messageType{} -type fastReflection_Authentication_messageType struct{} +type fastReflection_PublicKey_messageType struct{} -func (x fastReflection_Authentication_messageType) Zero() protoreflect.Message { - return (*fastReflection_Authentication)(nil) +func (x fastReflection_PublicKey_messageType) Zero() protoreflect.Message { + return (*fastReflection_PublicKey)(nil) } -func (x fastReflection_Authentication_messageType) New() protoreflect.Message { - return new(fastReflection_Authentication) +func (x fastReflection_PublicKey_messageType) New() protoreflect.Message { + return new(fastReflection_PublicKey) } -func (x fastReflection_Authentication_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Authentication +func (x fastReflection_PublicKey_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PublicKey } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Authentication) Descriptor() protoreflect.MessageDescriptor { - return md_Authentication +func (x *fastReflection_PublicKey) Descriptor() protoreflect.MessageDescriptor { + return md_PublicKey } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_Authentication) Type() protoreflect.MessageType { - return _fastReflection_Authentication_messageType +func (x *fastReflection_PublicKey) Type() protoreflect.MessageType { + return _fastReflection_PublicKey_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Authentication) New() protoreflect.Message { - return new(fastReflection_Authentication) +func (x *fastReflection_PublicKey) New() protoreflect.Message { + return new(fastReflection_PublicKey) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Authentication) Interface() protoreflect.ProtoMessage { - return (*Authentication)(x) +func (x *fastReflection_PublicKey) Interface() protoreflect.ProtoMessage { + return (*PublicKey)(x) } // Range iterates over every populated field in an undefined order, @@ -1213,1718 +1135,58 @@ func (x *fastReflection_Authentication) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Authentication) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_Authentication_did, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Authentication_controller, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Authentication_subject, value) { - return - } - } - if x.PublicKeyHex != "" { - value := protoreflect.ValueOfString(x.PublicKeyHex) - if !f(fd_Authentication_public_key_hex, value) { - return - } - } - if len(x.CredentialId) != 0 { - value := protoreflect.ValueOfBytes(x.CredentialId) - if !f(fd_Authentication_credential_id, value) { - return - } - } - if len(x.Metadata) != 0 { - value := protoreflect.ValueOfMap(&_Authentication_6_map{m: &x.Metadata}) - if !f(fd_Authentication_metadata, value) { - return - } - } - if x.CreationBlock != int64(0) { - value := protoreflect.ValueOfInt64(x.CreationBlock) - if !f(fd_Authentication_creation_block, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Authentication) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Authentication.did": - return x.Did != "" - case "did.v1.Authentication.controller": - return x.Controller != "" - case "did.v1.Authentication.subject": - return x.Subject != "" - case "did.v1.Authentication.public_key_hex": - return x.PublicKeyHex != "" - case "did.v1.Authentication.credential_id": - return len(x.CredentialId) != 0 - case "did.v1.Authentication.metadata": - return len(x.Metadata) != 0 - case "did.v1.Authentication.creation_block": - return x.CreationBlock != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) - } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Authentication) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Authentication.did": - x.Did = "" - case "did.v1.Authentication.controller": - x.Controller = "" - case "did.v1.Authentication.subject": - x.Subject = "" - case "did.v1.Authentication.public_key_hex": - x.PublicKeyHex = "" - case "did.v1.Authentication.credential_id": - x.CredentialId = nil - case "did.v1.Authentication.metadata": - x.Metadata = nil - case "did.v1.Authentication.creation_block": - x.CreationBlock = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) - } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Authentication) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Authentication.did": - value := x.Did - return protoreflect.ValueOfString(value) - case "did.v1.Authentication.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.Authentication.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Authentication.public_key_hex": - value := x.PublicKeyHex - return protoreflect.ValueOfString(value) - case "did.v1.Authentication.credential_id": - value := x.CredentialId - return protoreflect.ValueOfBytes(value) - case "did.v1.Authentication.metadata": - if len(x.Metadata) == 0 { - return protoreflect.ValueOfMap(&_Authentication_6_map{}) - } - mapValue := &_Authentication_6_map{m: &x.Metadata} - return protoreflect.ValueOfMap(mapValue) - case "did.v1.Authentication.creation_block": - value := x.CreationBlock - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) - } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Authentication) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Authentication.did": - x.Did = value.Interface().(string) - case "did.v1.Authentication.controller": - x.Controller = value.Interface().(string) - case "did.v1.Authentication.subject": - x.Subject = value.Interface().(string) - case "did.v1.Authentication.public_key_hex": - x.PublicKeyHex = value.Interface().(string) - case "did.v1.Authentication.credential_id": - x.CredentialId = value.Bytes() - case "did.v1.Authentication.metadata": - mv := value.Map() - cmv := mv.(*_Authentication_6_map) - x.Metadata = *cmv.m - case "did.v1.Authentication.creation_block": - x.CreationBlock = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) - } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Authentication) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Authentication.metadata": - if x.Metadata == nil { - x.Metadata = make(map[string]string) - } - value := &_Authentication_6_map{m: &x.Metadata} - return protoreflect.ValueOfMap(value) - case "did.v1.Authentication.did": - panic(fmt.Errorf("field did of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.controller": - panic(fmt.Errorf("field controller of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.subject": - panic(fmt.Errorf("field subject of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.public_key_hex": - panic(fmt.Errorf("field public_key_hex of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.credential_id": - panic(fmt.Errorf("field credential_id of message did.v1.Authentication is not mutable")) - case "did.v1.Authentication.creation_block": - panic(fmt.Errorf("field creation_block of message did.v1.Authentication is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) - } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Authentication) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Authentication.did": - return protoreflect.ValueOfString("") - case "did.v1.Authentication.controller": - return protoreflect.ValueOfString("") - case "did.v1.Authentication.subject": - return protoreflect.ValueOfString("") - case "did.v1.Authentication.public_key_hex": - return protoreflect.ValueOfString("") - case "did.v1.Authentication.credential_id": - return protoreflect.ValueOfBytes(nil) - case "did.v1.Authentication.metadata": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_Authentication_6_map{m: &m}) - case "did.v1.Authentication.creation_block": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Authentication")) - } - panic(fmt.Errorf("message did.v1.Authentication does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Authentication) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Authentication", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Authentication) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Authentication) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Authentication) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Authentication) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Authentication) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PublicKeyHex) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CredentialId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Metadata) > 0 { - SiZeMaP := func(k string, v string) { - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.Metadata)) - for k := range x.Metadata { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Metadata[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Metadata { - SiZeMaP(k, v) - } - } - } - if x.CreationBlock != 0 { - n += 1 + runtime.Sov(uint64(x.CreationBlock)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Authentication) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.CreationBlock != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationBlock)) - i-- - dAtA[i] = 0x38 - } - if len(x.Metadata) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForMetadata := make([]string, 0, len(x.Metadata)) - for k := range x.Metadata { - keysForMetadata = append(keysForMetadata, string(k)) - } - sort.Slice(keysForMetadata, func(i, j int) bool { - return keysForMetadata[i] < keysForMetadata[j] - }) - for iNdEx := len(keysForMetadata) - 1; iNdEx >= 0; iNdEx-- { - v := x.Metadata[string(keysForMetadata[iNdEx])] - out, err := MaRsHaLmAp(keysForMetadata[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Metadata { - v := x.Metadata[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if len(x.CredentialId) > 0 { - i -= len(x.CredentialId) - copy(dAtA[i:], x.CredentialId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) - i-- - dAtA[i] = 0x2a - } - if len(x.PublicKeyHex) > 0 { - i -= len(x.PublicKeyHex) - copy(dAtA[i:], x.PublicKeyHex) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicKeyHex))) - i-- - dAtA[i] = 0x22 - } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) - i-- - dAtA[i] = 0x1a - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x12 - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Authentication) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Authentication: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Authentication: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKeyHex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PublicKeyHex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if x.CredentialId == nil { - x.CredentialId = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Metadata == nil { - x.Metadata = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Metadata[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationBlock", wireType) - } - x.CreationBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.CreationBlock |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Biscuit protoreflect.MessageDescriptor - fd_Biscuit_id protoreflect.FieldDescriptor - fd_Biscuit_controller protoreflect.FieldDescriptor - fd_Biscuit_subject protoreflect.FieldDescriptor - fd_Biscuit_origin protoreflect.FieldDescriptor - fd_Biscuit_expiry_height protoreflect.FieldDescriptor - fd_Biscuit_macaroon protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_state_proto_init() - md_Biscuit = File_did_v1_state_proto.Messages().ByName("Biscuit") - fd_Biscuit_id = md_Biscuit.Fields().ByName("id") - fd_Biscuit_controller = md_Biscuit.Fields().ByName("controller") - fd_Biscuit_subject = md_Biscuit.Fields().ByName("subject") - fd_Biscuit_origin = md_Biscuit.Fields().ByName("origin") - fd_Biscuit_expiry_height = md_Biscuit.Fields().ByName("expiry_height") - fd_Biscuit_macaroon = md_Biscuit.Fields().ByName("macaroon") -} - -var _ protoreflect.Message = (*fastReflection_Biscuit)(nil) - -type fastReflection_Biscuit Biscuit - -func (x *Biscuit) ProtoReflect() protoreflect.Message { - return (*fastReflection_Biscuit)(x) -} - -func (x *Biscuit) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Biscuit_messageType fastReflection_Biscuit_messageType -var _ protoreflect.MessageType = fastReflection_Biscuit_messageType{} - -type fastReflection_Biscuit_messageType struct{} - -func (x fastReflection_Biscuit_messageType) Zero() protoreflect.Message { - return (*fastReflection_Biscuit)(nil) -} -func (x fastReflection_Biscuit_messageType) New() protoreflect.Message { - return new(fastReflection_Biscuit) -} -func (x fastReflection_Biscuit_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Biscuit -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Biscuit) Descriptor() protoreflect.MessageDescriptor { - return md_Biscuit -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Biscuit) Type() protoreflect.MessageType { - return _fastReflection_Biscuit_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Biscuit) New() protoreflect.Message { - return new(fastReflection_Biscuit) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Biscuit) Interface() protoreflect.ProtoMessage { - return (*Biscuit)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Biscuit) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_Biscuit_id, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Biscuit_controller, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Biscuit_subject, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Biscuit_origin, value) { - return - } - } - if x.ExpiryHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.ExpiryHeight) - if !f(fd_Biscuit_expiry_height, value) { - return - } - } - if x.Macaroon != "" { - value := protoreflect.ValueOfString(x.Macaroon) - if !f(fd_Biscuit_macaroon, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Biscuit) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Biscuit.id": - return x.Id != uint64(0) - case "did.v1.Biscuit.controller": - return x.Controller != "" - case "did.v1.Biscuit.subject": - return x.Subject != "" - case "did.v1.Biscuit.origin": - return x.Origin != "" - case "did.v1.Biscuit.expiry_height": - return x.ExpiryHeight != int64(0) - case "did.v1.Biscuit.macaroon": - return x.Macaroon != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Biscuit")) - } - panic(fmt.Errorf("message did.v1.Biscuit does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Biscuit) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Biscuit.id": - x.Id = uint64(0) - case "did.v1.Biscuit.controller": - x.Controller = "" - case "did.v1.Biscuit.subject": - x.Subject = "" - case "did.v1.Biscuit.origin": - x.Origin = "" - case "did.v1.Biscuit.expiry_height": - x.ExpiryHeight = int64(0) - case "did.v1.Biscuit.macaroon": - x.Macaroon = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Biscuit")) - } - panic(fmt.Errorf("message did.v1.Biscuit does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Biscuit) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Biscuit.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "did.v1.Biscuit.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.Biscuit.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "did.v1.Biscuit.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "did.v1.Biscuit.expiry_height": - value := x.ExpiryHeight - return protoreflect.ValueOfInt64(value) - case "did.v1.Biscuit.macaroon": - value := x.Macaroon - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Biscuit")) - } - panic(fmt.Errorf("message did.v1.Biscuit does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Biscuit) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Biscuit.id": - x.Id = value.Uint() - case "did.v1.Biscuit.controller": - x.Controller = value.Interface().(string) - case "did.v1.Biscuit.subject": - x.Subject = value.Interface().(string) - case "did.v1.Biscuit.origin": - x.Origin = value.Interface().(string) - case "did.v1.Biscuit.expiry_height": - x.ExpiryHeight = value.Int() - case "did.v1.Biscuit.macaroon": - x.Macaroon = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Biscuit")) - } - panic(fmt.Errorf("message did.v1.Biscuit does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Biscuit) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Biscuit.id": - panic(fmt.Errorf("field id of message did.v1.Biscuit is not mutable")) - case "did.v1.Biscuit.controller": - panic(fmt.Errorf("field controller of message did.v1.Biscuit is not mutable")) - case "did.v1.Biscuit.subject": - panic(fmt.Errorf("field subject of message did.v1.Biscuit is not mutable")) - case "did.v1.Biscuit.origin": - panic(fmt.Errorf("field origin of message did.v1.Biscuit is not mutable")) - case "did.v1.Biscuit.expiry_height": - panic(fmt.Errorf("field expiry_height of message did.v1.Biscuit is not mutable")) - case "did.v1.Biscuit.macaroon": - panic(fmt.Errorf("field macaroon of message did.v1.Biscuit is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Biscuit")) - } - panic(fmt.Errorf("message did.v1.Biscuit does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Biscuit) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Biscuit.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "did.v1.Biscuit.controller": - return protoreflect.ValueOfString("") - case "did.v1.Biscuit.subject": - return protoreflect.ValueOfString("") - case "did.v1.Biscuit.origin": - return protoreflect.ValueOfString("") - case "did.v1.Biscuit.expiry_height": - return protoreflect.ValueOfInt64(int64(0)) - case "did.v1.Biscuit.macaroon": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Biscuit")) - } - panic(fmt.Errorf("message did.v1.Biscuit does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Biscuit) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Biscuit", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Biscuit) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Biscuit) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Biscuit) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Biscuit) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Biscuit) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ExpiryHeight != 0 { - n += 1 + runtime.Sov(uint64(x.ExpiryHeight)) - } - l = len(x.Macaroon) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Biscuit) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Macaroon) > 0 { - i -= len(x.Macaroon) - copy(dAtA[i:], x.Macaroon) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macaroon))) - i-- - dAtA[i] = 0x32 - } - if x.ExpiryHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight)) - i-- - dAtA[i] = 0x28 - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0x22 - } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) - i-- - dAtA[i] = 0x1a - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Biscuit) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Biscuit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Biscuit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) - } - x.ExpiryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ExpiryHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macaroon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Macaroon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Controller protoreflect.MessageDescriptor - fd_Controller_number protoreflect.FieldDescriptor - fd_Controller_did protoreflect.FieldDescriptor - fd_Controller_sonr_address protoreflect.FieldDescriptor - fd_Controller_eth_address protoreflect.FieldDescriptor - fd_Controller_btc_address protoreflect.FieldDescriptor - fd_Controller_public_key_hex protoreflect.FieldDescriptor - fd_Controller_ks_val protoreflect.FieldDescriptor - fd_Controller_claimed_block protoreflect.FieldDescriptor - fd_Controller_creation_block protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_state_proto_init() - md_Controller = File_did_v1_state_proto.Messages().ByName("Controller") - fd_Controller_number = md_Controller.Fields().ByName("number") - fd_Controller_did = md_Controller.Fields().ByName("did") - fd_Controller_sonr_address = md_Controller.Fields().ByName("sonr_address") - fd_Controller_eth_address = md_Controller.Fields().ByName("eth_address") - fd_Controller_btc_address = md_Controller.Fields().ByName("btc_address") - fd_Controller_public_key_hex = md_Controller.Fields().ByName("public_key_hex") - fd_Controller_ks_val = md_Controller.Fields().ByName("ks_val") - fd_Controller_claimed_block = md_Controller.Fields().ByName("claimed_block") - fd_Controller_creation_block = md_Controller.Fields().ByName("creation_block") -} - -var _ protoreflect.Message = (*fastReflection_Controller)(nil) - -type fastReflection_Controller Controller - -func (x *Controller) ProtoReflect() protoreflect.Message { - return (*fastReflection_Controller)(x) -} - -func (x *Controller) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Controller_messageType fastReflection_Controller_messageType -var _ protoreflect.MessageType = fastReflection_Controller_messageType{} - -type fastReflection_Controller_messageType struct{} - -func (x fastReflection_Controller_messageType) Zero() protoreflect.Message { - return (*fastReflection_Controller)(nil) -} -func (x fastReflection_Controller_messageType) New() protoreflect.Message { - return new(fastReflection_Controller) -} -func (x fastReflection_Controller_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Controller -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Controller) Descriptor() protoreflect.MessageDescriptor { - return md_Controller -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Controller) Type() protoreflect.MessageType { - return _fastReflection_Controller_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Controller) New() protoreflect.Message { - return new(fastReflection_Controller) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Controller) Interface() protoreflect.ProtoMessage { - return (*Controller)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_PublicKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Number != uint64(0) { value := protoreflect.ValueOfUint64(x.Number) - if !f(fd_Controller_number, value) { + if !f(fd_PublicKey_number, value) { return } } if x.Did != "" { value := protoreflect.ValueOfString(x.Did) - if !f(fd_Controller_did, value) { + if !f(fd_PublicKey_did, value) { return } } if x.SonrAddress != "" { value := protoreflect.ValueOfString(x.SonrAddress) - if !f(fd_Controller_sonr_address, value) { + if !f(fd_PublicKey_sonr_address, value) { return } } if x.EthAddress != "" { value := protoreflect.ValueOfString(x.EthAddress) - if !f(fd_Controller_eth_address, value) { + if !f(fd_PublicKey_eth_address, value) { return } } if x.BtcAddress != "" { value := protoreflect.ValueOfString(x.BtcAddress) - if !f(fd_Controller_btc_address, value) { + if !f(fd_PublicKey_btc_address, value) { return } } if x.PublicKeyHex != "" { value := protoreflect.ValueOfString(x.PublicKeyHex) - if !f(fd_Controller_public_key_hex, value) { + if !f(fd_PublicKey_public_key_hex, value) { return } } if x.KsVal != "" { value := protoreflect.ValueOfString(x.KsVal) - if !f(fd_Controller_ks_val, value) { + if !f(fd_PublicKey_ks_val, value) { return } } if x.ClaimedBlock != int64(0) { value := protoreflect.ValueOfInt64(x.ClaimedBlock) - if !f(fd_Controller_claimed_block, value) { + if !f(fd_PublicKey_claimed_block, value) { return } } if x.CreationBlock != int64(0) { value := protoreflect.ValueOfInt64(x.CreationBlock) - if !f(fd_Controller_creation_block, value) { + if !f(fd_PublicKey_creation_block, value) { return } } @@ -2941,31 +1203,31 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_PublicKey) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Controller.number": + case "did.v1.PublicKey.number": return x.Number != uint64(0) - case "did.v1.Controller.did": + case "did.v1.PublicKey.did": return x.Did != "" - case "did.v1.Controller.sonr_address": + case "did.v1.PublicKey.sonr_address": return x.SonrAddress != "" - case "did.v1.Controller.eth_address": + case "did.v1.PublicKey.eth_address": return x.EthAddress != "" - case "did.v1.Controller.btc_address": + case "did.v1.PublicKey.btc_address": return x.BtcAddress != "" - case "did.v1.Controller.public_key_hex": + case "did.v1.PublicKey.public_key_hex": return x.PublicKeyHex != "" - case "did.v1.Controller.ks_val": + case "did.v1.PublicKey.ks_val": return x.KsVal != "" - case "did.v1.Controller.claimed_block": + case "did.v1.PublicKey.claimed_block": return x.ClaimedBlock != int64(0) - case "did.v1.Controller.creation_block": + case "did.v1.PublicKey.creation_block": return x.CreationBlock != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PublicKey")) } - panic(fmt.Errorf("message did.v1.Controller does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PublicKey does not contain field %s", fd.FullName())) } } @@ -2975,31 +1237,31 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_PublicKey) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Controller.number": + case "did.v1.PublicKey.number": x.Number = uint64(0) - case "did.v1.Controller.did": + case "did.v1.PublicKey.did": x.Did = "" - case "did.v1.Controller.sonr_address": + case "did.v1.PublicKey.sonr_address": x.SonrAddress = "" - case "did.v1.Controller.eth_address": + case "did.v1.PublicKey.eth_address": x.EthAddress = "" - case "did.v1.Controller.btc_address": + case "did.v1.PublicKey.btc_address": x.BtcAddress = "" - case "did.v1.Controller.public_key_hex": + case "did.v1.PublicKey.public_key_hex": x.PublicKeyHex = "" - case "did.v1.Controller.ks_val": + case "did.v1.PublicKey.ks_val": x.KsVal = "" - case "did.v1.Controller.claimed_block": + case "did.v1.PublicKey.claimed_block": x.ClaimedBlock = int64(0) - case "did.v1.Controller.creation_block": + case "did.v1.PublicKey.creation_block": x.CreationBlock = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PublicKey")) } - panic(fmt.Errorf("message did.v1.Controller does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PublicKey does not contain field %s", fd.FullName())) } } @@ -3009,40 +1271,40 @@ func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PublicKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Controller.number": + case "did.v1.PublicKey.number": value := x.Number return protoreflect.ValueOfUint64(value) - case "did.v1.Controller.did": + case "did.v1.PublicKey.did": value := x.Did return protoreflect.ValueOfString(value) - case "did.v1.Controller.sonr_address": + case "did.v1.PublicKey.sonr_address": value := x.SonrAddress return protoreflect.ValueOfString(value) - case "did.v1.Controller.eth_address": + case "did.v1.PublicKey.eth_address": value := x.EthAddress return protoreflect.ValueOfString(value) - case "did.v1.Controller.btc_address": + case "did.v1.PublicKey.btc_address": value := x.BtcAddress return protoreflect.ValueOfString(value) - case "did.v1.Controller.public_key_hex": + case "did.v1.PublicKey.public_key_hex": value := x.PublicKeyHex return protoreflect.ValueOfString(value) - case "did.v1.Controller.ks_val": + case "did.v1.PublicKey.ks_val": value := x.KsVal return protoreflect.ValueOfString(value) - case "did.v1.Controller.claimed_block": + case "did.v1.PublicKey.claimed_block": value := x.ClaimedBlock return protoreflect.ValueOfInt64(value) - case "did.v1.Controller.creation_block": + case "did.v1.PublicKey.creation_block": value := x.CreationBlock return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PublicKey")) } - panic(fmt.Errorf("message did.v1.Controller does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.PublicKey does not contain field %s", descriptor.FullName())) } } @@ -3056,31 +1318,31 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_PublicKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Controller.number": + case "did.v1.PublicKey.number": x.Number = value.Uint() - case "did.v1.Controller.did": + case "did.v1.PublicKey.did": x.Did = value.Interface().(string) - case "did.v1.Controller.sonr_address": + case "did.v1.PublicKey.sonr_address": x.SonrAddress = value.Interface().(string) - case "did.v1.Controller.eth_address": + case "did.v1.PublicKey.eth_address": x.EthAddress = value.Interface().(string) - case "did.v1.Controller.btc_address": + case "did.v1.PublicKey.btc_address": x.BtcAddress = value.Interface().(string) - case "did.v1.Controller.public_key_hex": + case "did.v1.PublicKey.public_key_hex": x.PublicKeyHex = value.Interface().(string) - case "did.v1.Controller.ks_val": + case "did.v1.PublicKey.ks_val": x.KsVal = value.Interface().(string) - case "did.v1.Controller.claimed_block": + case "did.v1.PublicKey.claimed_block": x.ClaimedBlock = value.Int() - case "did.v1.Controller.creation_block": + case "did.v1.PublicKey.creation_block": x.CreationBlock = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PublicKey")) } - panic(fmt.Errorf("message did.v1.Controller does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PublicKey does not contain field %s", fd.FullName())) } } @@ -3094,72 +1356,72 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PublicKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Controller.number": - panic(fmt.Errorf("field number of message did.v1.Controller is not mutable")) - case "did.v1.Controller.did": - panic(fmt.Errorf("field did of message did.v1.Controller is not mutable")) - case "did.v1.Controller.sonr_address": - panic(fmt.Errorf("field sonr_address of message did.v1.Controller is not mutable")) - case "did.v1.Controller.eth_address": - panic(fmt.Errorf("field eth_address of message did.v1.Controller is not mutable")) - case "did.v1.Controller.btc_address": - panic(fmt.Errorf("field btc_address of message did.v1.Controller is not mutable")) - case "did.v1.Controller.public_key_hex": - panic(fmt.Errorf("field public_key_hex of message did.v1.Controller is not mutable")) - case "did.v1.Controller.ks_val": - panic(fmt.Errorf("field ks_val of message did.v1.Controller is not mutable")) - case "did.v1.Controller.claimed_block": - panic(fmt.Errorf("field claimed_block of message did.v1.Controller is not mutable")) - case "did.v1.Controller.creation_block": - panic(fmt.Errorf("field creation_block of message did.v1.Controller is not mutable")) + case "did.v1.PublicKey.number": + panic(fmt.Errorf("field number of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.did": + panic(fmt.Errorf("field did of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.sonr_address": + panic(fmt.Errorf("field sonr_address of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.eth_address": + panic(fmt.Errorf("field eth_address of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.btc_address": + panic(fmt.Errorf("field btc_address of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.public_key_hex": + panic(fmt.Errorf("field public_key_hex of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.ks_val": + panic(fmt.Errorf("field ks_val of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.claimed_block": + panic(fmt.Errorf("field claimed_block of message did.v1.PublicKey is not mutable")) + case "did.v1.PublicKey.creation_block": + panic(fmt.Errorf("field creation_block of message did.v1.PublicKey is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PublicKey")) } - panic(fmt.Errorf("message did.v1.Controller does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PublicKey does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Controller) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PublicKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Controller.number": + case "did.v1.PublicKey.number": return protoreflect.ValueOfUint64(uint64(0)) - case "did.v1.Controller.did": + case "did.v1.PublicKey.did": return protoreflect.ValueOfString("") - case "did.v1.Controller.sonr_address": + case "did.v1.PublicKey.sonr_address": return protoreflect.ValueOfString("") - case "did.v1.Controller.eth_address": + case "did.v1.PublicKey.eth_address": return protoreflect.ValueOfString("") - case "did.v1.Controller.btc_address": + case "did.v1.PublicKey.btc_address": return protoreflect.ValueOfString("") - case "did.v1.Controller.public_key_hex": + case "did.v1.PublicKey.public_key_hex": return protoreflect.ValueOfString("") - case "did.v1.Controller.ks_val": + case "did.v1.PublicKey.ks_val": return protoreflect.ValueOfString("") - case "did.v1.Controller.claimed_block": + case "did.v1.PublicKey.claimed_block": return protoreflect.ValueOfInt64(int64(0)) - case "did.v1.Controller.creation_block": + case "did.v1.PublicKey.creation_block": return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Controller")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PublicKey")) } - panic(fmt.Errorf("message did.v1.Controller does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.PublicKey does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Controller) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_PublicKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Controller", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.PublicKey", d.FullName())) } panic("unreachable") } @@ -3167,7 +1429,7 @@ func (x *fastReflection_Controller) WhichOneof(d protoreflect.OneofDescriptor) p // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Controller) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_PublicKey) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3178,7 +1440,7 @@ func (x *fastReflection_Controller) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Controller) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_PublicKey) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3190,7 +1452,7 @@ func (x *fastReflection_Controller) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Controller) IsValid() bool { +func (x *fastReflection_PublicKey) IsValid() bool { return x != nil } @@ -3200,9 +1462,9 @@ func (x *fastReflection_Controller) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_PublicKey) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Controller) + x := input.Message.Interface().(*PublicKey) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3257,7 +1519,7 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Controller) + x := input.Message.Interface().(*PublicKey) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3344,7 +1606,7 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Controller) + x := input.Message.Interface().(*PublicKey) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3376,10 +1638,10 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Controller: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PublicKey: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Controller: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3784,7 +2046,7 @@ func (x *Verification) ProtoReflect() protoreflect.Message { } func (x *Verification) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[4] + mi := &file_did_v1_state_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4835,7 +3097,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Assertion struct { +type Account struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4856,8 +3118,8 @@ type Assertion struct { CreationBlock int64 `protobuf:"varint,7,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` } -func (x *Assertion) Reset() { - *x = Assertion{} +func (x *Account) Reset() { + *x = Account{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_state_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4865,234 +3127,68 @@ func (x *Assertion) Reset() { } } -func (x *Assertion) String() string { +func (x *Account) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Assertion) ProtoMessage() {} +func (*Account) ProtoMessage() {} -// Deprecated: Use Assertion.ProtoReflect.Descriptor instead. -func (*Assertion) Descriptor() ([]byte, []int) { +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { return file_did_v1_state_proto_rawDescGZIP(), []int{0} } -func (x *Assertion) GetDid() string { +func (x *Account) GetDid() string { if x != nil { return x.Did } return "" } -func (x *Assertion) GetController() string { +func (x *Account) GetController() string { if x != nil { return x.Controller } return "" } -func (x *Assertion) GetSubject() string { +func (x *Account) GetSubject() string { if x != nil { return x.Subject } return "" } -func (x *Assertion) GetPublicKeyHex() string { +func (x *Account) GetPublicKeyHex() string { if x != nil { return x.PublicKeyHex } return "" } -func (x *Assertion) GetAssertionType() string { +func (x *Account) GetAssertionType() string { if x != nil { return x.AssertionType } return "" } -func (x *Assertion) GetAccumulator() map[string][]byte { +func (x *Account) GetAccumulator() map[string][]byte { if x != nil { return x.Accumulator } return nil } -func (x *Assertion) GetCreationBlock() int64 { +func (x *Account) GetCreationBlock() int64 { if x != nil { return x.CreationBlock } return 0 } -type Authentication struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier of the authentication - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - // The authentication of the DID - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Origin of the authentication - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - // string is the verification method - PublicKeyHex string `protobuf:"bytes,4,opt,name=public_key_hex,json=publicKeyHex,proto3" json:"public_key_hex,omitempty"` - // CredentialID is the byte representation of the credential ID - CredentialId []byte `protobuf:"bytes,5,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - // Metadata of the authentication - Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // CreationBlock is the block number of the creation of the authentication - CreationBlock int64 `protobuf:"varint,7,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` -} - -func (x *Authentication) Reset() { - *x = Authentication{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Authentication) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Authentication) ProtoMessage() {} - -// Deprecated: Use Authentication.ProtoReflect.Descriptor instead. -func (*Authentication) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{1} -} - -func (x *Authentication) GetDid() string { - if x != nil { - return x.Did - } - return "" -} - -func (x *Authentication) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *Authentication) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Authentication) GetPublicKeyHex() string { - if x != nil { - return x.PublicKeyHex - } - return "" -} - -func (x *Authentication) GetCredentialId() []byte { - if x != nil { - return x.CredentialId - } - return nil -} - -func (x *Authentication) GetMetadata() map[string]string { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *Authentication) GetCreationBlock() int64 { - if x != nil { - return x.CreationBlock - } - return 0 -} - -// Macaroon is a Macaroon message type. -type Biscuit struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` - ExpiryHeight int64 `protobuf:"varint,5,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` - Macaroon string `protobuf:"bytes,6,opt,name=macaroon,proto3" json:"macaroon,omitempty"` -} - -func (x *Biscuit) Reset() { - *x = Biscuit{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Biscuit) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Biscuit) ProtoMessage() {} - -// Deprecated: Use Biscuit.ProtoReflect.Descriptor instead. -func (*Biscuit) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{2} -} - -func (x *Biscuit) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Biscuit) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *Biscuit) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Biscuit) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Biscuit) GetExpiryHeight() int64 { - if x != nil { - return x.ExpiryHeight - } - return 0 -} - -func (x *Biscuit) GetMacaroon() string { - if x != nil { - return x.Macaroon - } - return "" -} - -// Controller represents a Sonr DWN Vault -type Controller struct { +// PublicKey represents a public key +type PublicKey struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -5117,83 +3213,83 @@ type Controller struct { CreationBlock int64 `protobuf:"varint,9,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` } -func (x *Controller) Reset() { - *x = Controller{} +func (x *PublicKey) Reset() { + *x = PublicKey{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[3] + mi := &file_did_v1_state_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Controller) String() string { +func (x *PublicKey) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Controller) ProtoMessage() {} +func (*PublicKey) ProtoMessage() {} -// Deprecated: Use Controller.ProtoReflect.Descriptor instead. -func (*Controller) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{3} +// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead. +func (*PublicKey) Descriptor() ([]byte, []int) { + return file_did_v1_state_proto_rawDescGZIP(), []int{1} } -func (x *Controller) GetNumber() uint64 { +func (x *PublicKey) GetNumber() uint64 { if x != nil { return x.Number } return 0 } -func (x *Controller) GetDid() string { +func (x *PublicKey) GetDid() string { if x != nil { return x.Did } return "" } -func (x *Controller) GetSonrAddress() string { +func (x *PublicKey) GetSonrAddress() string { if x != nil { return x.SonrAddress } return "" } -func (x *Controller) GetEthAddress() string { +func (x *PublicKey) GetEthAddress() string { if x != nil { return x.EthAddress } return "" } -func (x *Controller) GetBtcAddress() string { +func (x *PublicKey) GetBtcAddress() string { if x != nil { return x.BtcAddress } return "" } -func (x *Controller) GetPublicKeyHex() string { +func (x *PublicKey) GetPublicKeyHex() string { if x != nil { return x.PublicKeyHex } return "" } -func (x *Controller) GetKsVal() string { +func (x *PublicKey) GetKsVal() string { if x != nil { return x.KsVal } return "" } -func (x *Controller) GetClaimedBlock() int64 { +func (x *PublicKey) GetClaimedBlock() int64 { if x != nil { return x.ClaimedBlock } return 0 } -func (x *Controller) GetCreationBlock() int64 { +func (x *PublicKey) GetCreationBlock() int64 { if x != nil { return x.CreationBlock } @@ -5229,7 +3325,7 @@ type Verification struct { func (x *Verification) Reset() { *x = Verification{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[4] + mi := &file_did_v1_state_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5243,7 +3339,7 @@ func (*Verification) ProtoMessage() {} // Deprecated: Use Verification.ProtoReflect.Descriptor instead. func (*Verification) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{4} + return file_did_v1_state_proto_rawDescGZIP(), []int{2} } func (x *Verification) GetDid() string { @@ -5316,132 +3412,95 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x02, 0x0a, 0x09, - 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x0e, 0x61, - 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, - 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x63, 0x75, 0x6d, - 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x63, 0x63, - 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, - 0x3e, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x29, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x23, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0xf8, 0x02, 0x0a, 0x0e, 0x41, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, - 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, - 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x65, 0x78, 0x12, - 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x61, 0x6c, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3b, 0x0a, - 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0xf2, 0x9e, 0xd3, 0x8e, - 0x03, 0x23, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x12, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, - 0x01, 0x18, 0x01, 0x18, 0x02, 0x22, 0xd4, 0x01, 0x0a, 0x07, 0x42, 0x69, 0x73, 0x63, 0x75, 0x69, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x68, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x63, 0x61, - 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x61, - 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x26, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x20, 0x0a, 0x06, 0x0a, 0x02, - 0x69, 0x64, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x05, 0x22, 0xff, 0x02, 0x0a, - 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x6e, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, - 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x74, 0x63, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x62, 0x74, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x65, 0x78, - 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, - 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, - 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x0a, 0x0e, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x3a, 0x59, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x53, 0x0a, 0x0a, 0x0a, 0x06, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x65, - 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x18, 0x01, 0x12, 0x11, - 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x18, - 0x01, 0x12, 0x09, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x10, 0x04, 0x18, 0x01, 0x18, 0x03, 0x22, 0xfb, - 0x03, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x68, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x65, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf8, 0x02, 0x0a, 0x07, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x73, 0x73, + 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x42, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3e, 0x0a, 0x10, 0x41, + 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0xf2, 0x9e, 0xd3, + 0x8e, 0x03, 0x23, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x12, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0xfe, 0x02, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x6e, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x74, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x65, 0x78, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x73, 0x5f, + 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x73, 0x56, 0x61, 0x6c, + 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3b, 0x0a, 0x0d, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x71, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, - 0x6b, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, - 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x12, 0x22, - 0x0a, 0x1c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x64, 0x69, 0x64, - 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x02, - 0x18, 0x01, 0x12, 0x26, 0x0a, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, 0x06, 0x42, 0x7a, 0x0a, 0x0a, - 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x59, 0xf2, 0x9e, + 0xd3, 0x8e, 0x03, 0x53, 0x0a, 0x0a, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x10, 0x01, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x10, 0x02, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x64, 0x69, + 0x64, 0x10, 0x04, 0x18, 0x01, 0x18, 0x02, 0x22, 0xfb, 0x03, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, + 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x64, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x68, 0x65, 0x78, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, 0x65, + 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, + 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, + 0x38, 0x01, 0x3a, 0x71, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x6b, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, + 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x1c, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x64, 0x69, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x02, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x20, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, + 0x03, 0x18, 0x01, 0x18, 0x03, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, + 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, + 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5456,26 +3515,22 @@ func file_did_v1_state_proto_rawDescGZIP() []byte { return file_did_v1_state_proto_rawDescData } -var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Assertion)(nil), // 0: did.v1.Assertion - (*Authentication)(nil), // 1: did.v1.Authentication - (*Biscuit)(nil), // 2: did.v1.Biscuit - (*Controller)(nil), // 3: did.v1.Controller - (*Verification)(nil), // 4: did.v1.Verification - nil, // 5: did.v1.Assertion.AccumulatorEntry - nil, // 6: did.v1.Authentication.MetadataEntry - nil, // 7: did.v1.Verification.MetadataEntry + (*Account)(nil), // 0: did.v1.Account + (*PublicKey)(nil), // 1: did.v1.PublicKey + (*Verification)(nil), // 2: did.v1.Verification + nil, // 3: did.v1.Account.AccumulatorEntry + nil, // 4: did.v1.Verification.MetadataEntry } var file_did_v1_state_proto_depIdxs = []int32{ - 5, // 0: did.v1.Assertion.accumulator:type_name -> did.v1.Assertion.AccumulatorEntry - 6, // 1: did.v1.Authentication.metadata:type_name -> did.v1.Authentication.MetadataEntry - 7, // 2: did.v1.Verification.metadata:type_name -> did.v1.Verification.MetadataEntry - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 3, // 0: did.v1.Account.accumulator:type_name -> did.v1.Account.AccumulatorEntry + 4, // 1: did.v1.Verification.metadata:type_name -> did.v1.Verification.MetadataEntry + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -5486,7 +3541,7 @@ func file_did_v1_state_proto_init() { file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Assertion); i { + switch v := v.(*Account); i { case 0: return &v.state case 1: @@ -5498,7 +3553,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Authentication); i { + switch v := v.(*PublicKey); i { case 0: return &v.state case 1: @@ -5510,30 +3565,6 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Biscuit); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Controller); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Verification); i { case 0: return &v.state @@ -5552,7 +3583,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/api/dwn/v1/state.cosmos_orm.go b/api/dwn/v1/state.cosmos_orm.go index 8bf5048fc..a6aa6c240 100644 --- a/api/dwn/v1/state.cosmos_orm.go +++ b/api/dwn/v1/state.cosmos_orm.go @@ -9,145 +9,278 @@ import ( ormerrors "cosmossdk.io/orm/types/ormerrors" ) -type ExampleDataTable interface { - Insert(ctx context.Context, exampleData *ExampleData) error - Update(ctx context.Context, exampleData *ExampleData) error - Save(ctx context.Context, exampleData *ExampleData) error - Delete(ctx context.Context, exampleData *ExampleData) error +type CredentialTable interface { + Insert(ctx context.Context, credential *Credential) error + Update(ctx context.Context, credential *Credential) error + Save(ctx context.Context, credential *Credential) error + Delete(ctx context.Context, credential *Credential) error Has(ctx context.Context, account []byte) (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, account []byte) (*ExampleData, error) - List(ctx context.Context, prefixKey ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error) - ListRange(ctx context.Context, from, to ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error) - DeleteBy(ctx context.Context, prefixKey ExampleDataIndexKey) error - DeleteRange(ctx context.Context, from, to ExampleDataIndexKey) error + Get(ctx context.Context, account []byte) (*Credential, error) + List(ctx context.Context, prefixKey CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) + ListRange(ctx context.Context, from, to CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) + DeleteBy(ctx context.Context, prefixKey CredentialIndexKey) error + DeleteRange(ctx context.Context, from, to CredentialIndexKey) error doNotImplement() } -type ExampleDataIterator struct { +type CredentialIterator struct { ormtable.Iterator } -func (i ExampleDataIterator) Value() (*ExampleData, error) { - var exampleData ExampleData - err := i.UnmarshalMessage(&exampleData) - return &exampleData, err +func (i CredentialIterator) Value() (*Credential, error) { + var credential Credential + err := i.UnmarshalMessage(&credential) + return &credential, err } -type ExampleDataIndexKey interface { +type CredentialIndexKey interface { id() uint32 values() []interface{} - exampleDataIndexKey() + credentialIndexKey() } // primary key starting index.. -type ExampleDataPrimaryKey = ExampleDataAccountIndexKey +type CredentialPrimaryKey = CredentialAccountIndexKey -type ExampleDataAccountIndexKey struct { +type CredentialAccountIndexKey struct { vs []interface{} } -func (x ExampleDataAccountIndexKey) id() uint32 { return 0 } -func (x ExampleDataAccountIndexKey) values() []interface{} { return x.vs } -func (x ExampleDataAccountIndexKey) exampleDataIndexKey() {} +func (x CredentialAccountIndexKey) id() uint32 { return 0 } +func (x CredentialAccountIndexKey) values() []interface{} { return x.vs } +func (x CredentialAccountIndexKey) credentialIndexKey() {} -func (this ExampleDataAccountIndexKey) WithAccount(account []byte) ExampleDataAccountIndexKey { +func (this CredentialAccountIndexKey) WithAccount(account []byte) CredentialAccountIndexKey { this.vs = []interface{}{account} return this } -type ExampleDataAmountIndexKey struct { +type CredentialAmountIndexKey struct { vs []interface{} } -func (x ExampleDataAmountIndexKey) id() uint32 { return 1 } -func (x ExampleDataAmountIndexKey) values() []interface{} { return x.vs } -func (x ExampleDataAmountIndexKey) exampleDataIndexKey() {} +func (x CredentialAmountIndexKey) id() uint32 { return 1 } +func (x CredentialAmountIndexKey) values() []interface{} { return x.vs } +func (x CredentialAmountIndexKey) credentialIndexKey() {} -func (this ExampleDataAmountIndexKey) WithAmount(amount uint64) ExampleDataAmountIndexKey { +func (this CredentialAmountIndexKey) WithAmount(amount uint64) CredentialAmountIndexKey { this.vs = []interface{}{amount} return this } -type exampleDataTable struct { +type credentialTable struct { table ormtable.Table } -func (this exampleDataTable) Insert(ctx context.Context, exampleData *ExampleData) error { - return this.table.Insert(ctx, exampleData) +func (this credentialTable) Insert(ctx context.Context, credential *Credential) error { + return this.table.Insert(ctx, credential) } -func (this exampleDataTable) Update(ctx context.Context, exampleData *ExampleData) error { - return this.table.Update(ctx, exampleData) +func (this credentialTable) Update(ctx context.Context, credential *Credential) error { + return this.table.Update(ctx, credential) } -func (this exampleDataTable) Save(ctx context.Context, exampleData *ExampleData) error { - return this.table.Save(ctx, exampleData) +func (this credentialTable) Save(ctx context.Context, credential *Credential) error { + return this.table.Save(ctx, credential) } -func (this exampleDataTable) Delete(ctx context.Context, exampleData *ExampleData) error { - return this.table.Delete(ctx, exampleData) +func (this credentialTable) Delete(ctx context.Context, credential *Credential) error { + return this.table.Delete(ctx, credential) } -func (this exampleDataTable) Has(ctx context.Context, account []byte) (found bool, err error) { +func (this credentialTable) Has(ctx context.Context, account []byte) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, account) } -func (this exampleDataTable) Get(ctx context.Context, account []byte) (*ExampleData, error) { - var exampleData ExampleData - found, err := this.table.PrimaryKey().Get(ctx, &exampleData, account) +func (this credentialTable) Get(ctx context.Context, account []byte) (*Credential, error) { + var credential Credential + found, err := this.table.PrimaryKey().Get(ctx, &credential, account) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &exampleData, nil + return &credential, nil } -func (this exampleDataTable) List(ctx context.Context, prefixKey ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error) { +func (this credentialTable) List(ctx context.Context, prefixKey CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return ExampleDataIterator{it}, err + return CredentialIterator{it}, err } -func (this exampleDataTable) ListRange(ctx context.Context, from, to ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error) { +func (this credentialTable) ListRange(ctx context.Context, from, to CredentialIndexKey, opts ...ormlist.Option) (CredentialIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return ExampleDataIterator{it}, err + return CredentialIterator{it}, err } -func (this exampleDataTable) DeleteBy(ctx context.Context, prefixKey ExampleDataIndexKey) error { +func (this credentialTable) DeleteBy(ctx context.Context, prefixKey CredentialIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this exampleDataTable) DeleteRange(ctx context.Context, from, to ExampleDataIndexKey) error { +func (this credentialTable) DeleteRange(ctx context.Context, from, to CredentialIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this exampleDataTable) doNotImplement() {} +func (this credentialTable) doNotImplement() {} -var _ ExampleDataTable = exampleDataTable{} +var _ CredentialTable = credentialTable{} -func NewExampleDataTable(db ormtable.Schema) (ExampleDataTable, error) { - table := db.GetTable(&ExampleData{}) +func NewCredentialTable(db ormtable.Schema) (CredentialTable, error) { + table := db.GetTable(&Credential{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&ExampleData{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&Credential{}).ProtoReflect().Descriptor().FullName())) } - return exampleDataTable{table}, nil + return credentialTable{table}, nil +} + +type ProfileTable interface { + Insert(ctx context.Context, profile *Profile) error + Update(ctx context.Context, profile *Profile) error + Save(ctx context.Context, profile *Profile) error + Delete(ctx context.Context, profile *Profile) error + Has(ctx context.Context, account []byte) (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, account []byte) (*Profile, error) + List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) + ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) + DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error + DeleteRange(ctx context.Context, from, to ProfileIndexKey) error + + doNotImplement() +} + +type ProfileIterator struct { + ormtable.Iterator +} + +func (i ProfileIterator) Value() (*Profile, error) { + var profile Profile + err := i.UnmarshalMessage(&profile) + return &profile, err +} + +type ProfileIndexKey interface { + id() uint32 + values() []interface{} + profileIndexKey() +} + +// primary key starting index.. +type ProfilePrimaryKey = ProfileAccountIndexKey + +type ProfileAccountIndexKey struct { + vs []interface{} +} + +func (x ProfileAccountIndexKey) id() uint32 { return 0 } +func (x ProfileAccountIndexKey) values() []interface{} { return x.vs } +func (x ProfileAccountIndexKey) profileIndexKey() {} + +func (this ProfileAccountIndexKey) WithAccount(account []byte) ProfileAccountIndexKey { + this.vs = []interface{}{account} + return this +} + +type ProfileAmountIndexKey struct { + vs []interface{} +} + +func (x ProfileAmountIndexKey) id() uint32 { return 1 } +func (x ProfileAmountIndexKey) values() []interface{} { return x.vs } +func (x ProfileAmountIndexKey) profileIndexKey() {} + +func (this ProfileAmountIndexKey) WithAmount(amount uint64) ProfileAmountIndexKey { + this.vs = []interface{}{amount} + return this +} + +type profileTable struct { + table ormtable.Table +} + +func (this profileTable) Insert(ctx context.Context, profile *Profile) error { + return this.table.Insert(ctx, profile) +} + +func (this profileTable) Update(ctx context.Context, profile *Profile) error { + return this.table.Update(ctx, profile) +} + +func (this profileTable) Save(ctx context.Context, profile *Profile) error { + return this.table.Save(ctx, profile) +} + +func (this profileTable) Delete(ctx context.Context, profile *Profile) error { + return this.table.Delete(ctx, profile) +} + +func (this profileTable) Has(ctx context.Context, account []byte) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, account) +} + +func (this profileTable) Get(ctx context.Context, account []byte) (*Profile, error) { + var profile Profile + found, err := this.table.PrimaryKey().Get(ctx, &profile, account) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &profile, nil +} + +func (this profileTable) List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return ProfileIterator{it}, err +} + +func (this profileTable) ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return ProfileIterator{it}, err +} + +func (this profileTable) DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this profileTable) DeleteRange(ctx context.Context, from, to ProfileIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this profileTable) doNotImplement() {} + +var _ ProfileTable = profileTable{} + +func NewProfileTable(db ormtable.Schema) (ProfileTable, error) { + table := db.GetTable(&Profile{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&Profile{}).ProtoReflect().Descriptor().FullName())) + } + return profileTable{table}, nil } type StateStore interface { - ExampleDataTable() ExampleDataTable + CredentialTable() CredentialTable + ProfileTable() ProfileTable doNotImplement() } type stateStore struct { - exampleData ExampleDataTable + credential CredentialTable + profile ProfileTable } -func (x stateStore) ExampleDataTable() ExampleDataTable { - return x.exampleData +func (x stateStore) CredentialTable() CredentialTable { + return x.credential +} + +func (x stateStore) ProfileTable() ProfileTable { + return x.profile } func (stateStore) doNotImplement() {} @@ -155,12 +288,18 @@ func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} func NewStateStore(db ormtable.Schema) (StateStore, error) { - exampleDataTable, err := NewExampleDataTable(db) + credentialTable, err := NewCredentialTable(db) + if err != nil { + return nil, err + } + + profileTable, err := NewProfileTable(db) if err != nil { return nil, err } return stateStore{ - exampleDataTable, + credentialTable, + profileTable, }, nil } diff --git a/api/dwn/v1/state.pulsar.go b/api/dwn/v1/state.pulsar.go index 77acde27b..eba069b68 100644 --- a/api/dwn/v1/state.pulsar.go +++ b/api/dwn/v1/state.pulsar.go @@ -14,27 +14,27 @@ import ( ) var ( - md_ExampleData protoreflect.MessageDescriptor - fd_ExampleData_account protoreflect.FieldDescriptor - fd_ExampleData_amount protoreflect.FieldDescriptor + md_Credential protoreflect.MessageDescriptor + fd_Credential_account protoreflect.FieldDescriptor + fd_Credential_amount protoreflect.FieldDescriptor ) func init() { file_dwn_v1_state_proto_init() - md_ExampleData = File_dwn_v1_state_proto.Messages().ByName("ExampleData") - fd_ExampleData_account = md_ExampleData.Fields().ByName("account") - fd_ExampleData_amount = md_ExampleData.Fields().ByName("amount") + md_Credential = File_dwn_v1_state_proto.Messages().ByName("Credential") + fd_Credential_account = md_Credential.Fields().ByName("account") + fd_Credential_amount = md_Credential.Fields().ByName("amount") } -var _ protoreflect.Message = (*fastReflection_ExampleData)(nil) +var _ protoreflect.Message = (*fastReflection_Credential)(nil) -type fastReflection_ExampleData ExampleData +type fastReflection_Credential Credential -func (x *ExampleData) ProtoReflect() protoreflect.Message { - return (*fastReflection_ExampleData)(x) +func (x *Credential) ProtoReflect() protoreflect.Message { + return (*fastReflection_Credential)(x) } -func (x *ExampleData) slowProtoReflect() protoreflect.Message { +func (x *Credential) slowProtoReflect() protoreflect.Message { mi := &file_dwn_v1_state_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -46,43 +46,43 @@ func (x *ExampleData) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ExampleData_messageType fastReflection_ExampleData_messageType -var _ protoreflect.MessageType = fastReflection_ExampleData_messageType{} +var _fastReflection_Credential_messageType fastReflection_Credential_messageType +var _ protoreflect.MessageType = fastReflection_Credential_messageType{} -type fastReflection_ExampleData_messageType struct{} +type fastReflection_Credential_messageType struct{} -func (x fastReflection_ExampleData_messageType) Zero() protoreflect.Message { - return (*fastReflection_ExampleData)(nil) +func (x fastReflection_Credential_messageType) Zero() protoreflect.Message { + return (*fastReflection_Credential)(nil) } -func (x fastReflection_ExampleData_messageType) New() protoreflect.Message { - return new(fastReflection_ExampleData) +func (x fastReflection_Credential_messageType) New() protoreflect.Message { + return new(fastReflection_Credential) } -func (x fastReflection_ExampleData_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ExampleData +func (x fastReflection_Credential_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Credential } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ExampleData) Descriptor() protoreflect.MessageDescriptor { - return md_ExampleData +func (x *fastReflection_Credential) Descriptor() protoreflect.MessageDescriptor { + return md_Credential } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ExampleData) Type() protoreflect.MessageType { - return _fastReflection_ExampleData_messageType +func (x *fastReflection_Credential) Type() protoreflect.MessageType { + return _fastReflection_Credential_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ExampleData) New() protoreflect.Message { - return new(fastReflection_ExampleData) +func (x *fastReflection_Credential) New() protoreflect.Message { + return new(fastReflection_Credential) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ExampleData) Interface() protoreflect.ProtoMessage { - return (*ExampleData)(x) +func (x *fastReflection_Credential) Interface() protoreflect.ProtoMessage { + return (*Credential)(x) } // Range iterates over every populated field in an undefined order, @@ -90,16 +90,16 @@ func (x *fastReflection_ExampleData) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ExampleData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Account) != 0 { value := protoreflect.ValueOfBytes(x.Account) - if !f(fd_ExampleData_account, value) { + if !f(fd_Credential_account, value) { return } } if x.Amount != uint64(0) { value := protoreflect.ValueOfUint64(x.Amount) - if !f(fd_ExampleData_amount, value) { + if !f(fd_Credential_amount, value) { return } } @@ -116,17 +116,17 @@ func (x *fastReflection_ExampleData) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ExampleData) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "dwn.v1.ExampleData.account": + case "dwn.v1.Credential.account": return len(x.Account) != 0 - case "dwn.v1.ExampleData.amount": + case "dwn.v1.Credential.amount": return x.Amount != uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Credential")) } - panic(fmt.Errorf("message dwn.v1.ExampleData does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message dwn.v1.Credential does not contain field %s", fd.FullName())) } } @@ -136,17 +136,17 @@ func (x *fastReflection_ExampleData) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExampleData) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "dwn.v1.ExampleData.account": + case "dwn.v1.Credential.account": x.Account = nil - case "dwn.v1.ExampleData.amount": + case "dwn.v1.Credential.amount": x.Amount = uint64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Credential")) } - panic(fmt.Errorf("message dwn.v1.ExampleData does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message dwn.v1.Credential does not contain field %s", fd.FullName())) } } @@ -156,19 +156,19 @@ func (x *fastReflection_ExampleData) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ExampleData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "dwn.v1.ExampleData.account": + case "dwn.v1.Credential.account": value := x.Account return protoreflect.ValueOfBytes(value) - case "dwn.v1.ExampleData.amount": + case "dwn.v1.Credential.amount": value := x.Amount return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Credential")) } - panic(fmt.Errorf("message dwn.v1.ExampleData does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message dwn.v1.Credential does not contain field %s", descriptor.FullName())) } } @@ -182,17 +182,17 @@ func (x *fastReflection_ExampleData) Get(descriptor protoreflect.FieldDescriptor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExampleData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "dwn.v1.ExampleData.account": + case "dwn.v1.Credential.account": x.Account = value.Bytes() - case "dwn.v1.ExampleData.amount": + case "dwn.v1.Credential.amount": x.Amount = value.Uint() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Credential")) } - panic(fmt.Errorf("message dwn.v1.ExampleData does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message dwn.v1.Credential does not contain field %s", fd.FullName())) } } @@ -206,44 +206,44 @@ func (x *fastReflection_ExampleData) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExampleData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "dwn.v1.ExampleData.account": - panic(fmt.Errorf("field account of message dwn.v1.ExampleData is not mutable")) - case "dwn.v1.ExampleData.amount": - panic(fmt.Errorf("field amount of message dwn.v1.ExampleData is not mutable")) + case "dwn.v1.Credential.account": + panic(fmt.Errorf("field account of message dwn.v1.Credential is not mutable")) + case "dwn.v1.Credential.amount": + panic(fmt.Errorf("field amount of message dwn.v1.Credential is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Credential")) } - panic(fmt.Errorf("message dwn.v1.ExampleData does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message dwn.v1.Credential does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ExampleData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "dwn.v1.ExampleData.account": + case "dwn.v1.Credential.account": return protoreflect.ValueOfBytes(nil) - case "dwn.v1.ExampleData.amount": + case "dwn.v1.Credential.amount": return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Credential")) } - panic(fmt.Errorf("message dwn.v1.ExampleData does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message dwn.v1.Credential does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ExampleData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Credential) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in dwn.v1.ExampleData", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in dwn.v1.Credential", d.FullName())) } panic("unreachable") } @@ -251,7 +251,7 @@ func (x *fastReflection_ExampleData) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ExampleData) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Credential) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -262,7 +262,7 @@ func (x *fastReflection_ExampleData) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExampleData) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Credential) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -274,7 +274,7 @@ func (x *fastReflection_ExampleData) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ExampleData) IsValid() bool { +func (x *fastReflection_Credential) IsValid() bool { return x != nil } @@ -284,9 +284,9 @@ func (x *fastReflection_ExampleData) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_ExampleData) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ExampleData) + x := input.Message.Interface().(*Credential) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -315,7 +315,7 @@ func (x *fastReflection_ExampleData) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ExampleData) + x := input.Message.Interface().(*Credential) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -357,7 +357,7 @@ func (x *fastReflection_ExampleData) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ExampleData) + x := input.Message.Interface().(*Credential) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -389,10 +389,480 @@ func (x *fastReflection_ExampleData) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExampleData: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExampleData: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Account = append(x.Account[:0], dAtA[iNdEx:postIndex]...) + if x.Account == nil { + x.Account = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + x.Amount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Amount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Profile protoreflect.MessageDescriptor + fd_Profile_account protoreflect.FieldDescriptor + fd_Profile_amount protoreflect.FieldDescriptor +) + +func init() { + file_dwn_v1_state_proto_init() + md_Profile = File_dwn_v1_state_proto.Messages().ByName("Profile") + fd_Profile_account = md_Profile.Fields().ByName("account") + fd_Profile_amount = md_Profile.Fields().ByName("amount") +} + +var _ protoreflect.Message = (*fastReflection_Profile)(nil) + +type fastReflection_Profile Profile + +func (x *Profile) ProtoReflect() protoreflect.Message { + return (*fastReflection_Profile)(x) +} + +func (x *Profile) slowProtoReflect() protoreflect.Message { + mi := &file_dwn_v1_state_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Profile_messageType fastReflection_Profile_messageType +var _ protoreflect.MessageType = fastReflection_Profile_messageType{} + +type fastReflection_Profile_messageType struct{} + +func (x fastReflection_Profile_messageType) Zero() protoreflect.Message { + return (*fastReflection_Profile)(nil) +} +func (x fastReflection_Profile_messageType) New() protoreflect.Message { + return new(fastReflection_Profile) +} +func (x fastReflection_Profile_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Profile +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Profile) Descriptor() protoreflect.MessageDescriptor { + return md_Profile +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Profile) Type() protoreflect.MessageType { + return _fastReflection_Profile_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Profile) New() protoreflect.Message { + return new(fastReflection_Profile) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Profile) Interface() protoreflect.ProtoMessage { + return (*Profile)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Profile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Account) != 0 { + value := protoreflect.ValueOfBytes(x.Account) + if !f(fd_Profile_account, value) { + return + } + } + if x.Amount != uint64(0) { + value := protoreflect.ValueOfUint64(x.Amount) + if !f(fd_Profile_amount, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Profile) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "dwn.v1.Profile.account": + return len(x.Account) != 0 + case "dwn.v1.Profile.amount": + return x.Amount != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Profile")) + } + panic(fmt.Errorf("message dwn.v1.Profile does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Profile) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "dwn.v1.Profile.account": + x.Account = nil + case "dwn.v1.Profile.amount": + x.Amount = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Profile")) + } + panic(fmt.Errorf("message dwn.v1.Profile does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Profile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "dwn.v1.Profile.account": + value := x.Account + return protoreflect.ValueOfBytes(value) + case "dwn.v1.Profile.amount": + value := x.Amount + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Profile")) + } + panic(fmt.Errorf("message dwn.v1.Profile does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Profile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "dwn.v1.Profile.account": + x.Account = value.Bytes() + case "dwn.v1.Profile.amount": + x.Amount = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Profile")) + } + panic(fmt.Errorf("message dwn.v1.Profile does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Profile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "dwn.v1.Profile.account": + panic(fmt.Errorf("field account of message dwn.v1.Profile is not mutable")) + case "dwn.v1.Profile.amount": + panic(fmt.Errorf("field amount of message dwn.v1.Profile is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Profile")) + } + panic(fmt.Errorf("message dwn.v1.Profile does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Profile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "dwn.v1.Profile.account": + return protoreflect.ValueOfBytes(nil) + case "dwn.v1.Profile.amount": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.Profile")) + } + panic(fmt.Errorf("message dwn.v1.Profile does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Profile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in dwn.v1.Profile", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Profile) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Profile) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Profile) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Profile) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Account) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Amount != 0 { + n += 1 + runtime.Sov(uint64(x.Amount)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Profile) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Amount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount)) + i-- + dAtA[i] = 0x10 + } + if len(x.Account) > 0 { + i -= len(x.Account) + copy(dAtA[i:], x.Account) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Account))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Profile) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -496,7 +966,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type ExampleData struct { +type Credential struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -505,8 +975,8 @@ type ExampleData struct { Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` } -func (x *ExampleData) Reset() { - *x = ExampleData{} +func (x *Credential) Reset() { + *x = Credential{} if protoimpl.UnsafeEnabled { mi := &file_dwn_v1_state_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -514,25 +984,68 @@ func (x *ExampleData) Reset() { } } -func (x *ExampleData) String() string { +func (x *Credential) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExampleData) ProtoMessage() {} +func (*Credential) ProtoMessage() {} -// Deprecated: Use ExampleData.ProtoReflect.Descriptor instead. -func (*ExampleData) Descriptor() ([]byte, []int) { +// Deprecated: Use Credential.ProtoReflect.Descriptor instead. +func (*Credential) Descriptor() ([]byte, []int) { return file_dwn_v1_state_proto_rawDescGZIP(), []int{0} } -func (x *ExampleData) GetAccount() []byte { +func (x *Credential) GetAccount() []byte { if x != nil { return x.Account } return nil } -func (x *ExampleData) GetAmount() uint64 { +func (x *Credential) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +type Profile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (x *Profile) Reset() { + *x = Profile{} + if protoimpl.UnsafeEnabled { + mi := &file_dwn_v1_state_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Profile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Profile) ProtoMessage() {} + +// Deprecated: Use Profile.ProtoReflect.Descriptor instead. +func (*Profile) Descriptor() ([]byte, []int) { + return file_dwn_v1_state_proto_rawDescGZIP(), []int{1} +} + +func (x *Profile) GetAccount() []byte { + if x != nil { + return x.Account + } + return nil +} + +func (x *Profile) GetAmount() uint64 { if x != nil { return x.Amount } @@ -545,21 +1058,27 @@ var file_dwn_v1_state_proto_rawDesc = []byte{ 0x0a, 0x12, 0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x09, - 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x10, 0x01, 0x18, 0x01, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, - 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x77, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, - 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x77, - 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x77, 0x6e, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x09, 0x0a, + 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x10, 0x01, 0x18, 0x01, 0x22, 0x5c, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x09, 0x0a, 0x07, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x10, 0x01, 0x18, 0x02, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x77, 0x6e, 0x2e, + 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, + 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x77, 0x6e, + 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x77, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, + 0x02, 0x06, 0x44, 0x77, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x12, 0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x77, 0x6e, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -574,9 +1093,10 @@ func file_dwn_v1_state_proto_rawDescGZIP() []byte { return file_dwn_v1_state_proto_rawDescData } -var file_dwn_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_dwn_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_dwn_v1_state_proto_goTypes = []interface{}{ - (*ExampleData)(nil), // 0: dwn.v1.ExampleData + (*Credential)(nil), // 0: dwn.v1.Credential + (*Profile)(nil), // 1: dwn.v1.Profile } var file_dwn_v1_state_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -593,7 +1113,19 @@ func file_dwn_v1_state_proto_init() { } if !protoimpl.UnsafeEnabled { file_dwn_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExampleData); i { + switch v := v.(*Credential); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_dwn_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Profile); i { case 0: return &v.state case 1: @@ -611,7 +1143,7 @@ func file_dwn_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_dwn_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 1, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/api/service/module/v1/module.pulsar.go b/api/service/module/v1/module.pulsar.go deleted file mode 100644 index 0f7d12fc7..000000000 --- a/api/service/module/v1/module.pulsar.go +++ /dev/null @@ -1,500 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package modulev1 - -import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Module protoreflect.MessageDescriptor -) - -func init() { - file_service_module_v1_module_proto_init() - md_Module = File_service_module_v1_module_proto.Messages().ByName("Module") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_service_module_v1_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) - } - panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) - } - panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) - } - panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) - } - panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) - } - panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.module.v1.Module")) - } - panic(fmt.Errorf("message service.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.module.v1.Module", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Module) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: service/module/v1/module.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Module is the app config object of the module. -// Learn more: https://docs.cosmos.network/main/building-modules/depinject -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_service_module_v1_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_service_module_v1_module_proto_rawDescGZIP(), []int{0} -} - -var File_service_module_v1_module_proto protoreflect.FileDescriptor - -var file_service_module_v1_module_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, - 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, - 0xc1, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_service_module_v1_module_proto_rawDescOnce sync.Once - file_service_module_v1_module_proto_rawDescData = file_service_module_v1_module_proto_rawDesc -) - -func file_service_module_v1_module_proto_rawDescGZIP() []byte { - file_service_module_v1_module_proto_rawDescOnce.Do(func() { - file_service_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_module_v1_module_proto_rawDescData) - }) - return file_service_module_v1_module_proto_rawDescData -} - -var file_service_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_service_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: service.module.v1.Module -} -var file_service_module_v1_module_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_service_module_v1_module_proto_init() } -func file_service_module_v1_module_proto_init() { - if File_service_module_v1_module_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_service_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_service_module_v1_module_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_service_module_v1_module_proto_goTypes, - DependencyIndexes: file_service_module_v1_module_proto_depIdxs, - MessageInfos: file_service_module_v1_module_proto_msgTypes, - }.Build() - File_service_module_v1_module_proto = out.File - file_service_module_v1_module_proto_rawDesc = nil - file_service_module_v1_module_proto_goTypes = nil - file_service_module_v1_module_proto_depIdxs = nil -} diff --git a/api/service/v1/genesis.pulsar.go b/api/service/v1/genesis.pulsar.go deleted file mode 100644 index 608d92d49..000000000 --- a/api/service/v1/genesis.pulsar.go +++ /dev/null @@ -1,3267 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package servicev1 - -import ( - _ "cosmossdk.io/api/amino" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_genesis_proto_init() - md_GenesisState = File_service_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.GenesisState.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.GenesisState")) - } - panic(fmt.Errorf("message service.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.GenesisState.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.GenesisState")) - } - panic(fmt.Errorf("message service.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.GenesisState")) - } - panic(fmt.Errorf("message service.v1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.GenesisState")) - } - panic(fmt.Errorf("message service.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.GenesisState")) - } - panic(fmt.Errorf("message service.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.GenesisState")) - } - panic(fmt.Errorf("message service.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_categories protoreflect.FieldDescriptor - fd_Params_types protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_genesis_proto_init() - md_Params = File_service_v1_genesis_proto.Messages().ByName("Params") - fd_Params_categories = md_Params.Fields().ByName("categories") - fd_Params_types = md_Params.Fields().ByName("types") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Categories != nil { - value := protoreflect.ValueOfMessage(x.Categories.ProtoReflect()) - if !f(fd_Params_categories, value) { - return - } - } - if x.Types != nil { - value := protoreflect.ValueOfMessage(x.Types.ProtoReflect()) - if !f(fd_Params_types, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.Params.categories": - return x.Categories != nil - case "service.v1.Params.types": - return x.Types != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Params")) - } - panic(fmt.Errorf("message service.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.Params.categories": - x.Categories = nil - case "service.v1.Params.types": - x.Types = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Params")) - } - panic(fmt.Errorf("message service.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.Params.categories": - value := x.Categories - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "service.v1.Params.types": - value := x.Types - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Params")) - } - panic(fmt.Errorf("message service.v1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.Params.categories": - x.Categories = value.Message().Interface().(*ServiceCategories) - case "service.v1.Params.types": - x.Types = value.Message().Interface().(*ServiceTypes) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Params")) - } - panic(fmt.Errorf("message service.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Params.categories": - if x.Categories == nil { - x.Categories = new(ServiceCategories) - } - return protoreflect.ValueOfMessage(x.Categories.ProtoReflect()) - case "service.v1.Params.types": - if x.Types == nil { - x.Types = new(ServiceTypes) - } - return protoreflect.ValueOfMessage(x.Types.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Params")) - } - panic(fmt.Errorf("message service.v1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Params.categories": - m := new(ServiceCategories) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "service.v1.Params.types": - m := new(ServiceTypes) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Params")) - } - panic(fmt.Errorf("message service.v1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Categories != nil { - l = options.Size(x.Categories) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Types != nil { - l = options.Size(x.Types) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Types != nil { - encoded, err := options.Marshal(x.Types) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Categories != nil { - encoded, err := options.Marshal(x.Categories) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Categories == nil { - x.Categories = &ServiceCategories{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Categories); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Types", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Types == nil { - x.Types = &ServiceTypes{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Types); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ServiceCategories_1_list)(nil) - -type _ServiceCategories_1_list struct { - list *[]string -} - -func (x *_ServiceCategories_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ServiceCategories_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ServiceCategories_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ServiceCategories_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ServiceCategories_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ServiceCategories at list field Categories as it is not of Message kind")) -} - -func (x *_ServiceCategories_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ServiceCategories_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ServiceCategories_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ServiceCategories protoreflect.MessageDescriptor - fd_ServiceCategories_categories protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_genesis_proto_init() - md_ServiceCategories = File_service_v1_genesis_proto.Messages().ByName("ServiceCategories") - fd_ServiceCategories_categories = md_ServiceCategories.Fields().ByName("categories") -} - -var _ protoreflect.Message = (*fastReflection_ServiceCategories)(nil) - -type fastReflection_ServiceCategories ServiceCategories - -func (x *ServiceCategories) ProtoReflect() protoreflect.Message { - return (*fastReflection_ServiceCategories)(x) -} - -func (x *ServiceCategories) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_genesis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ServiceCategories_messageType fastReflection_ServiceCategories_messageType -var _ protoreflect.MessageType = fastReflection_ServiceCategories_messageType{} - -type fastReflection_ServiceCategories_messageType struct{} - -func (x fastReflection_ServiceCategories_messageType) Zero() protoreflect.Message { - return (*fastReflection_ServiceCategories)(nil) -} -func (x fastReflection_ServiceCategories_messageType) New() protoreflect.Message { - return new(fastReflection_ServiceCategories) -} -func (x fastReflection_ServiceCategories_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ServiceCategories -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ServiceCategories) Descriptor() protoreflect.MessageDescriptor { - return md_ServiceCategories -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ServiceCategories) Type() protoreflect.MessageType { - return _fastReflection_ServiceCategories_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ServiceCategories) New() protoreflect.Message { - return new(fastReflection_ServiceCategories) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ServiceCategories) Interface() protoreflect.ProtoMessage { - return (*ServiceCategories)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ServiceCategories) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Categories) != 0 { - value := protoreflect.ValueOfList(&_ServiceCategories_1_list{list: &x.Categories}) - if !f(fd_ServiceCategories_categories, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ServiceCategories) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.ServiceCategories.categories": - return len(x.Categories) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceCategories")) - } - panic(fmt.Errorf("message service.v1.ServiceCategories does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceCategories) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.ServiceCategories.categories": - x.Categories = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceCategories")) - } - panic(fmt.Errorf("message service.v1.ServiceCategories does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ServiceCategories) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.ServiceCategories.categories": - if len(x.Categories) == 0 { - return protoreflect.ValueOfList(&_ServiceCategories_1_list{}) - } - listValue := &_ServiceCategories_1_list{list: &x.Categories} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceCategories")) - } - panic(fmt.Errorf("message service.v1.ServiceCategories does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceCategories) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.ServiceCategories.categories": - lv := value.List() - clv := lv.(*_ServiceCategories_1_list) - x.Categories = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceCategories")) - } - panic(fmt.Errorf("message service.v1.ServiceCategories does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceCategories) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.ServiceCategories.categories": - if x.Categories == nil { - x.Categories = []string{} - } - value := &_ServiceCategories_1_list{list: &x.Categories} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceCategories")) - } - panic(fmt.Errorf("message service.v1.ServiceCategories does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ServiceCategories) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.ServiceCategories.categories": - list := []string{} - return protoreflect.ValueOfList(&_ServiceCategories_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceCategories")) - } - panic(fmt.Errorf("message service.v1.ServiceCategories does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ServiceCategories) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.ServiceCategories", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ServiceCategories) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceCategories) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ServiceCategories) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ServiceCategories) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ServiceCategories) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Categories) > 0 { - for _, s := range x.Categories { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ServiceCategories) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Categories) > 0 { - for iNdEx := len(x.Categories) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Categories[iNdEx]) - copy(dAtA[i:], x.Categories[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Categories[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ServiceCategories) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceCategories: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceCategories: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Categories = append(x.Categories, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ServiceTypes_1_list)(nil) - -type _ServiceTypes_1_list struct { - list *[]string -} - -func (x *_ServiceTypes_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ServiceTypes_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ServiceTypes_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ServiceTypes_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ServiceTypes_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ServiceTypes at list field Types as it is not of Message kind")) -} - -func (x *_ServiceTypes_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ServiceTypes_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ServiceTypes_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ServiceTypes protoreflect.MessageDescriptor - fd_ServiceTypes_types protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_genesis_proto_init() - md_ServiceTypes = File_service_v1_genesis_proto.Messages().ByName("ServiceTypes") - fd_ServiceTypes_types = md_ServiceTypes.Fields().ByName("types") -} - -var _ protoreflect.Message = (*fastReflection_ServiceTypes)(nil) - -type fastReflection_ServiceTypes ServiceTypes - -func (x *ServiceTypes) ProtoReflect() protoreflect.Message { - return (*fastReflection_ServiceTypes)(x) -} - -func (x *ServiceTypes) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_genesis_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ServiceTypes_messageType fastReflection_ServiceTypes_messageType -var _ protoreflect.MessageType = fastReflection_ServiceTypes_messageType{} - -type fastReflection_ServiceTypes_messageType struct{} - -func (x fastReflection_ServiceTypes_messageType) Zero() protoreflect.Message { - return (*fastReflection_ServiceTypes)(nil) -} -func (x fastReflection_ServiceTypes_messageType) New() protoreflect.Message { - return new(fastReflection_ServiceTypes) -} -func (x fastReflection_ServiceTypes_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ServiceTypes -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ServiceTypes) Descriptor() protoreflect.MessageDescriptor { - return md_ServiceTypes -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ServiceTypes) Type() protoreflect.MessageType { - return _fastReflection_ServiceTypes_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ServiceTypes) New() protoreflect.Message { - return new(fastReflection_ServiceTypes) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ServiceTypes) Interface() protoreflect.ProtoMessage { - return (*ServiceTypes)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ServiceTypes) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Types) != 0 { - value := protoreflect.ValueOfList(&_ServiceTypes_1_list{list: &x.Types}) - if !f(fd_ServiceTypes_types, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ServiceTypes) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.ServiceTypes.types": - return len(x.Types) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceTypes")) - } - panic(fmt.Errorf("message service.v1.ServiceTypes does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceTypes) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.ServiceTypes.types": - x.Types = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceTypes")) - } - panic(fmt.Errorf("message service.v1.ServiceTypes does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ServiceTypes) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.ServiceTypes.types": - if len(x.Types) == 0 { - return protoreflect.ValueOfList(&_ServiceTypes_1_list{}) - } - listValue := &_ServiceTypes_1_list{list: &x.Types} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceTypes")) - } - panic(fmt.Errorf("message service.v1.ServiceTypes does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceTypes) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.ServiceTypes.types": - lv := value.List() - clv := lv.(*_ServiceTypes_1_list) - x.Types = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceTypes")) - } - panic(fmt.Errorf("message service.v1.ServiceTypes does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceTypes) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.ServiceTypes.types": - if x.Types == nil { - x.Types = []string{} - } - value := &_ServiceTypes_1_list{list: &x.Types} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceTypes")) - } - panic(fmt.Errorf("message service.v1.ServiceTypes does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ServiceTypes) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.ServiceTypes.types": - list := []string{} - return protoreflect.ValueOfList(&_ServiceTypes_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.ServiceTypes")) - } - panic(fmt.Errorf("message service.v1.ServiceTypes does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ServiceTypes) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.ServiceTypes", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ServiceTypes) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ServiceTypes) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ServiceTypes) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ServiceTypes) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ServiceTypes) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Types) > 0 { - for _, s := range x.Types { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ServiceTypes) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Types) > 0 { - for iNdEx := len(x.Types) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Types[iNdEx]) - copy(dAtA[i:], x.Types[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Types[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ServiceTypes) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Types", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Types = append(x.Types, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Service_7_list)(nil) - -type _Service_7_list struct { - list *[]string -} - -func (x *_Service_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Service_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Service_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Service_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Service_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Service at list field Tags as it is not of Message kind")) -} - -func (x *_Service_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Service_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Service_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Service protoreflect.MessageDescriptor - fd_Service_id protoreflect.FieldDescriptor - fd_Service_authority protoreflect.FieldDescriptor - fd_Service_origin protoreflect.FieldDescriptor - fd_Service_name protoreflect.FieldDescriptor - fd_Service_description protoreflect.FieldDescriptor - fd_Service_category protoreflect.FieldDescriptor - fd_Service_tags protoreflect.FieldDescriptor - fd_Service_expiry_height protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_genesis_proto_init() - md_Service = File_service_v1_genesis_proto.Messages().ByName("Service") - fd_Service_id = md_Service.Fields().ByName("id") - fd_Service_authority = md_Service.Fields().ByName("authority") - fd_Service_origin = md_Service.Fields().ByName("origin") - fd_Service_name = md_Service.Fields().ByName("name") - fd_Service_description = md_Service.Fields().ByName("description") - fd_Service_category = md_Service.Fields().ByName("category") - fd_Service_tags = md_Service.Fields().ByName("tags") - fd_Service_expiry_height = md_Service.Fields().ByName("expiry_height") -} - -var _ protoreflect.Message = (*fastReflection_Service)(nil) - -type fastReflection_Service Service - -func (x *Service) ProtoReflect() protoreflect.Message { - return (*fastReflection_Service)(x) -} - -func (x *Service) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_genesis_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Service_messageType fastReflection_Service_messageType -var _ protoreflect.MessageType = fastReflection_Service_messageType{} - -type fastReflection_Service_messageType struct{} - -func (x fastReflection_Service_messageType) Zero() protoreflect.Message { - return (*fastReflection_Service)(nil) -} -func (x fastReflection_Service_messageType) New() protoreflect.Message { - return new(fastReflection_Service) -} -func (x fastReflection_Service_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Service -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Service) Descriptor() protoreflect.MessageDescriptor { - return md_Service -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Service) Type() protoreflect.MessageType { - return _fastReflection_Service_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Service) New() protoreflect.Message { - return new(fastReflection_Service) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Service) Interface() protoreflect.ProtoMessage { - return (*Service)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Service_id, value) { - return - } - } - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_Service_authority, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Service_origin, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Service_name, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_Service_description, value) { - return - } - } - if x.Category != "" { - value := protoreflect.ValueOfString(x.Category) - if !f(fd_Service_category, value) { - return - } - } - if len(x.Tags) != 0 { - value := protoreflect.ValueOfList(&_Service_7_list{list: &x.Tags}) - if !f(fd_Service_tags, value) { - return - } - } - if x.ExpiryHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.ExpiryHeight) - if !f(fd_Service_expiry_height, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.Service.id": - return x.Id != "" - case "service.v1.Service.authority": - return x.Authority != "" - case "service.v1.Service.origin": - return x.Origin != "" - case "service.v1.Service.name": - return x.Name != "" - case "service.v1.Service.description": - return x.Description != "" - case "service.v1.Service.category": - return x.Category != "" - case "service.v1.Service.tags": - return len(x.Tags) != 0 - case "service.v1.Service.expiry_height": - return x.ExpiryHeight != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Service")) - } - panic(fmt.Errorf("message service.v1.Service does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.Service.id": - x.Id = "" - case "service.v1.Service.authority": - x.Authority = "" - case "service.v1.Service.origin": - x.Origin = "" - case "service.v1.Service.name": - x.Name = "" - case "service.v1.Service.description": - x.Description = "" - case "service.v1.Service.category": - x.Category = "" - case "service.v1.Service.tags": - x.Tags = nil - case "service.v1.Service.expiry_height": - x.ExpiryHeight = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Service")) - } - panic(fmt.Errorf("message service.v1.Service does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.Service.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "service.v1.Service.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "service.v1.Service.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "service.v1.Service.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "service.v1.Service.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "service.v1.Service.category": - value := x.Category - return protoreflect.ValueOfString(value) - case "service.v1.Service.tags": - if len(x.Tags) == 0 { - return protoreflect.ValueOfList(&_Service_7_list{}) - } - listValue := &_Service_7_list{list: &x.Tags} - return protoreflect.ValueOfList(listValue) - case "service.v1.Service.expiry_height": - value := x.ExpiryHeight - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Service")) - } - panic(fmt.Errorf("message service.v1.Service does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.Service.id": - x.Id = value.Interface().(string) - case "service.v1.Service.authority": - x.Authority = value.Interface().(string) - case "service.v1.Service.origin": - x.Origin = value.Interface().(string) - case "service.v1.Service.name": - x.Name = value.Interface().(string) - case "service.v1.Service.description": - x.Description = value.Interface().(string) - case "service.v1.Service.category": - x.Category = value.Interface().(string) - case "service.v1.Service.tags": - lv := value.List() - clv := lv.(*_Service_7_list) - x.Tags = *clv.list - case "service.v1.Service.expiry_height": - x.ExpiryHeight = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Service")) - } - panic(fmt.Errorf("message service.v1.Service does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Service.tags": - if x.Tags == nil { - x.Tags = []string{} - } - value := &_Service_7_list{list: &x.Tags} - return protoreflect.ValueOfList(value) - case "service.v1.Service.id": - panic(fmt.Errorf("field id of message service.v1.Service is not mutable")) - case "service.v1.Service.authority": - panic(fmt.Errorf("field authority of message service.v1.Service is not mutable")) - case "service.v1.Service.origin": - panic(fmt.Errorf("field origin of message service.v1.Service is not mutable")) - case "service.v1.Service.name": - panic(fmt.Errorf("field name of message service.v1.Service is not mutable")) - case "service.v1.Service.description": - panic(fmt.Errorf("field description of message service.v1.Service is not mutable")) - case "service.v1.Service.category": - panic(fmt.Errorf("field category of message service.v1.Service is not mutable")) - case "service.v1.Service.expiry_height": - panic(fmt.Errorf("field expiry_height of message service.v1.Service is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Service")) - } - panic(fmt.Errorf("message service.v1.Service does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Service.id": - return protoreflect.ValueOfString("") - case "service.v1.Service.authority": - return protoreflect.ValueOfString("") - case "service.v1.Service.origin": - return protoreflect.ValueOfString("") - case "service.v1.Service.name": - return protoreflect.ValueOfString("") - case "service.v1.Service.description": - return protoreflect.ValueOfString("") - case "service.v1.Service.category": - return protoreflect.ValueOfString("") - case "service.v1.Service.tags": - list := []string{} - return protoreflect.ValueOfList(&_Service_7_list{list: &list}) - case "service.v1.Service.expiry_height": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Service")) - } - panic(fmt.Errorf("message service.v1.Service does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Service) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.Service", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Service) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Service) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Service) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Service) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Category) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Tags) > 0 { - for _, s := range x.Tags { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.ExpiryHeight != 0 { - n += 1 + runtime.Sov(uint64(x.ExpiryHeight)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Service) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ExpiryHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryHeight)) - i-- - dAtA[i] = 0x40 - } - if len(x.Tags) > 0 { - for iNdEx := len(x.Tags) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Tags[iNdEx]) - copy(dAtA[i:], x.Tags[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tags[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.Category) > 0 { - i -= len(x.Category) - copy(dAtA[i:], x.Category) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Category))) - i-- - dAtA[i] = 0x32 - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x2a - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x22 - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0x1a - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Service) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Category", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Category = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Tags = append(x.Tags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) - } - x.ExpiryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ExpiryHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: service/v1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the module genesis state -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Params defines all the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_service_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// Params defines the set of module parameters. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Categories *ServiceCategories `protobuf:"bytes,1,opt,name=categories,proto3" json:"categories,omitempty"` - Types *ServiceTypes `protobuf:"bytes,2,opt,name=types,proto3" json:"types,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_service_v1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *Params) GetCategories() *ServiceCategories { - if x != nil { - return x.Categories - } - return nil -} - -func (x *Params) GetTypes() *ServiceTypes { - if x != nil { - return x.Types - } - return nil -} - -type ServiceCategories struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Categories []string `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"` -} - -func (x *ServiceCategories) Reset() { - *x = ServiceCategories{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_genesis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServiceCategories) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceCategories) ProtoMessage() {} - -// Deprecated: Use ServiceCategories.ProtoReflect.Descriptor instead. -func (*ServiceCategories) Descriptor() ([]byte, []int) { - return file_service_v1_genesis_proto_rawDescGZIP(), []int{2} -} - -func (x *ServiceCategories) GetCategories() []string { - if x != nil { - return x.Categories - } - return nil -} - -type ServiceTypes struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Types []string `protobuf:"bytes,1,rep,name=types,proto3" json:"types,omitempty"` -} - -func (x *ServiceTypes) Reset() { - *x = ServiceTypes{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_genesis_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServiceTypes) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServiceTypes) ProtoMessage() {} - -// Deprecated: Use ServiceTypes.ProtoReflect.Descriptor instead. -func (*ServiceTypes) Descriptor() ([]byte, []int) { - return file_service_v1_genesis_proto_rawDescGZIP(), []int{3} -} - -func (x *ServiceTypes) GetTypes() []string { - if x != nil { - return x.Types - } - return nil -} - -// Service defines a Decentralized Service on the Sonr Blockchain -type Service struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - Category string `protobuf:"bytes,6,opt,name=category,proto3" json:"category,omitempty"` - Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` - ExpiryHeight int64 `protobuf:"varint,8,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` -} - -func (x *Service) Reset() { - *x = Service{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_genesis_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Service) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Service) ProtoMessage() {} - -// Deprecated: Use Service.ProtoReflect.Descriptor instead. -func (*Service) Descriptor() ([]byte, []int) { - return file_service_v1_genesis_proto_rawDescGZIP(), []int{4} -} - -func (x *Service) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Service) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *Service) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Service) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Service) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Service) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *Service) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *Service) GetExpiryHeight() int64 { - if x != nil { - return x.ExpiryHeight - } - return 0 -} - -var File_service_v1_genesis_proto protoreflect.FileDescriptor - -var file_service_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x18, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, - 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, - 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0x40, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x94, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x3d, 0x0a, 0x0a, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x05, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x73, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x3a, 0x1b, 0x98, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x50, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x0a, - 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x1b, 0xe8, - 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, - 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x3c, 0x0a, 0x0c, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x3a, 0x16, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xda, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, - 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0x98, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, - 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, - 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_service_v1_genesis_proto_rawDescOnce sync.Once - file_service_v1_genesis_proto_rawDescData = file_service_v1_genesis_proto_rawDesc -) - -func file_service_v1_genesis_proto_rawDescGZIP() []byte { - file_service_v1_genesis_proto_rawDescOnce.Do(func() { - file_service_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_genesis_proto_rawDescData) - }) - return file_service_v1_genesis_proto_rawDescData -} - -var file_service_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_service_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: service.v1.GenesisState - (*Params)(nil), // 1: service.v1.Params - (*ServiceCategories)(nil), // 2: service.v1.ServiceCategories - (*ServiceTypes)(nil), // 3: service.v1.ServiceTypes - (*Service)(nil), // 4: service.v1.Service -} -var file_service_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: service.v1.GenesisState.params:type_name -> service.v1.Params - 2, // 1: service.v1.Params.categories:type_name -> service.v1.ServiceCategories - 3, // 2: service.v1.Params.types:type_name -> service.v1.ServiceTypes - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_service_v1_genesis_proto_init() } -func file_service_v1_genesis_proto_init() { - if File_service_v1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_service_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceCategories); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServiceTypes); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_genesis_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Service); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_service_v1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_service_v1_genesis_proto_goTypes, - DependencyIndexes: file_service_v1_genesis_proto_depIdxs, - MessageInfos: file_service_v1_genesis_proto_msgTypes, - }.Build() - File_service_v1_genesis_proto = out.File - file_service_v1_genesis_proto_rawDesc = nil - file_service_v1_genesis_proto_goTypes = nil - file_service_v1_genesis_proto_depIdxs = nil -} diff --git a/api/service/v1/query.pulsar.go b/api/service/v1/query.pulsar.go deleted file mode 100644 index e2f65cead..000000000 --- a/api/service/v1/query.pulsar.go +++ /dev/null @@ -1,997 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package servicev1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_service_v1_query_proto_init() - md_QueryParamsRequest = File_service_v1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message service.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.QueryParamsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_query_proto_init() - md_QueryParamsResponse = File_service_v1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message service.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message service.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message service.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message service.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message service.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message service.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.QueryParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: service/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_service_v1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_service_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -var File_service_v1_query_proto protoreflect.FileDescriptor - -var file_service_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x41, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x6e, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x65, - 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x14, 0x12, 0x12, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x96, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0a, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_service_v1_query_proto_rawDescOnce sync.Once - file_service_v1_query_proto_rawDescData = file_service_v1_query_proto_rawDesc -) - -func file_service_v1_query_proto_rawDescGZIP() []byte { - file_service_v1_query_proto_rawDescOnce.Do(func() { - file_service_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_query_proto_rawDescData) - }) - return file_service_v1_query_proto_rawDescData -} - -var file_service_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_service_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: service.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: service.v1.QueryParamsResponse - (*Params)(nil), // 2: service.v1.Params -} -var file_service_v1_query_proto_depIdxs = []int32{ - 2, // 0: service.v1.QueryParamsResponse.params:type_name -> service.v1.Params - 0, // 1: service.v1.Query.Params:input_type -> service.v1.QueryParamsRequest - 1, // 2: service.v1.Query.Params:output_type -> service.v1.QueryParamsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_service_v1_query_proto_init() } -func file_service_v1_query_proto_init() { - if File_service_v1_query_proto != nil { - return - } - file_service_v1_genesis_proto_init() - if !protoimpl.UnsafeEnabled { - file_service_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_service_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_service_v1_query_proto_goTypes, - DependencyIndexes: file_service_v1_query_proto_depIdxs, - MessageInfos: file_service_v1_query_proto_msgTypes, - }.Build() - File_service_v1_query_proto = out.File - file_service_v1_query_proto_rawDesc = nil - file_service_v1_query_proto_goTypes = nil - file_service_v1_query_proto_depIdxs = nil -} diff --git a/api/service/v1/query_grpc.pb.go b/api/service/v1/query_grpc.pb.go deleted file mode 100644 index ad87b4ab2..000000000 --- a/api/service/v1/query_grpc.pb.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: service/v1/query.proto - -package servicev1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Query_Params_FullMethodName = "/service.v1.Query/Params" -) - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Query provides defines the gRPC querier service. -type QueryClient interface { - // Params queries all parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility. -// -// Query provides defines the gRPC querier service. -type QueryServer interface { - // Params queries all parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServer struct{} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} -func (UnimplementedQueryServer) testEmbeddedByValue() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - // If the following call pancis, it indicates UnimplementedQueryServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Params_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "service.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service/v1/query.proto", -} diff --git a/api/service/v1/state.cosmos_orm.go b/api/service/v1/state.cosmos_orm.go deleted file mode 100644 index 2dfc0ecae..000000000 --- a/api/service/v1/state.cosmos_orm.go +++ /dev/null @@ -1,368 +0,0 @@ -// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT. - -package servicev1 - -import ( - context "context" - ormlist "cosmossdk.io/orm/model/ormlist" - ormtable "cosmossdk.io/orm/model/ormtable" - ormerrors "cosmossdk.io/orm/types/ormerrors" -) - -type MetadataTable interface { - Insert(ctx context.Context, metadata *Metadata) error - InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error) - LastInsertedSequence(ctx context.Context) (uint64, error) - Update(ctx context.Context, metadata *Metadata) error - Save(ctx context.Context, metadata *Metadata) error - Delete(ctx context.Context, metadata *Metadata) error - Has(ctx context.Context, id uint64) (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 uint64) (*Metadata, error) - HasByOrigin(ctx context.Context, origin string) (found bool, err error) - // GetByOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByOrigin(ctx context.Context, origin string) (*Metadata, error) - List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) - ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) - DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error - DeleteRange(ctx context.Context, from, to MetadataIndexKey) error - - doNotImplement() -} - -type MetadataIterator struct { - ormtable.Iterator -} - -func (i MetadataIterator) Value() (*Metadata, error) { - var metadata Metadata - err := i.UnmarshalMessage(&metadata) - return &metadata, err -} - -type MetadataIndexKey interface { - id() uint32 - values() []interface{} - metadataIndexKey() -} - -// primary key starting index.. -type MetadataPrimaryKey = MetadataIdIndexKey - -type MetadataIdIndexKey struct { - vs []interface{} -} - -func (x MetadataIdIndexKey) id() uint32 { return 0 } -func (x MetadataIdIndexKey) values() []interface{} { return x.vs } -func (x MetadataIdIndexKey) metadataIndexKey() {} - -func (this MetadataIdIndexKey) WithId(id uint64) MetadataIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type MetadataOriginIndexKey struct { - vs []interface{} -} - -func (x MetadataOriginIndexKey) id() uint32 { return 1 } -func (x MetadataOriginIndexKey) values() []interface{} { return x.vs } -func (x MetadataOriginIndexKey) metadataIndexKey() {} - -func (this MetadataOriginIndexKey) WithOrigin(origin string) MetadataOriginIndexKey { - this.vs = []interface{}{origin} - return this -} - -type metadataTable struct { - table ormtable.AutoIncrementTable -} - -func (this metadataTable) Insert(ctx context.Context, metadata *Metadata) error { - return this.table.Insert(ctx, metadata) -} - -func (this metadataTable) Update(ctx context.Context, metadata *Metadata) error { - return this.table.Update(ctx, metadata) -} - -func (this metadataTable) Save(ctx context.Context, metadata *Metadata) error { - return this.table.Save(ctx, metadata) -} - -func (this metadataTable) Delete(ctx context.Context, metadata *Metadata) error { - return this.table.Delete(ctx, metadata) -} - -func (this metadataTable) InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error) { - return this.table.InsertReturningPKey(ctx, metadata) -} - -func (this metadataTable) LastInsertedSequence(ctx context.Context) (uint64, error) { - return this.table.LastInsertedSequence(ctx) -} - -func (this metadataTable) Has(ctx context.Context, id uint64) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error) { - var metadata Metadata - found, err := this.table.PrimaryKey().Get(ctx, &metadata, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &metadata, nil -} - -func (this metadataTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - origin, - ) -} - -func (this metadataTable) GetByOrigin(ctx context.Context, origin string) (*Metadata, error) { - var metadata Metadata - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &metadata, - origin, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &metadata, nil -} - -func (this metadataTable) List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return MetadataIterator{it}, err -} - -func (this metadataTable) ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return MetadataIterator{it}, err -} - -func (this metadataTable) DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this metadataTable) DeleteRange(ctx context.Context, from, to MetadataIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this metadataTable) doNotImplement() {} - -var _ MetadataTable = metadataTable{} - -func NewMetadataTable(db ormtable.Schema) (MetadataTable, error) { - table := db.GetTable(&Metadata{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Metadata{}).ProtoReflect().Descriptor().FullName())) - } - return metadataTable{table.(ormtable.AutoIncrementTable)}, nil -} - -type ProfileTable interface { - Insert(ctx context.Context, profile *Profile) error - Update(ctx context.Context, profile *Profile) error - Save(ctx context.Context, profile *Profile) error - Delete(ctx context.Context, profile *Profile) error - 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) (*Profile, error) - HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) - // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error) - List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) - ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) - DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error - DeleteRange(ctx context.Context, from, to ProfileIndexKey) error - - doNotImplement() -} - -type ProfileIterator struct { - ormtable.Iterator -} - -func (i ProfileIterator) Value() (*Profile, error) { - var profile Profile - err := i.UnmarshalMessage(&profile) - return &profile, err -} - -type ProfileIndexKey interface { - id() uint32 - values() []interface{} - profileIndexKey() -} - -// primary key starting index.. -type ProfilePrimaryKey = ProfileIdIndexKey - -type ProfileIdIndexKey struct { - vs []interface{} -} - -func (x ProfileIdIndexKey) id() uint32 { return 0 } -func (x ProfileIdIndexKey) values() []interface{} { return x.vs } -func (x ProfileIdIndexKey) profileIndexKey() {} - -func (this ProfileIdIndexKey) WithId(id string) ProfileIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type ProfileSubjectOriginIndexKey struct { - vs []interface{} -} - -func (x ProfileSubjectOriginIndexKey) id() uint32 { return 1 } -func (x ProfileSubjectOriginIndexKey) values() []interface{} { return x.vs } -func (x ProfileSubjectOriginIndexKey) profileIndexKey() {} - -func (this ProfileSubjectOriginIndexKey) WithSubject(subject string) ProfileSubjectOriginIndexKey { - this.vs = []interface{}{subject} - return this -} - -func (this ProfileSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) ProfileSubjectOriginIndexKey { - this.vs = []interface{}{subject, origin} - return this -} - -type profileTable struct { - table ormtable.Table -} - -func (this profileTable) Insert(ctx context.Context, profile *Profile) error { - return this.table.Insert(ctx, profile) -} - -func (this profileTable) Update(ctx context.Context, profile *Profile) error { - return this.table.Update(ctx, profile) -} - -func (this profileTable) Save(ctx context.Context, profile *Profile) error { - return this.table.Save(ctx, profile) -} - -func (this profileTable) Delete(ctx context.Context, profile *Profile) error { - return this.table.Delete(ctx, profile) -} - -func (this profileTable) Has(ctx context.Context, id string) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this profileTable) Get(ctx context.Context, id string) (*Profile, error) { - var profile Profile - found, err := this.table.PrimaryKey().Get(ctx, &profile, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &profile, nil -} - -func (this profileTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - subject, - origin, - ) -} - -func (this profileTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error) { - var profile Profile - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &profile, - subject, - origin, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &profile, nil -} - -func (this profileTable) List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return ProfileIterator{it}, err -} - -func (this profileTable) ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return ProfileIterator{it}, err -} - -func (this profileTable) DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this profileTable) DeleteRange(ctx context.Context, from, to ProfileIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this profileTable) doNotImplement() {} - -var _ ProfileTable = profileTable{} - -func NewProfileTable(db ormtable.Schema) (ProfileTable, error) { - table := db.GetTable(&Profile{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Profile{}).ProtoReflect().Descriptor().FullName())) - } - return profileTable{table}, nil -} - -type StateStore interface { - MetadataTable() MetadataTable - ProfileTable() ProfileTable - - doNotImplement() -} - -type stateStore struct { - metadata MetadataTable - profile ProfileTable -} - -func (x stateStore) MetadataTable() MetadataTable { - return x.metadata -} - -func (x stateStore) ProfileTable() ProfileTable { - return x.profile -} - -func (stateStore) doNotImplement() {} - -var _ StateStore = stateStore{} - -func NewStateStore(db ormtable.Schema) (StateStore, error) { - metadataTable, err := NewMetadataTable(db) - if err != nil { - return nil, err - } - - profileTable, err := NewProfileTable(db) - if err != nil { - return nil, err - } - - return stateStore{ - metadataTable, - profileTable, - }, nil -} diff --git a/api/service/v1/state.pulsar.go b/api/service/v1/state.pulsar.go deleted file mode 100644 index c40f31343..000000000 --- a/api/service/v1/state.pulsar.go +++ /dev/null @@ -1,1752 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package servicev1 - -import ( - _ "cosmossdk.io/api/cosmos/orm/v1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Metadata_7_list)(nil) - -type _Metadata_7_list struct { - list *[]string -} - -func (x *_Metadata_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Metadata_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Metadata_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Metadata_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Metadata_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Metadata at list field Tags as it is not of Message kind")) -} - -func (x *_Metadata_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Metadata_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Metadata_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Metadata protoreflect.MessageDescriptor - fd_Metadata_id protoreflect.FieldDescriptor - fd_Metadata_origin protoreflect.FieldDescriptor - fd_Metadata_name protoreflect.FieldDescriptor - fd_Metadata_description protoreflect.FieldDescriptor - fd_Metadata_category protoreflect.FieldDescriptor - fd_Metadata_icon protoreflect.FieldDescriptor - fd_Metadata_tags protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_state_proto_init() - md_Metadata = File_service_v1_state_proto.Messages().ByName("Metadata") - fd_Metadata_id = md_Metadata.Fields().ByName("id") - fd_Metadata_origin = md_Metadata.Fields().ByName("origin") - fd_Metadata_name = md_Metadata.Fields().ByName("name") - fd_Metadata_description = md_Metadata.Fields().ByName("description") - fd_Metadata_category = md_Metadata.Fields().ByName("category") - fd_Metadata_icon = md_Metadata.Fields().ByName("icon") - fd_Metadata_tags = md_Metadata.Fields().ByName("tags") -} - -var _ protoreflect.Message = (*fastReflection_Metadata)(nil) - -type fastReflection_Metadata Metadata - -func (x *Metadata) ProtoReflect() protoreflect.Message { - return (*fastReflection_Metadata)(x) -} - -func (x *Metadata) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_state_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Metadata_messageType fastReflection_Metadata_messageType -var _ protoreflect.MessageType = fastReflection_Metadata_messageType{} - -type fastReflection_Metadata_messageType struct{} - -func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message { - return (*fastReflection_Metadata)(nil) -} -func (x fastReflection_Metadata_messageType) New() protoreflect.Message { - return new(fastReflection_Metadata) -} -func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Metadata) Type() protoreflect.MessageType { - return _fastReflection_Metadata_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Metadata) New() protoreflect.Message { - return new(fastReflection_Metadata) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { - return (*Metadata)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_Metadata_id, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Metadata_origin, value) { - return - } - } - if x.Name != "" { - value := protoreflect.ValueOfString(x.Name) - if !f(fd_Metadata_name, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_Metadata_description, value) { - return - } - } - if x.Category != "" { - value := protoreflect.ValueOfString(x.Category) - if !f(fd_Metadata_category, value) { - return - } - } - if x.Icon != "" { - value := protoreflect.ValueOfString(x.Icon) - if !f(fd_Metadata_icon, value) { - return - } - } - if len(x.Tags) != 0 { - value := protoreflect.ValueOfList(&_Metadata_7_list{list: &x.Tags}) - if !f(fd_Metadata_tags, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Metadata) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.Metadata.id": - return x.Id != uint64(0) - case "service.v1.Metadata.origin": - return x.Origin != "" - case "service.v1.Metadata.name": - return x.Name != "" - case "service.v1.Metadata.description": - return x.Description != "" - case "service.v1.Metadata.category": - return x.Category != "" - case "service.v1.Metadata.icon": - return x.Icon != "" - case "service.v1.Metadata.tags": - return len(x.Tags) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Metadata")) - } - panic(fmt.Errorf("message service.v1.Metadata does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.Metadata.id": - x.Id = uint64(0) - case "service.v1.Metadata.origin": - x.Origin = "" - case "service.v1.Metadata.name": - x.Name = "" - case "service.v1.Metadata.description": - x.Description = "" - case "service.v1.Metadata.category": - x.Category = "" - case "service.v1.Metadata.icon": - x.Icon = "" - case "service.v1.Metadata.tags": - x.Tags = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Metadata")) - } - panic(fmt.Errorf("message service.v1.Metadata does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.Metadata.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "service.v1.Metadata.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "service.v1.Metadata.name": - value := x.Name - return protoreflect.ValueOfString(value) - case "service.v1.Metadata.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "service.v1.Metadata.category": - value := x.Category - return protoreflect.ValueOfString(value) - case "service.v1.Metadata.icon": - value := x.Icon - return protoreflect.ValueOfString(value) - case "service.v1.Metadata.tags": - if len(x.Tags) == 0 { - return protoreflect.ValueOfList(&_Metadata_7_list{}) - } - listValue := &_Metadata_7_list{list: &x.Tags} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Metadata")) - } - panic(fmt.Errorf("message service.v1.Metadata does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.Metadata.id": - x.Id = value.Uint() - case "service.v1.Metadata.origin": - x.Origin = value.Interface().(string) - case "service.v1.Metadata.name": - x.Name = value.Interface().(string) - case "service.v1.Metadata.description": - x.Description = value.Interface().(string) - case "service.v1.Metadata.category": - x.Category = value.Interface().(string) - case "service.v1.Metadata.icon": - x.Icon = value.Interface().(string) - case "service.v1.Metadata.tags": - lv := value.List() - clv := lv.(*_Metadata_7_list) - x.Tags = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Metadata")) - } - panic(fmt.Errorf("message service.v1.Metadata does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Metadata.tags": - if x.Tags == nil { - x.Tags = []string{} - } - value := &_Metadata_7_list{list: &x.Tags} - return protoreflect.ValueOfList(value) - case "service.v1.Metadata.id": - panic(fmt.Errorf("field id of message service.v1.Metadata is not mutable")) - case "service.v1.Metadata.origin": - panic(fmt.Errorf("field origin of message service.v1.Metadata is not mutable")) - case "service.v1.Metadata.name": - panic(fmt.Errorf("field name of message service.v1.Metadata is not mutable")) - case "service.v1.Metadata.description": - panic(fmt.Errorf("field description of message service.v1.Metadata is not mutable")) - case "service.v1.Metadata.category": - panic(fmt.Errorf("field category of message service.v1.Metadata is not mutable")) - case "service.v1.Metadata.icon": - panic(fmt.Errorf("field icon of message service.v1.Metadata is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Metadata")) - } - panic(fmt.Errorf("message service.v1.Metadata does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Metadata.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "service.v1.Metadata.origin": - return protoreflect.ValueOfString("") - case "service.v1.Metadata.name": - return protoreflect.ValueOfString("") - case "service.v1.Metadata.description": - return protoreflect.ValueOfString("") - case "service.v1.Metadata.category": - return protoreflect.ValueOfString("") - case "service.v1.Metadata.icon": - return protoreflect.ValueOfString("") - case "service.v1.Metadata.tags": - list := []string{} - return protoreflect.ValueOfList(&_Metadata_7_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Metadata")) - } - panic(fmt.Errorf("message service.v1.Metadata does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.Metadata", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Metadata) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Metadata) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Metadata) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Name) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Category) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Icon) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Tags) > 0 { - for _, s := range x.Tags { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Metadata) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Tags) > 0 { - for iNdEx := len(x.Tags) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Tags[iNdEx]) - copy(dAtA[i:], x.Tags[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Tags[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.Icon) > 0 { - i -= len(x.Icon) - copy(dAtA[i:], x.Icon) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Icon))) - i-- - dAtA[i] = 0x32 - } - if len(x.Category) > 0 { - i -= len(x.Category) - copy(dAtA[i:], x.Category) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Category))) - i-- - dAtA[i] = 0x2a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x22 - } - if len(x.Name) > 0 { - i -= len(x.Name) - copy(dAtA[i:], x.Name) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) - i-- - dAtA[i] = 0x1a - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Metadata) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Category", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Category = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Icon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Tags = append(x.Tags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Profile protoreflect.MessageDescriptor - fd_Profile_id protoreflect.FieldDescriptor - fd_Profile_subject protoreflect.FieldDescriptor - fd_Profile_origin protoreflect.FieldDescriptor - fd_Profile_controller protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_state_proto_init() - md_Profile = File_service_v1_state_proto.Messages().ByName("Profile") - fd_Profile_id = md_Profile.Fields().ByName("id") - fd_Profile_subject = md_Profile.Fields().ByName("subject") - fd_Profile_origin = md_Profile.Fields().ByName("origin") - fd_Profile_controller = md_Profile.Fields().ByName("controller") -} - -var _ protoreflect.Message = (*fastReflection_Profile)(nil) - -type fastReflection_Profile Profile - -func (x *Profile) ProtoReflect() protoreflect.Message { - return (*fastReflection_Profile)(x) -} - -func (x *Profile) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_state_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Profile_messageType fastReflection_Profile_messageType -var _ protoreflect.MessageType = fastReflection_Profile_messageType{} - -type fastReflection_Profile_messageType struct{} - -func (x fastReflection_Profile_messageType) Zero() protoreflect.Message { - return (*fastReflection_Profile)(nil) -} -func (x fastReflection_Profile_messageType) New() protoreflect.Message { - return new(fastReflection_Profile) -} -func (x fastReflection_Profile_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Profile -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Profile) Descriptor() protoreflect.MessageDescriptor { - return md_Profile -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Profile) Type() protoreflect.MessageType { - return _fastReflection_Profile_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Profile) New() protoreflect.Message { - return new(fastReflection_Profile) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Profile) Interface() protoreflect.ProtoMessage { - return (*Profile)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Profile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_Profile_id, value) { - return - } - } - if x.Subject != "" { - value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Profile_subject, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Profile_origin, value) { - return - } - } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Profile_controller, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Profile) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.Profile.id": - return x.Id != "" - case "service.v1.Profile.subject": - return x.Subject != "" - case "service.v1.Profile.origin": - return x.Origin != "" - case "service.v1.Profile.controller": - return x.Controller != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Profile")) - } - panic(fmt.Errorf("message service.v1.Profile does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.Profile.id": - x.Id = "" - case "service.v1.Profile.subject": - x.Subject = "" - case "service.v1.Profile.origin": - x.Origin = "" - case "service.v1.Profile.controller": - x.Controller = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Profile")) - } - panic(fmt.Errorf("message service.v1.Profile does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Profile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.Profile.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "service.v1.Profile.subject": - value := x.Subject - return protoreflect.ValueOfString(value) - case "service.v1.Profile.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - case "service.v1.Profile.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Profile")) - } - panic(fmt.Errorf("message service.v1.Profile does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.Profile.id": - x.Id = value.Interface().(string) - case "service.v1.Profile.subject": - x.Subject = value.Interface().(string) - case "service.v1.Profile.origin": - x.Origin = value.Interface().(string) - case "service.v1.Profile.controller": - x.Controller = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Profile")) - } - panic(fmt.Errorf("message service.v1.Profile does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Profile.id": - panic(fmt.Errorf("field id of message service.v1.Profile is not mutable")) - case "service.v1.Profile.subject": - panic(fmt.Errorf("field subject of message service.v1.Profile is not mutable")) - case "service.v1.Profile.origin": - panic(fmt.Errorf("field origin of message service.v1.Profile is not mutable")) - case "service.v1.Profile.controller": - panic(fmt.Errorf("field controller of message service.v1.Profile is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Profile")) - } - panic(fmt.Errorf("message service.v1.Profile does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Profile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.Profile.id": - return protoreflect.ValueOfString("") - case "service.v1.Profile.subject": - return protoreflect.ValueOfString("") - case "service.v1.Profile.origin": - return protoreflect.ValueOfString("") - case "service.v1.Profile.controller": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.Profile")) - } - panic(fmt.Errorf("message service.v1.Profile does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Profile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.Profile", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Profile) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Profile) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Profile) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Subject) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Profile) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0x22 - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0x1a - } - if len(x.Subject) > 0 { - i -= len(x.Subject) - copy(dAtA[i:], x.Subject) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Profile) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: service/v1/state.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Metadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - Category string `protobuf:"bytes,5,opt,name=category,proto3" json:"category,omitempty"` - Icon string `protobuf:"bytes,6,opt,name=icon,proto3" json:"icon,omitempty"` - Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` -} - -func (x *Metadata) Reset() { - *x = Metadata{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metadata) ProtoMessage() {} - -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { - return file_service_v1_state_proto_rawDescGZIP(), []int{0} -} - -func (x *Metadata) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *Metadata) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Metadata) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Metadata) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Metadata) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *Metadata) GetIcon() string { - if x != nil { - return x.Icon - } - return "" -} - -func (x *Metadata) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -// Profile represents a DID alias -type Profile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier of the alias - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The alias of the DID - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // Origin of the alias - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - // Controller of the alias - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (x *Profile) Reset() { - *x = Profile{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Profile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Profile) ProtoMessage() {} - -// Deprecated: Use Profile.ProtoReflect.Descriptor instead. -func (*Profile) Descriptor() ([]byte, []int) { - return file_service_v1_state_proto_rawDescGZIP(), []int{1} -} - -func (x *Profile) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Profile) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *Profile) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *Profile) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -var File_service_v1_state_proto protoreflect.FileDescriptor - -var file_service_v1_state_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, - 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, - 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, - 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x3a, 0x1e, 0xf2, 0x9e, - 0xd3, 0x8e, 0x03, 0x18, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x06, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x91, 0x01, 0x0a, - 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, 0x24, 0xf2, 0x9e, 0xd3, 0x8e, - 0x03, 0x1e, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x02, - 0x42, 0x96, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, - 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, -} - -var ( - file_service_v1_state_proto_rawDescOnce sync.Once - file_service_v1_state_proto_rawDescData = file_service_v1_state_proto_rawDesc -) - -func file_service_v1_state_proto_rawDescGZIP() []byte { - file_service_v1_state_proto_rawDescOnce.Do(func() { - file_service_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_state_proto_rawDescData) - }) - return file_service_v1_state_proto_rawDescData -} - -var file_service_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_service_v1_state_proto_goTypes = []interface{}{ - (*Metadata)(nil), // 0: service.v1.Metadata - (*Profile)(nil), // 1: service.v1.Profile -} -var file_service_v1_state_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_service_v1_state_proto_init() } -func file_service_v1_state_proto_init() { - if File_service_v1_state_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_service_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Profile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_service_v1_state_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_service_v1_state_proto_goTypes, - DependencyIndexes: file_service_v1_state_proto_depIdxs, - MessageInfos: file_service_v1_state_proto_msgTypes, - }.Build() - File_service_v1_state_proto = out.File - file_service_v1_state_proto_rawDesc = nil - file_service_v1_state_proto_goTypes = nil - file_service_v1_state_proto_depIdxs = nil -} diff --git a/api/service/v1/tx.pulsar.go b/api/service/v1/tx.pulsar.go deleted file mode 100644 index feb847c60..000000000 --- a/api/service/v1/tx.pulsar.go +++ /dev/null @@ -1,2199 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package servicev1 - -import ( - _ "cosmossdk.io/api/cosmos/msg/v1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_tx_proto_init() - md_MsgUpdateParams = File_service_v1_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") - fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.MsgUpdateParams.authority": - return x.Authority != "" - case "service.v1.MsgUpdateParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.MsgUpdateParams.authority": - x.Authority = "" - case "service.v1.MsgUpdateParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "service.v1.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "service.v1.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "service.v1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message service.v1.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "service.v1.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgUpdateParams", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParams) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_service_v1_tx_proto_init() - md_MsgUpdateParamsResponse = File_service_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message service.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgUpdateParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRegisterService protoreflect.MessageDescriptor - fd_MsgRegisterService_controller protoreflect.FieldDescriptor - fd_MsgRegisterService_service protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_tx_proto_init() - md_MsgRegisterService = File_service_v1_tx_proto.Messages().ByName("MsgRegisterService") - fd_MsgRegisterService_controller = md_MsgRegisterService.Fields().ByName("controller") - fd_MsgRegisterService_service = md_MsgRegisterService.Fields().ByName("service") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterService)(nil) - -type fastReflection_MsgRegisterService MsgRegisterService - -func (x *MsgRegisterService) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterService)(x) -} - -func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRegisterService_messageType fastReflection_MsgRegisterService_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterService_messageType{} - -type fastReflection_MsgRegisterService_messageType struct{} - -func (x fastReflection_MsgRegisterService_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterService)(nil) -} -func (x fastReflection_MsgRegisterService_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterService) -} -func (x fastReflection_MsgRegisterService_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterService -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterService) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterService -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterService) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterService_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterService) New() protoreflect.Message { - return new(fastReflection_MsgRegisterService) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterService) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterService)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgRegisterService_controller, value) { - return - } - } - if x.Service != nil { - value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - if !f(fd_MsgRegisterService_service, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.MsgRegisterService.controller": - return x.Controller != "" - case "service.v1.MsgRegisterService.service": - return x.Service != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.MsgRegisterService.controller": - x.Controller = "" - case "service.v1.MsgRegisterService.service": - x.Service = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.MsgRegisterService.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "service.v1.MsgRegisterService.service": - value := x.Service - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.MsgRegisterService.controller": - x.Controller = value.Interface().(string) - case "service.v1.MsgRegisterService.service": - x.Service = value.Message().Interface().(*Service) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.MsgRegisterService.service": - if x.Service == nil { - x.Service = new(Service) - } - return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) - case "service.v1.MsgRegisterService.controller": - panic(fmt.Errorf("field controller of message service.v1.MsgRegisterService is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.MsgRegisterService.controller": - return protoreflect.ValueOfString("") - case "service.v1.MsgRegisterService.service": - m := new(Service) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterService")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterService does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgRegisterService", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterService) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterService) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterService) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterService) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Service != nil { - l = options.Size(x.Service) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterService) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Service != nil { - encoded, err := options.Marshal(x.Service) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterService) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Service == nil { - x.Service = &Service{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgRegisterServiceResponse protoreflect.MessageDescriptor - fd_MsgRegisterServiceResponse_success protoreflect.FieldDescriptor - fd_MsgRegisterServiceResponse_did protoreflect.FieldDescriptor -) - -func init() { - file_service_v1_tx_proto_init() - md_MsgRegisterServiceResponse = File_service_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse") - fd_MsgRegisterServiceResponse_success = md_MsgRegisterServiceResponse.Fields().ByName("success") - fd_MsgRegisterServiceResponse_did = md_MsgRegisterServiceResponse.Fields().ByName("did") -} - -var _ protoreflect.Message = (*fastReflection_MsgRegisterServiceResponse)(nil) - -type fastReflection_MsgRegisterServiceResponse MsgRegisterServiceResponse - -func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterServiceResponse)(x) -} - -func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_service_v1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgRegisterServiceResponse_messageType fastReflection_MsgRegisterServiceResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterServiceResponse_messageType{} - -type fastReflection_MsgRegisterServiceResponse_messageType struct{} - -func (x fastReflection_MsgRegisterServiceResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterServiceResponse)(nil) -} -func (x fastReflection_MsgRegisterServiceResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterServiceResponse) -} -func (x fastReflection_MsgRegisterServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterServiceResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgRegisterServiceResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterServiceResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterServiceResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterServiceResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterServiceResponse) New() protoreflect.Message { - return new(fastReflection_MsgRegisterServiceResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterServiceResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterServiceResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgRegisterServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgRegisterServiceResponse_success, value) { - return - } - } - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_MsgRegisterServiceResponse_did, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "service.v1.MsgRegisterServiceResponse.success": - return x.Success != false - case "service.v1.MsgRegisterServiceResponse.did": - return x.Did != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "service.v1.MsgRegisterServiceResponse.success": - x.Success = false - case "service.v1.MsgRegisterServiceResponse.did": - x.Did = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "service.v1.MsgRegisterServiceResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "service.v1.MsgRegisterServiceResponse.did": - value := x.Did - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "service.v1.MsgRegisterServiceResponse.success": - x.Success = value.Bool() - case "service.v1.MsgRegisterServiceResponse.did": - x.Did = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.MsgRegisterServiceResponse.success": - panic(fmt.Errorf("field success of message service.v1.MsgRegisterServiceResponse is not mutable")) - case "service.v1.MsgRegisterServiceResponse.did": - panic(fmt.Errorf("field did of message service.v1.MsgRegisterServiceResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "service.v1.MsgRegisterServiceResponse.success": - return protoreflect.ValueOfBool(false) - case "service.v1.MsgRegisterServiceResponse.did": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: service.v1.MsgRegisterServiceResponse")) - } - panic(fmt.Errorf("message service.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in service.v1.MsgRegisterServiceResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterServiceResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterServiceResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterServiceResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterServiceResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterServiceResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0x12 - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterServiceResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: service/v1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the parameters to update. - // - // NOTE: All parameters must be supplied. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_service_v1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgUpdateParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateParams) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_service_v1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgRegisterService is the message type for the RegisterService RPC. -type MsgRegisterService struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // origin is the origin of the request in wildcard form. Requires valid TXT - // record in DNS. - Service *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` -} - -func (x *MsgRegisterService) Reset() { - *x = MsgRegisterService{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterService) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterService) ProtoMessage() {} - -// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead. -func (*MsgRegisterService) Descriptor() ([]byte, []int) { - return file_service_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgRegisterService) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *MsgRegisterService) GetService() *Service { - if x != nil { - return x.Service - } - return nil -} - -// MsgRegisterServiceResponse is the response type for the RegisterService RPC. -type MsgRegisterServiceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` -} - -func (x *MsgRegisterServiceResponse) Reset() { - *x = MsgRegisterServiceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_service_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgRegisterServiceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgRegisterServiceResponse) ProtoMessage() {} - -// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead. -func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { - return file_service_v1_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgRegisterServiceResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *MsgRegisterServiceResponse) GetDid() string { - if x != nil { - return x.Did - } - return "" -} - -var File_service_v1_tx_proto protoreflect.FileDescriptor - -var file_service_v1_tx_proto_rawDesc = []byte{ - 0x0a, 0x13, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, - 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, - 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x12, 0x30, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, - 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, - 0x2d, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x13, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f, - 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, - 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xb9, 0x01, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x50, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x23, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1e, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x26, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, - 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_service_v1_tx_proto_rawDescOnce sync.Once - file_service_v1_tx_proto_rawDescData = file_service_v1_tx_proto_rawDesc -) - -func file_service_v1_tx_proto_rawDescGZIP() []byte { - file_service_v1_tx_proto_rawDescOnce.Do(func() { - file_service_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_service_v1_tx_proto_rawDescData) - }) - return file_service_v1_tx_proto_rawDescData -} - -var file_service_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_service_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: service.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: service.v1.MsgUpdateParamsResponse - (*MsgRegisterService)(nil), // 2: service.v1.MsgRegisterService - (*MsgRegisterServiceResponse)(nil), // 3: service.v1.MsgRegisterServiceResponse - (*Params)(nil), // 4: service.v1.Params - (*Service)(nil), // 5: service.v1.Service -} -var file_service_v1_tx_proto_depIdxs = []int32{ - 4, // 0: service.v1.MsgUpdateParams.params:type_name -> service.v1.Params - 5, // 1: service.v1.MsgRegisterService.service:type_name -> service.v1.Service - 0, // 2: service.v1.Msg.UpdateParams:input_type -> service.v1.MsgUpdateParams - 2, // 3: service.v1.Msg.RegisterService:input_type -> service.v1.MsgRegisterService - 1, // 4: service.v1.Msg.UpdateParams:output_type -> service.v1.MsgUpdateParamsResponse - 3, // 5: service.v1.Msg.RegisterService:output_type -> service.v1.MsgRegisterServiceResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_service_v1_tx_proto_init() } -func file_service_v1_tx_proto_init() { - if File_service_v1_tx_proto != nil { - return - } - file_service_v1_genesis_proto_init() - if !protoimpl.UnsafeEnabled { - file_service_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterService); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_service_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterServiceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_service_v1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_service_v1_tx_proto_goTypes, - DependencyIndexes: file_service_v1_tx_proto_depIdxs, - MessageInfos: file_service_v1_tx_proto_msgTypes, - }.Build() - File_service_v1_tx_proto = out.File - file_service_v1_tx_proto_rawDesc = nil - file_service_v1_tx_proto_goTypes = nil - file_service_v1_tx_proto_depIdxs = nil -} diff --git a/api/service/v1/tx_grpc.pb.go b/api/service/v1/tx_grpc.pb.go deleted file mode 100644 index 0f5695081..000000000 --- a/api/service/v1/tx_grpc.pb.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: service/v1/tx.proto - -package servicev1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Msg_UpdateParams_FullMethodName = "/service.v1.Msg/UpdateParams" - Msg_RegisterService_FullMethodName = "/service.v1.Msg/RegisterService" -) - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Msg defines the Msg service. -type MsgClient interface { - // UpdateParams defines a governance operation for updating the parameters. - // - // Since: cosmos-sdk 0.47 - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // RegisterService initializes a Service with a given permission scope and - // URI. The domain must have a valid TXT record containing the public key. - RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgRegisterServiceResponse) - err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility. -// -// Msg defines the Msg service. -type MsgServer interface { - // UpdateParams defines a governance operation for updating the parameters. - // - // Since: cosmos-sdk 0.47 - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // RegisterService initializes a Service with a given permission scope and - // URI. The domain must have a valid TXT record containing the public key. - RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMsgServer struct{} - -func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} -func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} -func (UnimplementedMsgServer) testEmbeddedByValue() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - // If the following call pancis, it indicates UnimplementedMsgServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterService) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterService(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_RegisterService_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterService(ctx, req.(*MsgRegisterService)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "service.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - { - MethodName: "RegisterService", - Handler: _Msg_RegisterService_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "service/v1/tx.proto", -} diff --git a/api/svc/v1/state.cosmos_orm.go b/api/svc/v1/state.cosmos_orm.go index 156ecf278..894502609 100644 --- a/api/svc/v1/state.cosmos_orm.go +++ b/api/svc/v1/state.cosmos_orm.go @@ -9,19 +9,177 @@ import ( ormerrors "cosmossdk.io/orm/types/ormerrors" ) +type DomainTable interface { + Insert(ctx context.Context, domain *Domain) error + InsertReturningId(ctx context.Context, domain *Domain) (uint64, error) + LastInsertedSequence(ctx context.Context) (uint64, error) + Update(ctx context.Context, domain *Domain) error + Save(ctx context.Context, domain *Domain) error + Delete(ctx context.Context, domain *Domain) error + Has(ctx context.Context, id uint64) (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 uint64) (*Domain, error) + HasByOrigin(ctx context.Context, origin string) (found bool, err error) + // GetByOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByOrigin(ctx context.Context, origin string) (*Domain, error) + List(ctx context.Context, prefixKey DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) + ListRange(ctx context.Context, from, to DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) + DeleteBy(ctx context.Context, prefixKey DomainIndexKey) error + DeleteRange(ctx context.Context, from, to DomainIndexKey) error + + doNotImplement() +} + +type DomainIterator struct { + ormtable.Iterator +} + +func (i DomainIterator) Value() (*Domain, error) { + var domain Domain + err := i.UnmarshalMessage(&domain) + return &domain, err +} + +type DomainIndexKey interface { + id() uint32 + values() []interface{} + domainIndexKey() +} + +// primary key starting index.. +type DomainPrimaryKey = DomainIdIndexKey + +type DomainIdIndexKey struct { + vs []interface{} +} + +func (x DomainIdIndexKey) id() uint32 { return 0 } +func (x DomainIdIndexKey) values() []interface{} { return x.vs } +func (x DomainIdIndexKey) domainIndexKey() {} + +func (this DomainIdIndexKey) WithId(id uint64) DomainIdIndexKey { + this.vs = []interface{}{id} + return this +} + +type DomainOriginIndexKey struct { + vs []interface{} +} + +func (x DomainOriginIndexKey) id() uint32 { return 1 } +func (x DomainOriginIndexKey) values() []interface{} { return x.vs } +func (x DomainOriginIndexKey) domainIndexKey() {} + +func (this DomainOriginIndexKey) WithOrigin(origin string) DomainOriginIndexKey { + this.vs = []interface{}{origin} + return this +} + +type domainTable struct { + table ormtable.AutoIncrementTable +} + +func (this domainTable) Insert(ctx context.Context, domain *Domain) error { + return this.table.Insert(ctx, domain) +} + +func (this domainTable) Update(ctx context.Context, domain *Domain) error { + return this.table.Update(ctx, domain) +} + +func (this domainTable) Save(ctx context.Context, domain *Domain) error { + return this.table.Save(ctx, domain) +} + +func (this domainTable) Delete(ctx context.Context, domain *Domain) error { + return this.table.Delete(ctx, domain) +} + +func (this domainTable) InsertReturningId(ctx context.Context, domain *Domain) (uint64, error) { + return this.table.InsertReturningPKey(ctx, domain) +} + +func (this domainTable) LastInsertedSequence(ctx context.Context) (uint64, error) { + return this.table.LastInsertedSequence(ctx) +} + +func (this domainTable) Has(ctx context.Context, id uint64) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, id) +} + +func (this domainTable) Get(ctx context.Context, id uint64) (*Domain, error) { + var domain Domain + found, err := this.table.PrimaryKey().Get(ctx, &domain, id) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &domain, nil +} + +func (this domainTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + origin, + ) +} + +func (this domainTable) GetByOrigin(ctx context.Context, origin string) (*Domain, error) { + var domain Domain + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &domain, + origin, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &domain, nil +} + +func (this domainTable) List(ctx context.Context, prefixKey DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return DomainIterator{it}, err +} + +func (this domainTable) ListRange(ctx context.Context, from, to DomainIndexKey, opts ...ormlist.Option) (DomainIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return DomainIterator{it}, err +} + +func (this domainTable) DeleteBy(ctx context.Context, prefixKey DomainIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this domainTable) DeleteRange(ctx context.Context, from, to DomainIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this domainTable) doNotImplement() {} + +var _ DomainTable = domainTable{} + +func NewDomainTable(db ormtable.Schema) (DomainTable, error) { + table := db.GetTable(&Domain{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&Domain{}).ProtoReflect().Descriptor().FullName())) + } + return domainTable{table.(ormtable.AutoIncrementTable)}, nil +} + type MetadataTable interface { Insert(ctx context.Context, metadata *Metadata) error - InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error) - LastInsertedSequence(ctx context.Context) (uint64, error) Update(ctx context.Context, metadata *Metadata) error Save(ctx context.Context, metadata *Metadata) error Delete(ctx context.Context, metadata *Metadata) error - Has(ctx context.Context, id uint64) (found bool, err error) + 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 uint64) (*Metadata, error) - HasByOrigin(ctx context.Context, origin string) (found bool, err error) - // GetByOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByOrigin(ctx context.Context, origin string) (*Metadata, error) + Get(ctx context.Context, id string) (*Metadata, error) + HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) + // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Metadata, error) List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error @@ -57,26 +215,31 @@ func (x MetadataIdIndexKey) id() uint32 { return 0 } func (x MetadataIdIndexKey) values() []interface{} { return x.vs } func (x MetadataIdIndexKey) metadataIndexKey() {} -func (this MetadataIdIndexKey) WithId(id uint64) MetadataIdIndexKey { +func (this MetadataIdIndexKey) WithId(id string) MetadataIdIndexKey { this.vs = []interface{}{id} return this } -type MetadataOriginIndexKey struct { +type MetadataSubjectOriginIndexKey struct { vs []interface{} } -func (x MetadataOriginIndexKey) id() uint32 { return 1 } -func (x MetadataOriginIndexKey) values() []interface{} { return x.vs } -func (x MetadataOriginIndexKey) metadataIndexKey() {} +func (x MetadataSubjectOriginIndexKey) id() uint32 { return 1 } +func (x MetadataSubjectOriginIndexKey) values() []interface{} { return x.vs } +func (x MetadataSubjectOriginIndexKey) metadataIndexKey() {} -func (this MetadataOriginIndexKey) WithOrigin(origin string) MetadataOriginIndexKey { - this.vs = []interface{}{origin} +func (this MetadataSubjectOriginIndexKey) WithSubject(subject string) MetadataSubjectOriginIndexKey { + this.vs = []interface{}{subject} + return this +} + +func (this MetadataSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) MetadataSubjectOriginIndexKey { + this.vs = []interface{}{subject, origin} return this } type metadataTable struct { - table ormtable.AutoIncrementTable + table ormtable.Table } func (this metadataTable) Insert(ctx context.Context, metadata *Metadata) error { @@ -95,19 +258,11 @@ func (this metadataTable) Delete(ctx context.Context, metadata *Metadata) error return this.table.Delete(ctx, metadata) } -func (this metadataTable) InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error) { - return this.table.InsertReturningPKey(ctx, metadata) -} - -func (this metadataTable) LastInsertedSequence(ctx context.Context) (uint64, error) { - return this.table.LastInsertedSequence(ctx) -} - -func (this metadataTable) Has(ctx context.Context, id uint64) (found bool, err error) { +func (this metadataTable) Has(ctx context.Context, id string) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, id) } -func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error) { +func (this metadataTable) Get(ctx context.Context, id string) (*Metadata, error) { var metadata Metadata found, err := this.table.PrimaryKey().Get(ctx, &metadata, id) if err != nil { @@ -119,15 +274,17 @@ func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error) return &metadata, nil } -func (this metadataTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) { +func (this metadataTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + subject, origin, ) } -func (this metadataTable) GetByOrigin(ctx context.Context, origin string) (*Metadata, error) { +func (this metadataTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Metadata, error) { var metadata Metadata found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &metadata, + subject, origin, ) if err != nil { @@ -166,203 +323,46 @@ func NewMetadataTable(db ormtable.Schema) (MetadataTable, error) { if table == nil { return nil, ormerrors.TableNotFound.Wrap(string((&Metadata{}).ProtoReflect().Descriptor().FullName())) } - return metadataTable{table.(ormtable.AutoIncrementTable)}, nil -} - -type ProfileTable interface { - Insert(ctx context.Context, profile *Profile) error - Update(ctx context.Context, profile *Profile) error - Save(ctx context.Context, profile *Profile) error - Delete(ctx context.Context, profile *Profile) error - 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) (*Profile, error) - HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) - // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error) - List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) - ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) - DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error - DeleteRange(ctx context.Context, from, to ProfileIndexKey) error - - doNotImplement() -} - -type ProfileIterator struct { - ormtable.Iterator -} - -func (i ProfileIterator) Value() (*Profile, error) { - var profile Profile - err := i.UnmarshalMessage(&profile) - return &profile, err -} - -type ProfileIndexKey interface { - id() uint32 - values() []interface{} - profileIndexKey() -} - -// primary key starting index.. -type ProfilePrimaryKey = ProfileIdIndexKey - -type ProfileIdIndexKey struct { - vs []interface{} -} - -func (x ProfileIdIndexKey) id() uint32 { return 0 } -func (x ProfileIdIndexKey) values() []interface{} { return x.vs } -func (x ProfileIdIndexKey) profileIndexKey() {} - -func (this ProfileIdIndexKey) WithId(id string) ProfileIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type ProfileSubjectOriginIndexKey struct { - vs []interface{} -} - -func (x ProfileSubjectOriginIndexKey) id() uint32 { return 1 } -func (x ProfileSubjectOriginIndexKey) values() []interface{} { return x.vs } -func (x ProfileSubjectOriginIndexKey) profileIndexKey() {} - -func (this ProfileSubjectOriginIndexKey) WithSubject(subject string) ProfileSubjectOriginIndexKey { - this.vs = []interface{}{subject} - return this -} - -func (this ProfileSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) ProfileSubjectOriginIndexKey { - this.vs = []interface{}{subject, origin} - return this -} - -type profileTable struct { - table ormtable.Table -} - -func (this profileTable) Insert(ctx context.Context, profile *Profile) error { - return this.table.Insert(ctx, profile) -} - -func (this profileTable) Update(ctx context.Context, profile *Profile) error { - return this.table.Update(ctx, profile) -} - -func (this profileTable) Save(ctx context.Context, profile *Profile) error { - return this.table.Save(ctx, profile) -} - -func (this profileTable) Delete(ctx context.Context, profile *Profile) error { - return this.table.Delete(ctx, profile) -} - -func (this profileTable) Has(ctx context.Context, id string) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this profileTable) Get(ctx context.Context, id string) (*Profile, error) { - var profile Profile - found, err := this.table.PrimaryKey().Get(ctx, &profile, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &profile, nil -} - -func (this profileTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - subject, - origin, - ) -} - -func (this profileTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error) { - var profile Profile - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &profile, - subject, - origin, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &profile, nil -} - -func (this profileTable) List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return ProfileIterator{it}, err -} - -func (this profileTable) ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return ProfileIterator{it}, err -} - -func (this profileTable) DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this profileTable) DeleteRange(ctx context.Context, from, to ProfileIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this profileTable) doNotImplement() {} - -var _ ProfileTable = profileTable{} - -func NewProfileTable(db ormtable.Schema) (ProfileTable, error) { - table := db.GetTable(&Profile{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Profile{}).ProtoReflect().Descriptor().FullName())) - } - return profileTable{table}, nil + return metadataTable{table}, nil } type StateStore interface { + DomainTable() DomainTable MetadataTable() MetadataTable - ProfileTable() ProfileTable doNotImplement() } type stateStore struct { + domain DomainTable metadata MetadataTable - profile ProfileTable +} + +func (x stateStore) DomainTable() DomainTable { + return x.domain } func (x stateStore) MetadataTable() MetadataTable { return x.metadata } -func (x stateStore) ProfileTable() ProfileTable { - return x.profile -} - func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} func NewStateStore(db ormtable.Schema) (StateStore, error) { + domainTable, err := NewDomainTable(db) + if err != nil { + return nil, err + } + metadataTable, err := NewMetadataTable(db) if err != nil { return nil, err } - profileTable, err := NewProfileTable(db) - if err != nil { - return nil, err - } - return stateStore{ + domainTable, metadataTable, - profileTable, }, nil } diff --git a/api/svc/v1/state.pulsar.go b/api/svc/v1/state.pulsar.go index 0af9896b1..c42aa9514 100644 --- a/api/svc/v1/state.pulsar.go +++ b/api/svc/v1/state.pulsar.go @@ -13,84 +13,84 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_Metadata_7_list)(nil) +var _ protoreflect.List = (*_Domain_7_list)(nil) -type _Metadata_7_list struct { +type _Domain_7_list struct { list *[]string } -func (x *_Metadata_7_list) Len() int { +func (x *_Domain_7_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_Metadata_7_list) Get(i int) protoreflect.Value { +func (x *_Domain_7_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_Metadata_7_list) Set(i int, value protoreflect.Value) { +func (x *_Domain_7_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_Metadata_7_list) Append(value protoreflect.Value) { +func (x *_Domain_7_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_Metadata_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Metadata at list field Tags as it is not of Message kind")) +func (x *_Domain_7_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Domain at list field Tags as it is not of Message kind")) } -func (x *_Metadata_7_list) Truncate(n int) { +func (x *_Domain_7_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_Metadata_7_list) NewElement() protoreflect.Value { +func (x *_Domain_7_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_Metadata_7_list) IsValid() bool { +func (x *_Domain_7_list) IsValid() bool { return x.list != nil } var ( - md_Metadata protoreflect.MessageDescriptor - fd_Metadata_id protoreflect.FieldDescriptor - fd_Metadata_origin protoreflect.FieldDescriptor - fd_Metadata_name protoreflect.FieldDescriptor - fd_Metadata_description protoreflect.FieldDescriptor - fd_Metadata_category protoreflect.FieldDescriptor - fd_Metadata_icon protoreflect.FieldDescriptor - fd_Metadata_tags protoreflect.FieldDescriptor + md_Domain protoreflect.MessageDescriptor + fd_Domain_id protoreflect.FieldDescriptor + fd_Domain_origin protoreflect.FieldDescriptor + fd_Domain_name protoreflect.FieldDescriptor + fd_Domain_description protoreflect.FieldDescriptor + fd_Domain_category protoreflect.FieldDescriptor + fd_Domain_icon protoreflect.FieldDescriptor + fd_Domain_tags protoreflect.FieldDescriptor ) func init() { file_svc_v1_state_proto_init() - md_Metadata = File_svc_v1_state_proto.Messages().ByName("Metadata") - fd_Metadata_id = md_Metadata.Fields().ByName("id") - fd_Metadata_origin = md_Metadata.Fields().ByName("origin") - fd_Metadata_name = md_Metadata.Fields().ByName("name") - fd_Metadata_description = md_Metadata.Fields().ByName("description") - fd_Metadata_category = md_Metadata.Fields().ByName("category") - fd_Metadata_icon = md_Metadata.Fields().ByName("icon") - fd_Metadata_tags = md_Metadata.Fields().ByName("tags") + md_Domain = File_svc_v1_state_proto.Messages().ByName("Domain") + fd_Domain_id = md_Domain.Fields().ByName("id") + fd_Domain_origin = md_Domain.Fields().ByName("origin") + fd_Domain_name = md_Domain.Fields().ByName("name") + fd_Domain_description = md_Domain.Fields().ByName("description") + fd_Domain_category = md_Domain.Fields().ByName("category") + fd_Domain_icon = md_Domain.Fields().ByName("icon") + fd_Domain_tags = md_Domain.Fields().ByName("tags") } -var _ protoreflect.Message = (*fastReflection_Metadata)(nil) +var _ protoreflect.Message = (*fastReflection_Domain)(nil) -type fastReflection_Metadata Metadata +type fastReflection_Domain Domain -func (x *Metadata) ProtoReflect() protoreflect.Message { - return (*fastReflection_Metadata)(x) +func (x *Domain) ProtoReflect() protoreflect.Message { + return (*fastReflection_Domain)(x) } -func (x *Metadata) slowProtoReflect() protoreflect.Message { +func (x *Domain) slowProtoReflect() protoreflect.Message { mi := &file_svc_v1_state_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -102,43 +102,43 @@ func (x *Metadata) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Metadata_messageType fastReflection_Metadata_messageType -var _ protoreflect.MessageType = fastReflection_Metadata_messageType{} +var _fastReflection_Domain_messageType fastReflection_Domain_messageType +var _ protoreflect.MessageType = fastReflection_Domain_messageType{} -type fastReflection_Metadata_messageType struct{} +type fastReflection_Domain_messageType struct{} -func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message { - return (*fastReflection_Metadata)(nil) +func (x fastReflection_Domain_messageType) Zero() protoreflect.Message { + return (*fastReflection_Domain)(nil) } -func (x fastReflection_Metadata_messageType) New() protoreflect.Message { - return new(fastReflection_Metadata) +func (x fastReflection_Domain_messageType) New() protoreflect.Message { + return new(fastReflection_Domain) } -func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata +func (x fastReflection_Domain_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Domain } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor { - return md_Metadata +func (x *fastReflection_Domain) Descriptor() protoreflect.MessageDescriptor { + return md_Domain } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_Metadata) Type() protoreflect.MessageType { - return _fastReflection_Metadata_messageType +func (x *fastReflection_Domain) Type() protoreflect.MessageType { + return _fastReflection_Domain_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Metadata) New() protoreflect.Message { - return new(fastReflection_Metadata) +func (x *fastReflection_Domain) New() protoreflect.Message { + return new(fastReflection_Domain) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { - return (*Metadata)(x) +func (x *fastReflection_Domain) Interface() protoreflect.ProtoMessage { + return (*Domain)(x) } // Range iterates over every populated field in an undefined order, @@ -146,46 +146,46 @@ func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Domain) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != uint64(0) { value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_Metadata_id, value) { + if !f(fd_Domain_id, value) { return } } if x.Origin != "" { value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Metadata_origin, value) { + if !f(fd_Domain_origin, value) { return } } if x.Name != "" { value := protoreflect.ValueOfString(x.Name) - if !f(fd_Metadata_name, value) { + if !f(fd_Domain_name, value) { return } } if x.Description != "" { value := protoreflect.ValueOfString(x.Description) - if !f(fd_Metadata_description, value) { + if !f(fd_Domain_description, value) { return } } if x.Category != "" { value := protoreflect.ValueOfString(x.Category) - if !f(fd_Metadata_category, value) { + if !f(fd_Domain_category, value) { return } } if x.Icon != "" { value := protoreflect.ValueOfString(x.Icon) - if !f(fd_Metadata_icon, value) { + if !f(fd_Domain_icon, value) { return } } if len(x.Tags) != 0 { - value := protoreflect.ValueOfList(&_Metadata_7_list{list: &x.Tags}) - if !f(fd_Metadata_tags, value) { + value := protoreflect.ValueOfList(&_Domain_7_list{list: &x.Tags}) + if !f(fd_Domain_tags, value) { return } } @@ -202,27 +202,27 @@ func (x *fastReflection_Metadata) Range(f func(protoreflect.FieldDescriptor, pro // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_Metadata) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Domain) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "svc.v1.Metadata.id": + case "svc.v1.Domain.id": return x.Id != uint64(0) - case "svc.v1.Metadata.origin": + case "svc.v1.Domain.origin": return x.Origin != "" - case "svc.v1.Metadata.name": + case "svc.v1.Domain.name": return x.Name != "" - case "svc.v1.Metadata.description": + case "svc.v1.Domain.description": return x.Description != "" - case "svc.v1.Metadata.category": + case "svc.v1.Domain.category": return x.Category != "" - case "svc.v1.Metadata.icon": + case "svc.v1.Domain.icon": return x.Icon != "" - case "svc.v1.Metadata.tags": + case "svc.v1.Domain.tags": return len(x.Tags) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Domain")) } - panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Domain does not contain field %s", fd.FullName())) } } @@ -232,27 +232,27 @@ func (x *fastReflection_Metadata) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Domain) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "svc.v1.Metadata.id": + case "svc.v1.Domain.id": x.Id = uint64(0) - case "svc.v1.Metadata.origin": + case "svc.v1.Domain.origin": x.Origin = "" - case "svc.v1.Metadata.name": + case "svc.v1.Domain.name": x.Name = "" - case "svc.v1.Metadata.description": + case "svc.v1.Domain.description": x.Description = "" - case "svc.v1.Metadata.category": + case "svc.v1.Domain.category": x.Category = "" - case "svc.v1.Metadata.icon": + case "svc.v1.Domain.icon": x.Icon = "" - case "svc.v1.Metadata.tags": + case "svc.v1.Domain.tags": x.Tags = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Domain")) } - panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Domain does not contain field %s", fd.FullName())) } } @@ -262,37 +262,37 @@ func (x *fastReflection_Metadata) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Domain) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "svc.v1.Metadata.id": + case "svc.v1.Domain.id": value := x.Id return protoreflect.ValueOfUint64(value) - case "svc.v1.Metadata.origin": + case "svc.v1.Domain.origin": value := x.Origin return protoreflect.ValueOfString(value) - case "svc.v1.Metadata.name": + case "svc.v1.Domain.name": value := x.Name return protoreflect.ValueOfString(value) - case "svc.v1.Metadata.description": + case "svc.v1.Domain.description": value := x.Description return protoreflect.ValueOfString(value) - case "svc.v1.Metadata.category": + case "svc.v1.Domain.category": value := x.Category return protoreflect.ValueOfString(value) - case "svc.v1.Metadata.icon": + case "svc.v1.Domain.icon": value := x.Icon return protoreflect.ValueOfString(value) - case "svc.v1.Metadata.tags": + case "svc.v1.Domain.tags": if len(x.Tags) == 0 { - return protoreflect.ValueOfList(&_Metadata_7_list{}) + return protoreflect.ValueOfList(&_Domain_7_list{}) } - listValue := &_Metadata_7_list{list: &x.Tags} + listValue := &_Domain_7_list{list: &x.Tags} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Domain")) } - panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message svc.v1.Domain does not contain field %s", descriptor.FullName())) } } @@ -306,29 +306,29 @@ func (x *fastReflection_Metadata) Get(descriptor protoreflect.FieldDescriptor) p // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Domain) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "svc.v1.Metadata.id": + case "svc.v1.Domain.id": x.Id = value.Uint() - case "svc.v1.Metadata.origin": + case "svc.v1.Domain.origin": x.Origin = value.Interface().(string) - case "svc.v1.Metadata.name": + case "svc.v1.Domain.name": x.Name = value.Interface().(string) - case "svc.v1.Metadata.description": + case "svc.v1.Domain.description": x.Description = value.Interface().(string) - case "svc.v1.Metadata.category": + case "svc.v1.Domain.category": x.Category = value.Interface().(string) - case "svc.v1.Metadata.icon": + case "svc.v1.Domain.icon": x.Icon = value.Interface().(string) - case "svc.v1.Metadata.tags": + case "svc.v1.Domain.tags": lv := value.List() - clv := lv.(*_Metadata_7_list) + clv := lv.(*_Domain_7_list) x.Tags = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Domain")) } - panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Domain does not contain field %s", fd.FullName())) } } @@ -342,69 +342,69 @@ func (x *fastReflection_Metadata) Set(fd protoreflect.FieldDescriptor, value pro // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Domain) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "svc.v1.Metadata.tags": + case "svc.v1.Domain.tags": if x.Tags == nil { x.Tags = []string{} } - value := &_Metadata_7_list{list: &x.Tags} + value := &_Domain_7_list{list: &x.Tags} return protoreflect.ValueOfList(value) - case "svc.v1.Metadata.id": - panic(fmt.Errorf("field id of message svc.v1.Metadata is not mutable")) - case "svc.v1.Metadata.origin": - panic(fmt.Errorf("field origin of message svc.v1.Metadata is not mutable")) - case "svc.v1.Metadata.name": - panic(fmt.Errorf("field name of message svc.v1.Metadata is not mutable")) - case "svc.v1.Metadata.description": - panic(fmt.Errorf("field description of message svc.v1.Metadata is not mutable")) - case "svc.v1.Metadata.category": - panic(fmt.Errorf("field category of message svc.v1.Metadata is not mutable")) - case "svc.v1.Metadata.icon": - panic(fmt.Errorf("field icon of message svc.v1.Metadata is not mutable")) + case "svc.v1.Domain.id": + panic(fmt.Errorf("field id of message svc.v1.Domain is not mutable")) + case "svc.v1.Domain.origin": + panic(fmt.Errorf("field origin of message svc.v1.Domain is not mutable")) + case "svc.v1.Domain.name": + panic(fmt.Errorf("field name of message svc.v1.Domain is not mutable")) + case "svc.v1.Domain.description": + panic(fmt.Errorf("field description of message svc.v1.Domain is not mutable")) + case "svc.v1.Domain.category": + panic(fmt.Errorf("field category of message svc.v1.Domain is not mutable")) + case "svc.v1.Domain.icon": + panic(fmt.Errorf("field icon of message svc.v1.Domain is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Domain")) } - panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Domain does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Domain) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "svc.v1.Metadata.id": + case "svc.v1.Domain.id": return protoreflect.ValueOfUint64(uint64(0)) - case "svc.v1.Metadata.origin": + case "svc.v1.Domain.origin": return protoreflect.ValueOfString("") - case "svc.v1.Metadata.name": + case "svc.v1.Domain.name": return protoreflect.ValueOfString("") - case "svc.v1.Metadata.description": + case "svc.v1.Domain.description": return protoreflect.ValueOfString("") - case "svc.v1.Metadata.category": + case "svc.v1.Domain.category": return protoreflect.ValueOfString("") - case "svc.v1.Metadata.icon": + case "svc.v1.Domain.icon": return protoreflect.ValueOfString("") - case "svc.v1.Metadata.tags": + case "svc.v1.Domain.tags": list := []string{} - return protoreflect.ValueOfList(&_Metadata_7_list{list: &list}) + return protoreflect.ValueOfList(&_Domain_7_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Domain")) } - panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Domain does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Domain) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in svc.v1.Metadata", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in svc.v1.Domain", d.FullName())) } panic("unreachable") } @@ -412,7 +412,7 @@ func (x *fastReflection_Metadata) WhichOneof(d protoreflect.OneofDescriptor) pro // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Metadata) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Domain) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -423,7 +423,7 @@ func (x *fastReflection_Metadata) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Metadata) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Domain) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -435,7 +435,7 @@ func (x *fastReflection_Metadata) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Metadata) IsValid() bool { +func (x *fastReflection_Domain) IsValid() bool { return x != nil } @@ -445,9 +445,9 @@ func (x *fastReflection_Metadata) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Domain) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Metadata) + x := input.Message.Interface().(*Domain) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -498,7 +498,7 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Metadata) + x := input.Message.Interface().(*Domain) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -577,7 +577,7 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Metadata) + x := input.Message.Interface().(*Domain) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -609,10 +609,10 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Domain: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Domain: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -862,31 +862,31 @@ func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { } var ( - md_Profile protoreflect.MessageDescriptor - fd_Profile_id protoreflect.FieldDescriptor - fd_Profile_subject protoreflect.FieldDescriptor - fd_Profile_origin protoreflect.FieldDescriptor - fd_Profile_controller protoreflect.FieldDescriptor + md_Metadata protoreflect.MessageDescriptor + fd_Metadata_id protoreflect.FieldDescriptor + fd_Metadata_subject protoreflect.FieldDescriptor + fd_Metadata_origin protoreflect.FieldDescriptor + fd_Metadata_controller protoreflect.FieldDescriptor ) func init() { file_svc_v1_state_proto_init() - md_Profile = File_svc_v1_state_proto.Messages().ByName("Profile") - fd_Profile_id = md_Profile.Fields().ByName("id") - fd_Profile_subject = md_Profile.Fields().ByName("subject") - fd_Profile_origin = md_Profile.Fields().ByName("origin") - fd_Profile_controller = md_Profile.Fields().ByName("controller") + md_Metadata = File_svc_v1_state_proto.Messages().ByName("Metadata") + fd_Metadata_id = md_Metadata.Fields().ByName("id") + fd_Metadata_subject = md_Metadata.Fields().ByName("subject") + fd_Metadata_origin = md_Metadata.Fields().ByName("origin") + fd_Metadata_controller = md_Metadata.Fields().ByName("controller") } -var _ protoreflect.Message = (*fastReflection_Profile)(nil) +var _ protoreflect.Message = (*fastReflection_Metadata)(nil) -type fastReflection_Profile Profile +type fastReflection_Metadata Metadata -func (x *Profile) ProtoReflect() protoreflect.Message { - return (*fastReflection_Profile)(x) +func (x *Metadata) ProtoReflect() protoreflect.Message { + return (*fastReflection_Metadata)(x) } -func (x *Profile) slowProtoReflect() protoreflect.Message { +func (x *Metadata) slowProtoReflect() protoreflect.Message { mi := &file_svc_v1_state_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -898,43 +898,43 @@ func (x *Profile) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Profile_messageType fastReflection_Profile_messageType -var _ protoreflect.MessageType = fastReflection_Profile_messageType{} +var _fastReflection_Metadata_messageType fastReflection_Metadata_messageType +var _ protoreflect.MessageType = fastReflection_Metadata_messageType{} -type fastReflection_Profile_messageType struct{} +type fastReflection_Metadata_messageType struct{} -func (x fastReflection_Profile_messageType) Zero() protoreflect.Message { - return (*fastReflection_Profile)(nil) +func (x fastReflection_Metadata_messageType) Zero() protoreflect.Message { + return (*fastReflection_Metadata)(nil) } -func (x fastReflection_Profile_messageType) New() protoreflect.Message { - return new(fastReflection_Profile) +func (x fastReflection_Metadata_messageType) New() protoreflect.Message { + return new(fastReflection_Metadata) } -func (x fastReflection_Profile_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Profile +func (x fastReflection_Metadata_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Metadata } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Profile) Descriptor() protoreflect.MessageDescriptor { - return md_Profile +func (x *fastReflection_Metadata) Descriptor() protoreflect.MessageDescriptor { + return md_Metadata } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_Profile) Type() protoreflect.MessageType { - return _fastReflection_Profile_messageType +func (x *fastReflection_Metadata) Type() protoreflect.MessageType { + return _fastReflection_Metadata_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Profile) New() protoreflect.Message { - return new(fastReflection_Profile) +func (x *fastReflection_Metadata) New() protoreflect.Message { + return new(fastReflection_Metadata) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Profile) Interface() protoreflect.ProtoMessage { - return (*Profile)(x) +func (x *fastReflection_Metadata) Interface() protoreflect.ProtoMessage { + return (*Metadata)(x) } // Range iterates over every populated field in an undefined order, @@ -942,28 +942,28 @@ func (x *fastReflection_Profile) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Profile) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_Metadata) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_Profile_id, value) { + if !f(fd_Metadata_id, value) { return } } if x.Subject != "" { value := protoreflect.ValueOfString(x.Subject) - if !f(fd_Profile_subject, value) { + if !f(fd_Metadata_subject, value) { return } } if x.Origin != "" { value := protoreflect.ValueOfString(x.Origin) - if !f(fd_Profile_origin, value) { + if !f(fd_Metadata_origin, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_Profile_controller, value) { + if !f(fd_Metadata_controller, value) { return } } @@ -980,21 +980,21 @@ func (x *fastReflection_Profile) Range(f func(protoreflect.FieldDescriptor, prot // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_Profile) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Metadata) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "svc.v1.Profile.id": + case "svc.v1.Metadata.id": return x.Id != "" - case "svc.v1.Profile.subject": + case "svc.v1.Metadata.subject": return x.Subject != "" - case "svc.v1.Profile.origin": + case "svc.v1.Metadata.origin": return x.Origin != "" - case "svc.v1.Profile.controller": + case "svc.v1.Metadata.controller": return x.Controller != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Profile")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) } - panic(fmt.Errorf("message svc.v1.Profile does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) } } @@ -1004,21 +1004,21 @@ func (x *fastReflection_Profile) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Metadata) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "svc.v1.Profile.id": + case "svc.v1.Metadata.id": x.Id = "" - case "svc.v1.Profile.subject": + case "svc.v1.Metadata.subject": x.Subject = "" - case "svc.v1.Profile.origin": + case "svc.v1.Metadata.origin": x.Origin = "" - case "svc.v1.Profile.controller": + case "svc.v1.Metadata.controller": x.Controller = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Profile")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) } - panic(fmt.Errorf("message svc.v1.Profile does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) } } @@ -1028,25 +1028,25 @@ func (x *fastReflection_Profile) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Profile) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Metadata) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "svc.v1.Profile.id": + case "svc.v1.Metadata.id": value := x.Id return protoreflect.ValueOfString(value) - case "svc.v1.Profile.subject": + case "svc.v1.Metadata.subject": value := x.Subject return protoreflect.ValueOfString(value) - case "svc.v1.Profile.origin": + case "svc.v1.Metadata.origin": value := x.Origin return protoreflect.ValueOfString(value) - case "svc.v1.Profile.controller": + case "svc.v1.Metadata.controller": value := x.Controller return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Profile")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) } - panic(fmt.Errorf("message svc.v1.Profile does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", descriptor.FullName())) } } @@ -1060,21 +1060,21 @@ func (x *fastReflection_Profile) Get(descriptor protoreflect.FieldDescriptor) pr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Metadata) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "svc.v1.Profile.id": + case "svc.v1.Metadata.id": x.Id = value.Interface().(string) - case "svc.v1.Profile.subject": + case "svc.v1.Metadata.subject": x.Subject = value.Interface().(string) - case "svc.v1.Profile.origin": + case "svc.v1.Metadata.origin": x.Origin = value.Interface().(string) - case "svc.v1.Profile.controller": + case "svc.v1.Metadata.controller": x.Controller = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Profile")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) } - panic(fmt.Errorf("message svc.v1.Profile does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) } } @@ -1088,52 +1088,52 @@ func (x *fastReflection_Profile) Set(fd protoreflect.FieldDescriptor, value prot // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Metadata) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "svc.v1.Profile.id": - panic(fmt.Errorf("field id of message svc.v1.Profile is not mutable")) - case "svc.v1.Profile.subject": - panic(fmt.Errorf("field subject of message svc.v1.Profile is not mutable")) - case "svc.v1.Profile.origin": - panic(fmt.Errorf("field origin of message svc.v1.Profile is not mutable")) - case "svc.v1.Profile.controller": - panic(fmt.Errorf("field controller of message svc.v1.Profile is not mutable")) + case "svc.v1.Metadata.id": + panic(fmt.Errorf("field id of message svc.v1.Metadata is not mutable")) + case "svc.v1.Metadata.subject": + panic(fmt.Errorf("field subject of message svc.v1.Metadata is not mutable")) + case "svc.v1.Metadata.origin": + panic(fmt.Errorf("field origin of message svc.v1.Metadata is not mutable")) + case "svc.v1.Metadata.controller": + panic(fmt.Errorf("field controller of message svc.v1.Metadata is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Profile")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) } - panic(fmt.Errorf("message svc.v1.Profile does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Profile) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Metadata) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "svc.v1.Profile.id": + case "svc.v1.Metadata.id": return protoreflect.ValueOfString("") - case "svc.v1.Profile.subject": + case "svc.v1.Metadata.subject": return protoreflect.ValueOfString("") - case "svc.v1.Profile.origin": + case "svc.v1.Metadata.origin": return protoreflect.ValueOfString("") - case "svc.v1.Profile.controller": + case "svc.v1.Metadata.controller": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Profile")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.Metadata")) } - panic(fmt.Errorf("message svc.v1.Profile does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message svc.v1.Metadata does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Profile) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Metadata) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in svc.v1.Profile", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in svc.v1.Metadata", d.FullName())) } panic("unreachable") } @@ -1141,7 +1141,7 @@ func (x *fastReflection_Profile) WhichOneof(d protoreflect.OneofDescriptor) prot // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Profile) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Metadata) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1152,7 +1152,7 @@ func (x *fastReflection_Profile) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Profile) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Metadata) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1164,7 +1164,7 @@ func (x *fastReflection_Profile) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Profile) IsValid() bool { +func (x *fastReflection_Metadata) IsValid() bool { return x != nil } @@ -1174,9 +1174,9 @@ func (x *fastReflection_Profile) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Metadata) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Profile) + x := input.Message.Interface().(*Metadata) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1214,7 +1214,7 @@ func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Profile) + x := input.Message.Interface().(*Metadata) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1272,7 +1272,7 @@ func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Profile) + x := input.Message.Interface().(*Metadata) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1304,10 +1304,10 @@ func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1486,7 +1486,7 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Metadata struct { +type Domain struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1500,8 +1500,8 @@ type Metadata struct { Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` } -func (x *Metadata) Reset() { - *x = Metadata{} +func (x *Domain) Reset() { + *x = Domain{} if protoimpl.UnsafeEnabled { mi := &file_svc_v1_state_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1509,68 +1509,68 @@ func (x *Metadata) Reset() { } } -func (x *Metadata) String() string { +func (x *Domain) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Metadata) ProtoMessage() {} +func (*Domain) ProtoMessage() {} -// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. -func (*Metadata) Descriptor() ([]byte, []int) { +// Deprecated: Use Domain.ProtoReflect.Descriptor instead. +func (*Domain) Descriptor() ([]byte, []int) { return file_svc_v1_state_proto_rawDescGZIP(), []int{0} } -func (x *Metadata) GetId() uint64 { +func (x *Domain) GetId() uint64 { if x != nil { return x.Id } return 0 } -func (x *Metadata) GetOrigin() string { +func (x *Domain) GetOrigin() string { if x != nil { return x.Origin } return "" } -func (x *Metadata) GetName() string { +func (x *Domain) GetName() string { if x != nil { return x.Name } return "" } -func (x *Metadata) GetDescription() string { +func (x *Domain) GetDescription() string { if x != nil { return x.Description } return "" } -func (x *Metadata) GetCategory() string { +func (x *Domain) GetCategory() string { if x != nil { return x.Category } return "" } -func (x *Metadata) GetIcon() string { +func (x *Domain) GetIcon() string { if x != nil { return x.Icon } return "" } -func (x *Metadata) GetTags() []string { +func (x *Domain) GetTags() []string { if x != nil { return x.Tags } return nil } -// Profile represents a DID alias -type Profile struct { +// Metadata represents a DID alias +type Metadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1585,8 +1585,8 @@ type Profile struct { Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` } -func (x *Profile) Reset() { - *x = Profile{} +func (x *Metadata) Reset() { + *x = Metadata{} if protoimpl.UnsafeEnabled { mi := &file_svc_v1_state_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1594,39 +1594,39 @@ func (x *Profile) Reset() { } } -func (x *Profile) String() string { +func (x *Metadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Profile) ProtoMessage() {} +func (*Metadata) ProtoMessage() {} -// Deprecated: Use Profile.ProtoReflect.Descriptor instead. -func (*Profile) Descriptor() ([]byte, []int) { +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { return file_svc_v1_state_proto_rawDescGZIP(), []int{1} } -func (x *Profile) GetId() string { +func (x *Metadata) GetId() string { if x != nil { return x.Id } return "" } -func (x *Profile) GetSubject() string { +func (x *Metadata) GetSubject() string { if x != nil { return x.Subject } return "" } -func (x *Profile) GetOrigin() string { +func (x *Metadata) GetOrigin() string { if x != nil { return x.Origin } return "" } -func (x *Profile) GetController() string { +func (x *Metadata) GetController() string { if x != nil { return x.Controller } @@ -1639,37 +1639,37 @@ var file_svc_v1_state_proto_rawDesc = []byte{ 0x0a, 0x12, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcc, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, - 0x69, 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x3a, 0x1e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x18, 0x0a, 0x06, 0x0a, 0x02, - 0x69, 0x64, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, - 0x18, 0x01, 0x18, 0x01, 0x22, 0x91, 0x01, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x3a, 0x24, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x1e, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x02, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x76, 0x63, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x53, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x53, - 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x53, 0x76, 0x63, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x01, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, + 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, + 0x67, 0x73, 0x3a, 0x1e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x18, 0x0a, 0x06, 0x0a, 0x02, 0x69, 0x64, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, 0x01, + 0x18, 0x01, 0x22, 0x92, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x3a, 0x24, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x1e, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, + 0x14, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x10, 0x01, 0x18, 0x01, 0x18, 0x02, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x76, 0x63, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, + 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x53, 0x76, + 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x53, 0x76, 0x63, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1686,8 +1686,8 @@ func file_svc_v1_state_proto_rawDescGZIP() []byte { var file_svc_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_svc_v1_state_proto_goTypes = []interface{}{ - (*Metadata)(nil), // 0: svc.v1.Metadata - (*Profile)(nil), // 1: svc.v1.Profile + (*Domain)(nil), // 0: svc.v1.Domain + (*Metadata)(nil), // 1: svc.v1.Metadata } var file_svc_v1_state_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -1704,7 +1704,7 @@ func file_svc_v1_state_proto_init() { } if !protoimpl.UnsafeEnabled { file_svc_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { + switch v := v.(*Domain); i { case 0: return &v.state case 1: @@ -1716,7 +1716,7 @@ func file_svc_v1_state_proto_init() { } } file_svc_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Profile); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: diff --git a/api/vault/module/v1/module.pulsar.go b/api/vault/module/v1/module.pulsar.go deleted file mode 100644 index 1789eae62..000000000 --- a/api/vault/module/v1/module.pulsar.go +++ /dev/null @@ -1,499 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package modulev1 - -import ( - _ "cosmossdk.io/api/cosmos/app/v1alpha1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_Module protoreflect.MessageDescriptor -) - -func init() { - file_vault_module_v1_module_proto_init() - md_Module = File_vault_module_v1_module_proto.Messages().ByName("Module") -} - -var _ protoreflect.Message = (*fastReflection_Module)(nil) - -type fastReflection_Module Module - -func (x *Module) ProtoReflect() protoreflect.Message { - return (*fastReflection_Module)(x) -} - -func (x *Module) slowProtoReflect() protoreflect.Message { - mi := &file_vault_module_v1_module_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Module_messageType fastReflection_Module_messageType -var _ protoreflect.MessageType = fastReflection_Module_messageType{} - -type fastReflection_Module_messageType struct{} - -func (x fastReflection_Module_messageType) Zero() protoreflect.Message { - return (*fastReflection_Module)(nil) -} -func (x fastReflection_Module_messageType) New() protoreflect.Message { - return new(fastReflection_Module) -} -func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { - return md_Module -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Module) Type() protoreflect.MessageType { - return _fastReflection_Module_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Module) New() protoreflect.Message { - return new(fastReflection_Module) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { - return (*Module)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) - } - panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) - } - panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) - } - panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) - } - panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) - } - panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.module.v1.Module")) - } - panic(fmt.Errorf("message vault.module.v1.Module does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.module.v1.Module", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Module) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Module) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Module) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Module) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: vault/module/v1/module.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Module is the app config object of the module. -// Learn more: https://docs.cosmos.network/main/building-modules/depinject -type Module struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *Module) Reset() { - *x = Module{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_module_v1_module_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Module) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Module) ProtoMessage() {} - -// Deprecated: Use Module.ProtoReflect.Descriptor instead. -func (*Module) Descriptor() ([]byte, []int) { - return file_vault_module_v1_module_proto_rawDescGZIP(), []int{0} -} - -var File_vault_module_v1_module_proto protoreflect.FileDescriptor - -var file_vault_module_v1_module_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, - 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, - 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xb5, 0x01, 0x0a, 0x13, - 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x4d, 0x58, 0xaa, 0x02, 0x0f, - 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x0f, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x1b, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x11, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_vault_module_v1_module_proto_rawDescOnce sync.Once - file_vault_module_v1_module_proto_rawDescData = file_vault_module_v1_module_proto_rawDesc -) - -func file_vault_module_v1_module_proto_rawDescGZIP() []byte { - file_vault_module_v1_module_proto_rawDescOnce.Do(func() { - file_vault_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_module_v1_module_proto_rawDescData) - }) - return file_vault_module_v1_module_proto_rawDescData -} - -var file_vault_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_vault_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: vault.module.v1.Module -} -var file_vault_module_v1_module_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_vault_module_v1_module_proto_init() } -func file_vault_module_v1_module_proto_init() { - if File_vault_module_v1_module_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_vault_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Module); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_vault_module_v1_module_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_vault_module_v1_module_proto_goTypes, - DependencyIndexes: file_vault_module_v1_module_proto_depIdxs, - MessageInfos: file_vault_module_v1_module_proto_msgTypes, - }.Build() - File_vault_module_v1_module_proto = out.File - file_vault_module_v1_module_proto_rawDesc = nil - file_vault_module_v1_module_proto_goTypes = nil - file_vault_module_v1_module_proto_depIdxs = nil -} diff --git a/api/vault/v1/genesis.pulsar.go b/api/vault/v1/genesis.pulsar.go deleted file mode 100644 index 527134ec6..000000000 --- a/api/vault/v1/genesis.pulsar.go +++ /dev/null @@ -1,2323 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package vaultv1 - -import ( - _ "cosmossdk.io/api/amino" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_genesis_proto_init() - md_GenesisState = File_vault_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) - -type fastReflection_GenesisState GenesisState - -func (x *GenesisState) ProtoReflect() protoreflect.Message { - return (*fastReflection_GenesisState)(x) -} - -func (x *GenesisState) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_genesis_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_GenesisState_messageType fastReflection_GenesisState_messageType -var _ protoreflect.MessageType = fastReflection_GenesisState_messageType{} - -type fastReflection_GenesisState_messageType struct{} - -func (x fastReflection_GenesisState_messageType) Zero() protoreflect.Message { - return (*fastReflection_GenesisState)(nil) -} -func (x fastReflection_GenesisState_messageType) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} -func (x fastReflection_GenesisState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_GenesisState) Descriptor() protoreflect.MessageDescriptor { - return md_GenesisState -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_GenesisState) Type() protoreflect.MessageType { - return _fastReflection_GenesisState_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_GenesisState) New() protoreflect.Message { - return new(fastReflection_GenesisState) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { - return (*GenesisState)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.GenesisState.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.GenesisState")) - } - panic(fmt.Errorf("message vault.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.GenesisState.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.GenesisState")) - } - panic(fmt.Errorf("message vault.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.GenesisState")) - } - panic(fmt.Errorf("message vault.v1.GenesisState does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.GenesisState")) - } - panic(fmt.Errorf("message vault.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.GenesisState")) - } - panic(fmt.Errorf("message vault.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.GenesisState")) - } - panic(fmt.Errorf("message vault.v1.GenesisState does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_GenesisState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.GenesisState", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_GenesisState) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_GenesisState) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_GenesisState) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*GenesisState) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_ipfs_active protoreflect.FieldDescriptor - fd_Params_local_registration_enabled protoreflect.FieldDescriptor - fd_Params_schema protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_genesis_proto_init() - md_Params = File_vault_v1_genesis_proto.Messages().ByName("Params") - fd_Params_ipfs_active = md_Params.Fields().ByName("ipfs_active") - fd_Params_local_registration_enabled = md_Params.Fields().ByName("local_registration_enabled") - fd_Params_schema = md_Params.Fields().ByName("schema") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_genesis_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.IpfsActive != false { - value := protoreflect.ValueOfBool(x.IpfsActive) - if !f(fd_Params_ipfs_active, value) { - return - } - } - if x.LocalRegistrationEnabled != false { - value := protoreflect.ValueOfBool(x.LocalRegistrationEnabled) - if !f(fd_Params_local_registration_enabled, value) { - return - } - } - if x.Schema != nil { - value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - if !f(fd_Params_schema, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.Params.ipfs_active": - return x.IpfsActive != false - case "vault.v1.Params.local_registration_enabled": - return x.LocalRegistrationEnabled != false - case "vault.v1.Params.schema": - return x.Schema != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Params")) - } - panic(fmt.Errorf("message vault.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.Params.ipfs_active": - x.IpfsActive = false - case "vault.v1.Params.local_registration_enabled": - x.LocalRegistrationEnabled = false - case "vault.v1.Params.schema": - x.Schema = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Params")) - } - panic(fmt.Errorf("message vault.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.Params.ipfs_active": - value := x.IpfsActive - return protoreflect.ValueOfBool(value) - case "vault.v1.Params.local_registration_enabled": - value := x.LocalRegistrationEnabled - return protoreflect.ValueOfBool(value) - case "vault.v1.Params.schema": - value := x.Schema - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Params")) - } - panic(fmt.Errorf("message vault.v1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.Params.ipfs_active": - x.IpfsActive = value.Bool() - case "vault.v1.Params.local_registration_enabled": - x.LocalRegistrationEnabled = value.Bool() - case "vault.v1.Params.schema": - x.Schema = value.Message().Interface().(*Schema) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Params")) - } - panic(fmt.Errorf("message vault.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.Params.schema": - if x.Schema == nil { - x.Schema = new(Schema) - } - return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - case "vault.v1.Params.ipfs_active": - panic(fmt.Errorf("field ipfs_active of message vault.v1.Params is not mutable")) - case "vault.v1.Params.local_registration_enabled": - panic(fmt.Errorf("field local_registration_enabled of message vault.v1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Params")) - } - panic(fmt.Errorf("message vault.v1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.Params.ipfs_active": - return protoreflect.ValueOfBool(false) - case "vault.v1.Params.local_registration_enabled": - return protoreflect.ValueOfBool(false) - case "vault.v1.Params.schema": - m := new(Schema) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Params")) - } - panic(fmt.Errorf("message vault.v1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.IpfsActive { - n += 2 - } - if x.LocalRegistrationEnabled { - n += 2 - } - if x.Schema != nil { - l = options.Size(x.Schema) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Schema != nil { - encoded, err := options.Marshal(x.Schema) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if x.LocalRegistrationEnabled { - i-- - if x.LocalRegistrationEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if x.IpfsActive { - i-- - if x.IpfsActive { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IpfsActive", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IpfsActive = bool(v != 0) - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LocalRegistrationEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.LocalRegistrationEnabled = bool(v != 0) - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Schema == nil { - x.Schema = &Schema{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Schema); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_Schema protoreflect.MessageDescriptor - fd_Schema_version protoreflect.FieldDescriptor - fd_Schema_account protoreflect.FieldDescriptor - fd_Schema_asset protoreflect.FieldDescriptor - fd_Schema_chain protoreflect.FieldDescriptor - fd_Schema_credential protoreflect.FieldDescriptor - fd_Schema_did protoreflect.FieldDescriptor - fd_Schema_jwk protoreflect.FieldDescriptor - fd_Schema_grant protoreflect.FieldDescriptor - fd_Schema_keyshare protoreflect.FieldDescriptor - fd_Schema_profile protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_genesis_proto_init() - md_Schema = File_vault_v1_genesis_proto.Messages().ByName("Schema") - fd_Schema_version = md_Schema.Fields().ByName("version") - fd_Schema_account = md_Schema.Fields().ByName("account") - fd_Schema_asset = md_Schema.Fields().ByName("asset") - fd_Schema_chain = md_Schema.Fields().ByName("chain") - fd_Schema_credential = md_Schema.Fields().ByName("credential") - fd_Schema_did = md_Schema.Fields().ByName("did") - fd_Schema_jwk = md_Schema.Fields().ByName("jwk") - fd_Schema_grant = md_Schema.Fields().ByName("grant") - fd_Schema_keyshare = md_Schema.Fields().ByName("keyshare") - fd_Schema_profile = md_Schema.Fields().ByName("profile") -} - -var _ protoreflect.Message = (*fastReflection_Schema)(nil) - -type fastReflection_Schema Schema - -func (x *Schema) ProtoReflect() protoreflect.Message { - return (*fastReflection_Schema)(x) -} - -func (x *Schema) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_genesis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Schema_messageType fastReflection_Schema_messageType -var _ protoreflect.MessageType = fastReflection_Schema_messageType{} - -type fastReflection_Schema_messageType struct{} - -func (x fastReflection_Schema_messageType) Zero() protoreflect.Message { - return (*fastReflection_Schema)(nil) -} -func (x fastReflection_Schema_messageType) New() protoreflect.Message { - return new(fastReflection_Schema) -} -func (x fastReflection_Schema_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Schema -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Schema) Descriptor() protoreflect.MessageDescriptor { - return md_Schema -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Schema) Type() protoreflect.MessageType { - return _fastReflection_Schema_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Schema) New() protoreflect.Message { - return new(fastReflection_Schema) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Schema) Interface() protoreflect.ProtoMessage { - return (*Schema)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Schema) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != int32(0) { - value := protoreflect.ValueOfInt32(x.Version) - if !f(fd_Schema_version, value) { - return - } - } - if x.Account != "" { - value := protoreflect.ValueOfString(x.Account) - if !f(fd_Schema_account, value) { - return - } - } - if x.Asset != "" { - value := protoreflect.ValueOfString(x.Asset) - if !f(fd_Schema_asset, value) { - return - } - } - if x.Chain != "" { - value := protoreflect.ValueOfString(x.Chain) - if !f(fd_Schema_chain, value) { - return - } - } - if x.Credential != "" { - value := protoreflect.ValueOfString(x.Credential) - if !f(fd_Schema_credential, value) { - return - } - } - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_Schema_did, value) { - return - } - } - if x.Jwk != "" { - value := protoreflect.ValueOfString(x.Jwk) - if !f(fd_Schema_jwk, value) { - return - } - } - if x.Grant != "" { - value := protoreflect.ValueOfString(x.Grant) - if !f(fd_Schema_grant, value) { - return - } - } - if x.Keyshare != "" { - value := protoreflect.ValueOfString(x.Keyshare) - if !f(fd_Schema_keyshare, value) { - return - } - } - if x.Profile != "" { - value := protoreflect.ValueOfString(x.Profile) - if !f(fd_Schema_profile, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Schema) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.Schema.version": - return x.Version != int32(0) - case "vault.v1.Schema.account": - return x.Account != "" - case "vault.v1.Schema.asset": - return x.Asset != "" - case "vault.v1.Schema.chain": - return x.Chain != "" - case "vault.v1.Schema.credential": - return x.Credential != "" - case "vault.v1.Schema.did": - return x.Did != "" - case "vault.v1.Schema.jwk": - return x.Jwk != "" - case "vault.v1.Schema.grant": - return x.Grant != "" - case "vault.v1.Schema.keyshare": - return x.Keyshare != "" - case "vault.v1.Schema.profile": - return x.Profile != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Schema")) - } - panic(fmt.Errorf("message vault.v1.Schema does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Schema) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.Schema.version": - x.Version = int32(0) - case "vault.v1.Schema.account": - x.Account = "" - case "vault.v1.Schema.asset": - x.Asset = "" - case "vault.v1.Schema.chain": - x.Chain = "" - case "vault.v1.Schema.credential": - x.Credential = "" - case "vault.v1.Schema.did": - x.Did = "" - case "vault.v1.Schema.jwk": - x.Jwk = "" - case "vault.v1.Schema.grant": - x.Grant = "" - case "vault.v1.Schema.keyshare": - x.Keyshare = "" - case "vault.v1.Schema.profile": - x.Profile = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Schema")) - } - panic(fmt.Errorf("message vault.v1.Schema does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Schema) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.Schema.version": - value := x.Version - return protoreflect.ValueOfInt32(value) - case "vault.v1.Schema.account": - value := x.Account - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.asset": - value := x.Asset - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.chain": - value := x.Chain - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.credential": - value := x.Credential - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.did": - value := x.Did - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.jwk": - value := x.Jwk - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.grant": - value := x.Grant - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.keyshare": - value := x.Keyshare - return protoreflect.ValueOfString(value) - case "vault.v1.Schema.profile": - value := x.Profile - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Schema")) - } - panic(fmt.Errorf("message vault.v1.Schema does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Schema) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.Schema.version": - x.Version = int32(value.Int()) - case "vault.v1.Schema.account": - x.Account = value.Interface().(string) - case "vault.v1.Schema.asset": - x.Asset = value.Interface().(string) - case "vault.v1.Schema.chain": - x.Chain = value.Interface().(string) - case "vault.v1.Schema.credential": - x.Credential = value.Interface().(string) - case "vault.v1.Schema.did": - x.Did = value.Interface().(string) - case "vault.v1.Schema.jwk": - x.Jwk = value.Interface().(string) - case "vault.v1.Schema.grant": - x.Grant = value.Interface().(string) - case "vault.v1.Schema.keyshare": - x.Keyshare = value.Interface().(string) - case "vault.v1.Schema.profile": - x.Profile = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Schema")) - } - panic(fmt.Errorf("message vault.v1.Schema does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Schema) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.Schema.version": - panic(fmt.Errorf("field version of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.account": - panic(fmt.Errorf("field account of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.asset": - panic(fmt.Errorf("field asset of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.chain": - panic(fmt.Errorf("field chain of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.credential": - panic(fmt.Errorf("field credential of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.did": - panic(fmt.Errorf("field did of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.jwk": - panic(fmt.Errorf("field jwk of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.grant": - panic(fmt.Errorf("field grant of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.keyshare": - panic(fmt.Errorf("field keyshare of message vault.v1.Schema is not mutable")) - case "vault.v1.Schema.profile": - panic(fmt.Errorf("field profile of message vault.v1.Schema is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Schema")) - } - panic(fmt.Errorf("message vault.v1.Schema does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Schema) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.Schema.version": - return protoreflect.ValueOfInt32(int32(0)) - case "vault.v1.Schema.account": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.asset": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.chain": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.credential": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.did": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.jwk": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.grant": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.keyshare": - return protoreflect.ValueOfString("") - case "vault.v1.Schema.profile": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.Schema")) - } - panic(fmt.Errorf("message vault.v1.Schema does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Schema) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.Schema", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Schema) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Schema) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Schema) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Schema) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Schema) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Version != 0 { - n += 1 + runtime.Sov(uint64(x.Version)) - } - l = len(x.Account) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Asset) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Chain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Credential) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Jwk) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Grant) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Keyshare) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Profile) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Schema) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Profile) > 0 { - i -= len(x.Profile) - copy(dAtA[i:], x.Profile) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Profile))) - i-- - dAtA[i] = 0x52 - } - if len(x.Keyshare) > 0 { - i -= len(x.Keyshare) - copy(dAtA[i:], x.Keyshare) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshare))) - i-- - dAtA[i] = 0x4a - } - if len(x.Grant) > 0 { - i -= len(x.Grant) - copy(dAtA[i:], x.Grant) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Grant))) - i-- - dAtA[i] = 0x42 - } - if len(x.Jwk) > 0 { - i -= len(x.Jwk) - copy(dAtA[i:], x.Jwk) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Jwk))) - i-- - dAtA[i] = 0x3a - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0x32 - } - if len(x.Credential) > 0 { - i -= len(x.Credential) - copy(dAtA[i:], x.Credential) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Credential))) - i-- - dAtA[i] = 0x2a - } - if len(x.Chain) > 0 { - i -= len(x.Chain) - copy(dAtA[i:], x.Chain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Chain))) - i-- - dAtA[i] = 0x22 - } - if len(x.Asset) > 0 { - i -= len(x.Asset) - copy(dAtA[i:], x.Asset) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Asset))) - i-- - dAtA[i] = 0x1a - } - if len(x.Account) > 0 { - i -= len(x.Account) - copy(dAtA[i:], x.Account) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Account))) - i-- - dAtA[i] = 0x12 - } - if x.Version != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Version)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Schema) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Schema: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Schema: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - x.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Version |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Account = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Asset = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Chain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Chain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Credential = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jwk", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Jwk = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Grant", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Grant = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keyshare", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Keyshare = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Profile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: vault/v1/genesis.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// GenesisState defines the module genesis state -type GenesisState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Params defines all the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *GenesisState) Reset() { - *x = GenesisState{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_genesis_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GenesisState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GenesisState) ProtoMessage() {} - -// Deprecated: Use GenesisState.ProtoReflect.Descriptor instead. -func (*GenesisState) Descriptor() ([]byte, []int) { - return file_vault_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// Params defines the set of module parameters. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - IpfsActive bool `protobuf:"varint,1,opt,name=ipfs_active,json=ipfsActive,proto3" json:"ipfs_active,omitempty"` - LocalRegistrationEnabled bool `protobuf:"varint,2,opt,name=local_registration_enabled,json=localRegistrationEnabled,proto3" json:"local_registration_enabled,omitempty"` - Schema *Schema `protobuf:"bytes,4,opt,name=schema,proto3" json:"schema,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_vault_v1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *Params) GetIpfsActive() bool { - if x != nil { - return x.IpfsActive - } - return false -} - -func (x *Params) GetLocalRegistrationEnabled() bool { - if x != nil { - return x.LocalRegistrationEnabled - } - return false -} - -func (x *Params) GetSchema() *Schema { - if x != nil { - return x.Schema - } - return nil -} - -type Schema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` - Asset string `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"` - Chain string `protobuf:"bytes,4,opt,name=chain,proto3" json:"chain,omitempty"` - Credential string `protobuf:"bytes,5,opt,name=credential,proto3" json:"credential,omitempty"` - Did string `protobuf:"bytes,6,opt,name=did,proto3" json:"did,omitempty"` - Jwk string `protobuf:"bytes,7,opt,name=jwk,proto3" json:"jwk,omitempty"` - Grant string `protobuf:"bytes,8,opt,name=grant,proto3" json:"grant,omitempty"` - Keyshare string `protobuf:"bytes,9,opt,name=keyshare,proto3" json:"keyshare,omitempty"` - Profile string `protobuf:"bytes,10,opt,name=profile,proto3" json:"profile,omitempty"` -} - -func (x *Schema) Reset() { - *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_genesis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Schema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Schema) ProtoMessage() {} - -// Deprecated: Use Schema.ProtoReflect.Descriptor instead. -func (*Schema) Descriptor() ([]byte, []int) { - return file_vault_v1_genesis_proto_rawDescGZIP(), []int{2} -} - -func (x *Schema) GetVersion() int32 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *Schema) GetAccount() string { - if x != nil { - return x.Account - } - return "" -} - -func (x *Schema) GetAsset() string { - if x != nil { - return x.Asset - } - return "" -} - -func (x *Schema) GetChain() string { - if x != nil { - return x.Chain - } - return "" -} - -func (x *Schema) GetCredential() string { - if x != nil { - return x.Credential - } - return "" -} - -func (x *Schema) GetDid() string { - if x != nil { - return x.Did - } - return "" -} - -func (x *Schema) GetJwk() string { - if x != nil { - return x.Jwk - } - return "" -} - -func (x *Schema) GetGrant() string { - if x != nil { - return x.Grant - } - return "" -} - -func (x *Schema) GetKeyshare() string { - if x != nil { - return x.Keyshare - } - return "" -} - -func (x *Schema) GetProfile() string { - if x != nil { - return x.Profile - } - return "" -} - -var File_vault_v1_genesis_proto protoreflect.FileDescriptor - -var file_vault_v1_genesis_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, - 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, - 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xac, 0x01, 0x0a, 0x06, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x70, 0x66, 0x73, 0x5f, 0x61, - 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x70, 0x66, - 0x73, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x18, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, - 0x19, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0c, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6a, 0x77, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x8a, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_vault_v1_genesis_proto_rawDescOnce sync.Once - file_vault_v1_genesis_proto_rawDescData = file_vault_v1_genesis_proto_rawDesc -) - -func file_vault_v1_genesis_proto_rawDescGZIP() []byte { - file_vault_v1_genesis_proto_rawDescOnce.Do(func() { - file_vault_v1_genesis_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_v1_genesis_proto_rawDescData) - }) - return file_vault_v1_genesis_proto_rawDescData -} - -var file_vault_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_vault_v1_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: vault.v1.GenesisState - (*Params)(nil), // 1: vault.v1.Params - (*Schema)(nil), // 2: vault.v1.Schema -} -var file_vault_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: vault.v1.GenesisState.params:type_name -> vault.v1.Params - 2, // 1: vault.v1.Params.schema:type_name -> vault.v1.Schema - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_vault_v1_genesis_proto_init() } -func file_vault_v1_genesis_proto_init() { - if File_vault_v1_genesis_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_vault_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GenesisState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_vault_v1_genesis_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_vault_v1_genesis_proto_goTypes, - DependencyIndexes: file_vault_v1_genesis_proto_depIdxs, - MessageInfos: file_vault_v1_genesis_proto_msgTypes, - }.Build() - File_vault_v1_genesis_proto = out.File - file_vault_v1_genesis_proto_rawDesc = nil - file_vault_v1_genesis_proto_goTypes = nil - file_vault_v1_genesis_proto_depIdxs = nil -} diff --git a/api/vault/v1/query.pulsar.go b/api/vault/v1/query.pulsar.go deleted file mode 100644 index 78343f1a4..000000000 --- a/api/vault/v1/query.pulsar.go +++ /dev/null @@ -1,4221 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package vaultv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QueryParamsRequest = File_vault_v1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QueryParamsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryParamsResponse protoreflect.MessageDescriptor - fd_QueryParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QueryParamsResponse = File_vault_v1_query_proto.Messages().ByName("QueryParamsResponse") - fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil) - -type fastReflection_QueryParamsResponse QueryParamsResponse - -func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(x) -} - -func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{} - -type fastReflection_QueryParamsResponse_messageType struct{} - -func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsResponse)(nil) -} -func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} -func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_QueryParamsResponse_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.QueryParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.QueryParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.QueryParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.QueryParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QueryParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QueryParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QueryParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySchemaRequest protoreflect.MessageDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QuerySchemaRequest = File_vault_v1_query_proto.Messages().ByName("QuerySchemaRequest") -} - -var _ protoreflect.Message = (*fastReflection_QuerySchemaRequest)(nil) - -type fastReflection_QuerySchemaRequest QuerySchemaRequest - -func (x *QuerySchemaRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySchemaRequest)(x) -} - -func (x *QuerySchemaRequest) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySchemaRequest_messageType fastReflection_QuerySchemaRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySchemaRequest_messageType{} - -type fastReflection_QuerySchemaRequest_messageType struct{} - -func (x fastReflection_QuerySchemaRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySchemaRequest)(nil) -} -func (x fastReflection_QuerySchemaRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySchemaRequest) -} -func (x fastReflection_QuerySchemaRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySchemaRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySchemaRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySchemaRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QuerySchemaRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySchemaRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySchemaRequest) New() protoreflect.Message { - return new(fastReflection_QuerySchemaRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySchemaRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySchemaRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QuerySchemaRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QuerySchemaRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QuerySchemaRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QuerySchemaRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QuerySchemaRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySchemaRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QuerySchemaRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QuerySchemaRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QuerySchemaRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySchemaRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySchemaRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySchemaRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySchemaResponse protoreflect.MessageDescriptor - fd_QuerySchemaResponse_schema protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QuerySchemaResponse = File_vault_v1_query_proto.Messages().ByName("QuerySchemaResponse") - fd_QuerySchemaResponse_schema = md_QuerySchemaResponse.Fields().ByName("schema") -} - -var _ protoreflect.Message = (*fastReflection_QuerySchemaResponse)(nil) - -type fastReflection_QuerySchemaResponse QuerySchemaResponse - -func (x *QuerySchemaResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySchemaResponse)(x) -} - -func (x *QuerySchemaResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySchemaResponse_messageType fastReflection_QuerySchemaResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySchemaResponse_messageType{} - -type fastReflection_QuerySchemaResponse_messageType struct{} - -func (x fastReflection_QuerySchemaResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySchemaResponse)(nil) -} -func (x fastReflection_QuerySchemaResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySchemaResponse) -} -func (x fastReflection_QuerySchemaResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySchemaResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySchemaResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySchemaResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QuerySchemaResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySchemaResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySchemaResponse) New() protoreflect.Message { - return new(fastReflection_QuerySchemaResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySchemaResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySchemaResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QuerySchemaResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Schema != nil { - value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - if !f(fd_QuerySchemaResponse_schema, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QuerySchemaResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.QuerySchemaResponse.schema": - return x.Schema != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.QuerySchemaResponse.schema": - x.Schema = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QuerySchemaResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.QuerySchemaResponse.schema": - value := x.Schema - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.QuerySchemaResponse.schema": - x.Schema = value.Message().Interface().(*Schema) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QuerySchemaResponse.schema": - if x.Schema == nil { - x.Schema = new(Schema) - } - return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QuerySchemaResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QuerySchemaResponse.schema": - m := new(Schema) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySchemaResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySchemaResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QuerySchemaResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySchemaResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QuerySchemaResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySchemaResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QuerySchemaResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QuerySchemaResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySchemaResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Schema != nil { - l = options.Size(x.Schema) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySchemaResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Schema != nil { - encoded, err := options.Marshal(x.Schema) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySchemaResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySchemaResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Schema == nil { - x.Schema = &Schema{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Schema); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllocateRequest protoreflect.MessageDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QueryAllocateRequest = File_vault_v1_query_proto.Messages().ByName("QueryAllocateRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllocateRequest)(nil) - -type fastReflection_QueryAllocateRequest QueryAllocateRequest - -func (x *QueryAllocateRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllocateRequest)(x) -} - -func (x *QueryAllocateRequest) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllocateRequest_messageType fastReflection_QueryAllocateRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllocateRequest_messageType{} - -type fastReflection_QueryAllocateRequest_messageType struct{} - -func (x fastReflection_QueryAllocateRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllocateRequest)(nil) -} -func (x fastReflection_QueryAllocateRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllocateRequest) -} -func (x fastReflection_QueryAllocateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllocateRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllocateRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllocateRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllocateRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAllocateRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllocateRequest) New() protoreflect.Message { - return new(fastReflection_QueryAllocateRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllocateRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAllocateRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllocateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllocateRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllocateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllocateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateRequest")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllocateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QueryAllocateRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllocateRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllocateRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllocateRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllocateRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllocateRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllocateRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryAllocateResponse protoreflect.MessageDescriptor - fd_QueryAllocateResponse_success protoreflect.FieldDescriptor - fd_QueryAllocateResponse_cid protoreflect.FieldDescriptor - fd_QueryAllocateResponse_macaroon protoreflect.FieldDescriptor - fd_QueryAllocateResponse_public_uri protoreflect.FieldDescriptor - fd_QueryAllocateResponse_expiry_block protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QueryAllocateResponse = File_vault_v1_query_proto.Messages().ByName("QueryAllocateResponse") - fd_QueryAllocateResponse_success = md_QueryAllocateResponse.Fields().ByName("success") - fd_QueryAllocateResponse_cid = md_QueryAllocateResponse.Fields().ByName("cid") - fd_QueryAllocateResponse_macaroon = md_QueryAllocateResponse.Fields().ByName("macaroon") - fd_QueryAllocateResponse_public_uri = md_QueryAllocateResponse.Fields().ByName("public_uri") - fd_QueryAllocateResponse_expiry_block = md_QueryAllocateResponse.Fields().ByName("expiry_block") -} - -var _ protoreflect.Message = (*fastReflection_QueryAllocateResponse)(nil) - -type fastReflection_QueryAllocateResponse QueryAllocateResponse - -func (x *QueryAllocateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAllocateResponse)(x) -} - -func (x *QueryAllocateResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAllocateResponse_messageType fastReflection_QueryAllocateResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryAllocateResponse_messageType{} - -type fastReflection_QueryAllocateResponse_messageType struct{} - -func (x fastReflection_QueryAllocateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAllocateResponse)(nil) -} -func (x fastReflection_QueryAllocateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAllocateResponse) -} -func (x fastReflection_QueryAllocateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllocateResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAllocateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAllocateResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAllocateResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryAllocateResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAllocateResponse) New() protoreflect.Message { - return new(fastReflection_QueryAllocateResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAllocateResponse) Interface() protoreflect.ProtoMessage { - return (*QueryAllocateResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryAllocateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_QueryAllocateResponse_success, value) { - return - } - } - if x.Cid != "" { - value := protoreflect.ValueOfString(x.Cid) - if !f(fd_QueryAllocateResponse_cid, value) { - return - } - } - if x.Macaroon != "" { - value := protoreflect.ValueOfString(x.Macaroon) - if !f(fd_QueryAllocateResponse_macaroon, value) { - return - } - } - if x.PublicUri != "" { - value := protoreflect.ValueOfString(x.PublicUri) - if !f(fd_QueryAllocateResponse_public_uri, value) { - return - } - } - if x.ExpiryBlock != int64(0) { - value := protoreflect.ValueOfInt64(x.ExpiryBlock) - if !f(fd_QueryAllocateResponse_expiry_block, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryAllocateResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.QueryAllocateResponse.success": - return x.Success != false - case "vault.v1.QueryAllocateResponse.cid": - return x.Cid != "" - case "vault.v1.QueryAllocateResponse.macaroon": - return x.Macaroon != "" - case "vault.v1.QueryAllocateResponse.public_uri": - return x.PublicUri != "" - case "vault.v1.QueryAllocateResponse.expiry_block": - return x.ExpiryBlock != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.QueryAllocateResponse.success": - x.Success = false - case "vault.v1.QueryAllocateResponse.cid": - x.Cid = "" - case "vault.v1.QueryAllocateResponse.macaroon": - x.Macaroon = "" - case "vault.v1.QueryAllocateResponse.public_uri": - x.PublicUri = "" - case "vault.v1.QueryAllocateResponse.expiry_block": - x.ExpiryBlock = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryAllocateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.QueryAllocateResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "vault.v1.QueryAllocateResponse.cid": - value := x.Cid - return protoreflect.ValueOfString(value) - case "vault.v1.QueryAllocateResponse.macaroon": - value := x.Macaroon - return protoreflect.ValueOfString(value) - case "vault.v1.QueryAllocateResponse.public_uri": - value := x.PublicUri - return protoreflect.ValueOfString(value) - case "vault.v1.QueryAllocateResponse.expiry_block": - value := x.ExpiryBlock - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.QueryAllocateResponse.success": - x.Success = value.Bool() - case "vault.v1.QueryAllocateResponse.cid": - x.Cid = value.Interface().(string) - case "vault.v1.QueryAllocateResponse.macaroon": - x.Macaroon = value.Interface().(string) - case "vault.v1.QueryAllocateResponse.public_uri": - x.PublicUri = value.Interface().(string) - case "vault.v1.QueryAllocateResponse.expiry_block": - x.ExpiryBlock = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QueryAllocateResponse.success": - panic(fmt.Errorf("field success of message vault.v1.QueryAllocateResponse is not mutable")) - case "vault.v1.QueryAllocateResponse.cid": - panic(fmt.Errorf("field cid of message vault.v1.QueryAllocateResponse is not mutable")) - case "vault.v1.QueryAllocateResponse.macaroon": - panic(fmt.Errorf("field macaroon of message vault.v1.QueryAllocateResponse is not mutable")) - case "vault.v1.QueryAllocateResponse.public_uri": - panic(fmt.Errorf("field public_uri of message vault.v1.QueryAllocateResponse is not mutable")) - case "vault.v1.QueryAllocateResponse.expiry_block": - panic(fmt.Errorf("field expiry_block of message vault.v1.QueryAllocateResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAllocateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QueryAllocateResponse.success": - return protoreflect.ValueOfBool(false) - case "vault.v1.QueryAllocateResponse.cid": - return protoreflect.ValueOfString("") - case "vault.v1.QueryAllocateResponse.macaroon": - return protoreflect.ValueOfString("") - case "vault.v1.QueryAllocateResponse.public_uri": - return protoreflect.ValueOfString("") - case "vault.v1.QueryAllocateResponse.expiry_block": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QueryAllocateResponse")) - } - panic(fmt.Errorf("message vault.v1.QueryAllocateResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAllocateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QueryAllocateResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryAllocateResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryAllocateResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryAllocateResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryAllocateResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAllocateResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - l = len(x.Cid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Macaroon) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.PublicUri) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.ExpiryBlock != 0 { - n += 1 + runtime.Sov(uint64(x.ExpiryBlock)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAllocateResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.ExpiryBlock != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryBlock)) - i-- - dAtA[i] = 0x28 - } - if len(x.PublicUri) > 0 { - i -= len(x.PublicUri) - copy(dAtA[i:], x.PublicUri) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicUri))) - i-- - dAtA[i] = 0x22 - } - if len(x.Macaroon) > 0 { - i -= len(x.Macaroon) - copy(dAtA[i:], x.Macaroon) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macaroon))) - i-- - dAtA[i] = 0x1a - } - if len(x.Cid) > 0 { - i -= len(x.Cid) - copy(dAtA[i:], x.Cid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) - i-- - dAtA[i] = 0x12 - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAllocateResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macaroon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Macaroon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicUri", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.PublicUri = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryBlock", wireType) - } - x.ExpiryBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.ExpiryBlock |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySyncRequest protoreflect.MessageDescriptor - fd_QuerySyncRequest_did protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QuerySyncRequest = File_vault_v1_query_proto.Messages().ByName("QuerySyncRequest") - fd_QuerySyncRequest_did = md_QuerySyncRequest.Fields().ByName("did") -} - -var _ protoreflect.Message = (*fastReflection_QuerySyncRequest)(nil) - -type fastReflection_QuerySyncRequest QuerySyncRequest - -func (x *QuerySyncRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySyncRequest)(x) -} - -func (x *QuerySyncRequest) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySyncRequest_messageType fastReflection_QuerySyncRequest_messageType -var _ protoreflect.MessageType = fastReflection_QuerySyncRequest_messageType{} - -type fastReflection_QuerySyncRequest_messageType struct{} - -func (x fastReflection_QuerySyncRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySyncRequest)(nil) -} -func (x fastReflection_QuerySyncRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySyncRequest) -} -func (x fastReflection_QuerySyncRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySyncRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySyncRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySyncRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QuerySyncRequest) Type() protoreflect.MessageType { - return _fastReflection_QuerySyncRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySyncRequest) New() protoreflect.Message { - return new(fastReflection_QuerySyncRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySyncRequest) Interface() protoreflect.ProtoMessage { - return (*QuerySyncRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QuerySyncRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_QuerySyncRequest_did, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QuerySyncRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.QuerySyncRequest.did": - return x.Did != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.QuerySyncRequest.did": - x.Did = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QuerySyncRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.QuerySyncRequest.did": - value := x.Did - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.QuerySyncRequest.did": - x.Did = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QuerySyncRequest.did": - panic(fmt.Errorf("field did of message vault.v1.QuerySyncRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QuerySyncRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QuerySyncRequest.did": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncRequest")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QuerySyncRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySyncRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QuerySyncRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QuerySyncRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QuerySyncRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySyncRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySyncRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySyncRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QuerySyncResponse protoreflect.MessageDescriptor - fd_QuerySyncResponse_success protoreflect.FieldDescriptor - fd_QuerySyncResponse_schema protoreflect.FieldDescriptor - fd_QuerySyncResponse_address protoreflect.FieldDescriptor - fd_QuerySyncResponse_chainID protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_query_proto_init() - md_QuerySyncResponse = File_vault_v1_query_proto.Messages().ByName("QuerySyncResponse") - fd_QuerySyncResponse_success = md_QuerySyncResponse.Fields().ByName("success") - fd_QuerySyncResponse_schema = md_QuerySyncResponse.Fields().ByName("schema") - fd_QuerySyncResponse_address = md_QuerySyncResponse.Fields().ByName("address") - fd_QuerySyncResponse_chainID = md_QuerySyncResponse.Fields().ByName("chainID") -} - -var _ protoreflect.Message = (*fastReflection_QuerySyncResponse)(nil) - -type fastReflection_QuerySyncResponse QuerySyncResponse - -func (x *QuerySyncResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QuerySyncResponse)(x) -} - -func (x *QuerySyncResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QuerySyncResponse_messageType fastReflection_QuerySyncResponse_messageType -var _ protoreflect.MessageType = fastReflection_QuerySyncResponse_messageType{} - -type fastReflection_QuerySyncResponse_messageType struct{} - -func (x fastReflection_QuerySyncResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QuerySyncResponse)(nil) -} -func (x fastReflection_QuerySyncResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QuerySyncResponse) -} -func (x fastReflection_QuerySyncResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySyncResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QuerySyncResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QuerySyncResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QuerySyncResponse) Type() protoreflect.MessageType { - return _fastReflection_QuerySyncResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QuerySyncResponse) New() protoreflect.Message { - return new(fastReflection_QuerySyncResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QuerySyncResponse) Interface() protoreflect.ProtoMessage { - return (*QuerySyncResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QuerySyncResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_QuerySyncResponse_success, value) { - return - } - } - if x.Schema != nil { - value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - if !f(fd_QuerySyncResponse_schema, value) { - return - } - } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_QuerySyncResponse_address, value) { - return - } - } - if x.ChainID != "" { - value := protoreflect.ValueOfString(x.ChainID) - if !f(fd_QuerySyncResponse_chainID, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QuerySyncResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.QuerySyncResponse.success": - return x.Success != false - case "vault.v1.QuerySyncResponse.schema": - return x.Schema != nil - case "vault.v1.QuerySyncResponse.address": - return x.Address != "" - case "vault.v1.QuerySyncResponse.chainID": - return x.ChainID != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.QuerySyncResponse.success": - x.Success = false - case "vault.v1.QuerySyncResponse.schema": - x.Schema = nil - case "vault.v1.QuerySyncResponse.address": - x.Address = "" - case "vault.v1.QuerySyncResponse.chainID": - x.ChainID = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QuerySyncResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.QuerySyncResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - case "vault.v1.QuerySyncResponse.schema": - value := x.Schema - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "vault.v1.QuerySyncResponse.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "vault.v1.QuerySyncResponse.chainID": - value := x.ChainID - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.QuerySyncResponse.success": - x.Success = value.Bool() - case "vault.v1.QuerySyncResponse.schema": - x.Schema = value.Message().Interface().(*Schema) - case "vault.v1.QuerySyncResponse.address": - x.Address = value.Interface().(string) - case "vault.v1.QuerySyncResponse.chainID": - x.ChainID = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QuerySyncResponse.schema": - if x.Schema == nil { - x.Schema = new(Schema) - } - return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) - case "vault.v1.QuerySyncResponse.success": - panic(fmt.Errorf("field success of message vault.v1.QuerySyncResponse is not mutable")) - case "vault.v1.QuerySyncResponse.address": - panic(fmt.Errorf("field address of message vault.v1.QuerySyncResponse is not mutable")) - case "vault.v1.QuerySyncResponse.chainID": - panic(fmt.Errorf("field chainID of message vault.v1.QuerySyncResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QuerySyncResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.QuerySyncResponse.success": - return protoreflect.ValueOfBool(false) - case "vault.v1.QuerySyncResponse.schema": - m := new(Schema) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "vault.v1.QuerySyncResponse.address": - return protoreflect.ValueOfString("") - case "vault.v1.QuerySyncResponse.chainID": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.QuerySyncResponse")) - } - panic(fmt.Errorf("message vault.v1.QuerySyncResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QuerySyncResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.QuerySyncResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QuerySyncResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QuerySyncResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QuerySyncResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QuerySyncResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QuerySyncResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Success { - n += 2 - } - if x.Schema != nil { - l = options.Size(x.Schema) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainID) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QuerySyncResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.ChainID) > 0 { - i -= len(x.ChainID) - copy(dAtA[i:], x.ChainID) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainID))) - i-- - dAtA[i] = 0x22 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0x1a - } - if x.Schema != nil { - encoded, err := options.Marshal(x.Schema) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if x.Success { - i-- - if x.Success { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QuerySyncResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QuerySyncResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Success = bool(v != 0) - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Schema == nil { - x.Schema = &Schema{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Schema); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: vault/v1/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type QueryParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *QueryParamsResponse) Reset() { - *x = QueryParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// QuerySchemaRequest is the request type for the Query/Schema RPC method. -type QuerySchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QuerySchemaRequest) Reset() { - *x = QuerySchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySchemaRequest) ProtoMessage() {} - -// Deprecated: Use QuerySchemaRequest.ProtoReflect.Descriptor instead. -func (*QuerySchemaRequest) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{2} -} - -// QuerySchemaResponse is the response type for the Query/Schema RPC method. -type QuerySchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Schema is the DID document. - Schema *Schema `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` -} - -func (x *QuerySchemaResponse) Reset() { - *x = QuerySchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySchemaResponse) ProtoMessage() {} - -// Deprecated: Use QuerySchemaResponse.ProtoReflect.Descriptor instead. -func (*QuerySchemaResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QuerySchemaResponse) GetSchema() *Schema { - if x != nil { - return x.Schema - } - return nil -} - -// QueryAllocateRequest is the request type for the Allocate RPC method. -type QueryAllocateRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryAllocateRequest) Reset() { - *x = QueryAllocateRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllocateRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllocateRequest) ProtoMessage() {} - -// Deprecated: Use QueryAllocateRequest.ProtoReflect.Descriptor instead. -func (*QueryAllocateRequest) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{4} -} - -// AllocateResponse is the response type for the Allocate RPC method. -type QueryAllocateResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - Macaroon string `protobuf:"bytes,3,opt,name=macaroon,proto3" json:"macaroon,omitempty"` - PublicUri string `protobuf:"bytes,4,opt,name=public_uri,json=publicUri,proto3" json:"public_uri,omitempty"` - ExpiryBlock int64 `protobuf:"varint,5,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` -} - -func (x *QueryAllocateResponse) Reset() { - *x = QueryAllocateResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAllocateResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAllocateResponse) ProtoMessage() {} - -// Deprecated: Use QueryAllocateResponse.ProtoReflect.Descriptor instead. -func (*QueryAllocateResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryAllocateResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *QueryAllocateResponse) GetCid() string { - if x != nil { - return x.Cid - } - return "" -} - -func (x *QueryAllocateResponse) GetMacaroon() string { - if x != nil { - return x.Macaroon - } - return "" -} - -func (x *QueryAllocateResponse) GetPublicUri() string { - if x != nil { - return x.PublicUri - } - return "" -} - -func (x *QueryAllocateResponse) GetExpiryBlock() int64 { - if x != nil { - return x.ExpiryBlock - } - return 0 -} - -// SyncRequest is the request type for the Sync RPC method. -type QuerySyncRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (x *QuerySyncRequest) Reset() { - *x = QuerySyncRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySyncRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySyncRequest) ProtoMessage() {} - -// Deprecated: Use QuerySyncRequest.ProtoReflect.Descriptor instead. -func (*QuerySyncRequest) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QuerySyncRequest) GetDid() string { - if x != nil { - return x.Did - } - return "" -} - -// SyncResponse is the response type for the Sync RPC method. -type QuerySyncResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` - // Schema is the DID document. - Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` - // Address is the address of the calling DID. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // ChainID is the chain ID of the current network. - ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` -} - -func (x *QuerySyncResponse) Reset() { - *x = QuerySyncResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuerySyncResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuerySyncResponse) ProtoMessage() {} - -// Deprecated: Use QuerySyncResponse.ProtoReflect.Descriptor instead. -func (*QuerySyncResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QuerySyncResponse) GetSuccess() bool { - if x != nil { - return x.Success - } - return false -} - -func (x *QuerySyncResponse) GetSchema() *Schema { - if x != nil { - return x.Schema - } - return nil -} - -func (x *QuerySyncResponse) GetAddress() string { - if x != nil { - return x.Address - } - return "" -} - -func (x *QuerySyncResponse) GetChainID() string { - if x != nil { - return x.ChainID - } - return "" -} - -var File_vault_v1_query_proto protoreflect.FileDescriptor - -var file_vault_v1_query_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, - 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x13, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x14, 0x0a, - 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x3f, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x22, 0x16, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa1, 0x01, 0x0a, - 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, - 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x55, 0x72, 0x69, 0x12, 0x21, 0x0a, - 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x22, 0x24, 0x0a, 0x10, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x11, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x44, 0x32, 0x8b, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, - 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x5f, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, - 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x12, 0x67, 0x0a, 0x08, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x57, 0x0a, 0x04, 0x53, 0x79, 0x6e, - 0x63, 0x12, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x79, - 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, - 0x6e, 0x63, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, - 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, - 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_vault_v1_query_proto_rawDescOnce sync.Once - file_vault_v1_query_proto_rawDescData = file_vault_v1_query_proto_rawDesc -) - -func file_vault_v1_query_proto_rawDescGZIP() []byte { - file_vault_v1_query_proto_rawDescOnce.Do(func() { - file_vault_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_v1_query_proto_rawDescData) - }) - return file_vault_v1_query_proto_rawDescData -} - -var file_vault_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_vault_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: vault.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: vault.v1.QueryParamsResponse - (*QuerySchemaRequest)(nil), // 2: vault.v1.QuerySchemaRequest - (*QuerySchemaResponse)(nil), // 3: vault.v1.QuerySchemaResponse - (*QueryAllocateRequest)(nil), // 4: vault.v1.QueryAllocateRequest - (*QueryAllocateResponse)(nil), // 5: vault.v1.QueryAllocateResponse - (*QuerySyncRequest)(nil), // 6: vault.v1.QuerySyncRequest - (*QuerySyncResponse)(nil), // 7: vault.v1.QuerySyncResponse - (*Params)(nil), // 8: vault.v1.Params - (*Schema)(nil), // 9: vault.v1.Schema -} -var file_vault_v1_query_proto_depIdxs = []int32{ - 8, // 0: vault.v1.QueryParamsResponse.params:type_name -> vault.v1.Params - 9, // 1: vault.v1.QuerySchemaResponse.schema:type_name -> vault.v1.Schema - 9, // 2: vault.v1.QuerySyncResponse.schema:type_name -> vault.v1.Schema - 0, // 3: vault.v1.Query.Params:input_type -> vault.v1.QueryParamsRequest - 2, // 4: vault.v1.Query.Schema:input_type -> vault.v1.QuerySchemaRequest - 4, // 5: vault.v1.Query.Allocate:input_type -> vault.v1.QueryAllocateRequest - 6, // 6: vault.v1.Query.Sync:input_type -> vault.v1.QuerySyncRequest - 1, // 7: vault.v1.Query.Params:output_type -> vault.v1.QueryParamsResponse - 3, // 8: vault.v1.Query.Schema:output_type -> vault.v1.QuerySchemaResponse - 5, // 9: vault.v1.Query.Allocate:output_type -> vault.v1.QueryAllocateResponse - 7, // 10: vault.v1.Query.Sync:output_type -> vault.v1.QuerySyncResponse - 7, // [7:11] is the sub-list for method output_type - 3, // [3:7] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_vault_v1_query_proto_init() } -func file_vault_v1_query_proto_init() { - if File_vault_v1_query_proto != nil { - return - } - file_vault_v1_genesis_proto_init() - if !protoimpl.UnsafeEnabled { - file_vault_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllocateRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAllocateResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySyncRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuerySyncResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_vault_v1_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_vault_v1_query_proto_goTypes, - DependencyIndexes: file_vault_v1_query_proto_depIdxs, - MessageInfos: file_vault_v1_query_proto_msgTypes, - }.Build() - File_vault_v1_query_proto = out.File - file_vault_v1_query_proto_rawDesc = nil - file_vault_v1_query_proto_goTypes = nil - file_vault_v1_query_proto_depIdxs = nil -} diff --git a/api/vault/v1/query_grpc.pb.go b/api/vault/v1/query_grpc.pb.go deleted file mode 100644 index 1730f75cf..000000000 --- a/api/vault/v1/query_grpc.pb.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: vault/v1/query.proto - -package vaultv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Query_Params_FullMethodName = "/vault.v1.Query/Params" - Query_Schema_FullMethodName = "/vault.v1.Query/Schema" - Query_Allocate_FullMethodName = "/vault.v1.Query/Allocate" - Query_Sync_FullMethodName = "/vault.v1.Query/Sync" -) - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Query provides defines the gRPC querier service. -type QueryClient interface { - // Params queries all parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Schema queries the DID document by its id. And returns the required PKL - // information - Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) - // Allocate initializes a Target Vault available for claims with a compatible - // Authentication mechanism. The default authentication mechanism is WebAuthn. - Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) - // Sync queries the DID document by its id. And returns the required PKL - // information - Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QuerySchemaResponse) - err := c.cc.Invoke(ctx, Query_Schema_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QueryAllocateResponse) - err := c.cc.Invoke(ctx, Query_Allocate_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(QuerySyncResponse) - err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility. -// -// Query provides defines the gRPC querier service. -type QueryServer interface { - // Params queries all parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Schema queries the DID document by its id. And returns the required PKL - // information - Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) - // Allocate initializes a Target Vault available for claims with a compatible - // Authentication mechanism. The default authentication mechanism is WebAuthn. - Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) - // Sync queries the DID document by its id. And returns the required PKL - // information - Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedQueryServer struct{} - -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") -} -func (UnimplementedQueryServer) Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") -} -func (UnimplementedQueryServer) Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} -func (UnimplementedQueryServer) testEmbeddedByValue() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - // If the following call pancis, it indicates UnimplementedQueryServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Params_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySchemaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Schema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Schema_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Schema(ctx, req.(*QuerySchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllocateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Allocate(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Allocate_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QuerySyncRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Sync(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Sync_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Sync(ctx, req.(*QuerySyncRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "vault.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "Schema", - Handler: _Query_Schema_Handler, - }, - { - MethodName: "Allocate", - Handler: _Query_Allocate_Handler, - }, - { - MethodName: "Sync", - Handler: _Query_Sync_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vault/v1/query.proto", -} diff --git a/api/vault/v1/state.cosmos_orm.go b/api/vault/v1/state.cosmos_orm.go deleted file mode 100644 index c4d222026..000000000 --- a/api/vault/v1/state.cosmos_orm.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT. - -package vaultv1 - -import ( - context "context" - ormlist "cosmossdk.io/orm/model/ormlist" - ormtable "cosmossdk.io/orm/model/ormtable" - ormerrors "cosmossdk.io/orm/types/ormerrors" -) - -type DWNTable interface { - Insert(ctx context.Context, dWN *DWN) error - InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error) - LastInsertedSequence(ctx context.Context) (uint64, error) - Update(ctx context.Context, dWN *DWN) error - Save(ctx context.Context, dWN *DWN) error - Delete(ctx context.Context, dWN *DWN) error - Has(ctx context.Context, id uint64) (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 uint64) (*DWN, error) - HasByAlias(ctx context.Context, alias string) (found bool, err error) - // GetByAlias returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByAlias(ctx context.Context, alias string) (*DWN, error) - HasByCid(ctx context.Context, cid string) (found bool, err error) - // GetByCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByCid(ctx context.Context, cid string) (*DWN, error) - List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) - ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) - DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error - DeleteRange(ctx context.Context, from, to DWNIndexKey) error - - doNotImplement() -} - -type DWNIterator struct { - ormtable.Iterator -} - -func (i DWNIterator) Value() (*DWN, error) { - var dWN DWN - err := i.UnmarshalMessage(&dWN) - return &dWN, err -} - -type DWNIndexKey interface { - id() uint32 - values() []interface{} - dWNIndexKey() -} - -// primary key starting index.. -type DWNPrimaryKey = DWNIdIndexKey - -type DWNIdIndexKey struct { - vs []interface{} -} - -func (x DWNIdIndexKey) id() uint32 { return 0 } -func (x DWNIdIndexKey) values() []interface{} { return x.vs } -func (x DWNIdIndexKey) dWNIndexKey() {} - -func (this DWNIdIndexKey) WithId(id uint64) DWNIdIndexKey { - this.vs = []interface{}{id} - return this -} - -type DWNAliasIndexKey struct { - vs []interface{} -} - -func (x DWNAliasIndexKey) id() uint32 { return 1 } -func (x DWNAliasIndexKey) values() []interface{} { return x.vs } -func (x DWNAliasIndexKey) dWNIndexKey() {} - -func (this DWNAliasIndexKey) WithAlias(alias string) DWNAliasIndexKey { - this.vs = []interface{}{alias} - return this -} - -type DWNCidIndexKey struct { - vs []interface{} -} - -func (x DWNCidIndexKey) id() uint32 { return 2 } -func (x DWNCidIndexKey) values() []interface{} { return x.vs } -func (x DWNCidIndexKey) dWNIndexKey() {} - -func (this DWNCidIndexKey) WithCid(cid string) DWNCidIndexKey { - this.vs = []interface{}{cid} - return this -} - -type dWNTable struct { - table ormtable.AutoIncrementTable -} - -func (this dWNTable) Insert(ctx context.Context, dWN *DWN) error { - return this.table.Insert(ctx, dWN) -} - -func (this dWNTable) Update(ctx context.Context, dWN *DWN) error { - return this.table.Update(ctx, dWN) -} - -func (this dWNTable) Save(ctx context.Context, dWN *DWN) error { - return this.table.Save(ctx, dWN) -} - -func (this dWNTable) Delete(ctx context.Context, dWN *DWN) error { - return this.table.Delete(ctx, dWN) -} - -func (this dWNTable) InsertReturningId(ctx context.Context, dWN *DWN) (uint64, error) { - return this.table.InsertReturningPKey(ctx, dWN) -} - -func (this dWNTable) LastInsertedSequence(ctx context.Context) (uint64, error) { - return this.table.LastInsertedSequence(ctx) -} - -func (this dWNTable) Has(ctx context.Context, id uint64) (found bool, err error) { - return this.table.PrimaryKey().Has(ctx, id) -} - -func (this dWNTable) Get(ctx context.Context, id uint64) (*DWN, error) { - var dWN DWN - found, err := this.table.PrimaryKey().Get(ctx, &dWN, id) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &dWN, nil -} - -func (this dWNTable) HasByAlias(ctx context.Context, alias string) (found bool, err error) { - return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - alias, - ) -} - -func (this dWNTable) GetByAlias(ctx context.Context, alias string) (*DWN, error) { - var dWN DWN - found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &dWN, - alias, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &dWN, nil -} - -func (this dWNTable) HasByCid(ctx context.Context, cid string) (found bool, err error) { - return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, - cid, - ) -} - -func (this dWNTable) GetByCid(ctx context.Context, cid string) (*DWN, error) { - var dWN DWN - found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &dWN, - cid, - ) - if err != nil { - return nil, err - } - if !found { - return nil, ormerrors.NotFound - } - return &dWN, nil -} - -func (this dWNTable) List(ctx context.Context, prefixKey DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) { - it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return DWNIterator{it}, err -} - -func (this dWNTable) ListRange(ctx context.Context, from, to DWNIndexKey, opts ...ormlist.Option) (DWNIterator, error) { - it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return DWNIterator{it}, err -} - -func (this dWNTable) DeleteBy(ctx context.Context, prefixKey DWNIndexKey) error { - return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) -} - -func (this dWNTable) DeleteRange(ctx context.Context, from, to DWNIndexKey) error { - return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) -} - -func (this dWNTable) doNotImplement() {} - -var _ DWNTable = dWNTable{} - -func NewDWNTable(db ormtable.Schema) (DWNTable, error) { - table := db.GetTable(&DWN{}) - if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&DWN{}).ProtoReflect().Descriptor().FullName())) - } - return dWNTable{table.(ormtable.AutoIncrementTable)}, nil -} - -type StateStore interface { - DWNTable() DWNTable - - doNotImplement() -} - -type stateStore struct { - dWN DWNTable -} - -func (x stateStore) DWNTable() DWNTable { - return x.dWN -} - -func (stateStore) doNotImplement() {} - -var _ StateStore = stateStore{} - -func NewStateStore(db ormtable.Schema) (StateStore, error) { - dWNTable, err := NewDWNTable(db) - if err != nil { - return nil, err - } - - return stateStore{ - dWNTable, - }, nil -} diff --git a/api/vault/v1/state.pulsar.go b/api/vault/v1/state.pulsar.go deleted file mode 100644 index b72016bc9..000000000 --- a/api/vault/v1/state.pulsar.go +++ /dev/null @@ -1,772 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package vaultv1 - -import ( - _ "cosmossdk.io/api/cosmos/orm/v1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_DWN protoreflect.MessageDescriptor - fd_DWN_id protoreflect.FieldDescriptor - fd_DWN_alias protoreflect.FieldDescriptor - fd_DWN_cid protoreflect.FieldDescriptor - fd_DWN_resolver protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_state_proto_init() - md_DWN = File_vault_v1_state_proto.Messages().ByName("DWN") - fd_DWN_id = md_DWN.Fields().ByName("id") - fd_DWN_alias = md_DWN.Fields().ByName("alias") - fd_DWN_cid = md_DWN.Fields().ByName("cid") - fd_DWN_resolver = md_DWN.Fields().ByName("resolver") -} - -var _ protoreflect.Message = (*fastReflection_DWN)(nil) - -type fastReflection_DWN DWN - -func (x *DWN) ProtoReflect() protoreflect.Message { - return (*fastReflection_DWN)(x) -} - -func (x *DWN) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_state_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_DWN_messageType fastReflection_DWN_messageType -var _ protoreflect.MessageType = fastReflection_DWN_messageType{} - -type fastReflection_DWN_messageType struct{} - -func (x fastReflection_DWN_messageType) Zero() protoreflect.Message { - return (*fastReflection_DWN)(nil) -} -func (x fastReflection_DWN_messageType) New() protoreflect.Message { - return new(fastReflection_DWN) -} -func (x fastReflection_DWN_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DWN -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_DWN) Descriptor() protoreflect.MessageDescriptor { - return md_DWN -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_DWN) Type() protoreflect.MessageType { - return _fastReflection_DWN_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_DWN) New() protoreflect.Message { - return new(fastReflection_DWN) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_DWN) Interface() protoreflect.ProtoMessage { - return (*DWN)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_DWN) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != uint64(0) { - value := protoreflect.ValueOfUint64(x.Id) - if !f(fd_DWN_id, value) { - return - } - } - if x.Alias != "" { - value := protoreflect.ValueOfString(x.Alias) - if !f(fd_DWN_alias, value) { - return - } - } - if x.Cid != "" { - value := protoreflect.ValueOfString(x.Cid) - if !f(fd_DWN_cid, value) { - return - } - } - if x.Resolver != "" { - value := protoreflect.ValueOfString(x.Resolver) - if !f(fd_DWN_resolver, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_DWN) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.DWN.id": - return x.Id != uint64(0) - case "vault.v1.DWN.alias": - return x.Alias != "" - case "vault.v1.DWN.cid": - return x.Cid != "" - case "vault.v1.DWN.resolver": - return x.Resolver != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) - } - panic(fmt.Errorf("message vault.v1.DWN does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DWN) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.DWN.id": - x.Id = uint64(0) - case "vault.v1.DWN.alias": - x.Alias = "" - case "vault.v1.DWN.cid": - x.Cid = "" - case "vault.v1.DWN.resolver": - x.Resolver = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) - } - panic(fmt.Errorf("message vault.v1.DWN does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_DWN) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.DWN.id": - value := x.Id - return protoreflect.ValueOfUint64(value) - case "vault.v1.DWN.alias": - value := x.Alias - return protoreflect.ValueOfString(value) - case "vault.v1.DWN.cid": - value := x.Cid - return protoreflect.ValueOfString(value) - case "vault.v1.DWN.resolver": - value := x.Resolver - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) - } - panic(fmt.Errorf("message vault.v1.DWN does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DWN) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.DWN.id": - x.Id = value.Uint() - case "vault.v1.DWN.alias": - x.Alias = value.Interface().(string) - case "vault.v1.DWN.cid": - x.Cid = value.Interface().(string) - case "vault.v1.DWN.resolver": - x.Resolver = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) - } - panic(fmt.Errorf("message vault.v1.DWN does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DWN) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.DWN.id": - panic(fmt.Errorf("field id of message vault.v1.DWN is not mutable")) - case "vault.v1.DWN.alias": - panic(fmt.Errorf("field alias of message vault.v1.DWN is not mutable")) - case "vault.v1.DWN.cid": - panic(fmt.Errorf("field cid of message vault.v1.DWN is not mutable")) - case "vault.v1.DWN.resolver": - panic(fmt.Errorf("field resolver of message vault.v1.DWN is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) - } - panic(fmt.Errorf("message vault.v1.DWN does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_DWN) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.DWN.id": - return protoreflect.ValueOfUint64(uint64(0)) - case "vault.v1.DWN.alias": - return protoreflect.ValueOfString("") - case "vault.v1.DWN.cid": - return protoreflect.ValueOfString("") - case "vault.v1.DWN.resolver": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.DWN")) - } - panic(fmt.Errorf("message vault.v1.DWN does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_DWN) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.DWN", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_DWN) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DWN) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_DWN) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_DWN) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DWN) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Id != 0 { - n += 1 + runtime.Sov(uint64(x.Id)) - } - l = len(x.Alias) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Cid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Resolver) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DWN) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Resolver) > 0 { - i -= len(x.Resolver) - copy(dAtA[i:], x.Resolver) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Resolver))) - i-- - dAtA[i] = 0x22 - } - if len(x.Cid) > 0 { - i -= len(x.Cid) - copy(dAtA[i:], x.Cid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) - i-- - dAtA[i] = 0x1a - } - if len(x.Alias) > 0 { - i -= len(x.Alias) - copy(dAtA[i:], x.Alias) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Alias))) - i-- - dAtA[i] = 0x12 - } - if x.Id != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DWN) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DWN: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DWN: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - x.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Alias = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Resolver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Resolver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: vault/v1/state.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type DWN struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"` - Cid string `protobuf:"bytes,3,opt,name=cid,proto3" json:"cid,omitempty"` - Resolver string `protobuf:"bytes,4,opt,name=resolver,proto3" json:"resolver,omitempty"` -} - -func (x *DWN) Reset() { - *x = DWN{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DWN) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DWN) ProtoMessage() {} - -// Deprecated: Use DWN.ProtoReflect.Descriptor instead. -func (*DWN) Descriptor() ([]byte, []int) { - return file_vault_v1_state_proto_rawDescGZIP(), []int{0} -} - -func (x *DWN) GetId() uint64 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *DWN) GetAlias() string { - if x != nil { - return x.Alias - } - return "" -} - -func (x *DWN) GetCid() string { - if x != nil { - return x.Cid - } - return "" -} - -func (x *DWN) GetResolver() string { - if x != nil { - return x.Resolver - } - return "" -} - -var File_vault_v1_state_proto protoreflect.FileDescriptor - -var file_vault_v1_state_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, - 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, - 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x83, 0x01, 0x0a, 0x03, 0x44, 0x57, - 0x4e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x72, 0x3a, 0x28, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x22, 0x0a, 0x06, 0x0a, - 0x02, 0x69, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x10, 0x01, - 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01, 0x18, 0x01, 0x42, - 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, - 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, - 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, - 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_vault_v1_state_proto_rawDescOnce sync.Once - file_vault_v1_state_proto_rawDescData = file_vault_v1_state_proto_rawDesc -) - -func file_vault_v1_state_proto_rawDescGZIP() []byte { - file_vault_v1_state_proto_rawDescOnce.Do(func() { - file_vault_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_v1_state_proto_rawDescData) - }) - return file_vault_v1_state_proto_rawDescData -} - -var file_vault_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_vault_v1_state_proto_goTypes = []interface{}{ - (*DWN)(nil), // 0: vault.v1.DWN -} -var file_vault_v1_state_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_vault_v1_state_proto_init() } -func file_vault_v1_state_proto_init() { - if File_vault_v1_state_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_vault_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DWN); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_vault_v1_state_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_vault_v1_state_proto_goTypes, - DependencyIndexes: file_vault_v1_state_proto_depIdxs, - MessageInfos: file_vault_v1_state_proto_msgTypes, - }.Build() - File_vault_v1_state_proto = out.File - file_vault_v1_state_proto_rawDesc = nil - file_vault_v1_state_proto_goTypes = nil - file_vault_v1_state_proto_depIdxs = nil -} diff --git a/api/vault/v1/tx.pulsar.go b/api/vault/v1/tx.pulsar.go deleted file mode 100644 index 56a4ef6b0..000000000 --- a/api/vault/v1/tx.pulsar.go +++ /dev/null @@ -1,2066 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package vaultv1 - -import ( - _ "cosmossdk.io/api/cosmos/msg/v1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgUpdateParams = File_vault_v1_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") - fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - return x.Authority != "" - case "vault.v1.MsgUpdateParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - x.Authority = "" - case "vault.v1.MsgUpdateParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "vault.v1.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "vault.v1.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "vault.v1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message vault.v1.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "vault.v1.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgUpdateParams", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParams) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgUpdateParamsResponse = File_vault_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgUpdateParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgInitialize protoreflect.MessageDescriptor - fd_MsgInitialize_authority protoreflect.FieldDescriptor - fd_MsgInitialize_params protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgInitialize = File_vault_v1_tx_proto.Messages().ByName("MsgInitialize") - fd_MsgInitialize_authority = md_MsgInitialize.Fields().ByName("authority") - fd_MsgInitialize_params = md_MsgInitialize.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitialize)(nil) - -type fastReflection_MsgInitialize MsgInitialize - -func (x *MsgInitialize) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitialize)(x) -} - -func (x *MsgInitialize) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgInitialize_messageType fastReflection_MsgInitialize_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitialize_messageType{} - -type fastReflection_MsgInitialize_messageType struct{} - -func (x fastReflection_MsgInitialize_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitialize)(nil) -} -func (x fastReflection_MsgInitialize_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitialize) -} -func (x fastReflection_MsgInitialize_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitialize -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitialize) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitialize -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitialize) Type() protoreflect.MessageType { - return _fastReflection_MsgInitialize_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitialize) New() protoreflect.Message { - return new(fastReflection_MsgInitialize) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitialize) Interface() protoreflect.ProtoMessage { - return (*MsgInitialize)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgInitialize) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgInitialize_authority, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgInitialize_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitialize) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.MsgInitialize.authority": - return x.Authority != "" - case "vault.v1.MsgInitialize.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitialize")) - } - panic(fmt.Errorf("message vault.v1.MsgInitialize does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitialize) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.MsgInitialize.authority": - x.Authority = "" - case "vault.v1.MsgInitialize.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitialize")) - } - panic(fmt.Errorf("message vault.v1.MsgInitialize does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitialize) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.MsgInitialize.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "vault.v1.MsgInitialize.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitialize")) - } - panic(fmt.Errorf("message vault.v1.MsgInitialize does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitialize) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.MsgInitialize.authority": - x.Authority = value.Interface().(string) - case "vault.v1.MsgInitialize.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitialize")) - } - panic(fmt.Errorf("message vault.v1.MsgInitialize does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitialize) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgInitialize.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "vault.v1.MsgInitialize.authority": - panic(fmt.Errorf("field authority of message vault.v1.MsgInitialize is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitialize")) - } - panic(fmt.Errorf("message vault.v1.MsgInitialize does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitialize) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgInitialize.authority": - return protoreflect.ValueOfString("") - case "vault.v1.MsgInitialize.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitialize")) - } - panic(fmt.Errorf("message vault.v1.MsgInitialize does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitialize) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgInitialize", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitialize) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitialize) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitialize) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitialize) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitialize) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitialize) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitialize) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitialize: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitialize: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgInitializeResponse protoreflect.MessageDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgInitializeResponse = File_vault_v1_tx_proto.Messages().ByName("MsgInitializeResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitializeResponse)(nil) - -type fastReflection_MsgInitializeResponse MsgInitializeResponse - -func (x *MsgInitializeResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitializeResponse)(x) -} - -func (x *MsgInitializeResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgInitializeResponse_messageType fastReflection_MsgInitializeResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitializeResponse_messageType{} - -type fastReflection_MsgInitializeResponse_messageType struct{} - -func (x fastReflection_MsgInitializeResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitializeResponse)(nil) -} -func (x fastReflection_MsgInitializeResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitializeResponse) -} -func (x fastReflection_MsgInitializeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitializeResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitializeResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgInitializeResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitializeResponse) New() protoreflect.Message { - return new(fastReflection_MsgInitializeResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitializeResponse) Interface() protoreflect.ProtoMessage { - return (*MsgInitializeResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgInitializeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitializeResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitializeResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgInitializeResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitializeResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgInitializeResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitializeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitializeResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgInitializeResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitializeResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgInitializeResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitializeResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgInitializeResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitializeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgInitializeResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgInitializeResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitializeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgInitializeResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitializeResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitializeResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitializeResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitializeResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitializeResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitializeResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: vault/v1/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the parameters to update. - // - // NOTE: All parameters must be supplied. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgUpdateParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateParams) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgInitialize spawns a New Vault with Unclaimed State. This is a one-time -// operation that must be performed interacting with the Vault. -// -// Since: cosmos-sdk 0.47 -type MsgInitialize struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the parameters to update. - // - // NOTE: All parameters must be supplied. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgInitialize) Reset() { - *x = MsgInitialize{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitialize) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitialize) ProtoMessage() {} - -// Deprecated: Use MsgInitialize.ProtoReflect.Descriptor instead. -func (*MsgInitialize) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgInitialize) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgInitialize) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// MsgInitializeResponse defines the response structure for executing a -// MsgInitialize message. -// -// Since: cosmos-sdk 0.47 -type MsgInitializeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgInitializeResponse) Reset() { - *x = MsgInitializeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitializeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitializeResponse) ProtoMessage() {} - -// Deprecated: Use MsgInitializeResponse.ProtoReflect.Descriptor instead. -func (*MsgInitializeResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{3} -} - -var File_vault_v1_tx_proto protoreflect.FileDescriptor - -var file_vault_v1_tx_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, - 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x87, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x17, - 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa2, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, - 0x4c, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x19, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x21, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, - 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x17, 0x2e, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x1a, 0x1f, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x85, 0x01, 0x0a, - 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, - 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, - 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, - 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, - 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_vault_v1_tx_proto_rawDescOnce sync.Once - file_vault_v1_tx_proto_rawDescData = file_vault_v1_tx_proto_rawDesc -) - -func file_vault_v1_tx_proto_rawDescGZIP() []byte { - file_vault_v1_tx_proto_rawDescOnce.Do(func() { - file_vault_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_vault_v1_tx_proto_rawDescData) - }) - return file_vault_v1_tx_proto_rawDescData -} - -var file_vault_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_vault_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: vault.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: vault.v1.MsgUpdateParamsResponse - (*MsgInitialize)(nil), // 2: vault.v1.MsgInitialize - (*MsgInitializeResponse)(nil), // 3: vault.v1.MsgInitializeResponse - (*Params)(nil), // 4: vault.v1.Params -} -var file_vault_v1_tx_proto_depIdxs = []int32{ - 4, // 0: vault.v1.MsgUpdateParams.params:type_name -> vault.v1.Params - 4, // 1: vault.v1.MsgInitialize.params:type_name -> vault.v1.Params - 0, // 2: vault.v1.Msg.UpdateParams:input_type -> vault.v1.MsgUpdateParams - 2, // 3: vault.v1.Msg.Initialize:input_type -> vault.v1.MsgInitialize - 1, // 4: vault.v1.Msg.UpdateParams:output_type -> vault.v1.MsgUpdateParamsResponse - 3, // 5: vault.v1.Msg.Initialize:output_type -> vault.v1.MsgInitializeResponse - 4, // [4:6] is the sub-list for method output_type - 2, // [2:4] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_vault_v1_tx_proto_init() } -func file_vault_v1_tx_proto_init() { - if File_vault_v1_tx_proto != nil { - return - } - file_vault_v1_genesis_proto_init() - if !protoimpl.UnsafeEnabled { - file_vault_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitialize); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitializeResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_vault_v1_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_vault_v1_tx_proto_goTypes, - DependencyIndexes: file_vault_v1_tx_proto_depIdxs, - MessageInfos: file_vault_v1_tx_proto_msgTypes, - }.Build() - File_vault_v1_tx_proto = out.File - file_vault_v1_tx_proto_rawDesc = nil - file_vault_v1_tx_proto_goTypes = nil - file_vault_v1_tx_proto_depIdxs = nil -} diff --git a/api/vault/v1/tx_grpc.pb.go b/api/vault/v1/tx_grpc.pb.go deleted file mode 100644 index 958bd6cd2..000000000 --- a/api/vault/v1/tx_grpc.pb.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc (unknown) -// source: vault/v1/tx.proto - -package vaultv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 - -const ( - Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams" - Msg_Initialize_FullMethodName = "/vault.v1.Msg/Initialize" -) - -// MsgClient is the client API for Msg service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Msg defines the Msg service. -type MsgClient interface { - // UpdateParams defines a governance operation for updating the parameters. - // - // Since: cosmos-sdk 0.47 - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // Initialize spawns a new Vault - Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) -} - -type msgClient struct { - cc grpc.ClientConnInterface -} - -func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(MsgInitializeResponse) - err := c.cc.Invoke(ctx, Msg_Initialize_FullMethodName, in, out, cOpts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -// All implementations must embed UnimplementedMsgServer -// for forward compatibility. -// -// Msg defines the Msg service. -type MsgServer interface { - // UpdateParams defines a governance operation for updating the parameters. - // - // Since: cosmos-sdk 0.47 - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // Initialize spawns a new Vault - Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error) - mustEmbedUnimplementedMsgServer() -} - -// UnimplementedMsgServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedMsgServer struct{} - -func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} -func (UnimplementedMsgServer) Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented") -} -func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} -func (UnimplementedMsgServer) testEmbeddedByValue() {} - -// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to MsgServer will -// result in compilation errors. -type UnsafeMsgServer interface { - mustEmbedUnimplementedMsgServer() -} - -func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { - // If the following call pancis, it indicates UnimplementedMsgServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } - s.RegisterService(&Msg_ServiceDesc, srv) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgInitialize) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).Initialize(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_Initialize_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Initialize(ctx, req.(*MsgInitialize)) - } - return interceptor(ctx, in, info, handler) -} - -// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Msg_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "vault.v1.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - { - MethodName: "Initialize", - Handler: _Msg_Initialize_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "vault/v1/tx.proto", -} diff --git a/pkg/webapp/components/auth/create_credential.templ b/pkg/webapp/components/auth/create_credential.templ deleted file mode 100644 index 65f99c078..000000000 --- a/pkg/webapp/components/auth/create_credential.templ +++ /dev/null @@ -1,49 +0,0 @@ -package auth - -import "github.com/labstack/echo/v4" - -templ RegisterCredentialForm() { -
-
-
-
-
-
-
-} - -templ NavigatorCredentialsCreate(c echo.Context) { - -} diff --git a/pkg/webapp/components/auth/create_credential_templ.go b/pkg/webapp/components/auth/create_credential_templ.go deleted file mode 100644 index 11f0103ea..000000000 --- a/pkg/webapp/components/auth/create_credential_templ.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package auth - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -import "github.com/labstack/echo/v4" - -func RegisterCredentialForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func NavigatorCredentialsCreate(c echo.Context) templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/components/auth/current.templ b/pkg/webapp/components/auth/current.templ new file mode 100644 index 000000000..f8a8fb931 --- /dev/null +++ b/pkg/webapp/components/auth/current.templ @@ -0,0 +1,30 @@ +package auth + +import "github.com/onsonr/sonr/pkg/webapp/components/ui" + +// RedirectModal returns the Modal with a QR code to scan. +templ RedirectModal() { + @ui.FullScreenModal() { +
+
+
+ + + +

Continue with your phone

+

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

+
+ @ui.Separator("Or Reserve Handle") +
+ + + +
+
+

Already have an account? Login here

+

By continuing, you agree to our Terms and Policy.

+
+ } +} diff --git a/pkg/webapp/components/auth/current_templ.go b/pkg/webapp/components/auth/current_templ.go new file mode 100644 index 000000000..9caad89f3 --- /dev/null +++ b/pkg/webapp/components/auth/current_templ.go @@ -0,0 +1,69 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.793 +package auth + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import "github.com/onsonr/sonr/pkg/webapp/components/ui" + +// RedirectModal returns the Modal with a QR code to scan. +func RedirectModal() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = ui.Separator("Or Reserve Handle").Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = ui.FullScreenModal().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/components/auth/get_credential.templ b/pkg/webapp/components/auth/get_credential.templ deleted file mode 100644 index ed684b025..000000000 --- a/pkg/webapp/components/auth/get_credential.templ +++ /dev/null @@ -1,35 +0,0 @@ -package auth - -import "github.com/labstack/echo/v4" - -templ AssertCredentialForm() { -
-
-
-
-
-
-
-} - -templ NavigatorCredentialsGetAll(c echo.Context) { - -} diff --git a/pkg/webapp/components/auth/get_credential_templ.go b/pkg/webapp/components/auth/get_credential_templ.go deleted file mode 100644 index bfb597672..000000000 --- a/pkg/webapp/components/auth/get_credential_templ.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package auth - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -import "github.com/labstack/echo/v4" - -func AssertCredentialForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func NavigatorCredentialsGetAll(c echo.Context) templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/components/auth/register.templ b/pkg/webapp/components/auth/register.templ index d1e7c65fb..8568241d3 100644 --- a/pkg/webapp/components/auth/register.templ +++ b/pkg/webapp/components/auth/register.templ @@ -1,6 +1,7 @@ package auth import ( + "github.com/labstack/echo/v4" "github.com/onsonr/sonr/pkg/common/middleware/session" "github.com/onsonr/sonr/pkg/webapp/components/ui" ) @@ -8,7 +9,6 @@ import ( // RegisterModal returns the Register Modal. templ RegisterModal() { @ui.OpenModal(session.GetData(ctx).Id, "Sign up") { - @BasicDetailsForm()
@@ -16,26 +16,48 @@ templ RegisterModal() { } } -// RedirectModal returns the Modal with a QR code to scan. -templ RedirectModal() { - @ui.FullScreenModal() { -
-
-
-

Continue with your phone

-

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

-
-
- - - @ui.Separator("Or Scan QR Code") - -
-
-

Already have an account? Login here

-

By continuing, you agree to our Terms and Policy.

+templ RegisterCredentialForm() { +
+
+
+
+
- } +
+} + +templ NavigatorCredentialsCreate(c echo.Context) { + } diff --git a/pkg/webapp/components/auth/register_start.templ b/pkg/webapp/components/auth/register_start.templ deleted file mode 100644 index 08ead730c..000000000 --- a/pkg/webapp/components/auth/register_start.templ +++ /dev/null @@ -1,53 +0,0 @@ -package auth - -templ BasicDetailsForm() { -
-
- @roleSelectInput() -
-
-} - -templ roleSelectInput() { -
- -
-} - -templ nameInput() { -
-} - -templ usernameInput() { -
-} diff --git a/pkg/webapp/components/auth/register_start_templ.go b/pkg/webapp/components/auth/register_start_templ.go deleted file mode 100644 index 35ee1d9f5..000000000 --- a/pkg/webapp/components/auth/register_start_templ.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.793 -package auth - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func BasicDetailsForm() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = roleSelectInput().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func roleSelectInput() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func nameInput() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var3 := templ.GetChildren(ctx) - if templ_7745c5c3_Var3 == nil { - templ_7745c5c3_Var3 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func usernameInput() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var4 := templ.GetChildren(ctx) - if templ_7745c5c3_Var4 == nil { - templ_7745c5c3_Var4 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/components/auth/register_templ.go b/pkg/webapp/components/auth/register_templ.go index 231cc7bcf..89cd4607c 100644 --- a/pkg/webapp/components/auth/register_templ.go +++ b/pkg/webapp/components/auth/register_templ.go @@ -9,6 +9,7 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( + "github.com/labstack/echo/v4" "github.com/onsonr/sonr/pkg/common/middleware/session" "github.com/onsonr/sonr/pkg/webapp/components/ui" ) @@ -47,11 +48,7 @@ func RegisterModal() templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = BasicDetailsForm().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -65,8 +62,7 @@ func RegisterModal() templ.Component { }) } -// RedirectModal returns the Modal with a QR code to scan. -func RedirectModal() templ.Component { +func RegisterCredentialForm() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -87,33 +83,36 @@ func RedirectModal() templ.Component { templ_7745c5c3_Var3 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Continue with your phone

Creating a Sonr Vault requires a smartphone with W3C compliant biometrics enabled.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - templ_7745c5c3_Err = ui.Separator("Or Scan QR Code").Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Already have an account? Login here

By continuing, you agree to our Terms and Policy.

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err - }) - templ_7745c5c3_Err = ui.FullScreenModal().Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer) + } + return templ_7745c5c3_Err + }) +} + +func NavigatorCredentialsCreate(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/pkg/webapp/components/dash/layout.templ b/pkg/webapp/components/dash/layout.templ new file mode 100644 index 000000000..fa07135a8 --- /dev/null +++ b/pkg/webapp/components/dash/layout.templ @@ -0,0 +1,17 @@ +package ui + +// Variant is a component that has attributes +type Variant interface { + Attributes() templ.Attributes +} + +// ╭───────────────────────────────────────────────────────────╮ +// │ General Layout Components │ +// ╰───────────────────────────────────────────────────────────╯ + +// Columns is a component that renders a flex container with a gap of 3 and a max width of 100% +templ Columns() { +
+ { children... } +
+} diff --git a/pkg/webapp/components/dash/layout_templ.go b/pkg/webapp/components/dash/layout_templ.go new file mode 100644 index 000000000..addc76889 --- /dev/null +++ b/pkg/webapp/components/dash/layout_templ.go @@ -0,0 +1,58 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.793 +package ui + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +// Variant is a component that has attributes +type Variant interface { + Attributes() templ.Attributes +} + +// ╭───────────────────────────────────────────────────────────╮ +// │ General Layout Components │ +// ╰───────────────────────────────────────────────────────────╯ + +// Columns is a component that renders a flex container with a gap of 3 and a max width of 100% +func Columns() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var1.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/webapp/components/landing/highlights.templ b/pkg/webapp/components/landing/highlights.templ index 841a52b87..6b1436c6f 100644 --- a/pkg/webapp/components/landing/highlights.templ +++ b/pkg/webapp/components/landing/highlights.templ @@ -15,24 +15,44 @@ var highlights = &models.Highlights{ Subtitle: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.", Features: []*models.Feature{ { - Title: "∞ Factor Auth", + Title: "Crypto Wallet", Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, { - Title: "Control Your Data", + Title: "PassKey Authenticator", Desc: "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, { - Title: "Crypto Enabled", + Title: "Anonymous Identity", Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, { - Title: "Works Everywhere", + Title: "Tokenized Authorization", Desc: "Sonr anonymously associates your online identities with a Quantum-Resistant Vault which only you can access.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, }, } diff --git a/pkg/webapp/components/landing/highlights_templ.go b/pkg/webapp/components/landing/highlights_templ.go index 753f3be5f..242587cc9 100644 --- a/pkg/webapp/components/landing/highlights_templ.go +++ b/pkg/webapp/components/landing/highlights_templ.go @@ -23,24 +23,44 @@ var highlights = &models.Highlights{ Subtitle: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.", Features: []*models.Feature{ { - Title: "∞ Factor Auth", + Title: "Crypto Wallet", Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, { - Title: "Control Your Data", + Title: "PassKey Authenticator", Desc: "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, { - Title: "Crypto Enabled", + Title: "Anonymous Identity", Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, { - Title: "Works Everywhere", + Title: "Tokenized Authorization", Desc: "Sonr anonymously associates your online identities with a Quantum-Resistant Vault which only you can access.", Icon: nil, + Image: &models.Image{ + Src: "", + Width: "44", + Height: "44", + }, }, }, } @@ -76,7 +96,7 @@ func Highlights() templ.Component { var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Heading) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 52, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 72, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -89,7 +109,7 @@ func Highlights() templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Subtitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 55, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 75, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -151,7 +171,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(getSelectedClass(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 74, Col: 34} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 94, Col: 34} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -164,7 +184,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var6 string templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(getClickPrevent(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 76, Col: 41} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 96, Col: 41} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) if templ_7745c5c3_Err != nil { @@ -177,7 +197,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 80, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 100, Col: 21} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -190,7 +210,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(getShowBorder(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 83, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 103, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -203,7 +223,7 @@ func highlightTab(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 95, Col: 19} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 115, Col: 19} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -245,7 +265,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var11 string templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(getXShow(index)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 103, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 123, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) if templ_7745c5c3_Err != nil { @@ -258,7 +278,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var12 string templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 114, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 134, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -271,7 +291,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var13 string templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Width) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 115, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 135, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) if templ_7745c5c3_Err != nil { @@ -284,7 +304,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var14 string templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Image.Height) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 116, Col: 35} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 136, Col: 35} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { @@ -297,7 +317,7 @@ func highlightCard(index int, highlight *models.Feature) templ.Component { var templ_7745c5c3_Var15 string templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(highlight.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 117, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/webapp/components/landing/highlights.templ`, Line: 137, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) if templ_7745c5c3_Err != nil { diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 3d4576380..b6283e124 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -7,7 +7,7 @@ import "did/v1/genesis.proto"; option go_package = "github.com/onsonr/sonr/x/did/types"; -message Assertion { +message Account { option (cosmos.orm.v1.table) = { id: 1 primary_key: {fields: "did"} @@ -40,66 +40,10 @@ message Assertion { int64 creation_block = 7; } -message Authentication { +// PublicKey represents a public key +message PublicKey { option (cosmos.orm.v1.table) = { id: 2 - primary_key: {fields: "did"} - index: { - id: 1 - fields: "controller,subject" - unique: true - } - }; - - // The unique identifier of the authentication - string did = 1; - - // The authentication of the DID - string controller = 2; - - // Origin of the authentication - string subject = 3; - - // string is the verification method - string public_key_hex = 4; - - // CredentialID is the byte representation of the credential ID - bytes credential_id = 5; - - // Metadata of the authentication - map metadata = 6; - - // CreationBlock is the block number of the creation of the authentication - int64 creation_block = 7; -} - -// Macaroon is a Macaroon message type. -message Biscuit { - option (cosmos.orm.v1.table) = { - id: 5 - primary_key: { - fields: "id" - auto_increment: true - } - index: { - id: 1 - fields: "subject,origin" - unique: true - } - }; - - uint64 id = 1; - string controller = 2; - string subject = 3; - string origin = 4; - int64 expiry_height = 5; - string macaroon = 6; -} - -// Controller represents a Sonr DWN Vault -message Controller { - option (cosmos.orm.v1.table) = { - id: 3 primary_key: { fields: "number" auto_increment: true @@ -157,7 +101,7 @@ message Controller { // Verification represents a verification method message Verification { option (cosmos.orm.v1.table) = { - id: 6 + id: 3 primary_key: {fields: "did"} index: { id: 1 diff --git a/proto/dwn/v1/state.proto b/proto/dwn/v1/state.proto index fa5ba9440..625ab05cf 100644 --- a/proto/dwn/v1/state.proto +++ b/proto/dwn/v1/state.proto @@ -7,7 +7,7 @@ option go_package = "github.com/onsonr/sonr/x/dwn/types"; // https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md -message ExampleData { +message Credential { option (cosmos.orm.v1.table) = { id: 1; primary_key: { fields: "account" } @@ -16,4 +16,15 @@ message ExampleData { bytes account = 1; uint64 amount = 2; -} \ No newline at end of file +} + +message Profile { + option (cosmos.orm.v1.table) = { + id: 2; + primary_key: { fields: "account" } + index: { id: 1 fields: "amount" } + }; + + bytes account = 1; + uint64 amount = 2; +} diff --git a/proto/svc/v1/state.proto b/proto/svc/v1/state.proto index d1067bba4..890b1aa04 100644 --- a/proto/svc/v1/state.proto +++ b/proto/svc/v1/state.proto @@ -8,7 +8,7 @@ option go_package = "github.com/onsonr/sonr/x/svc/types"; // https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md -message Metadata { +message Domain { option (cosmos.orm.v1.table) = { id: 1 primary_key: { @@ -31,8 +31,8 @@ message Metadata { repeated string tags = 7; } -// Profile represents a DID alias -message Profile { +// Metadata represents a DID alias +message Metadata { option (cosmos.orm.v1.table) = { id: 2 primary_key: {fields: "id"} diff --git a/x/did/controller/table.go b/x/did/controller/table.go index 62ae0cfe6..1d6b00eb1 100644 --- a/x/did/controller/table.go +++ b/x/did/controller/table.go @@ -1,20 +1,13 @@ package controller -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/ethereum/go-ethereum/common/hexutil" - - didv1 "github.com/onsonr/sonr/api/did/v1" -) - -func LoadFromTableEntry(ctx sdk.Context, entry *didv1.Controller) (ControllerI, error) { - k, err := hexutil.Decode(entry.PublicKeyHex) - if err != nil { - return nil, err - } - return &controller{ - address: entry.Did, - chainID: ctx.ChainID(), - publicKey: k, - }, nil -} +// func LoadFromTableEntry(ctx sdk.Context, entry *didv1.Controller) (ControllerI, error) { +// k, err := hexutil.Decode(entry.PublicKeyHex) +// if err != nil { +// return nil, err +// } +// return &controller{ +// address: entry.Did, +// chainID: ctx.ChainID(), +// publicKey: k, +// }, nil +// } diff --git a/x/did/keeper/genesis.go b/x/did/keeper/genesis.go index e9e79e727..77b7c3bbf 100644 --- a/x/did/keeper/genesis.go +++ b/x/did/keeper/genesis.go @@ -23,18 +23,18 @@ func (k Keeper) NewController(ctx sdk.Context) (controller.ControllerI, error) { return controller, nil } -func (k Keeper) ResolveController(ctx sdk.Context, did string) (controller.ControllerI, error) { - ct, err := k.OrmDB.ControllerTable().GetByDid(ctx, did) - if err != nil { - return nil, err - } - c, err := controller.LoadFromTableEntry(ctx, ct) - if err != nil { - return nil, err - } - return c, nil -} - +// func (k Keeper) ResolveController(ctx sdk.Context, did string) (controller.ControllerI, error) { +// ct, err := k.OrmDB.ControllerTable().GetByDid(ctx, did) +// if err != nil { +// return nil, err +// } +// c, err := controller.LoadFromTableEntry(ctx, ct) +// if err != nil { +// return nil, err +// } +// return c, nil +// } +// // Logger returns the logger func (k Keeper) Logger() log.Logger { return k.logger diff --git a/x/did/types/pubkey.go b/x/did/types/pubkey.go index 88c1721f4..0910c0cef 100644 --- a/x/did/types/pubkey.go +++ b/x/did/types/pubkey.go @@ -16,11 +16,6 @@ type PubKeyI interface { // GetJwk() *commonv1.JSONWebKey } -// PubKey defines a generic pubkey. -type PublicKey interface { - VerifySignature(msg, sig []byte) bool -} - type PubKeyG[T any] interface { *T PublicKey diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 5699701fa..a30b9ccd2 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -23,7 +23,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type Assertion struct { +type Account struct { // The unique identifier of the assertion Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` // The authentication of the DID @@ -40,18 +40,18 @@ type Assertion struct { CreationBlock int64 `protobuf:"varint,7,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` } -func (m *Assertion) Reset() { *m = Assertion{} } -func (m *Assertion) String() string { return proto.CompactTextString(m) } -func (*Assertion) ProtoMessage() {} -func (*Assertion) Descriptor() ([]byte, []int) { +func (m *Account) Reset() { *m = Account{} } +func (m *Account) String() string { return proto.CompactTextString(m) } +func (*Account) ProtoMessage() {} +func (*Account) Descriptor() ([]byte, []int) { return fileDescriptor_f44bb702879c34b4, []int{0} } -func (m *Assertion) XXX_Unmarshal(b []byte) error { +func (m *Account) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Assertion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Assertion.Marshal(b, m, deterministic) + return xxx_messageInfo_Account.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -61,253 +61,69 @@ func (m *Assertion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Assertion) XXX_Merge(src proto.Message) { - xxx_messageInfo_Assertion.Merge(m, src) +func (m *Account) XXX_Merge(src proto.Message) { + xxx_messageInfo_Account.Merge(m, src) } -func (m *Assertion) XXX_Size() int { +func (m *Account) XXX_Size() int { return m.Size() } -func (m *Assertion) XXX_DiscardUnknown() { - xxx_messageInfo_Assertion.DiscardUnknown(m) +func (m *Account) XXX_DiscardUnknown() { + xxx_messageInfo_Account.DiscardUnknown(m) } -var xxx_messageInfo_Assertion proto.InternalMessageInfo +var xxx_messageInfo_Account proto.InternalMessageInfo -func (m *Assertion) GetDid() string { +func (m *Account) GetDid() string { if m != nil { return m.Did } return "" } -func (m *Assertion) GetController() string { +func (m *Account) GetController() string { if m != nil { return m.Controller } return "" } -func (m *Assertion) GetSubject() string { +func (m *Account) GetSubject() string { if m != nil { return m.Subject } return "" } -func (m *Assertion) GetPublicKeyHex() string { +func (m *Account) GetPublicKeyHex() string { if m != nil { return m.PublicKeyHex } return "" } -func (m *Assertion) GetAssertionType() string { +func (m *Account) GetAssertionType() string { if m != nil { return m.AssertionType } return "" } -func (m *Assertion) GetAccumulator() map[string][]byte { +func (m *Account) GetAccumulator() map[string][]byte { if m != nil { return m.Accumulator } return nil } -func (m *Assertion) GetCreationBlock() int64 { +func (m *Account) GetCreationBlock() int64 { if m != nil { return m.CreationBlock } return 0 } -type Authentication struct { - // The unique identifier of the authentication - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - // The authentication of the DID - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Origin of the authentication - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - // string is the verification method - PublicKeyHex string `protobuf:"bytes,4,opt,name=public_key_hex,json=publicKeyHex,proto3" json:"public_key_hex,omitempty"` - // CredentialID is the byte representation of the credential ID - CredentialId []byte `protobuf:"bytes,5,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - // Metadata of the authentication - Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // CreationBlock is the block number of the creation of the authentication - CreationBlock int64 `protobuf:"varint,7,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` -} - -func (m *Authentication) Reset() { *m = Authentication{} } -func (m *Authentication) String() string { return proto.CompactTextString(m) } -func (*Authentication) ProtoMessage() {} -func (*Authentication) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{1} -} -func (m *Authentication) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Authentication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Authentication.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Authentication) XXX_Merge(src proto.Message) { - xxx_messageInfo_Authentication.Merge(m, src) -} -func (m *Authentication) XXX_Size() int { - return m.Size() -} -func (m *Authentication) XXX_DiscardUnknown() { - xxx_messageInfo_Authentication.DiscardUnknown(m) -} - -var xxx_messageInfo_Authentication proto.InternalMessageInfo - -func (m *Authentication) GetDid() string { - if m != nil { - return m.Did - } - return "" -} - -func (m *Authentication) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Authentication) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Authentication) GetPublicKeyHex() string { - if m != nil { - return m.PublicKeyHex - } - return "" -} - -func (m *Authentication) GetCredentialId() []byte { - if m != nil { - return m.CredentialId - } - return nil -} - -func (m *Authentication) GetMetadata() map[string]string { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *Authentication) GetCreationBlock() int64 { - if m != nil { - return m.CreationBlock - } - return 0 -} - -// Macaroon is a Macaroon message type. -type Biscuit struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` - ExpiryHeight int64 `protobuf:"varint,5,opt,name=expiry_height,json=expiryHeight,proto3" json:"expiry_height,omitempty"` - Macaroon string `protobuf:"bytes,6,opt,name=macaroon,proto3" json:"macaroon,omitempty"` -} - -func (m *Biscuit) Reset() { *m = Biscuit{} } -func (m *Biscuit) String() string { return proto.CompactTextString(m) } -func (*Biscuit) ProtoMessage() {} -func (*Biscuit) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{2} -} -func (m *Biscuit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Biscuit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Biscuit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Biscuit) XXX_Merge(src proto.Message) { - xxx_messageInfo_Biscuit.Merge(m, src) -} -func (m *Biscuit) XXX_Size() int { - return m.Size() -} -func (m *Biscuit) XXX_DiscardUnknown() { - xxx_messageInfo_Biscuit.DiscardUnknown(m) -} - -var xxx_messageInfo_Biscuit proto.InternalMessageInfo - -func (m *Biscuit) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *Biscuit) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Biscuit) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Biscuit) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *Biscuit) GetExpiryHeight() int64 { - if m != nil { - return m.ExpiryHeight - } - return 0 -} - -func (m *Biscuit) GetMacaroon() string { - if m != nil { - return m.Macaroon - } - return "" -} - -// Controller represents a Sonr DWN Vault -type Controller struct { +// PublicKey represents a public key +type PublicKey struct { // The unique identifier of the controller Number uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // The unique identifier of the controller @@ -328,18 +144,18 @@ type Controller struct { CreationBlock int64 `protobuf:"varint,9,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` } -func (m *Controller) Reset() { *m = Controller{} } -func (m *Controller) String() string { return proto.CompactTextString(m) } -func (*Controller) ProtoMessage() {} -func (*Controller) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{3} +func (m *PublicKey) Reset() { *m = PublicKey{} } +func (m *PublicKey) String() string { return proto.CompactTextString(m) } +func (*PublicKey) ProtoMessage() {} +func (*PublicKey) Descriptor() ([]byte, []int) { + return fileDescriptor_f44bb702879c34b4, []int{1} } -func (m *Controller) XXX_Unmarshal(b []byte) error { +func (m *PublicKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Controller) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Controller.Marshal(b, m, deterministic) + return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -349,75 +165,75 @@ func (m *Controller) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Controller) XXX_Merge(src proto.Message) { - xxx_messageInfo_Controller.Merge(m, src) +func (m *PublicKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PublicKey.Merge(m, src) } -func (m *Controller) XXX_Size() int { +func (m *PublicKey) XXX_Size() int { return m.Size() } -func (m *Controller) XXX_DiscardUnknown() { - xxx_messageInfo_Controller.DiscardUnknown(m) +func (m *PublicKey) XXX_DiscardUnknown() { + xxx_messageInfo_PublicKey.DiscardUnknown(m) } -var xxx_messageInfo_Controller proto.InternalMessageInfo +var xxx_messageInfo_PublicKey proto.InternalMessageInfo -func (m *Controller) GetNumber() uint64 { +func (m *PublicKey) GetNumber() uint64 { if m != nil { return m.Number } return 0 } -func (m *Controller) GetDid() string { +func (m *PublicKey) GetDid() string { if m != nil { return m.Did } return "" } -func (m *Controller) GetSonrAddress() string { +func (m *PublicKey) GetSonrAddress() string { if m != nil { return m.SonrAddress } return "" } -func (m *Controller) GetEthAddress() string { +func (m *PublicKey) GetEthAddress() string { if m != nil { return m.EthAddress } return "" } -func (m *Controller) GetBtcAddress() string { +func (m *PublicKey) GetBtcAddress() string { if m != nil { return m.BtcAddress } return "" } -func (m *Controller) GetPublicKeyHex() string { +func (m *PublicKey) GetPublicKeyHex() string { if m != nil { return m.PublicKeyHex } return "" } -func (m *Controller) GetKsVal() string { +func (m *PublicKey) GetKsVal() string { if m != nil { return m.KsVal } return "" } -func (m *Controller) GetClaimedBlock() int64 { +func (m *PublicKey) GetClaimedBlock() int64 { if m != nil { return m.ClaimedBlock } return 0 } -func (m *Controller) GetCreationBlock() int64 { +func (m *PublicKey) GetCreationBlock() int64 { if m != nil { return m.CreationBlock } @@ -450,7 +266,7 @@ func (m *Verification) Reset() { *m = Verification{} } func (m *Verification) String() string { return proto.CompactTextString(m) } func (*Verification) ProtoMessage() {} func (*Verification) Descriptor() ([]byte, []int) { - return fileDescriptor_f44bb702879c34b4, []int{4} + return fileDescriptor_f44bb702879c34b4, []int{2} } func (m *Verification) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -543,12 +359,9 @@ func (m *Verification) GetCreationBlock() int64 { } func init() { - proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") - proto.RegisterMapType((map[string][]byte)(nil), "did.v1.Assertion.AccumulatorEntry") - proto.RegisterType((*Authentication)(nil), "did.v1.Authentication") - proto.RegisterMapType((map[string]string)(nil), "did.v1.Authentication.MetadataEntry") - proto.RegisterType((*Biscuit)(nil), "did.v1.Biscuit") - proto.RegisterType((*Controller)(nil), "did.v1.Controller") + proto.RegisterType((*Account)(nil), "did.v1.Account") + proto.RegisterMapType((map[string][]byte)(nil), "did.v1.Account.AccumulatorEntry") + proto.RegisterType((*PublicKey)(nil), "did.v1.PublicKey") proto.RegisterType((*Verification)(nil), "did.v1.Verification") proto.RegisterMapType((map[string]string)(nil), "did.v1.Verification.MetadataEntry") } @@ -556,62 +369,54 @@ func init() { func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 821 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x95, 0xdf, 0x8a, 0x23, 0x45, - 0x14, 0xc6, 0xa7, 0xba, 0x27, 0x3d, 0x93, 0x33, 0x99, 0xd0, 0x5b, 0x8c, 0x6b, 0x31, 0x68, 0x8c, - 0xd9, 0x75, 0x19, 0x71, 0x48, 0x58, 0xbd, 0x91, 0x51, 0x16, 0x67, 0x54, 0x58, 0x91, 0xbd, 0x89, - 0xb2, 0xa0, 0x37, 0xa1, 0xba, 0xab, 0x9c, 0x94, 0xe9, 0xee, 0x8a, 0x55, 0xd5, 0x61, 0xf2, 0x12, - 0xe2, 0x13, 0xf8, 0x3c, 0x5e, 0x2e, 0xe8, 0x85, 0x97, 0x32, 0xf3, 0x06, 0x5e, 0x09, 0x0a, 0x4a, - 0x55, 0x75, 0x27, 0x1d, 0x37, 0xb0, 0xba, 0x0a, 0x7b, 0x13, 0x72, 0xbe, 0x3e, 0xf5, 0xe7, 0xfc, - 0xce, 0xd7, 0xa7, 0x01, 0x33, 0xc1, 0x46, 0x8b, 0xfb, 0x23, 0x6d, 0xa8, 0xe1, 0xc3, 0xb9, 0x92, - 0x46, 0xe2, 0x88, 0x09, 0x36, 0x5c, 0xdc, 0x3f, 0x7e, 0x39, 0x95, 0x3a, 0x97, 0x7a, 0x24, 0x55, - 0x6e, 0x53, 0xa4, 0xca, 0x7d, 0xc2, 0xf1, 0x51, 0xb5, 0xe8, 0x92, 0x17, 0x5c, 0x0b, 0xed, 0xd5, - 0xc1, 0x1f, 0x01, 0xb4, 0xcf, 0xb5, 0xe6, 0xca, 0x08, 0x59, 0xe0, 0x18, 0x42, 0x26, 0x18, 0x41, - 0x7d, 0x74, 0xd2, 0x1e, 0xdb, 0xbf, 0xb8, 0x07, 0x90, 0xca, 0xc2, 0x28, 0x99, 0x65, 0x5c, 0x91, - 0xc0, 0x3d, 0x68, 0x28, 0x98, 0xc0, 0x9e, 0x2e, 0x93, 0xaf, 0x79, 0x6a, 0x48, 0xe8, 0x1e, 0xd6, - 0x21, 0xbe, 0x0b, 0xdd, 0x79, 0x99, 0x64, 0x22, 0x9d, 0xcc, 0xf8, 0x72, 0x32, 0xe5, 0x57, 0x64, - 0xd7, 0x25, 0x74, 0xbc, 0xfa, 0x29, 0x5f, 0x3e, 0xe4, 0x57, 0xf8, 0x0d, 0xe8, 0xd2, 0xfa, 0xf8, - 0x89, 0x59, 0xce, 0x39, 0x69, 0xb9, 0xac, 0xc3, 0x95, 0xfa, 0xf9, 0x72, 0xce, 0xf1, 0x47, 0x70, - 0x40, 0xd3, 0xb4, 0xcc, 0xcb, 0x8c, 0x1a, 0xa9, 0x48, 0xd4, 0x0f, 0x4f, 0x0e, 0xde, 0x1e, 0x0c, - 0x7d, 0xcd, 0xc3, 0x55, 0x01, 0xc3, 0xf3, 0x75, 0xd2, 0xc7, 0x85, 0x51, 0xcb, 0x71, 0x73, 0x99, - 0x3d, 0x2c, 0x55, 0x9c, 0xba, 0xb3, 0x92, 0x4c, 0xa6, 0x33, 0xb2, 0xd7, 0x47, 0x27, 0xe1, 0xf8, - 0xb0, 0x56, 0x2f, 0xac, 0x78, 0xfc, 0x00, 0xe2, 0xbf, 0xef, 0x63, 0xc9, 0xcc, 0xf8, 0xb2, 0x26, - 0x33, 0xe3, 0x4b, 0x7c, 0x04, 0xad, 0x05, 0xcd, 0x4a, 0xee, 0xa0, 0x74, 0xc6, 0x3e, 0x38, 0x0b, - 0xde, 0x45, 0x67, 0x6f, 0xfe, 0xfa, 0xfd, 0x8f, 0xdf, 0x86, 0x77, 0xa0, 0xe5, 0x68, 0x62, 0x02, - 0x78, 0x0d, 0xec, 0xb4, 0xc2, 0x13, 0x23, 0x82, 0x08, 0x1a, 0xfc, 0x16, 0x40, 0xf7, 0xbc, 0x34, - 0x53, 0x5e, 0x18, 0x91, 0xd2, 0x17, 0xd4, 0x83, 0x3b, 0x60, 0x01, 0x30, 0x7b, 0x07, 0x9a, 0x4d, - 0x04, 0x73, 0x2d, 0xe8, 0x8c, 0x3b, 0x6b, 0xf1, 0x13, 0x86, 0x3f, 0x80, 0xfd, 0x9c, 0x1b, 0xca, - 0xa8, 0xa1, 0x15, 0xfe, 0xbb, 0x2b, 0xfc, 0x1b, 0x05, 0x0c, 0x1f, 0x55, 0x69, 0xbe, 0x01, 0xab, - 0x55, 0xff, 0x94, 0xfe, 0x7b, 0x70, 0xb8, 0xb1, 0xc3, 0xb3, 0xd0, 0xb7, 0x9f, 0x0b, 0x7d, 0x30, - 0xf8, 0x09, 0xc1, 0xde, 0x85, 0xd0, 0x69, 0x29, 0x0c, 0xee, 0x42, 0x50, 0x21, 0xdf, 0x1d, 0x07, - 0xff, 0x89, 0xf8, 0x6d, 0x88, 0xa4, 0x12, 0x97, 0xa2, 0xa8, 0x48, 0x57, 0x91, 0x65, 0xcc, 0xaf, - 0xe6, 0x42, 0xd9, 0x2e, 0x88, 0xcb, 0xa9, 0x71, 0x8c, 0xc3, 0x71, 0xc7, 0x8b, 0x0f, 0x9d, 0x86, - 0x8f, 0x61, 0x3f, 0xa7, 0x29, 0x55, 0x52, 0x16, 0x24, 0x72, 0xcb, 0x57, 0xf1, 0xd9, 0x3d, 0x57, - 0x59, 0x1f, 0x22, 0x7b, 0xd5, 0x18, 0xe1, 0x23, 0xe8, 0x56, 0x67, 0x9e, 0xfa, 0x23, 0x5c, 0x59, - 0xad, 0xc1, 0x9f, 0x01, 0xc0, 0x87, 0xeb, 0x9b, 0xde, 0x86, 0xa8, 0x28, 0xf3, 0x84, 0xab, 0xaa, - 0xba, 0x2a, 0xaa, 0x5d, 0x16, 0xac, 0x5d, 0xf6, 0x3a, 0x74, 0xb4, 0x2c, 0xd4, 0x84, 0x32, 0xa6, - 0xb8, 0xd6, 0x55, 0x61, 0x07, 0x56, 0x3b, 0xf7, 0x12, 0x7e, 0x0d, 0x0e, 0xb8, 0x99, 0xae, 0x32, - 0x7c, 0x85, 0xc0, 0xcd, 0xb4, 0x91, 0x90, 0x98, 0x74, 0x95, 0xe0, 0x5f, 0x65, 0x48, 0x4c, 0x5a, - 0x27, 0x3c, 0x6d, 0xc8, 0x68, 0x8b, 0x21, 0x5f, 0x82, 0x68, 0xa6, 0x27, 0x0b, 0x9a, 0x39, 0x87, - 0xb4, 0xc7, 0xad, 0x99, 0x7e, 0x4c, 0x33, 0xe7, 0xd3, 0x8c, 0x8a, 0x9c, 0xb3, 0xca, 0x3f, 0xfb, - 0x9e, 0x61, 0x25, 0x3a, 0xfb, 0x6c, 0x71, 0x59, 0x7b, 0x8b, 0xcb, 0xce, 0xbe, 0x70, 0x38, 0x3f, - 0x03, 0xa8, 0xf9, 0xc4, 0x08, 0xe3, 0x4d, 0x02, 0x16, 0x28, 0xbe, 0xb5, 0x51, 0x72, 0x1c, 0x78, - 0xa9, 0x51, 0x64, 0x1c, 0x12, 0x84, 0xdb, 0x8e, 0x66, 0xbc, 0x4b, 0x10, 0x09, 0x07, 0xbf, 0x87, - 0xd0, 0x79, 0xcc, 0x95, 0xf8, 0xea, 0xf9, 0xdf, 0xe8, 0x57, 0x01, 0x98, 0x60, 0x93, 0x9c, 0x9b, - 0xa9, 0x64, 0x55, 0x27, 0xda, 0x4c, 0xb0, 0x47, 0x4e, 0xb0, 0x4d, 0x15, 0x5a, 0x97, 0x5c, 0xd5, - 0x26, 0xf3, 0x51, 0xd3, 0x96, 0xad, 0x67, 0x0d, 0x82, 0x6d, 0xdc, 0xdf, 0x82, 0x5b, 0x8b, 0xc6, - 0xc5, 0xfd, 0x3c, 0xf6, 0x2d, 0x88, 0x9b, 0x0f, 0xdc, 0x48, 0x7e, 0xd0, 0x18, 0x08, 0xfb, 0x9b, - 0xf3, 0xb8, 0x59, 0xfd, 0xbf, 0x18, 0x07, 0xed, 0xff, 0x7d, 0x1c, 0x7c, 0xe3, 0xba, 0x3c, 0xab, - 0xc7, 0xc1, 0x11, 0x74, 0x3d, 0xa9, 0xe6, 0x28, 0xc0, 0x03, 0x78, 0xa5, 0x31, 0x24, 0xd6, 0xdc, - 0x4f, 0x7d, 0xae, 0xeb, 0xf9, 0x3d, 0xe8, 0x3f, 0x45, 0xa6, 0xde, 0xa4, 0xce, 0x0b, 0x09, 0x22, - 0xd1, 0xc5, 0xfb, 0x3f, 0x5c, 0xf7, 0xd0, 0x93, 0xeb, 0x1e, 0xfa, 0xe5, 0xba, 0x87, 0xbe, 0xbb, - 0xe9, 0xed, 0x3c, 0xb9, 0xe9, 0xed, 0xfc, 0x7c, 0xd3, 0xdb, 0xf9, 0x72, 0x70, 0x29, 0xcc, 0xb4, - 0x4c, 0x86, 0xa9, 0xcc, 0x47, 0xb2, 0xb0, 0x4e, 0x1b, 0xb9, 0x9f, 0xab, 0x91, 0xfd, 0x32, 0xdb, - 0x1d, 0x75, 0x12, 0xb9, 0xaf, 0xf2, 0x3b, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xce, 0xd1, 0x02, - 0x2a, 0xe2, 0x07, 0x00, 0x00, + // 690 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xd1, 0x6a, 0x13, 0x4b, + 0x1c, 0xc6, 0x3b, 0xd9, 0x26, 0x6d, 0xfe, 0x49, 0xca, 0x76, 0xe8, 0x39, 0x67, 0x08, 0xe7, 0xe4, + 0xc4, 0x54, 0xa5, 0x62, 0x49, 0xa8, 0xde, 0x48, 0x95, 0x42, 0x0b, 0x82, 0x20, 0x05, 0x89, 0x52, + 0xd0, 0x9b, 0xb0, 0x3b, 0x33, 0x36, 0x6b, 0x76, 0x77, 0xe2, 0xcc, 0x6c, 0xe8, 0xbe, 0x84, 0xf8, + 0x04, 0x3e, 0x8f, 0x97, 0x05, 0x6f, 0xbc, 0x94, 0xf6, 0x0d, 0xbc, 0x12, 0x04, 0x91, 0x9d, 0xd9, + 0x4d, 0xb7, 0x36, 0x50, 0xf1, 0x26, 0xc9, 0x7c, 0xf3, 0xcd, 0xcc, 0xce, 0xef, 0xcb, 0xb7, 0x80, + 0x59, 0xc0, 0x06, 0xb3, 0x9d, 0x81, 0xd2, 0x9e, 0xe6, 0xfd, 0xa9, 0x14, 0x5a, 0xe0, 0x1a, 0x0b, + 0x58, 0x7f, 0xb6, 0xd3, 0xfe, 0x87, 0x0a, 0x15, 0x09, 0x35, 0x10, 0x32, 0xca, 0x2c, 0x42, 0x46, + 0xd6, 0xd0, 0xde, 0xc8, 0x17, 0x1d, 0xf3, 0x98, 0xab, 0x40, 0x59, 0xb5, 0xf7, 0xad, 0x02, 0x2b, + 0xfb, 0x94, 0x8a, 0x24, 0xd6, 0xd8, 0x05, 0x87, 0x05, 0x8c, 0xa0, 0x2e, 0xda, 0xaa, 0x0f, 0xb3, + 0x9f, 0xb8, 0x03, 0x40, 0x45, 0xac, 0xa5, 0x08, 0x43, 0x2e, 0x49, 0xc5, 0x4c, 0x94, 0x14, 0x4c, + 0x60, 0x45, 0x25, 0xfe, 0x1b, 0x4e, 0x35, 0x71, 0xcc, 0x64, 0x31, 0xc4, 0x37, 0x61, 0x6d, 0x9a, + 0xf8, 0x61, 0x40, 0x47, 0x13, 0x9e, 0x8e, 0xc6, 0xfc, 0x84, 0x2c, 0x1b, 0x43, 0xd3, 0xaa, 0x4f, + 0x79, 0xfa, 0x84, 0x9f, 0xe0, 0x5b, 0xb0, 0xe6, 0x29, 0xc5, 0xa5, 0x0e, 0x44, 0x3c, 0xd2, 0xe9, + 0x94, 0x93, 0xaa, 0x71, 0xb5, 0xe6, 0xea, 0x8b, 0x74, 0xca, 0xf1, 0x01, 0x34, 0x3c, 0x4a, 0x93, + 0x28, 0x09, 0x3d, 0x2d, 0x24, 0xa9, 0x75, 0x9d, 0xad, 0xc6, 0xbd, 0x6e, 0xdf, 0xde, 0xb8, 0x9f, + 0x3f, 0x7e, 0xf6, 0x5d, 0x58, 0x1e, 0xc7, 0x5a, 0xa6, 0xc3, 0xf2, 0xa2, 0xec, 0x28, 0x2a, 0xb9, + 0x67, 0x4e, 0xf2, 0x43, 0x41, 0x27, 0x64, 0xa5, 0x8b, 0xb6, 0x9c, 0x61, 0xab, 0x50, 0x0f, 0x32, + 0xb1, 0xbd, 0x07, 0xee, 0xaf, 0xfb, 0x64, 0x5c, 0x26, 0x3c, 0x2d, 0xb8, 0x4c, 0x78, 0x8a, 0x37, + 0xa0, 0x3a, 0xf3, 0xc2, 0x84, 0x1b, 0x24, 0xcd, 0xa1, 0x1d, 0xec, 0x56, 0x1e, 0xa0, 0xdd, 0x3b, + 0x5f, 0x3f, 0x7c, 0x7a, 0xe7, 0x6c, 0x42, 0xd5, 0xb0, 0xc4, 0x04, 0xf0, 0x05, 0xae, 0xed, 0x1c, + 0x8e, 0x8b, 0x08, 0x22, 0xa8, 0xf7, 0xa3, 0x02, 0xf5, 0x67, 0x05, 0x0d, 0xfc, 0x37, 0xd4, 0xe2, + 0x24, 0xf2, 0xb9, 0x34, 0xe7, 0x2c, 0x0f, 0xf3, 0x51, 0x11, 0x4a, 0xe5, 0x22, 0x94, 0x1b, 0xd0, + 0x54, 0x22, 0x96, 0x23, 0x8f, 0x31, 0xc9, 0x95, 0xca, 0xc9, 0x37, 0x32, 0x6d, 0xdf, 0x4a, 0xf8, + 0x7f, 0x68, 0x70, 0x3d, 0x9e, 0x3b, 0x2c, 0x7a, 0xe0, 0x7a, 0x5c, 0x32, 0xf8, 0x9a, 0xce, 0x0d, + 0x96, 0x3a, 0xf8, 0x9a, 0x16, 0x86, 0xab, 0xf9, 0xd5, 0x16, 0xe4, 0xf7, 0x17, 0xd4, 0x26, 0x6a, + 0x34, 0xf3, 0x42, 0x03, 0xb3, 0x3e, 0xac, 0x4e, 0xd4, 0x91, 0x17, 0xe2, 0x4d, 0x68, 0xd1, 0xd0, + 0x0b, 0x22, 0xce, 0x72, 0xd4, 0xab, 0x06, 0x75, 0x33, 0x17, 0x0d, 0xe9, 0x05, 0x81, 0xd4, 0x17, + 0x04, 0xb2, 0xfb, 0xd2, 0x00, 0x7d, 0x0e, 0x50, 0xf0, 0x71, 0x11, 0xc6, 0x97, 0x09, 0x64, 0x3c, + 0xf1, 0xfa, 0xa5, 0x2b, 0xbb, 0x15, 0x2b, 0x95, 0x2e, 0xe9, 0x3a, 0x04, 0xe1, 0xba, 0xa1, 0xe9, + 0x2e, 0x13, 0x44, 0x2a, 0xbd, 0xef, 0x0e, 0x34, 0x8f, 0xb8, 0x0c, 0x5e, 0x07, 0xd4, 0x1c, 0xf8, + 0x07, 0x05, 0xf8, 0x0f, 0x80, 0x05, 0x6c, 0x14, 0x71, 0x3d, 0x16, 0x2c, 0x4f, 0xa2, 0xce, 0x02, + 0x76, 0x68, 0x84, 0x2c, 0xd4, 0x40, 0xa9, 0x84, 0xcb, 0x3c, 0x82, 0x7c, 0x54, 0xee, 0x4d, 0xf5, + 0xba, 0xde, 0x2c, 0xe2, 0x7e, 0x17, 0xd6, 0x67, 0xa5, 0x07, 0xb7, 0xd5, 0xb1, 0x11, 0xb8, 0xe5, + 0x09, 0xd3, 0x9e, 0x3d, 0x58, 0x8d, 0xb8, 0xf6, 0x98, 0xa7, 0x3d, 0xb2, 0x6a, 0xaa, 0xd3, 0x2b, + 0xaa, 0x53, 0xbe, 0x7d, 0xff, 0x30, 0x37, 0xd9, 0xf2, 0xcc, 0xd7, 0xfc, 0x66, 0x50, 0xed, 0x87, + 0xd0, 0xba, 0xb4, 0xc3, 0x75, 0xb5, 0xa9, 0x97, 0x6b, 0xf3, 0xd6, 0xa4, 0x3c, 0x29, 0x6a, 0xb3, + 0x01, 0x6b, 0x96, 0x54, 0xb9, 0x32, 0xb8, 0x07, 0xff, 0x96, 0xca, 0x74, 0xc1, 0x7d, 0xdb, 0x7a, + 0x4d, 0xe6, 0xb7, 0xa1, 0x7b, 0x85, 0x4c, 0xb1, 0x49, 0xe1, 0x73, 0x08, 0x22, 0xce, 0xc1, 0xa3, + 0x8f, 0x67, 0x1d, 0x74, 0x7a, 0xd6, 0x41, 0x5f, 0xce, 0x3a, 0xe8, 0xfd, 0x79, 0x67, 0xe9, 0xf4, + 0xbc, 0xb3, 0xf4, 0xf9, 0xbc, 0xb3, 0xf4, 0xaa, 0x77, 0x1c, 0xe8, 0x71, 0xe2, 0xf7, 0xa9, 0x88, + 0x06, 0x22, 0xce, 0xfe, 0x69, 0x03, 0xf3, 0x71, 0x32, 0xc8, 0x5e, 0xa1, 0xd9, 0x8e, 0xca, 0xaf, + 0x99, 0xd7, 0xe7, 0xfd, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xe7, 0x64, 0xd4, 0x8b, 0x05, + 0x00, 0x00, } -func (m *Assertion) Marshal() (dAtA []byte, err error) { +func (m *Account) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -621,12 +426,12 @@ func (m *Assertion) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Assertion) MarshalTo(dAtA []byte) (int, error) { +func (m *Account) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -695,7 +500,7 @@ func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Authentication) Marshal() (dAtA []byte, err error) { +func (m *PublicKey) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -705,155 +510,12 @@ func (m *Authentication) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Authentication) MarshalTo(dAtA []byte) (int, error) { +func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Authentication) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CreationBlock != 0 { - i = encodeVarintState(dAtA, i, uint64(m.CreationBlock)) - i-- - dAtA[i] = 0x38 - } - if len(m.Metadata) > 0 { - for k := range m.Metadata { - v := m.Metadata[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintState(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintState(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintState(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.CredentialId) > 0 { - i -= len(m.CredentialId) - copy(dAtA[i:], m.CredentialId) - i = encodeVarintState(dAtA, i, uint64(len(m.CredentialId))) - i-- - dAtA[i] = 0x2a - } - if len(m.PublicKeyHex) > 0 { - i -= len(m.PublicKeyHex) - copy(dAtA[i:], m.PublicKeyHex) - i = encodeVarintState(dAtA, i, uint64(len(m.PublicKeyHex))) - i-- - dAtA[i] = 0x22 - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintState(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x1a - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x12 - } - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintState(dAtA, i, uint64(len(m.Did))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Biscuit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Biscuit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Biscuit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Macaroon) > 0 { - i -= len(m.Macaroon) - copy(dAtA[i:], m.Macaroon) - i = encodeVarintState(dAtA, i, uint64(len(m.Macaroon))) - i-- - dAtA[i] = 0x32 - } - if m.ExpiryHeight != 0 { - i = encodeVarintState(dAtA, i, uint64(m.ExpiryHeight)) - i-- - dAtA[i] = 0x28 - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x22 - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintState(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x1a - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintState(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Controller) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Controller) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PublicKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1025,7 +687,7 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Assertion) Size() (n int) { +func (m *Account) Size() (n int) { if m == nil { return 0 } @@ -1069,78 +731,7 @@ func (m *Assertion) Size() (n int) { return n } -func (m *Authentication) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.PublicKeyHex) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.CredentialId) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if len(m.Metadata) > 0 { - for k, v := range m.Metadata { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v))) - n += mapEntrySize + 1 + sovState(uint64(mapEntrySize)) - } - } - if m.CreationBlock != 0 { - n += 1 + sovState(uint64(m.CreationBlock)) - } - return n -} - -func (m *Biscuit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovState(uint64(m.Id)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - if m.ExpiryHeight != 0 { - n += 1 + sovState(uint64(m.ExpiryHeight)) - } - l = len(m.Macaroon) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } - return n -} - -func (m *Controller) Size() (n int) { +func (m *PublicKey) Size() (n int) { if m == nil { return 0 } @@ -1236,7 +827,7 @@ func sovState(x uint64) (n int) { func sozState(x uint64) (n int) { return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Assertion) Unmarshal(dAtA []byte) error { +func (m *Account) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1259,10 +850,10 @@ func (m *Assertion) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Assertion: wiretype end group for non-group") + return fmt.Errorf("proto: Account: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Assertion: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Account: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1593,7 +1184,7 @@ func (m *Assertion) Unmarshal(dAtA []byte) error { } return nil } -func (m *Authentication) Unmarshal(dAtA []byte) error { +func (m *PublicKey) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1616,584 +1207,10 @@ func (m *Authentication) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Authentication: wiretype end group for non-group") + return fmt.Errorf("proto: PublicKey: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Authentication: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyHex", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeyHex = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if m.CredentialId == nil { - m.CredentialId = []byte{} - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metadata == nil { - m.Metadata = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthState - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthState - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthState - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthState - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Metadata[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CreationBlock", wireType) - } - m.CreationBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CreationBlock |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Biscuit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Biscuit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Biscuit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiryHeight", wireType) - } - m.ExpiryHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiryHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Macaroon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthState - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthState - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Macaroon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Controller) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Controller: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Controller: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PublicKey: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/dwn/keeper/orm_test.go b/x/dwn/keeper/orm_test.go deleted file mode 100644 index de439d2bf..000000000 --- a/x/dwn/keeper/orm_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package keeper_test - -import ( - "testing" - - apiv1 "github.com/onsonr/sonr/api/dwn/v1" - "github.com/stretchr/testify/require" -) - -func TestORM(t *testing.T) { - f := SetupTest(t) - - dt := f.k.OrmDB.ExampleDataTable() - acc := []byte("test_acc") - amt := uint64(7) - - err := dt.Insert(f.ctx, &apiv1.ExampleData{ - Account: acc, - Amount: amt, - }) - require.NoError(t, err) - - d, err := dt.Has(f.ctx, []byte("test_acc")) - require.NoError(t, err) - require.True(t, d) - - res, err := dt.Get(f.ctx, []byte("test_acc")) - require.NoError(t, err) - require.NotNil(t, res) - require.EqualValues(t, amt, res.Amount) -} diff --git a/x/dwn/types/state.pb.go b/x/dwn/types/state.pb.go index f3029c324..50a481acf 100644 --- a/x/dwn/types/state.pb.go +++ b/x/dwn/types/state.pb.go @@ -23,23 +23,23 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type ExampleData struct { +type Credential struct { Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` } -func (m *ExampleData) Reset() { *m = ExampleData{} } -func (m *ExampleData) String() string { return proto.CompactTextString(m) } -func (*ExampleData) ProtoMessage() {} -func (*ExampleData) Descriptor() ([]byte, []int) { +func (m *Credential) Reset() { *m = Credential{} } +func (m *Credential) String() string { return proto.CompactTextString(m) } +func (*Credential) ProtoMessage() {} +func (*Credential) Descriptor() ([]byte, []int) { return fileDescriptor_040a9b061177db90, []int{0} } -func (m *ExampleData) XXX_Unmarshal(b []byte) error { +func (m *Credential) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ExampleData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ExampleData.Marshal(b, m, deterministic) + return xxx_messageInfo_Credential.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -49,26 +49,78 @@ func (m *ExampleData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *ExampleData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExampleData.Merge(m, src) +func (m *Credential) XXX_Merge(src proto.Message) { + xxx_messageInfo_Credential.Merge(m, src) } -func (m *ExampleData) XXX_Size() int { +func (m *Credential) XXX_Size() int { return m.Size() } -func (m *ExampleData) XXX_DiscardUnknown() { - xxx_messageInfo_ExampleData.DiscardUnknown(m) +func (m *Credential) XXX_DiscardUnknown() { + xxx_messageInfo_Credential.DiscardUnknown(m) } -var xxx_messageInfo_ExampleData proto.InternalMessageInfo +var xxx_messageInfo_Credential proto.InternalMessageInfo -func (m *ExampleData) GetAccount() []byte { +func (m *Credential) GetAccount() []byte { if m != nil { return m.Account } return nil } -func (m *ExampleData) GetAmount() uint64 { +func (m *Credential) GetAmount() uint64 { + if m != nil { + return m.Amount + } + return 0 +} + +type Profile struct { + Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` + Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` +} + +func (m *Profile) Reset() { *m = Profile{} } +func (m *Profile) String() string { return proto.CompactTextString(m) } +func (*Profile) ProtoMessage() {} +func (*Profile) Descriptor() ([]byte, []int) { + return fileDescriptor_040a9b061177db90, []int{1} +} +func (m *Profile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Profile.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Profile) XXX_Merge(src proto.Message) { + xxx_messageInfo_Profile.Merge(m, src) +} +func (m *Profile) XXX_Size() int { + return m.Size() +} +func (m *Profile) XXX_DiscardUnknown() { + xxx_messageInfo_Profile.DiscardUnknown(m) +} + +var xxx_messageInfo_Profile proto.InternalMessageInfo + +func (m *Profile) GetAccount() []byte { + if m != nil { + return m.Account + } + return nil +} + +func (m *Profile) GetAmount() uint64 { if m != nil { return m.Amount } @@ -76,29 +128,31 @@ func (m *ExampleData) GetAmount() uint64 { } func init() { - proto.RegisterType((*ExampleData)(nil), "dwn.v1.ExampleData") + proto.RegisterType((*Credential)(nil), "dwn.v1.Credential") + proto.RegisterType((*Profile)(nil), "dwn.v1.Profile") } func init() { proto.RegisterFile("dwn/v1/state.proto", fileDescriptor_040a9b061177db90) } var fileDescriptor_040a9b061177db90 = []byte{ - // 205 bytes of a gzipped FileDescriptorProto + // 219 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4a, 0x29, 0xcf, 0xd3, 0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0x29, 0xcf, 0xd3, 0x2b, 0x33, 0x94, 0x12, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0xcf, - 0x2f, 0xca, 0x05, 0x29, 0xc9, 0x2f, 0xca, 0x85, 0x28, 0x50, 0x4a, 0xe0, 0xe2, 0x76, 0xad, 0x48, - 0xcc, 0x2d, 0xc8, 0x49, 0x75, 0x49, 0x2c, 0x49, 0x14, 0x92, 0xe0, 0x62, 0x4f, 0x4c, 0x4e, 0xce, - 0x2f, 0xcd, 0x2b, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x82, 0x71, 0x85, 0xc4, 0xb8, 0xd8, - 0x12, 0x73, 0xc1, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x50, 0x9e, 0x95, 0xfc, 0xa7, 0x79, - 0x97, 0xfb, 0x98, 0x25, 0xb9, 0x38, 0xe1, 0x3a, 0x85, 0xb8, 0x60, 0x4a, 0x05, 0x18, 0x25, 0x18, - 0x9d, 0x6c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, - 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x29, 0x3d, 0xb3, - 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x3f, 0xaf, 0x38, 0x3f, 0xaf, 0x48, 0x1f, - 0x4c, 0x54, 0xe8, 0x83, 0x7c, 0x52, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0xa6, 0x31, - 0x20, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x48, 0x77, 0x36, 0xdd, 0x00, 0x00, 0x00, + 0x2f, 0xca, 0x05, 0x29, 0xc9, 0x2f, 0xca, 0x85, 0x28, 0x50, 0x8a, 0xe7, 0xe2, 0x72, 0x2e, 0x4a, + 0x4d, 0x49, 0xcd, 0x2b, 0xc9, 0x4c, 0xcc, 0x11, 0x92, 0xe0, 0x62, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, + 0xcd, 0x2b, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x82, 0x71, 0x85, 0xc4, 0xb8, 0xd8, 0x12, + 0x73, 0xc1, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x50, 0x9e, 0x95, 0xfc, 0xa7, 0x79, 0x97, + 0xfb, 0x98, 0x25, 0xb9, 0x38, 0xe1, 0x3a, 0x85, 0xb8, 0x60, 0x4a, 0x05, 0x18, 0x25, 0x18, 0x95, + 0x62, 0xb8, 0xd8, 0x03, 0x8a, 0xf2, 0xd3, 0x32, 0x73, 0x52, 0xa9, 0x6f, 0x3a, 0x93, 0x93, 0xcd, + 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, + 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x29, 0xa5, 0x67, 0x96, 0x64, 0x94, + 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xe7, 0xe7, 0x15, 0xe7, 0xe7, 0x15, 0xe9, 0x83, 0x89, 0x0a, + 0x7d, 0x50, 0x30, 0x95, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xc3, 0xc0, 0x18, 0x10, 0x00, + 0x00, 0xff, 0xff, 0x14, 0x0b, 0x56, 0x1c, 0x3a, 0x01, 0x00, 0x00, } -func (m *ExampleData) Marshal() (dAtA []byte, err error) { +func (m *Credential) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -108,12 +162,47 @@ func (m *ExampleData) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ExampleData) MarshalTo(dAtA []byte) (int, error) { +func (m *Credential) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ExampleData) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Amount != 0 { + i = encodeVarintState(dAtA, i, uint64(m.Amount)) + i-- + dAtA[i] = 0x10 + } + if len(m.Account) > 0 { + i -= len(m.Account) + copy(dAtA[i:], m.Account) + i = encodeVarintState(dAtA, i, uint64(len(m.Account))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Profile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Profile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -144,7 +233,23 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ExampleData) Size() (n int) { +func (m *Credential) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Account) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if m.Amount != 0 { + n += 1 + sovState(uint64(m.Amount)) + } + return n +} + +func (m *Profile) Size() (n int) { if m == nil { return 0 } @@ -166,7 +271,7 @@ func sovState(x uint64) (n int) { func sozState(x uint64) (n int) { return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *ExampleData) Unmarshal(dAtA []byte) error { +func (m *Credential) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -189,10 +294,113 @@ func (m *ExampleData) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ExampleData: wiretype end group for non-group") + return fmt.Errorf("proto: Credential: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ExampleData: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Account = append(m.Account[:0], dAtA[iNdEx:postIndex]...) + if m.Account == nil { + m.Account = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + m.Amount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Amount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipState(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthState + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Profile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/svc/types/state.pb.go b/x/svc/types/state.pb.go index a7e9ac963..e7f9e4f88 100644 --- a/x/svc/types/state.pb.go +++ b/x/svc/types/state.pb.go @@ -23,7 +23,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type Metadata struct { +type Domain struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` @@ -33,11 +33,105 @@ type Metadata struct { Tags []string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` } +func (m *Domain) Reset() { *m = Domain{} } +func (m *Domain) String() string { return proto.CompactTextString(m) } +func (*Domain) ProtoMessage() {} +func (*Domain) Descriptor() ([]byte, []int) { + return fileDescriptor_2859adb306f7c51f, []int{0} +} +func (m *Domain) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Domain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Domain.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Domain) XXX_Merge(src proto.Message) { + xxx_messageInfo_Domain.Merge(m, src) +} +func (m *Domain) XXX_Size() int { + return m.Size() +} +func (m *Domain) XXX_DiscardUnknown() { + xxx_messageInfo_Domain.DiscardUnknown(m) +} + +var xxx_messageInfo_Domain proto.InternalMessageInfo + +func (m *Domain) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Domain) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *Domain) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Domain) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Domain) GetCategory() string { + if m != nil { + return m.Category + } + return "" +} + +func (m *Domain) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *Domain) GetTags() []string { + if m != nil { + return m.Tags + } + return nil +} + +// Metadata represents a DID alias +type Metadata struct { + // The unique identifier of the alias + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The alias of the DID + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // Origin of the alias + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + // Controller of the alias + Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` +} + func (m *Metadata) Reset() { *m = Metadata{} } func (m *Metadata) String() string { return proto.CompactTextString(m) } func (*Metadata) ProtoMessage() {} func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_2859adb306f7c51f, []int{0} + return fileDescriptor_2859adb306f7c51f, []int{1} } func (m *Metadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -66,11 +160,18 @@ func (m *Metadata) XXX_DiscardUnknown() { var xxx_messageInfo_Metadata proto.InternalMessageInfo -func (m *Metadata) GetId() uint64 { +func (m *Metadata) GetId() string { if m != nil { return m.Id } - return 0 + return "" +} + +func (m *Metadata) GetSubject() string { + if m != nil { + return m.Subject + } + return "" } func (m *Metadata) GetOrigin() string { @@ -80,108 +181,7 @@ func (m *Metadata) GetOrigin() string { return "" } -func (m *Metadata) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Metadata) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Metadata) GetCategory() string { - if m != nil { - return m.Category - } - return "" -} - -func (m *Metadata) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *Metadata) GetTags() []string { - if m != nil { - return m.Tags - } - return nil -} - -// Profile represents a DID alias -type Profile struct { - // The unique identifier of the alias - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The alias of the DID - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // Origin of the alias - Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` - // Controller of the alias - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *Profile) Reset() { *m = Profile{} } -func (m *Profile) String() string { return proto.CompactTextString(m) } -func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { - return fileDescriptor_2859adb306f7c51f, []int{1} -} -func (m *Profile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Profile.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Profile) XXX_Merge(src proto.Message) { - xxx_messageInfo_Profile.Merge(m, src) -} -func (m *Profile) XXX_Size() int { - return m.Size() -} -func (m *Profile) XXX_DiscardUnknown() { - xxx_messageInfo_Profile.DiscardUnknown(m) -} - -var xxx_messageInfo_Profile proto.InternalMessageInfo - -func (m *Profile) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Profile) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Profile) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - -func (m *Profile) GetController() string { +func (m *Metadata) GetController() string { if m != nil { return m.Controller } @@ -189,39 +189,39 @@ func (m *Profile) GetController() string { } func init() { + proto.RegisterType((*Domain)(nil), "svc.v1.Domain") proto.RegisterType((*Metadata)(nil), "svc.v1.Metadata") - proto.RegisterType((*Profile)(nil), "svc.v1.Profile") } func init() { proto.RegisterFile("svc/v1/state.proto", fileDescriptor_2859adb306f7c51f) } var fileDescriptor_2859adb306f7c51f = []byte{ - // 343 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xc1, 0x4a, 0x3b, 0x31, - 0x10, 0xc6, 0x9b, 0xdd, 0xfd, 0x6f, 0xdb, 0xfc, 0xa5, 0x94, 0x20, 0x1a, 0x7a, 0x08, 0x4b, 0xf1, - 0xd0, 0x83, 0x74, 0x29, 0xde, 0x8a, 0x27, 0xef, 0x82, 0xf4, 0xe8, 0x6d, 0x9b, 0x8d, 0x6b, 0xa4, - 0x9b, 0x29, 0x49, 0xba, 0xd8, 0x97, 0x10, 0x7d, 0x01, 0x9f, 0xc7, 0x83, 0x87, 0x82, 0x17, 0x8f, - 0xd2, 0xbe, 0x81, 0x4f, 0x20, 0x49, 0xb7, 0xb2, 0x5e, 0xc2, 0xcc, 0x37, 0xc3, 0x97, 0xef, 0xc7, - 0x60, 0x62, 0x2a, 0x9e, 0x56, 0x93, 0xd4, 0xd8, 0xcc, 0x8a, 0xf1, 0x52, 0x83, 0x05, 0x12, 0x9b, - 0x8a, 0x8f, 0xab, 0xc9, 0xe0, 0x94, 0x83, 0x29, 0xc1, 0xa4, 0xa0, 0x4b, 0xb7, 0x02, 0xba, 0xdc, - 0x2f, 0x0c, 0xdf, 0x11, 0xee, 0x5c, 0x0b, 0x9b, 0xe5, 0x99, 0xcd, 0x48, 0x0f, 0x07, 0x32, 0xa7, - 0x28, 0x41, 0xa3, 0x68, 0x16, 0xc8, 0x9c, 0x9c, 0xe0, 0x18, 0xb4, 0x2c, 0xa4, 0xa2, 0x41, 0x82, - 0x46, 0xdd, 0x59, 0xdd, 0x11, 0x82, 0x23, 0x95, 0x95, 0x82, 0x86, 0x5e, 0xf5, 0x35, 0x49, 0xf0, - 0xff, 0x5c, 0x18, 0xae, 0xe5, 0xd2, 0x4a, 0x50, 0x34, 0xf2, 0xa3, 0xa6, 0x44, 0x06, 0xb8, 0xc3, - 0x33, 0x2b, 0x0a, 0xd0, 0x6b, 0xfa, 0xcf, 0x8f, 0x7f, 0x7b, 0xe7, 0x28, 0x39, 0x28, 0x1a, 0xef, - 0x1d, 0x5d, 0xed, 0x34, 0x9b, 0x15, 0x86, 0xb6, 0x93, 0xd0, 0x69, 0xae, 0x9e, 0xb2, 0xef, 0xd7, - 0x8f, 0xa7, 0x90, 0xe2, 0xd8, 0x25, 0xed, 0x23, 0x72, 0x74, 0x48, 0xd8, 0x47, 0x14, 0x51, 0x34, - 0x7c, 0x41, 0xb8, 0x7d, 0xa3, 0xe1, 0x4e, 0x2e, 0x44, 0x83, 0xa6, 0xeb, 0x69, 0x28, 0x6e, 0x9b, - 0xd5, 0xfc, 0x41, 0x70, 0x5b, 0xe3, 0x1c, 0xda, 0x06, 0x67, 0xf8, 0x87, 0x93, 0x61, 0xcc, 0x41, - 0x59, 0x0d, 0x8b, 0x85, 0xd0, 0x35, 0x52, 0x43, 0x99, 0x9e, 0xf9, 0x34, 0x0c, 0x47, 0xee, 0x27, - 0x72, 0x8c, 0x7b, 0xb5, 0xe1, 0x79, 0x23, 0x53, 0x70, 0x75, 0xf9, 0xb6, 0x65, 0x68, 0xb3, 0x65, - 0xe8, 0x6b, 0xcb, 0xd0, 0xf3, 0x8e, 0xb5, 0x36, 0x3b, 0xd6, 0xfa, 0xdc, 0xb1, 0xd6, 0xed, 0xb0, - 0x90, 0xf6, 0x7e, 0x35, 0x1f, 0x73, 0x28, 0x53, 0x50, 0x06, 0x94, 0x4e, 0xfd, 0xf3, 0x98, 0xba, - 0x53, 0xda, 0xf5, 0x52, 0x98, 0x79, 0xec, 0xef, 0x74, 0xf1, 0x13, 0x00, 0x00, 0xff, 0xff, 0xd0, - 0x82, 0x18, 0x99, 0xde, 0x01, 0x00, 0x00, + // 344 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xb1, 0x6a, 0x23, 0x31, + 0x10, 0x86, 0xad, 0xdd, 0xbd, 0xb5, 0xad, 0x3b, 0x8c, 0x11, 0xc7, 0x9d, 0x70, 0x21, 0x16, 0x73, + 0x85, 0x8b, 0xc3, 0x8b, 0x49, 0x67, 0x52, 0x85, 0xb4, 0x69, 0x5c, 0xa6, 0x93, 0xb5, 0x62, 0xa3, + 0xe0, 0xd5, 0x18, 0x49, 0x5e, 0xe2, 0x97, 0x08, 0x21, 0x0f, 0x90, 0xe7, 0x09, 0xa9, 0x0c, 0x69, + 0x52, 0x06, 0xfb, 0x0d, 0xf2, 0x04, 0x41, 0xf2, 0x3a, 0x6c, 0x1a, 0x31, 0xf3, 0xcf, 0xf0, 0xeb, + 0xff, 0x18, 0x4c, 0x6c, 0x2d, 0xf2, 0x7a, 0x96, 0x5b, 0xc7, 0x9d, 0x9c, 0xae, 0x0d, 0x38, 0x20, + 0xa9, 0xad, 0xc5, 0xb4, 0x9e, 0x8d, 0xfe, 0x0a, 0xb0, 0x15, 0xd8, 0x1c, 0x4c, 0xe5, 0x57, 0xc0, + 0x54, 0xc7, 0x85, 0xf1, 0x0b, 0xc2, 0xe9, 0x25, 0x54, 0x5c, 0x69, 0x32, 0xc0, 0x91, 0x2a, 0x28, + 0xca, 0xd0, 0x24, 0x59, 0x44, 0xaa, 0x20, 0x7f, 0x70, 0x0a, 0x46, 0x95, 0x4a, 0xd3, 0x28, 0x43, + 0x93, 0xfe, 0xa2, 0xe9, 0x08, 0xc1, 0x89, 0xe6, 0x95, 0xa4, 0x71, 0x50, 0x43, 0x4d, 0x32, 0xfc, + 0xb3, 0x90, 0x56, 0x18, 0xb5, 0x76, 0x0a, 0x34, 0x4d, 0xc2, 0xa8, 0x2d, 0x91, 0x11, 0xee, 0x09, + 0xee, 0x64, 0x09, 0x66, 0x4b, 0x7f, 0x84, 0xf1, 0x57, 0xef, 0x1d, 0x95, 0x00, 0x4d, 0xd3, 0xa3, + 0xa3, 0xaf, 0xbd, 0xe6, 0x78, 0x69, 0x69, 0x37, 0x8b, 0xbd, 0xe6, 0xeb, 0x39, 0xfb, 0x78, 0x7a, + 0xbd, 0x8f, 0x29, 0x4e, 0x7d, 0xd2, 0x21, 0x22, 0xbf, 0x4e, 0x09, 0x87, 0x88, 0x22, 0x8a, 0xc6, + 0x8f, 0x08, 0xf7, 0xae, 0xa4, 0xe3, 0x05, 0x77, 0xbc, 0x85, 0xd3, 0x0f, 0x38, 0x14, 0x77, 0xed, + 0x66, 0x79, 0x2b, 0x85, 0x6b, 0x78, 0x4e, 0x6d, 0x0b, 0x34, 0xfe, 0x06, 0xca, 0x30, 0x16, 0xa0, + 0x9d, 0x81, 0xd5, 0x4a, 0x9a, 0x86, 0xa9, 0xa5, 0xcc, 0xff, 0x85, 0x38, 0x0c, 0x27, 0xfe, 0x27, + 0xf2, 0x1b, 0x0f, 0x1a, 0xc3, 0xff, 0xad, 0x50, 0xd1, 0xc5, 0xf9, 0xf3, 0x9e, 0xa1, 0xdd, 0x9e, + 0xa1, 0xf7, 0x3d, 0x43, 0x0f, 0x07, 0xd6, 0xd9, 0x1d, 0x58, 0xe7, 0xed, 0xc0, 0x3a, 0xd7, 0xe3, + 0x52, 0xb9, 0x9b, 0xcd, 0x72, 0x2a, 0xa0, 0xca, 0x41, 0x5b, 0xd0, 0x26, 0x0f, 0xcf, 0x5d, 0xee, + 0x2f, 0xe9, 0xb6, 0x6b, 0x69, 0x97, 0x69, 0x38, 0xd3, 0xd9, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x13, 0x81, 0x47, 0xf4, 0xdd, 0x01, 0x00, 0x00, } -func (m *Metadata) Marshal() (dAtA []byte, err error) { +func (m *Domain) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -231,12 +231,12 @@ func (m *Metadata) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { +func (m *Domain) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Domain) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -293,7 +293,7 @@ func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Profile) Marshal() (dAtA []byte, err error) { +func (m *Metadata) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -303,12 +303,12 @@ func (m *Profile) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Profile) MarshalTo(dAtA []byte) (int, error) { +func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -355,7 +355,7 @@ func encodeVarintState(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Metadata) Size() (n int) { +func (m *Domain) Size() (n int) { if m == nil { return 0 } @@ -393,7 +393,7 @@ func (m *Metadata) Size() (n int) { return n } -func (m *Profile) Size() (n int) { +func (m *Metadata) Size() (n int) { if m == nil { return 0 } @@ -424,7 +424,7 @@ func sovState(x uint64) (n int) { func sozState(x uint64) (n int) { return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Metadata) Unmarshal(dAtA []byte) error { +func (m *Domain) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -447,10 +447,10 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Metadata: wiretype end group for non-group") + return fmt.Errorf("proto: Domain: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Domain: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -685,7 +685,7 @@ func (m *Metadata) Unmarshal(dAtA []byte) error { } return nil } -func (m *Profile) Unmarshal(dAtA []byte) error { +func (m *Metadata) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -708,10 +708,10 @@ func (m *Profile) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Profile: wiretype end group for non-group") + return fmt.Errorf("proto: Metadata: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: