From aa830517f3a4eeda577e9cde13f723ec57cbf91e Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 30 Sep 2024 19:44:16 -0400 Subject: [PATCH] feat: add PKL schema for message formats --- Makefile | 2 + pkg/dwn/Schema.pkl.go | 2 - pkg/format/Format.pkl.go | 36 ++++++ pkg/format/Macaroon.pkl.go | 16 +++ pkg/format/didmethod/DIDMethod.pkl.go | 52 +++++++++ pkg/format/init.pkl.go | 9 ++ pkg/orm/Account.pkl.go | 2 +- pkg/orm/Asset.pkl.go | 2 +- pkg/orm/Chain.pkl.go | 2 +- pkg/orm/Credential.pkl.go | 2 +- pkg/orm/Grant.pkl.go | 2 +- pkg/orm/JWK.pkl.go | 2 +- pkg/orm/Keyshare.pkl.go | 2 +- pkg/orm/{Models.pkl.go => Orm.pkl.go} | 14 +-- pkg/orm/Profile.pkl.go | 2 +- pkg/orm/PublicKey.pkl.go | 2 +- pkg/orm/assettype/AssetType.pkl.go | 2 +- pkg/orm/didmethod/DIDMethod.pkl.go | 2 +- pkg/orm/init.pkl.go | 22 ++-- pkg/orm/keyalgorithm/KeyAlgorithm.pkl.go | 2 +- pkg/orm/keycurve/KeyCurve.pkl.go | 2 +- pkg/orm/keyencoding/KeyEncoding.pkl.go | 2 +- pkg/orm/keyrole/KeyRole.pkl.go | 2 +- pkg/orm/keysharerole/KeyShareRole.pkl.go | 2 +- pkg/orm/keytype/KeyType.pkl.go | 2 +- .../permissiongrant/PermissionGrant.pkl.go | 2 +- .../permissionscope/PermissionScope.pkl.go | 2 +- pkg/orm/transactions/Msg.pkl.go | 6 + .../transactions/MsgDidAllocateVault.pkl.go | 44 +++++++ pkg/orm/transactions/MsgDidAuthorize.pkl.go | 60 ++++++++++ .../transactions/MsgDidProveWitness.pkl.go | 52 +++++++++ .../MsgDidRegisterController.pkl.go | 60 ++++++++++ .../transactions/MsgDidRegisterService.pkl.go | 76 ++++++++++++ pkg/orm/transactions/MsgDidSyncVault.pkl.go | 36 ++++++ .../transactions/MsgDidUpdateParams.pkl.go | 44 +++++++ pkg/orm/transactions/MsgGovDeposit.pkl.go | 44 +++++++ .../transactions/MsgGovSubmitProposal.pkl.go | 45 +++++++ pkg/orm/transactions/MsgGovVote.pkl.go | 42 +++++++ .../transactions/MsgGroupCreateGroup.pkl.go | 45 +++++++ .../MsgGroupSubmitProposal.pkl.go | 60 ++++++++++ pkg/orm/transactions/MsgGroupVote.pkl.go | 58 +++++++++ .../MsgStakingBeginRedelegate.pkl.go | 52 +++++++++ .../MsgStakingCreateValidator.pkl.go | 77 ++++++++++++ .../transactions/MsgStakingDelegate.pkl.go | 44 +++++++ .../transactions/MsgStakingUndelegate.pkl.go | 44 +++++++ pkg/orm/transactions/Proposal.pkl.go | 11 ++ pkg/orm/transactions/Transactions.pkl.go | 36 ++++++ pkg/orm/transactions/TxBody.pkl.go | 17 +++ pkg/orm/transactions/init.pkl.go | 27 +++++ pkl/dwn.pkl | 3 - pkl/fmt.pkl | 37 ++++++ pkl/orm.pkl | 3 +- pkl/txns.pkl | 2 +- proto/vault/v1/genesis.proto | 3 +- x/vault/keeper/keeper.go | 1 - x/vault/types/genesis.go | 3 - x/vault/types/genesis.pb.go | 110 +++++------------- x/vault/types/params.go | 1 - 58 files changed, 1201 insertions(+), 133 deletions(-) create mode 100644 pkg/format/Format.pkl.go create mode 100644 pkg/format/Macaroon.pkl.go create mode 100644 pkg/format/didmethod/DIDMethod.pkl.go create mode 100644 pkg/format/init.pkl.go rename pkg/orm/{Models.pkl.go => Orm.pkl.go} (72%) create mode 100644 pkg/orm/transactions/Msg.pkl.go create mode 100644 pkg/orm/transactions/MsgDidAllocateVault.pkl.go create mode 100644 pkg/orm/transactions/MsgDidAuthorize.pkl.go create mode 100644 pkg/orm/transactions/MsgDidProveWitness.pkl.go create mode 100644 pkg/orm/transactions/MsgDidRegisterController.pkl.go create mode 100644 pkg/orm/transactions/MsgDidRegisterService.pkl.go create mode 100644 pkg/orm/transactions/MsgDidSyncVault.pkl.go create mode 100644 pkg/orm/transactions/MsgDidUpdateParams.pkl.go create mode 100644 pkg/orm/transactions/MsgGovDeposit.pkl.go create mode 100644 pkg/orm/transactions/MsgGovSubmitProposal.pkl.go create mode 100644 pkg/orm/transactions/MsgGovVote.pkl.go create mode 100644 pkg/orm/transactions/MsgGroupCreateGroup.pkl.go create mode 100644 pkg/orm/transactions/MsgGroupSubmitProposal.pkl.go create mode 100644 pkg/orm/transactions/MsgGroupVote.pkl.go create mode 100644 pkg/orm/transactions/MsgStakingBeginRedelegate.pkl.go create mode 100644 pkg/orm/transactions/MsgStakingCreateValidator.pkl.go create mode 100644 pkg/orm/transactions/MsgStakingDelegate.pkl.go create mode 100644 pkg/orm/transactions/MsgStakingUndelegate.pkl.go create mode 100644 pkg/orm/transactions/Proposal.pkl.go create mode 100644 pkg/orm/transactions/Transactions.pkl.go create mode 100644 pkg/orm/transactions/TxBody.pkl.go create mode 100644 pkg/orm/transactions/init.pkl.go create mode 100644 pkl/fmt.pkl diff --git a/Makefile b/Makefile index 6f1856a16..e3bf3827d 100644 --- a/Makefile +++ b/Makefile @@ -317,7 +317,9 @@ nebula: pkl: @echo "(pkl) Building PKL" go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/dwn.pkl + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/fmt.pkl go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/orm.pkl + go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/txns.pkl start-caddy: @echo "(start-caddy) Starting caddy" diff --git a/pkg/dwn/Schema.pkl.go b/pkg/dwn/Schema.pkl.go index 4ded3ac6a..e8d4692ac 100644 --- a/pkg/dwn/Schema.pkl.go +++ b/pkg/dwn/Schema.pkl.go @@ -18,7 +18,5 @@ type Schema struct { Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"` - PublicKey string `pkl:"publicKey" json:"publicKey,omitempty"` - Profile string `pkl:"profile" json:"profile,omitempty"` } diff --git a/pkg/format/Format.pkl.go b/pkg/format/Format.pkl.go new file mode 100644 index 000000000..bc7f6e80e --- /dev/null +++ b/pkg/format/Format.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `format`. DO NOT EDIT. +package format + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Format struct { +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Format +func LoadFromPath(ctx context.Context, path string) (ret *Format, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Format +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Format, error) { + var ret Format + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/pkg/format/Macaroon.pkl.go b/pkg/format/Macaroon.pkl.go new file mode 100644 index 000000000..c4e9647ac --- /dev/null +++ b/pkg/format/Macaroon.pkl.go @@ -0,0 +1,16 @@ +// Code generated from Pkl module `format`. DO NOT EDIT. +package format + +type Macaroon struct { + Location string `pkl:"location" json:"location,omitempty"` + + Originator string `pkl:"originator" json:"originator,omitempty"` + + Identifier string `pkl:"identifier" json:"identifier,omitempty"` + + FirstParty []string `pkl:"first_party" json:"first_party,omitempty"` + + ThirdParty []string `pkl:"third_party" json:"third_party,omitempty"` + + Expiration int `pkl:"expiration" json:"expiration,omitempty"` +} diff --git a/pkg/format/didmethod/DIDMethod.pkl.go b/pkg/format/didmethod/DIDMethod.pkl.go new file mode 100644 index 000000000..44aa49c81 --- /dev/null +++ b/pkg/format/didmethod/DIDMethod.pkl.go @@ -0,0 +1,52 @@ +// Code generated from Pkl module `format`. DO NOT EDIT. +package didmethod + +import ( + "encoding" + "fmt" +) + +type DIDMethod string + +const ( + Ipfs DIDMethod = "ipfs" + Sonr DIDMethod = "sonr" + Bitcoin DIDMethod = "bitcoin" + Ethereum DIDMethod = "ethereum" + Ibc DIDMethod = "ibc" + Webauthn DIDMethod = "webauthn" + Dwn DIDMethod = "dwn" + Service DIDMethod = "service" +) + +// String returns the string representation of DIDMethod +func (rcv DIDMethod) String() string { + return string(rcv) +} + +var _ encoding.BinaryUnmarshaler = new(DIDMethod) + +// UnmarshalBinary implements encoding.BinaryUnmarshaler for DIDMethod. +func (rcv *DIDMethod) UnmarshalBinary(data []byte) error { + switch str := string(data); str { + case "ipfs": + *rcv = Ipfs + case "sonr": + *rcv = Sonr + case "bitcoin": + *rcv = Bitcoin + case "ethereum": + *rcv = Ethereum + case "ibc": + *rcv = Ibc + case "webauthn": + *rcv = Webauthn + case "dwn": + *rcv = Dwn + case "service": + *rcv = Service + default: + return fmt.Errorf(`illegal: "%s" is not a valid DIDMethod`, str) + } + return nil +} diff --git a/pkg/format/init.pkl.go b/pkg/format/init.pkl.go new file mode 100644 index 000000000..6abd5e1e8 --- /dev/null +++ b/pkg/format/init.pkl.go @@ -0,0 +1,9 @@ +// Code generated from Pkl module `format`. DO NOT EDIT. +package format + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("format", Format{}) + pkl.RegisterMapping("format#Macaroon", Macaroon{}) +} diff --git a/pkg/orm/Account.pkl.go b/pkg/orm/Account.pkl.go index b9e3a5cf8..9bf3f02f4 100644 --- a/pkg/orm/Account.pkl.go +++ b/pkg/orm/Account.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type Account struct { diff --git a/pkg/orm/Asset.pkl.go b/pkg/orm/Asset.pkl.go index 5d4be0935..7fdfaebc0 100644 --- a/pkg/orm/Asset.pkl.go +++ b/pkg/orm/Asset.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type Asset struct { diff --git a/pkg/orm/Chain.pkl.go b/pkg/orm/Chain.pkl.go index a47a250f9..6fa443c58 100644 --- a/pkg/orm/Chain.pkl.go +++ b/pkg/orm/Chain.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type Chain struct { diff --git a/pkg/orm/Credential.pkl.go b/pkg/orm/Credential.pkl.go index e17391216..138ce7f88 100644 --- a/pkg/orm/Credential.pkl.go +++ b/pkg/orm/Credential.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type Credential struct { diff --git a/pkg/orm/Grant.pkl.go b/pkg/orm/Grant.pkl.go index 25538ef1b..b5b4d1e3d 100644 --- a/pkg/orm/Grant.pkl.go +++ b/pkg/orm/Grant.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type Grant struct { diff --git a/pkg/orm/JWK.pkl.go b/pkg/orm/JWK.pkl.go index 45ab091ef..3cd3f044f 100644 --- a/pkg/orm/JWK.pkl.go +++ b/pkg/orm/JWK.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type JWK struct { diff --git a/pkg/orm/Keyshare.pkl.go b/pkg/orm/Keyshare.pkl.go index 251505f7b..cbc8b356f 100644 --- a/pkg/orm/Keyshare.pkl.go +++ b/pkg/orm/Keyshare.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type Keyshare struct { diff --git a/pkg/orm/Models.pkl.go b/pkg/orm/Orm.pkl.go similarity index 72% rename from pkg/orm/Models.pkl.go rename to pkg/orm/Orm.pkl.go index 24d9aa3fa..0c1f09dbc 100644 --- a/pkg/orm/Models.pkl.go +++ b/pkg/orm/Orm.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm import ( @@ -7,14 +7,14 @@ import ( "github.com/apple/pkl-go/pkl" ) -type Models struct { +type Orm struct { DbName string `pkl:"db_name"` DbVersion int `pkl:"db_version"` } -// LoadFromPath loads the pkl module at the given path and evaluates it into a Models -func LoadFromPath(ctx context.Context, path string) (ret *Models, err error) { +// LoadFromPath loads the pkl module at the given path and evaluates it into a Orm +func LoadFromPath(ctx context.Context, path string) (ret *Orm, err error) { evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) if err != nil { return nil, err @@ -29,9 +29,9 @@ func LoadFromPath(ctx context.Context, path string) (ret *Models, err error) { return ret, err } -// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Models -func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Models, error) { - var ret Models +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Orm +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Orm, error) { + var ret Orm if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { return nil, err } diff --git a/pkg/orm/Profile.pkl.go b/pkg/orm/Profile.pkl.go index 276f30704..794e4e352 100644 --- a/pkg/orm/Profile.pkl.go +++ b/pkg/orm/Profile.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm type Profile struct { diff --git a/pkg/orm/PublicKey.pkl.go b/pkg/orm/PublicKey.pkl.go index 81cdf961a..3a38c6d0e 100644 --- a/pkg/orm/PublicKey.pkl.go +++ b/pkg/orm/PublicKey.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm import ( diff --git a/pkg/orm/assettype/AssetType.pkl.go b/pkg/orm/assettype/AssetType.pkl.go index fbc580b0e..ba491f869 100644 --- a/pkg/orm/assettype/AssetType.pkl.go +++ b/pkg/orm/assettype/AssetType.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package assettype import ( diff --git a/pkg/orm/didmethod/DIDMethod.pkl.go b/pkg/orm/didmethod/DIDMethod.pkl.go index e7b5140e2..4d6c583d6 100644 --- a/pkg/orm/didmethod/DIDMethod.pkl.go +++ b/pkg/orm/didmethod/DIDMethod.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package didmethod import ( diff --git a/pkg/orm/init.pkl.go b/pkg/orm/init.pkl.go index b44425ea5..390916a45 100644 --- a/pkg/orm/init.pkl.go +++ b/pkg/orm/init.pkl.go @@ -1,17 +1,17 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package orm import "github.com/apple/pkl-go/pkl" func init() { - pkl.RegisterMapping("models", Models{}) - pkl.RegisterMapping("models#Account", Account{}) - pkl.RegisterMapping("models#Asset", Asset{}) - pkl.RegisterMapping("models#Chain", Chain{}) - pkl.RegisterMapping("models#Credential", Credential{}) - pkl.RegisterMapping("models#JWK", JWK{}) - pkl.RegisterMapping("models#Grant", Grant{}) - pkl.RegisterMapping("models#Keyshare", Keyshare{}) - pkl.RegisterMapping("models#PublicKey", PublicKey{}) - pkl.RegisterMapping("models#Profile", Profile{}) + pkl.RegisterMapping("orm", Orm{}) + pkl.RegisterMapping("orm#Account", Account{}) + pkl.RegisterMapping("orm#Asset", Asset{}) + pkl.RegisterMapping("orm#Chain", Chain{}) + pkl.RegisterMapping("orm#Credential", Credential{}) + pkl.RegisterMapping("orm#JWK", JWK{}) + pkl.RegisterMapping("orm#Grant", Grant{}) + pkl.RegisterMapping("orm#Keyshare", Keyshare{}) + pkl.RegisterMapping("orm#PublicKey", PublicKey{}) + pkl.RegisterMapping("orm#Profile", Profile{}) } diff --git a/pkg/orm/keyalgorithm/KeyAlgorithm.pkl.go b/pkg/orm/keyalgorithm/KeyAlgorithm.pkl.go index 68a875097..16f47ac66 100644 --- a/pkg/orm/keyalgorithm/KeyAlgorithm.pkl.go +++ b/pkg/orm/keyalgorithm/KeyAlgorithm.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package keyalgorithm import ( diff --git a/pkg/orm/keycurve/KeyCurve.pkl.go b/pkg/orm/keycurve/KeyCurve.pkl.go index 1b8acf64a..773b59ab1 100644 --- a/pkg/orm/keycurve/KeyCurve.pkl.go +++ b/pkg/orm/keycurve/KeyCurve.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package keycurve import ( diff --git a/pkg/orm/keyencoding/KeyEncoding.pkl.go b/pkg/orm/keyencoding/KeyEncoding.pkl.go index 15a80c3c4..dab253554 100644 --- a/pkg/orm/keyencoding/KeyEncoding.pkl.go +++ b/pkg/orm/keyencoding/KeyEncoding.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package keyencoding import ( diff --git a/pkg/orm/keyrole/KeyRole.pkl.go b/pkg/orm/keyrole/KeyRole.pkl.go index 21d26a099..ee5437cee 100644 --- a/pkg/orm/keyrole/KeyRole.pkl.go +++ b/pkg/orm/keyrole/KeyRole.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package keyrole import ( diff --git a/pkg/orm/keysharerole/KeyShareRole.pkl.go b/pkg/orm/keysharerole/KeyShareRole.pkl.go index 846c411df..84394745e 100644 --- a/pkg/orm/keysharerole/KeyShareRole.pkl.go +++ b/pkg/orm/keysharerole/KeyShareRole.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package keysharerole import ( diff --git a/pkg/orm/keytype/KeyType.pkl.go b/pkg/orm/keytype/KeyType.pkl.go index d7ed78d27..d3f9808ad 100644 --- a/pkg/orm/keytype/KeyType.pkl.go +++ b/pkg/orm/keytype/KeyType.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package keytype import ( diff --git a/pkg/orm/permissiongrant/PermissionGrant.pkl.go b/pkg/orm/permissiongrant/PermissionGrant.pkl.go index c21195185..bdeea225f 100644 --- a/pkg/orm/permissiongrant/PermissionGrant.pkl.go +++ b/pkg/orm/permissiongrant/PermissionGrant.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package permissiongrant import ( diff --git a/pkg/orm/permissionscope/PermissionScope.pkl.go b/pkg/orm/permissionscope/PermissionScope.pkl.go index 87756e20a..2af42ee43 100644 --- a/pkg/orm/permissionscope/PermissionScope.pkl.go +++ b/pkg/orm/permissionscope/PermissionScope.pkl.go @@ -1,4 +1,4 @@ -// Code generated from Pkl module `models`. DO NOT EDIT. +// Code generated from Pkl module `orm`. DO NOT EDIT. package permissionscope import ( diff --git a/pkg/orm/transactions/Msg.pkl.go b/pkg/orm/transactions/Msg.pkl.go new file mode 100644 index 000000000..fe8ffcc9a --- /dev/null +++ b/pkg/orm/transactions/Msg.pkl.go @@ -0,0 +1,6 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +type Msg interface { + GetTypeUrl() string +} diff --git a/pkg/orm/transactions/MsgDidAllocateVault.pkl.go b/pkg/orm/transactions/MsgDidAllocateVault.pkl.go new file mode 100644 index 000000000..0e691f461 --- /dev/null +++ b/pkg/orm/transactions/MsgDidAllocateVault.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidAllocateVault interface { + Msg + + GetAuthority() string + + GetSubject() string + + GetToken() *pkl.Object +} + +var _ MsgDidAllocateVault = (*MsgDidAllocateVaultImpl)(nil) + +type MsgDidAllocateVaultImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Subject string `pkl:"subject"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidAllocateVaultImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidAllocateVaultImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidAllocateVaultImpl) GetSubject() string { + return rcv.Subject +} + +func (rcv *MsgDidAllocateVaultImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/pkg/orm/transactions/MsgDidAuthorize.pkl.go b/pkg/orm/transactions/MsgDidAuthorize.pkl.go new file mode 100644 index 000000000..b12fc046d --- /dev/null +++ b/pkg/orm/transactions/MsgDidAuthorize.pkl.go @@ -0,0 +1,60 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidAuthorize interface { + Msg + + GetAuthority() string + + GetController() string + + GetAddress() string + + GetOrigin() string + + GetToken() *pkl.Object +} + +var _ MsgDidAuthorize = (*MsgDidAuthorizeImpl)(nil) + +type MsgDidAuthorizeImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Controller string `pkl:"controller"` + + Address string `pkl:"address"` + + Origin string `pkl:"origin"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidAuthorizeImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidAuthorizeImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidAuthorizeImpl) GetController() string { + return rcv.Controller +} + +func (rcv *MsgDidAuthorizeImpl) GetAddress() string { + return rcv.Address +} + +func (rcv *MsgDidAuthorizeImpl) GetOrigin() string { + return rcv.Origin +} + +func (rcv *MsgDidAuthorizeImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/pkg/orm/transactions/MsgDidProveWitness.pkl.go b/pkg/orm/transactions/MsgDidProveWitness.pkl.go new file mode 100644 index 000000000..8bb849194 --- /dev/null +++ b/pkg/orm/transactions/MsgDidProveWitness.pkl.go @@ -0,0 +1,52 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidProveWitness interface { + Msg + + GetAuthority() string + + GetProperty() string + + GetWitness() []int + + GetToken() *pkl.Object +} + +var _ MsgDidProveWitness = (*MsgDidProveWitnessImpl)(nil) + +type MsgDidProveWitnessImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Property string `pkl:"property"` + + Witness []int `pkl:"witness"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidProveWitnessImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidProveWitnessImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidProveWitnessImpl) GetProperty() string { + return rcv.Property +} + +func (rcv *MsgDidProveWitnessImpl) GetWitness() []int { + return rcv.Witness +} + +func (rcv *MsgDidProveWitnessImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/pkg/orm/transactions/MsgDidRegisterController.pkl.go b/pkg/orm/transactions/MsgDidRegisterController.pkl.go new file mode 100644 index 000000000..99907f455 --- /dev/null +++ b/pkg/orm/transactions/MsgDidRegisterController.pkl.go @@ -0,0 +1,60 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidRegisterController interface { + Msg + + GetAuthority() string + + GetCid() string + + GetOrigin() string + + GetAuthentication() []*pkl.Object + + GetToken() *pkl.Object +} + +var _ MsgDidRegisterController = (*MsgDidRegisterControllerImpl)(nil) + +type MsgDidRegisterControllerImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Cid string `pkl:"cid"` + + Origin string `pkl:"origin"` + + Authentication []*pkl.Object `pkl:"authentication"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidRegisterControllerImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidRegisterControllerImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidRegisterControllerImpl) GetCid() string { + return rcv.Cid +} + +func (rcv *MsgDidRegisterControllerImpl) GetOrigin() string { + return rcv.Origin +} + +func (rcv *MsgDidRegisterControllerImpl) GetAuthentication() []*pkl.Object { + return rcv.Authentication +} + +func (rcv *MsgDidRegisterControllerImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/pkg/orm/transactions/MsgDidRegisterService.pkl.go b/pkg/orm/transactions/MsgDidRegisterService.pkl.go new file mode 100644 index 000000000..d234865da --- /dev/null +++ b/pkg/orm/transactions/MsgDidRegisterService.pkl.go @@ -0,0 +1,76 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidRegisterService interface { + Msg + + GetController() string + + GetOriginUri() string + + GetScopes() *pkl.Object + + GetDescription() string + + GetServiceEndpoints() map[string]string + + GetMetadata() *pkl.Object + + GetToken() *pkl.Object +} + +var _ MsgDidRegisterService = (*MsgDidRegisterServiceImpl)(nil) + +type MsgDidRegisterServiceImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Controller string `pkl:"controller"` + + OriginUri string `pkl:"originUri"` + + Scopes *pkl.Object `pkl:"scopes"` + + Description string `pkl:"description"` + + ServiceEndpoints map[string]string `pkl:"serviceEndpoints"` + + Metadata *pkl.Object `pkl:"metadata"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidRegisterServiceImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidRegisterServiceImpl) GetController() string { + return rcv.Controller +} + +func (rcv *MsgDidRegisterServiceImpl) GetOriginUri() string { + return rcv.OriginUri +} + +func (rcv *MsgDidRegisterServiceImpl) GetScopes() *pkl.Object { + return rcv.Scopes +} + +func (rcv *MsgDidRegisterServiceImpl) GetDescription() string { + return rcv.Description +} + +func (rcv *MsgDidRegisterServiceImpl) GetServiceEndpoints() map[string]string { + return rcv.ServiceEndpoints +} + +func (rcv *MsgDidRegisterServiceImpl) GetMetadata() *pkl.Object { + return rcv.Metadata +} + +func (rcv *MsgDidRegisterServiceImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/pkg/orm/transactions/MsgDidSyncVault.pkl.go b/pkg/orm/transactions/MsgDidSyncVault.pkl.go new file mode 100644 index 000000000..c4de4ba64 --- /dev/null +++ b/pkg/orm/transactions/MsgDidSyncVault.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidSyncVault interface { + Msg + + GetController() string + + GetToken() *pkl.Object +} + +var _ MsgDidSyncVault = (*MsgDidSyncVaultImpl)(nil) + +type MsgDidSyncVaultImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Controller string `pkl:"controller"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidSyncVaultImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidSyncVaultImpl) GetController() string { + return rcv.Controller +} + +func (rcv *MsgDidSyncVaultImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/pkg/orm/transactions/MsgDidUpdateParams.pkl.go b/pkg/orm/transactions/MsgDidUpdateParams.pkl.go new file mode 100644 index 000000000..a3e227ab8 --- /dev/null +++ b/pkg/orm/transactions/MsgDidUpdateParams.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgDidUpdateParams interface { + Msg + + GetAuthority() string + + GetParams() *pkl.Object + + GetToken() *pkl.Object +} + +var _ MsgDidUpdateParams = (*MsgDidUpdateParamsImpl)(nil) + +type MsgDidUpdateParamsImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Authority string `pkl:"authority"` + + Params *pkl.Object `pkl:"params"` + + Token *pkl.Object `pkl:"token"` +} + +// The type URL for the message +func (rcv *MsgDidUpdateParamsImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgDidUpdateParamsImpl) GetAuthority() string { + return rcv.Authority +} + +func (rcv *MsgDidUpdateParamsImpl) GetParams() *pkl.Object { + return rcv.Params +} + +func (rcv *MsgDidUpdateParamsImpl) GetToken() *pkl.Object { + return rcv.Token +} diff --git a/pkg/orm/transactions/MsgGovDeposit.pkl.go b/pkg/orm/transactions/MsgGovDeposit.pkl.go new file mode 100644 index 000000000..556d1df7f --- /dev/null +++ b/pkg/orm/transactions/MsgGovDeposit.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGovDeposit interface { + Msg + + GetProposalId() int + + GetDepositor() string + + GetAmount() []*pkl.Object +} + +var _ MsgGovDeposit = (*MsgGovDepositImpl)(nil) + +type MsgGovDepositImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + ProposalId int `pkl:"proposalId"` + + Depositor string `pkl:"depositor"` + + Amount []*pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgGovDepositImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGovDepositImpl) GetProposalId() int { + return rcv.ProposalId +} + +func (rcv *MsgGovDepositImpl) GetDepositor() string { + return rcv.Depositor +} + +func (rcv *MsgGovDepositImpl) GetAmount() []*pkl.Object { + return rcv.Amount +} diff --git a/pkg/orm/transactions/MsgGovSubmitProposal.pkl.go b/pkg/orm/transactions/MsgGovSubmitProposal.pkl.go new file mode 100644 index 000000000..c33b589b6 --- /dev/null +++ b/pkg/orm/transactions/MsgGovSubmitProposal.pkl.go @@ -0,0 +1,45 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGovSubmitProposal interface { + Msg + + GetContent() *Proposal + + GetInitialDeposit() []*pkl.Object + + GetProposer() string +} + +var _ MsgGovSubmitProposal = (*MsgGovSubmitProposalImpl)(nil) + +// Gov module messages +type MsgGovSubmitProposalImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Content *Proposal `pkl:"content"` + + InitialDeposit []*pkl.Object `pkl:"initialDeposit"` + + Proposer string `pkl:"proposer"` +} + +// The type URL for the message +func (rcv *MsgGovSubmitProposalImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGovSubmitProposalImpl) GetContent() *Proposal { + return rcv.Content +} + +func (rcv *MsgGovSubmitProposalImpl) GetInitialDeposit() []*pkl.Object { + return rcv.InitialDeposit +} + +func (rcv *MsgGovSubmitProposalImpl) GetProposer() string { + return rcv.Proposer +} diff --git a/pkg/orm/transactions/MsgGovVote.pkl.go b/pkg/orm/transactions/MsgGovVote.pkl.go new file mode 100644 index 000000000..303cf1eee --- /dev/null +++ b/pkg/orm/transactions/MsgGovVote.pkl.go @@ -0,0 +1,42 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +type MsgGovVote interface { + Msg + + GetProposalId() int + + GetVoter() string + + GetOption() int +} + +var _ MsgGovVote = (*MsgGovVoteImpl)(nil) + +type MsgGovVoteImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + ProposalId int `pkl:"proposalId"` + + Voter string `pkl:"voter"` + + Option int `pkl:"option"` +} + +// The type URL for the message +func (rcv *MsgGovVoteImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGovVoteImpl) GetProposalId() int { + return rcv.ProposalId +} + +func (rcv *MsgGovVoteImpl) GetVoter() string { + return rcv.Voter +} + +func (rcv *MsgGovVoteImpl) GetOption() int { + return rcv.Option +} diff --git a/pkg/orm/transactions/MsgGroupCreateGroup.pkl.go b/pkg/orm/transactions/MsgGroupCreateGroup.pkl.go new file mode 100644 index 000000000..c5dafd6bd --- /dev/null +++ b/pkg/orm/transactions/MsgGroupCreateGroup.pkl.go @@ -0,0 +1,45 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGroupCreateGroup interface { + Msg + + GetAdmin() string + + GetMembers() []*pkl.Object + + GetMetadata() string +} + +var _ MsgGroupCreateGroup = (*MsgGroupCreateGroupImpl)(nil) + +// Group module messages +type MsgGroupCreateGroupImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Admin string `pkl:"admin"` + + Members []*pkl.Object `pkl:"members"` + + Metadata string `pkl:"metadata"` +} + +// The type URL for the message +func (rcv *MsgGroupCreateGroupImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGroupCreateGroupImpl) GetAdmin() string { + return rcv.Admin +} + +func (rcv *MsgGroupCreateGroupImpl) GetMembers() []*pkl.Object { + return rcv.Members +} + +func (rcv *MsgGroupCreateGroupImpl) GetMetadata() string { + return rcv.Metadata +} diff --git a/pkg/orm/transactions/MsgGroupSubmitProposal.pkl.go b/pkg/orm/transactions/MsgGroupSubmitProposal.pkl.go new file mode 100644 index 000000000..c23f15391 --- /dev/null +++ b/pkg/orm/transactions/MsgGroupSubmitProposal.pkl.go @@ -0,0 +1,60 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgGroupSubmitProposal interface { + Msg + + GetGroupPolicyAddress() string + + GetProposers() []string + + GetMetadata() string + + GetMessages() []*pkl.Object + + GetExec() int +} + +var _ MsgGroupSubmitProposal = (*MsgGroupSubmitProposalImpl)(nil) + +type MsgGroupSubmitProposalImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + GroupPolicyAddress string `pkl:"groupPolicyAddress"` + + Proposers []string `pkl:"proposers"` + + Metadata string `pkl:"metadata"` + + Messages []*pkl.Object `pkl:"messages"` + + Exec int `pkl:"exec"` +} + +// The type URL for the message +func (rcv *MsgGroupSubmitProposalImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGroupSubmitProposalImpl) GetGroupPolicyAddress() string { + return rcv.GroupPolicyAddress +} + +func (rcv *MsgGroupSubmitProposalImpl) GetProposers() []string { + return rcv.Proposers +} + +func (rcv *MsgGroupSubmitProposalImpl) GetMetadata() string { + return rcv.Metadata +} + +func (rcv *MsgGroupSubmitProposalImpl) GetMessages() []*pkl.Object { + return rcv.Messages +} + +func (rcv *MsgGroupSubmitProposalImpl) GetExec() int { + return rcv.Exec +} diff --git a/pkg/orm/transactions/MsgGroupVote.pkl.go b/pkg/orm/transactions/MsgGroupVote.pkl.go new file mode 100644 index 000000000..a79ce6899 --- /dev/null +++ b/pkg/orm/transactions/MsgGroupVote.pkl.go @@ -0,0 +1,58 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +type MsgGroupVote interface { + Msg + + GetProposalId() int + + GetVoter() string + + GetOption() int + + GetMetadata() string + + GetExec() int +} + +var _ MsgGroupVote = (*MsgGroupVoteImpl)(nil) + +type MsgGroupVoteImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + ProposalId int `pkl:"proposalId"` + + Voter string `pkl:"voter"` + + Option int `pkl:"option"` + + Metadata string `pkl:"metadata"` + + Exec int `pkl:"exec"` +} + +// The type URL for the message +func (rcv *MsgGroupVoteImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgGroupVoteImpl) GetProposalId() int { + return rcv.ProposalId +} + +func (rcv *MsgGroupVoteImpl) GetVoter() string { + return rcv.Voter +} + +func (rcv *MsgGroupVoteImpl) GetOption() int { + return rcv.Option +} + +func (rcv *MsgGroupVoteImpl) GetMetadata() string { + return rcv.Metadata +} + +func (rcv *MsgGroupVoteImpl) GetExec() int { + return rcv.Exec +} diff --git a/pkg/orm/transactions/MsgStakingBeginRedelegate.pkl.go b/pkg/orm/transactions/MsgStakingBeginRedelegate.pkl.go new file mode 100644 index 000000000..44a019af4 --- /dev/null +++ b/pkg/orm/transactions/MsgStakingBeginRedelegate.pkl.go @@ -0,0 +1,52 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingBeginRedelegate interface { + Msg + + GetDelegatorAddress() string + + GetValidatorSrcAddress() string + + GetValidatorDstAddress() string + + GetAmount() *pkl.Object +} + +var _ MsgStakingBeginRedelegate = (*MsgStakingBeginRedelegateImpl)(nil) + +type MsgStakingBeginRedelegateImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorSrcAddress string `pkl:"validatorSrcAddress"` + + ValidatorDstAddress string `pkl:"validatorDstAddress"` + + Amount *pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgStakingBeginRedelegateImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetValidatorSrcAddress() string { + return rcv.ValidatorSrcAddress +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetValidatorDstAddress() string { + return rcv.ValidatorDstAddress +} + +func (rcv *MsgStakingBeginRedelegateImpl) GetAmount() *pkl.Object { + return rcv.Amount +} diff --git a/pkg/orm/transactions/MsgStakingCreateValidator.pkl.go b/pkg/orm/transactions/MsgStakingCreateValidator.pkl.go new file mode 100644 index 000000000..d904a71c6 --- /dev/null +++ b/pkg/orm/transactions/MsgStakingCreateValidator.pkl.go @@ -0,0 +1,77 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingCreateValidator interface { + Msg + + GetDescription() *pkl.Object + + GetCommission() *pkl.Object + + GetMinSelfDelegation() string + + GetDelegatorAddress() string + + GetValidatorAddress() string + + GetPubkey() *pkl.Object + + GetValue() *pkl.Object +} + +var _ MsgStakingCreateValidator = (*MsgStakingCreateValidatorImpl)(nil) + +// Staking module messages +type MsgStakingCreateValidatorImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + Description *pkl.Object `pkl:"description"` + + Commission *pkl.Object `pkl:"commission"` + + MinSelfDelegation string `pkl:"minSelfDelegation"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorAddress string `pkl:"validatorAddress"` + + Pubkey *pkl.Object `pkl:"pubkey"` + + Value *pkl.Object `pkl:"value"` +} + +// The type URL for the message +func (rcv *MsgStakingCreateValidatorImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingCreateValidatorImpl) GetDescription() *pkl.Object { + return rcv.Description +} + +func (rcv *MsgStakingCreateValidatorImpl) GetCommission() *pkl.Object { + return rcv.Commission +} + +func (rcv *MsgStakingCreateValidatorImpl) GetMinSelfDelegation() string { + return rcv.MinSelfDelegation +} + +func (rcv *MsgStakingCreateValidatorImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingCreateValidatorImpl) GetValidatorAddress() string { + return rcv.ValidatorAddress +} + +func (rcv *MsgStakingCreateValidatorImpl) GetPubkey() *pkl.Object { + return rcv.Pubkey +} + +func (rcv *MsgStakingCreateValidatorImpl) GetValue() *pkl.Object { + return rcv.Value +} diff --git a/pkg/orm/transactions/MsgStakingDelegate.pkl.go b/pkg/orm/transactions/MsgStakingDelegate.pkl.go new file mode 100644 index 000000000..9dd6fa824 --- /dev/null +++ b/pkg/orm/transactions/MsgStakingDelegate.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingDelegate interface { + Msg + + GetDelegatorAddress() string + + GetValidatorAddress() string + + GetAmount() *pkl.Object +} + +var _ MsgStakingDelegate = (*MsgStakingDelegateImpl)(nil) + +type MsgStakingDelegateImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorAddress string `pkl:"validatorAddress"` + + Amount *pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgStakingDelegateImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingDelegateImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingDelegateImpl) GetValidatorAddress() string { + return rcv.ValidatorAddress +} + +func (rcv *MsgStakingDelegateImpl) GetAmount() *pkl.Object { + return rcv.Amount +} diff --git a/pkg/orm/transactions/MsgStakingUndelegate.pkl.go b/pkg/orm/transactions/MsgStakingUndelegate.pkl.go new file mode 100644 index 000000000..ffc2395e6 --- /dev/null +++ b/pkg/orm/transactions/MsgStakingUndelegate.pkl.go @@ -0,0 +1,44 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +type MsgStakingUndelegate interface { + Msg + + GetDelegatorAddress() string + + GetValidatorAddress() string + + GetAmount() *pkl.Object +} + +var _ MsgStakingUndelegate = (*MsgStakingUndelegateImpl)(nil) + +type MsgStakingUndelegateImpl struct { + // The type URL for the message + TypeUrl string `pkl:"typeUrl"` + + DelegatorAddress string `pkl:"delegatorAddress"` + + ValidatorAddress string `pkl:"validatorAddress"` + + Amount *pkl.Object `pkl:"amount"` +} + +// The type URL for the message +func (rcv *MsgStakingUndelegateImpl) GetTypeUrl() string { + return rcv.TypeUrl +} + +func (rcv *MsgStakingUndelegateImpl) GetDelegatorAddress() string { + return rcv.DelegatorAddress +} + +func (rcv *MsgStakingUndelegateImpl) GetValidatorAddress() string { + return rcv.ValidatorAddress +} + +func (rcv *MsgStakingUndelegateImpl) GetAmount() *pkl.Object { + return rcv.Amount +} diff --git a/pkg/orm/transactions/Proposal.pkl.go b/pkg/orm/transactions/Proposal.pkl.go new file mode 100644 index 000000000..4a3e8bd62 --- /dev/null +++ b/pkg/orm/transactions/Proposal.pkl.go @@ -0,0 +1,11 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +// Base class for all proposals +type Proposal struct { + // The title of the proposal + Title string `pkl:"title"` + + // The description of the proposal + Description string `pkl:"description"` +} diff --git a/pkg/orm/transactions/Transactions.pkl.go b/pkg/orm/transactions/Transactions.pkl.go new file mode 100644 index 000000000..5a551b8c4 --- /dev/null +++ b/pkg/orm/transactions/Transactions.pkl.go @@ -0,0 +1,36 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Transactions struct { +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Transactions +func LoadFromPath(ctx context.Context, path string) (ret *Transactions, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Transactions +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Transactions, error) { + var ret Transactions + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/pkg/orm/transactions/TxBody.pkl.go b/pkg/orm/transactions/TxBody.pkl.go new file mode 100644 index 000000000..8a8c23263 --- /dev/null +++ b/pkg/orm/transactions/TxBody.pkl.go @@ -0,0 +1,17 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +// Represents a transaction body +type TxBody struct { + Messages []Msg `pkl:"messages"` + + Memo *string `pkl:"memo"` + + TimeoutHeight *int `pkl:"timeoutHeight"` + + ExtensionOptions *[]*pkl.Object `pkl:"extensionOptions"` + + NonCriticalExtensionOptions *[]*pkl.Object `pkl:"nonCriticalExtensionOptions"` +} diff --git a/pkg/orm/transactions/init.pkl.go b/pkg/orm/transactions/init.pkl.go new file mode 100644 index 000000000..211bc2e21 --- /dev/null +++ b/pkg/orm/transactions/init.pkl.go @@ -0,0 +1,27 @@ +// Code generated from Pkl module `transactions`. DO NOT EDIT. +package transactions + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("transactions", Transactions{}) + pkl.RegisterMapping("transactions#Proposal", Proposal{}) + pkl.RegisterMapping("transactions#MsgGovSubmitProposal", MsgGovSubmitProposalImpl{}) + pkl.RegisterMapping("transactions#MsgGovVote", MsgGovVoteImpl{}) + pkl.RegisterMapping("transactions#MsgGovDeposit", MsgGovDepositImpl{}) + pkl.RegisterMapping("transactions#MsgGroupCreateGroup", MsgGroupCreateGroupImpl{}) + pkl.RegisterMapping("transactions#MsgGroupSubmitProposal", MsgGroupSubmitProposalImpl{}) + pkl.RegisterMapping("transactions#MsgGroupVote", MsgGroupVoteImpl{}) + pkl.RegisterMapping("transactions#MsgStakingCreateValidator", MsgStakingCreateValidatorImpl{}) + pkl.RegisterMapping("transactions#MsgStakingDelegate", MsgStakingDelegateImpl{}) + pkl.RegisterMapping("transactions#MsgStakingUndelegate", MsgStakingUndelegateImpl{}) + pkl.RegisterMapping("transactions#MsgStakingBeginRedelegate", MsgStakingBeginRedelegateImpl{}) + pkl.RegisterMapping("transactions#MsgDidUpdateParams", MsgDidUpdateParamsImpl{}) + pkl.RegisterMapping("transactions#MsgDidAllocateVault", MsgDidAllocateVaultImpl{}) + pkl.RegisterMapping("transactions#MsgDidProveWitness", MsgDidProveWitnessImpl{}) + pkl.RegisterMapping("transactions#MsgDidSyncVault", MsgDidSyncVaultImpl{}) + pkl.RegisterMapping("transactions#MsgDidRegisterController", MsgDidRegisterControllerImpl{}) + pkl.RegisterMapping("transactions#MsgDidAuthorize", MsgDidAuthorizeImpl{}) + pkl.RegisterMapping("transactions#MsgDidRegisterService", MsgDidRegisterServiceImpl{}) + pkl.RegisterMapping("transactions#TxBody", TxBody{}) +} diff --git a/pkl/dwn.pkl b/pkl/dwn.pkl index 636baaab9..71947b28e 100644 --- a/pkl/dwn.pkl +++ b/pkl/dwn.pkl @@ -72,9 +72,6 @@ class Schema { @JsonField keyshare: String - @JsonField - publicKey: String - @JsonField profile: String } diff --git a/pkl/fmt.pkl b/pkl/fmt.pkl new file mode 100644 index 000000000..b20fdffa4 --- /dev/null +++ b/pkl/fmt.pkl @@ -0,0 +1,37 @@ +@go.Package { name = "github.com/onsonr/sonr/pkg/format" } + +module format + +import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" + +class JsonField extends go.Field { + structTags { + ["json"] = "%{name},omitempty" + } +} + +typealias DID = String + +typealias DIDMethod = "ipfs"|"sonr"|"bitcoin"|"ethereum"|"ibc"|"webauthn"|"dwn"|"service" + +class Macaroon { + @JsonField + location: String + + @JsonField + originator: String + + @JsonField + identifier: String + + @JsonField + first_party: List + + @JsonField + third_party: List + + @JsonField + expiration: Int +} + +typealias MacaroonToken = String diff --git a/pkl/orm.pkl b/pkl/orm.pkl index b71100c9f..a7718c8bb 100644 --- a/pkl/orm.pkl +++ b/pkl/orm.pkl @@ -1,6 +1,6 @@ @go.Package { name = "github.com/onsonr/sonr/pkg/orm" } -module models +module orm import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" @@ -273,4 +273,3 @@ class Profile { db_name: String = "vault" db_version: Int = 1 - diff --git a/pkl/txns.pkl b/pkl/txns.pkl index e658489b1..0852eebea 100644 --- a/pkl/txns.pkl +++ b/pkl/txns.pkl @@ -1,4 +1,4 @@ -@go.Package { name = "github.com/onsonr/sonr/internal/orm/transactions" } +@go.Package { name = "github.com/onsonr/sonr/pkg/orm/transactions" } module transactions diff --git a/proto/vault/v1/genesis.proto b/proto/vault/v1/genesis.proto index 8b857091b..cd59d66d8 100644 --- a/proto/vault/v1/genesis.proto +++ b/proto/vault/v1/genesis.proto @@ -32,6 +32,5 @@ message Schema { string jwk = 6; string grant = 7; string keyshare = 8; - string publicKey = 9; - string profile = 10; + string profile = 9; } diff --git a/x/vault/keeper/keeper.go b/x/vault/keeper/keeper.go index 2efd8f0b3..470200856 100644 --- a/x/vault/keeper/keeper.go +++ b/x/vault/keeper/keeper.go @@ -101,7 +101,6 @@ func (k Keeper) CurrentSchema(ctx sdk.Context) (*dwn.Schema, error) { Jwk: schema.Jwk, Grant: schema.Grant, Keyshare: schema.Keyshare, - PublicKey: schema.PublicKey, Profile: schema.Profile, }, nil } diff --git a/x/vault/types/genesis.go b/x/vault/types/genesis.go index d95f64e07..1cbf2defd 100644 --- a/x/vault/types/genesis.go +++ b/x/vault/types/genesis.go @@ -49,9 +49,6 @@ func (s *Schema) Equal(that *Schema) bool { if s.Keyshare != that.Keyshare { return false } - if s.PublicKey != that.PublicKey { - return false - } if s.Profile != that.Profile { return false } diff --git a/x/vault/types/genesis.pb.go b/x/vault/types/genesis.pb.go index 7c51bc420..643c99572 100644 --- a/x/vault/types/genesis.pb.go +++ b/x/vault/types/genesis.pb.go @@ -139,8 +139,7 @@ type Schema struct { Jwk string `protobuf:"bytes,6,opt,name=jwk,proto3" json:"jwk,omitempty"` Grant string `protobuf:"bytes,7,opt,name=grant,proto3" json:"grant,omitempty"` Keyshare string `protobuf:"bytes,8,opt,name=keyshare,proto3" json:"keyshare,omitempty"` - PublicKey string `protobuf:"bytes,9,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - Profile string `protobuf:"bytes,10,opt,name=profile,proto3" json:"profile,omitempty"` + Profile string `protobuf:"bytes,9,opt,name=profile,proto3" json:"profile,omitempty"` } func (m *Schema) Reset() { *m = Schema{} } @@ -232,13 +231,6 @@ func (m *Schema) GetKeyshare() string { return "" } -func (m *Schema) GetPublicKey() string { - if m != nil { - return m.PublicKey - } - return "" -} - func (m *Schema) GetProfile() string { if m != nil { return m.Profile @@ -255,35 +247,34 @@ func init() { func init() { proto.RegisterFile("vault/v1/genesis.proto", fileDescriptor_4c971b352fb6cc17) } var fileDescriptor_4c971b352fb6cc17 = []byte{ - // 440 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0xb1, 0x6f, 0xd3, 0x40, - 0x14, 0xc6, 0xed, 0xb6, 0x71, 0x93, 0xd7, 0x0e, 0xe5, 0x54, 0xa1, 0x23, 0x42, 0x0e, 0xaa, 0x18, - 0x2a, 0x06, 0x5b, 0x85, 0x0d, 0xa1, 0x4a, 0x54, 0x42, 0x0c, 0x2c, 0xc8, 0xdd, 0x58, 0xa2, 0xcb, - 0xf5, 0xd5, 0x39, 0xea, 0xdc, 0x59, 0x77, 0x17, 0x43, 0x76, 0x26, 0x26, 0x46, 0xc6, 0xfe, 0x01, - 0x0c, 0xfc, 0x19, 0x1d, 0x3b, 0x32, 0x21, 0x94, 0x0c, 0xf0, 0x67, 0x20, 0xbf, 0x73, 0x20, 0xea, - 0x72, 0x7a, 0xdf, 0xef, 0xfb, 0xfc, 0xf4, 0xdd, 0xc9, 0x70, 0xbf, 0x11, 0xf3, 0xca, 0xe7, 0xcd, - 0x49, 0x5e, 0xa2, 0x46, 0xa7, 0x5c, 0x56, 0x5b, 0xe3, 0x0d, 0xeb, 0x13, 0xcf, 0x9a, 0x93, 0xe1, - 0x3d, 0x31, 0x53, 0xda, 0xe4, 0x74, 0x06, 0x73, 0x78, 0x58, 0x9a, 0xd2, 0xd0, 0x98, 0xb7, 0x53, - 0xa0, 0x47, 0xa7, 0xb0, 0xff, 0x3a, 0xec, 0x38, 0xf7, 0xc2, 0x23, 0xcb, 0x20, 0xa9, 0x85, 0x15, - 0x33, 0xc7, 0xe3, 0x47, 0xf1, 0xf1, 0xde, 0xd3, 0x83, 0x6c, 0xbd, 0x33, 0x7b, 0x4b, 0xfc, 0x6c, - 0xe7, 0xe6, 0xe7, 0x28, 0x2a, 0xba, 0xd4, 0xd1, 0xb7, 0x18, 0x92, 0x60, 0xb0, 0x11, 0xec, 0xa9, - 0xfa, 0xd2, 0x8d, 0x85, 0xf4, 0xaa, 0x41, 0xfa, 0xbe, 0x5f, 0x40, 0x8b, 0x5e, 0x12, 0x61, 0x2f, - 0x60, 0x58, 0x19, 0x29, 0xaa, 0xb1, 0xc5, 0x52, 0x39, 0x6f, 0x85, 0x57, 0x46, 0x8f, 0x51, 0x8b, - 0x49, 0x85, 0x17, 0x7c, 0x8b, 0xf2, 0x9c, 0x12, 0xc5, 0x46, 0xe0, 0x55, 0xf0, 0xd9, 0x31, 0x24, - 0x4e, 0x4e, 0x71, 0x26, 0xf8, 0xce, 0xdd, 0x66, 0xe7, 0xc4, 0x8b, 0xce, 0x7f, 0xfe, 0xe0, 0xeb, - 0xf5, 0x28, 0xfa, 0x73, 0x3d, 0x8a, 0x3f, 0xff, 0xfe, 0xfe, 0x64, 0x3f, 0xbc, 0x55, 0x57, 0xf7, - 0xd3, 0x16, 0x24, 0x21, 0xcd, 0x38, 0xec, 0x36, 0x68, 0x9d, 0x32, 0x9a, 0xaa, 0xf6, 0x8a, 0xb5, - 0x6c, 0x1d, 0x21, 0xa5, 0x99, 0x6b, 0x4f, 0xa5, 0x06, 0xc5, 0x5a, 0xb2, 0x43, 0xe8, 0x09, 0xe7, - 0xd0, 0xf3, 0x6d, 0xe2, 0x41, 0xb4, 0x54, 0x4e, 0x85, 0xd2, 0x54, 0x6c, 0x50, 0x04, 0xc1, 0x52, - 0x00, 0x69, 0xf1, 0x02, 0xb5, 0x57, 0xa2, 0xe2, 0x3d, 0xb2, 0x36, 0x08, 0x3b, 0x80, 0xed, 0xf7, - 0x1f, 0xae, 0x78, 0x42, 0x46, 0x3b, 0xb6, 0x7b, 0x4a, 0x2b, 0xb4, 0xe7, 0xbb, 0x61, 0x0f, 0x09, - 0x36, 0x84, 0xfe, 0x15, 0x2e, 0xdc, 0x54, 0x58, 0xe4, 0x7d, 0x32, 0xfe, 0x69, 0xf6, 0x10, 0x06, - 0xf5, 0x7c, 0x52, 0x29, 0xf9, 0x06, 0x17, 0x7c, 0x40, 0xe6, 0x7f, 0xd0, 0xde, 0xa3, 0xb6, 0xe6, - 0x52, 0x55, 0xc8, 0x21, 0xdc, 0xa3, 0x93, 0x67, 0xa7, 0x37, 0xcb, 0x34, 0xbe, 0x5d, 0xa6, 0xf1, - 0xaf, 0x65, 0x1a, 0x7f, 0x59, 0xa5, 0xd1, 0xed, 0x2a, 0x8d, 0x7e, 0xac, 0xd2, 0xe8, 0xdd, 0xe3, - 0x52, 0xf9, 0xe9, 0x7c, 0x92, 0x49, 0x33, 0xcb, 0x8d, 0x76, 0x46, 0xdb, 0x9c, 0x8e, 0x8f, 0x79, - 0x78, 0x47, 0xbf, 0xa8, 0xd1, 0x4d, 0x12, 0xfa, 0x79, 0x9e, 0xfd, 0x0d, 0x00, 0x00, 0xff, 0xff, - 0x57, 0x11, 0x84, 0xf3, 0x89, 0x02, 0x00, 0x00, + // 423 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0xb1, 0x6e, 0xd4, 0x40, + 0x10, 0x86, 0xbd, 0x24, 0xe7, 0xdc, 0x6d, 0x52, 0x84, 0x55, 0x84, 0x96, 0x2b, 0x7c, 0x28, 0xa2, + 0x88, 0x28, 0x6c, 0x05, 0x3a, 0x84, 0x22, 0x11, 0x09, 0xd1, 0x22, 0xa7, 0xa3, 0x39, 0xcd, 0x6d, + 0x26, 0xbe, 0x25, 0xbe, 0x5d, 0x6b, 0x77, 0xcf, 0x90, 0x57, 0xa0, 0xa2, 0xa4, 0xcc, 0x03, 0x50, + 0xf0, 0x18, 0x29, 0x53, 0x52, 0x21, 0x74, 0x27, 0x01, 0x8f, 0x81, 0x3c, 0xeb, 0x43, 0x51, 0x9a, + 0xd5, 0xfc, 0xdf, 0xff, 0x7b, 0xf4, 0x6b, 0x64, 0xfe, 0xa8, 0x85, 0x65, 0x1d, 0x8a, 0xf6, 0xb8, + 0xa8, 0xd0, 0xa0, 0xd7, 0x3e, 0x6f, 0x9c, 0x0d, 0x56, 0x0c, 0x89, 0xe7, 0xed, 0xf1, 0xf8, 0x21, + 0x2c, 0xb4, 0xb1, 0x05, 0xbd, 0xd1, 0x1c, 0x1f, 0x54, 0xb6, 0xb2, 0x34, 0x16, 0xdd, 0x14, 0xe9, + 0xe1, 0x09, 0xdf, 0x7b, 0x1b, 0x77, 0x9c, 0x05, 0x08, 0x28, 0x72, 0x9e, 0x36, 0xe0, 0x60, 0xe1, + 0x25, 0x7b, 0xc2, 0x8e, 0x76, 0x9f, 0xef, 0xe7, 0x9b, 0x9d, 0xf9, 0x3b, 0xe2, 0xa7, 0xdb, 0x37, + 0x3f, 0x27, 0x49, 0xd9, 0xa7, 0x0e, 0xbf, 0x31, 0x9e, 0x46, 0x43, 0x4c, 0xf8, 0xae, 0x6e, 0x2e, + 0xfc, 0x14, 0x54, 0xd0, 0x2d, 0xd2, 0xf7, 0xc3, 0x92, 0x77, 0xe8, 0x35, 0x11, 0xf1, 0x8a, 0x8f, + 0x6b, 0xab, 0xa0, 0x9e, 0x3a, 0xac, 0xb4, 0x0f, 0x0e, 0x82, 0xb6, 0x66, 0x8a, 0x06, 0x66, 0x35, + 0x9e, 0xcb, 0x07, 0x94, 0x97, 0x94, 0x28, 0xef, 0x04, 0xde, 0x44, 0x5f, 0x1c, 0xf1, 0xd4, 0xab, + 0x39, 0x2e, 0x40, 0x6e, 0xdf, 0x6f, 0x76, 0x46, 0xbc, 0xec, 0xfd, 0x97, 0x8f, 0xbf, 0x5e, 0x4f, + 0x92, 0xbf, 0xd7, 0x13, 0xf6, 0xf9, 0xcf, 0xf7, 0x67, 0x7b, 0xf1, 0x56, 0x7d, 0xdd, 0xdf, 0x8c, + 0xa7, 0x31, 0x2d, 0x24, 0xdf, 0x69, 0xd1, 0x79, 0x6d, 0x0d, 0x55, 0x1d, 0x94, 0x1b, 0xd9, 0x39, + 0xa0, 0x94, 0x5d, 0x9a, 0x40, 0xa5, 0x46, 0xe5, 0x46, 0x8a, 0x03, 0x3e, 0x00, 0xef, 0x31, 0xc8, + 0x2d, 0xe2, 0x51, 0x74, 0x54, 0xcd, 0x41, 0x1b, 0x2a, 0x36, 0x2a, 0xa3, 0x10, 0x19, 0xe7, 0xca, + 0xe1, 0x39, 0x9a, 0xa0, 0xa1, 0x96, 0x03, 0xb2, 0xee, 0x10, 0xb1, 0xcf, 0xb7, 0x3e, 0x7c, 0xbc, + 0x94, 0x29, 0x19, 0xdd, 0xd8, 0xed, 0xa9, 0x1c, 0x98, 0x20, 0x77, 0xe2, 0x1e, 0x12, 0x62, 0xcc, + 0x87, 0x97, 0x78, 0xe5, 0xe7, 0xe0, 0x50, 0x0e, 0xc9, 0xf8, 0xaf, 0xbb, 0xa6, 0x8d, 0xb3, 0x17, + 0xba, 0x46, 0x39, 0x8a, 0x4d, 0x7b, 0x79, 0x7a, 0x72, 0xb3, 0xca, 0xd8, 0xed, 0x2a, 0x63, 0xbf, + 0x56, 0x19, 0xfb, 0xb2, 0xce, 0x92, 0xdb, 0x75, 0x96, 0xfc, 0x58, 0x67, 0xc9, 0xfb, 0xa7, 0x95, + 0x0e, 0xf3, 0xe5, 0x2c, 0x57, 0x76, 0x51, 0x58, 0xe3, 0xad, 0x71, 0x05, 0x3d, 0x9f, 0x8a, 0x78, + 0xa9, 0x70, 0xd5, 0xa0, 0x9f, 0xa5, 0xf4, 0x7b, 0xbc, 0xf8, 0x17, 0x00, 0x00, 0xff, 0xff, 0xb6, + 0xf1, 0x38, 0xc9, 0x6b, 0x02, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -429,13 +420,6 @@ func (m *Schema) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Profile) i = encodeVarintGenesis(dAtA, i, uint64(len(m.Profile))) i-- - dAtA[i] = 0x52 - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.PublicKey))) - i-- dAtA[i] = 0x4a } if len(m.Keyshare) > 0 { @@ -573,10 +557,6 @@ func (m *Schema) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } l = len(m.Profile) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) @@ -1072,38 +1052,6 @@ func (m *Schema) Unmarshal(dAtA []byte) error { m.Keyshare = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) } diff --git a/x/vault/types/params.go b/x/vault/types/params.go index 482089089..29025de03 100644 --- a/x/vault/types/params.go +++ b/x/vault/types/params.go @@ -40,7 +40,6 @@ func DefaultSchema() *Schema { Jwk: "++, kty, crv, x, y, n, e", Grant: "++, subject, controller, origin, token, scopes, createdAt, updatedAt", Keyshare: "++, id, data, role, createdAt, lastRefreshed", - PublicKey: "++, role, algorithm, encoding, curve, key_type, raw, jwk", Profile: "++, id, subject, controller, originUri, publicMetadata, privateMetadata, createdAt, updatedAt", } }